DPBuddy: Command-Line Tool for IBM DataPower Administration and DevOps

DataPower Buddy (“DPBuddy”) is a tool for automating the administration and management of IBM DataPower Gateways. The tool supports configuration export, configuration import, file transfer, backups, crypto and certificate management, and many other functions.

Each function is implemented as a command that can be run directly from the command line/shell and as a custom task for the Apache Ant build tool.

For example, to import a domain, you can run the following command:

dpbuddy import -file domain.zip -assertObjectsUp -save

This command will import the configuration and files contained in “domain.zip”, verify that all objects and services are up and running after the import and save the domain’s configuration.

To implement the same functionality in an Ant build script, you could create an Ant target containing the dp:import task (all DPBuddy tasks have dp: XML namespace prefix):

<target name="import.domain" >
   <dp:import file="domain.zip" assertObjectsUp="true" save="true"  />
</target>

You can find many more examples in your DPBuddy distribution under samples or online. The directories samples/cli-shell and samples/cli-win contain CLI examples for Linux and Windows, respectively. The samples/ant-tasks folder contains examples of Ant tasks. You can also look at samples/ant-end-to-end and dp-build.deploy.xml, which implements an end-to-end build/deploy process using DPBuddy.

Any DPBuddy’s command can interact with multiple gateways or domains so you can automate most of your tasks with a single command.