Installing IBM Cloud Paks using Daffy

Introduction

In this blog, I am going to install Cloud Pak for Data (CP4D), Cloud Pak for Business Automation (CP4BA), and Cloud Pak for Integration (CP4I) using Daffy (Deployment Automation Framework For You). Because I was unable to run Daffy using the Windows Subsystem for Linux (WSL), I provisioned a Linux Virtual Machine (VM) from the IBM Technology Zone, but, of course, you may use any other Linux VM or Linux box capable of running Daffy. As a side note, my laptop uses the Windows operating system, and I did use WSL to log in to the Linux VM. Please be aware that to use the IBM Technology Zone for provisioning clusters or VMs, you’ll need to create an account. Finally, do bear in mind that OpenShift is required for installing and using the Cloud Paks services.

Installation

Since I’ll be provisioning a Linux VM from the IBM Technology Zone, and because I am using Windows, I’ll be using WSL to log in to the Linux VM. Once the VM has been provisioned, the SSH key, username, public IP address, and port number associated with the VM will be required; please see the documentation provided with the VM. In addition to the information required for the VM, the cluster credential for logging in and an IBM entitlement key are required as well. At this point, execute each command below (bold black letters) in the given order to install the cloud paks services.

From the WSL, move to the default location for all user-specific ssh configuration and authentication files.
$ cd .ssh

Copy and paste the SSH key for the VM.
$ vi vm_ssh.pem
-----BEGIN RSA PRIVATE KEY-----
MIIJKgIBAAKCAgEArZ0XVA0ttHrNaKXRoZ9RRqyfEtnGC0mQQmkQjbdKuhWpP0tz
qygd1Bqj5DqTB7ee7m7e/nqsHkYJMATapKl2gBmy2+Tnj5+B4tLyFG2aFCspAVL5
ZNiNudTwzXJ1uhs+k9W2IpDQKrNH6T0yGMNZpXp/WkU/TBTTlS9S5NQbeo1N7YC4
..
KHRt5S/hbgwevyAHh1ZsbT2jpHeO5nQI/Fpikta/zg6YcQLTsZRcqngidbgKGCku
s4JtLA1r697K9bAkzVTb0cCivjYQUMGaMNfQ60RIXEp7XqQE6BY4/pRT2DHjZcAR
mgRT5B/IuManGJ7Fior7avQvsDPj1HADg7oW/HqDfNpys+lI6WZByd8XPGHP4g==
-----END RSA PRIVATE KEY-----
:wq!

Change the permission of the vm_ssh.pem file.
$ chmod 600 vm_ssh.pem

Move to the home directory.
$ cd ~

To login to the VM, use the username, public IP address, and port number given.
$ ssh username@IpAddress -p port -i ~/.ssh/vm_ssh.pem
...
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
...

At this point, you are logged in.
Run as root.
$ sudo -i

Download Daffy.
# wget http://get.daffy-installer.com/download-scripts/daffy-init.sh; chmod 777 daffy-init.sh; ./daffy-init.sh

Change directory.
# cd /data/daffy/env

Create a file for the daffy environment (using cloud-paks-env); ensure the name ends with -env.
Feel free to use one of the many sample files under the directory samples.
# vi cloud-paks-env.sh
############################################################
#Author           : Daffy CLI Configurator
#Modified Date    : 2022-10-19
############################################################
#Daffy Information Required
############################################################

#Make changes as required.
DAFFY_UNIQUE_ID="<e-mail>"
#This is required - Values POC/Demo/Enablement/HCCX/TechZone
#Make changes as required.
DAFFY_DEPLOYMENT_TYPE="TechZone"
ROKS_PROVIDER="techzone"
#If POC/Demo, these are required.
#ISC number must be 18 characters
#Make changes as required.
DAFFY_ISC_NUMBER="<###########>"
DAFFY_CUSTOMER_NAME="xxxxxxxxxxxxx"

#Core Values
#OpenShift Cluster info
#########################
#Make changes as required.
CLUSTER_NAME="<cluster-name>"
#This is required - Values aws-ipi/azure-ipi/gcp-ipi/vsphere-ipi/vsphere-upi/kvm-upi/roks-msp
OCP_INSTALL_TYPE="roks-msp"
OCP_RELEASE="4.10.39"
VM_TSHIRT_SIZE="Large"
VM_NUMBER_OF_WORKERS_LARGE="7"
 
DEBUG=false

#Cloud Pak for Data
#Make changes as required.
CP4D_VERSION="4.5.3"
CP4D_ENABLE_SERVICE_WKS="false"
CP4D_ENABLE_SERVICE_WKC="true"
CP4D_ENABLE_SERVICE_DV="false"
CP4D_ENABLE_SERVICE_SPSS="false"
CP4D_ENABLE_SERVICE_WS="false"
CP4D_ENABLE_SERVICE_WML="false"
CP4D_ENABLE_SERVICE_DATASTAGE="false"
CP4D_ENABLE_SERVICE_DODS="false"
CP4D_ENABLE_SERVICE_DMC="false"
CP4D_ENABLE_SERVICE_COGNOS_DASHBOARDS="false"
CP4D_ENABLE_SERVICE_MATCH_360="false"
CP4D_ENABLE_SERVICE_OPENPAGES="false"
CP4D_ENABLE_SERVICE_ANALYTICS_ENGINE="false"
CP4D_ENABLE_SERVICE_DB2_WAREHOUSE="false"
CP4D_ENABLE_SERVICE_DATAPRIVACY="false"
CP4D_ENABLE_SERVICE_COGNOS_ANALYTICS="false"
CP4D_ENABLE_SERVICE_DB2="true"

#Cloud Pak for Business Automation
#Make changes as required.
CP4BA_VERSION="22.0.1"
CP4BA_IFIX=IF003
CP4BA_DEPLOYMENT_STARTER_SERVICE="content"
#Prodution Services
###################################################
# CP4BA_DEPLOYMENT_PRODUCTION_DECISIONS="false"
#Prodution Services - only step 2 supported today.
###################################################
CP4BA_DEPLOYMENT_PRODUCTION_CONTENT="false"
CP4BA_DEPLOYMENT_PRODUCTION_WORKFLOW="false"
#RPA Server
############################################
CP4BA_ENABLE_SERVICE_RPA_SERVER="false"
CP4BA_RPA_SERVER_VERSION="21.0.5"

#Cloud Pak for Integration
#Make changes as required.
CP4I_VERSION="2022.2.1"
CP4I_ENABLE_SERVICE_ACEDESIGN="true"
CP4I_ENABLE_SERVICE_ACEDASH="true"
CP4I_ENABLE_SERVICE_MQHA="true"
:wq!

Move to the home directory.
# cd ~

Add the line in blue to the end of the file.
# vi ~/.bashrc
...
# Add this line
export PATH=$PATH:/usr/local/bin
:wq!

Reload the .bashrc settings without logging out.
# source ~/.bashrc

Note: You will need the oc admin login token as well as an IBM entitlement key.

Install oc, kubectl, and openshift-install tools on the local machine.
# /data/daffy/ocp/build.sh cloud-paks --installOpenShiftTools

Check if oc is installed; it should be.
(For informational purposes only; it is not required for the installation.)
# which oc
/usr/local/bin/oc

Precheck the OpenShift build.
If OCP is already installed, skip the next two steps.
# /data/daffy/ocp/build.sh cloud-paks --precheck

Deploy the cluster.
# /data/daffy/ocp/build.sh cloud-paks

Display cluster info.
(For informational purposes only; it is not required for the installation.)
# /data/daffy/ocp/build.sh cloud-paks --status

Login to the cluster.
# oc login --token=sha256~**************************** --server=https://******.us-east.containers.cloud.ibm.com:*****

Once logged in, precheck each service before installing it.
# /data/daffy/cp4d/build.sh cloud-paks --precheck

Once the precheck is successful, install the service.
# /data/daffy/cp4d/build.sh cloud-paks
Once the installation is complete, please make a copy of the information given by daffy since it will be required to login to the service. The information will be similar to this:
...
Here is the login info for the CP4D Navigator console
################################################################
Super User            :      admin
Password              :      ************
CP4D Web Console      :      https://cpd-cpd-instance.itz**ks-**********-ypzboy-****7f378ae81955**37d5f2ee142bd6-****.us-east.containers.appdomain.cloud
...

Repeat the commands for the other services.
# /data/daffy/cp4ba/build.sh cloud-paks --precheck

# /data/daffy/cp4ba/build.sh cloud-paks
For this service, no information is given.
...
##########################################################################################################
End Time: Tue Nov 22 13:52:50 CST 2022
CP4BA Build Completed in 5 minute(s) and 34 second(s)
##########################################################################################################
...

# /data/daffy/cp4i/build.sh cloud-paks --precheck

# /data/daffy/cp4i/build.sh cloud-paks
...

Here is the login info for the CP4I Navigator console:
################################################################
Super User            :      admin
Password              :      *******************************
CP4I Web Console      :      https://cpd-cp4i.it****s-66***22***-b****w-******378a*****53d37d5f2ee142bd6-****.us-south.containers.appdomain.cloud

Upon successfully completing all of the steps above, the services are installed and ready to be used. At this point, it is recommended to deprovision the VM so as not to incur unnecessary cost.

Conclusion

Daffy considerably simplifies the installation of cloud paks services, but, unfortunately, as of this writing not all services are supported by Daffy; however, the list of services supported by Daffy changes regularly. Finally, I would like to thank my colleague Don Bailey for helping me with Daffy, but, of course, I alone bear the blame for any errors or omissions.

Leave a Comment

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