Deployment of IBM Urban Code Deploy

IBM Urban Code Deploy is a tool to automate deployments. As is typical with many software tools, they need to be installed in order to use them.

Naturally, product documentation is available and that was my starting point when I started to learn about UCD. There is UCD docker container, but at the time it is not the latest version so I had to install UCD by following product documentation.

(By the way, there is 60-day UCD trial available for download and link to it is in this page.)

But instead of just installing, I decided to create a PureApplication pattern of UCD.

The point of patterns is that software is not deployed in a traditional way (that is, manual/scripted installs). Patterns describe the topology of the software including deployment and configuration and the result is that patterns are used to automatically deploy software repeatedly and flawlessly.

PureApplication patterns describe the topology and beneath the surface, pattern is just a JSON file. Patterns have also beneficial side effect: the pattern can be viewed as instructions how to install UCD in case PureApplication is not used.

Urban code deploy pattern

The image below is screenshot of UCD pattern in PureApp pattern editor.

ucd_pattern

Pretty straight-forward. Pattern describes UCD installation having two RHEL 7 virtual machines and several script packages that configure RHEL and install UCD.

The image below shows the ordering of deployment.

ucd_pattern_2

Again, very straight-forward.

When the pattern is ready, it is deployed to PureApplication, whether on-premise or off-premise or both. The image below shows history of deployment.

ucd_pattern_3

The deployment took about 10 minutes and that’s just fine. With this pattern deployment, I can deploy new UCD instances when needed.

Script packages

Script packages are core components of the pattern. They are nothing more than zipped packages with file called cbscript.json and all the scripts that are required to do whatever needed. Below is a sample of one cbscript.json file.

[
   {
      "name": "UCD6.2.1.1_SERVER_install",
      "version": "1.0.0.0",
      "execmode": 0,
      "type": "APPLICATION",
      "description": "Install and start UCD 6.2.1.1 Server component",
      "location": "/scripts/ucd_install",
      "command": "sh setup.sh",
      "ostype": "linux/unix",
      "keys": [
         {
            "type": "password",
            "scriptkey": "UCD_SERVER_ADMIN_PASSWORD",
            "scriptdefaultvalue": "",
            "description": "Password for UCD \"admin\" user",
            "locked": false,
            "required": true
         },
             {
            "type": "string",
            "scriptkey": "UCDSERVER_BINARY_URL",
            "scriptdefaultvalue": "http://10.250.64.26/UrbanCodeDeploy6.2.1.1_TRIAL/URBANCODE_DEPLOY_6.2.1.1_EN_EVAL.zip",
            "description": "URL for UCD server binary file.",
            "locked": false,
            "required": true
         }
      ]
   }
]

The scripts that make up the script package are plain old scripts, for example bash-scripts. Below is an excerpt of setup.sh script that downloads UCD binary and installs it.

INSTALL_DIR=/ibm-ucd-install
cd $INSTALL_DIR

#modify install properties file
INSTALL_PROPS=install.properties

PASSWORD=$UCD_SERVER_ADMIN_PASSWORD

echo nonInteractive=true >> $INSTALL_PROPS
echo server.initial.password=$PASSWORD >> $INSTALL_PROPS
echo hibernate.connection.password >> $INSTALL_PROPS

./install-server.sh

echo "UCD server installed."

download, Import and use

This UCD pattern and scripts are in GitHub and you need to import them to PureApp to start using them.

Use CLI and command:

pureconsole.sh -f import_pattern_dir.py patterns/UrbanCodeDeploy_Server_6.2.1.1_Trial

to import pattern and script packages.

Prereqs for the pattern are that you need to have PureApp 2.1 or later and RHEL 7 image, HTTP server where UCD trial binary can be downloaded and UCD agent plugin. See the pattern/script sources for details.

Leave a Reply

Your email address will not be published. Required fields are marked *