Wednesday, 9 January 2019

IBM Cloud Automation Manager and the Case of the Missing Software

As per previous posts: -

Docker Secrets - And there's more ....



I am on another voyage of discovery, this time using IBM Cloud Automation Manager (CAM) to build out IBM middleware such as DB2, WebSphere Application Server and WebSphere Liberty Profile on VMs, hosted on the IBM Cloud ( aka SoftLayer ).

So, having got CAM up-and-running, and having learned a few lessons about building VMs ( the subject of the next few posts ), I started by attempting to build out a DB2 VM ....

This went smoothly, until I hit this exception: -

...
Error: Error applying plan:
1 error(s) occurred:
* camc_softwaredeploy.DB2Node01_db2_v111_install: 1 error(s) occurred:
* camc_softwaredeploy.DB2Node01_db2_v111_install: 
**********
Error: Response from pattern manager:
StatusCode:500
Message:
{
  "failures_found": [
    "10.143.162.16     Error executing action `run` on resource 'ruby_block[fixpack_packages_validation]'", 
    "10.143.162.16     RuntimeError", 
    "10.143.162.16     116:       rescue OpenSSL::SSL::SSLError", 
    "10.143.162.16 Chef Client failed. 0 resources updated in 02 seconds", 
    "10.143.162.16 [2019-01-09T00:11:54-06:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out", 
    "10.143.162.16 [2019-01-09T00:11:54-06:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report", 
    "10.143.162.16 [2019-01-09T00:11:54-06:00] FATAL: RuntimeError: ruby_block[fixpack_packages_validation] (db2::prereq_check line 99) had an error: RuntimeError: 404 Please make sure v11.1.2fp2_linuxx64_server_t.tar.gz is available in your binary repository"
  ], 
...

It took me but a little while to work out what I'd missed ...

Having built CAM, and the underlying IBM Cloud Private (ICP) platform, I somehow assumed that the requisite IBM software packages would magically download themselves from Passport Advantage, Fix Central etc.

Well, guess what ....

They did not :-)

Using this as inspiration: -

Managing a software repository


I downloaded the required DB2 binary, fix pack and activation kit: -

ls -al /tmp/v11.1.2fp2_linuxx64_server_t.tar.gz

-rw-r--r-- 1 root root 2092136927 Jun 15  2017 /tmp/v11.1.2fp2_linuxx64_server_t.tar.gz

ls -al /tmp/DB2_Svr_11.1_Linux_x86-64.tar.gz 

-rw-r--r-- 1 root root 1945576016 Jun 11  2016 /tmp/DB2_Svr_11.1_Linux_x86-64.tar.gz

ls -al /tmp/DB2_ESE_AUSI_Activation_11.1.zip 

-rw-r--r-- 1 root root 3993254 Jun  3  2016 /tmp/DB2_ESE_AUSI_Activation_11.1.zip

and placed the files in the requisite locations: -

cp /tmp/DB2_Svr_11.1_Linux_x86-64.tar.gz /opt/ibm/docker/software-repo/var/swRepo/private/db2/v111/base

cp /tmp/v11.1.2fp2_linuxx64_server_t.tar.gz /opt/ibm/docker/software-repo/var/swRepo/private/db2/v111/maint

unzip -j -p DB2_ESE_AUSI_Activation_11.1.zip \*db2ese_u.lic > /opt/ibm/docker/software-repo/var/swRepo/private/db2/v111/license

and validated the same: -

ls -R -al /opt/ibm/docker/software-repo/var/swRepo/private/db2/v111/

/opt/ibm/docker/software-repo/var/swRepo/private/db2/v111/:
total 20
drwxr-xr-x 4 root root 4096 Jan  9 20:55 .
drwxr-xr-x 4 root root 4096 Jan  8 19:30 ..
drwxr-xr-x 2 root root 4096 Jan  9 11:45 base
-rw-r--r-- 1 root root  913 Jan  9 20:54 license
drwxr-xr-x 2 root root 4096 Jan  9 14:51 maint

/opt/ibm/docker/software-repo/var/swRepo/private/db2/v111/base:
total 1899992
drwxr-xr-x 2 root root       4096 Jan  9 11:45 .
drwxr-xr-x 4 root root       4096 Jan  9 20:55 ..
-rw-r--r-- 1 root root 1945576016 Jan  9 11:46 DB2_Svr_11.1_Linux_x86-64.tar.gz

/opt/ibm/docker/software-repo/var/swRepo/private/db2/v111/maint:
total 2043116
drwxr-xr-x 2 root root       4096 Jan  9 14:51 .
drwxr-xr-x 4 root root       4096 Jan  9 20:55 ..
-rw-r--r-- 1 root root 2092136927 Jan  9 14:51 v11.1.2fp2_linuxx64_server_t.tar.gz

With the right files in the right place, guess what, the CAM build of a DB2 VM just flippin' worked :-)

No comments:

Note to self - use kubectl to query images in a pod or deployment

In both cases, we use JSON ... For a deployment, we can do this: - kubectl get deployment foobar --namespace snafu --output jsonpath="{...