Install automatically IBM Cloudpak for Data using Tekton Pipeline
- Openshift Cluster > 4.12
- Openshift Pipeline Operator
- Cluster can access to registries icr.io and cp.icr.io
-
Installation
- GUI based: Using openshift web-console
- cli based: Using helm cli
-
Starting Pipeline
- GUI based: Using openshift pipeline graphical interface
- cli based: applying pipelineRun yaml file
The easiest way to install the pipeline is to add this helm registry to your openshift cluster.
You must have acces to internet for this.
For airgap mod, please use the helm cli and download the archive from release page
apply the following yaml to add the helm repo in openshift (with oc apply
or on the openshift console by clicking on the "+" button on the black banner at the top right-end corner of the screen.
apiVersion: helm.openshift.io/v1beta1
kind: HelmChartRepository
metadata:
name: cpd-install-pipeline
spec:
connectionConfig:
url: 'https://schabrolles.github.io/cpd-install-pipeline'
- Then create a project:
cp-install
for example. - Switch to developer view / add
- Select Helm charts and search for cp-install
- Click on Create
- Select the Chart version you want.
- if you Run on Power or Z, set the arch value before validating
After having installed the openshift-pipeline operator, use helm to deploy the tasks and pipeline in a namespace of your cluster.
- adding the helm repo
helm repo add cpd-install-pipeline https://schabrolles.github.io/cpd-install-pipeline
- deploying the pipeline configuration with helm-cli
helm install <name> cpd-install-pipeline/cpd-install-pipeline --create-namespace -n <namespace> [--set arch=(ppc64le|s390x)]
helm_chart
can be found in the release section.arch
optional value allows pipeline to be adapted for non x86 cluster (onlyppc64le
ors390x
) (arch=""
meansx86
which is the default when not set)
example:
helm install cpd-install cpd-install-pipeline/cpd-install-pipeline \
--create-namespace -n cpd-install --set arch=ppc64le
This will:
- create a project
cpd-install
- give the ::“cluster-admin”:: right to the “pipeline” service-account of this project
- create a tekton task “olm-utils” based on the official
olm-utils-v3
from IBM (icr.io) - create a tekton pipeline to install automatically the cloud pak for data
components
you choose
- 2- Using openshift pipeline graphical interface (GUI based)
- 2bis- applying pipelineRun yaml file (cli based)
- After having deploy the helm charts, verify that the
tekton-patch
pipeline ran successfuly.- This
tekton-patch
pipeline update theopenshift-pipelines
config to increase the default value from 1h to 5h (cp4d installation duration is 2h minimum).- If you want to update this parameter manually or if this pipeline failed you can change update this pipeline timeout parameter by using the following command:
oc set data -n openshift-pipelines cm/config-defaults default-timeout-minutes="300"
From the openshift console, enter in the project cpd-install
and select the tab “pipeline" from the menu on the left.
Click on the cpd-install pipeline.
On the next page, click on the action button on the right end side of the page and select “start”
This will open a forms to customize your installation.
- You need to provide at least your IBM Entitlement key
- You can change the version, name of namespaces or storageclass to use
- list of available component
- If you are not running a production service, set production to false
- if you don’t have GPUs but still want to deploy watsonx, set NO_GPU to true
click on Start
The full installation duration is about ~2h
It is possible to apply a PipelineRun YAML file to start the pipeline and set your variables.
An example of this yaml file is availble in the NOTES of this helm Chart. it can be print with the helm status <release_name>
command.
- Use
helm list
in your namespace to get the release name:
$ helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
cpd-install-pipeline cpd-install 5 2024-06-02 06:54:12.979372883 +0000 UTC deployed cpd-install-pipeline-1.4.3 1.4.3
- Run the
helm status ...
helm status cpd-install-pipeline
NAME: cpd-install-pipeline
LAST DEPLOYED: Sun Jun 2 06:54:12 2024
NAMESPACE: cpd-install
STATUS: deployed
REVISION: 5
TEST SUITE: None
NOTES:
Your Pipeline to install CPD on your cluster has been deployed.
you can use the openshift console to start the installation graphically
or use "oc create -f" with a PipelineRun yaml file. (example bellow)
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: cpd-install-
namespace: cpd-install
spec:
params:
- name: OLM_UTILS_IMAGE
value: icr.io/cpopen/cpd/olm-utils-v3
- name: VERSION
value: 5.0.0
- name: COMPONENTS
value: wml,ws
- name: PROJECT_CPD_INST_OPERANDS
value: cpd
- name: PROJECT_CPD_INST_OPERATORS
value: cpd-operators
- name: PROJECT_CERT_MANAGER
value: ibm-cert-manager
- name: PROJECT_LICENSE_SERVICE
value: ibm-licensing
- name: PROJECT_SCHEDULING_SERVICE
value: ibm-scheduler
- name: IBM_ENTITLEMENT_KEY
value: >>> PUT YOUR IBM ICR KEY HERE <<<
- name: STG_CLASS_BLOCK
value: ocs-storagecluster-ceph-rbd
- name: STG_CLASS_FILE
value: ocs-storagecluster-cephfs
- name: ENTITLEMENT
value: cpd-enterprise
- name: SCHEDULER
value: "false"
- name: PRODUCTION
value: "false"
- name: ACCEPT_LICENCE
value: "true"
- name: APPLY_MACHINECONFIG
value: 'true'
- name: DB2_LIMITED_PRIV
value: 'false'
- name: CASE_FROM_OCI
value: 'true'
- name: OCI_LOCATION
value: "icr.io/cpopen"
- name: NO_GPU
value: 'true'
- name: CP-INSTALL-OPTIONS
value: cpd-install-install-option
pipelineRef:
name: cpd-install
taskRunTemplate:
serviceAccountName: pipeline
timeouts:
pipeline: 5h0m0`
-
Use this sample (starting from apiversion) to create a yaml file.
-
Change the Parameters to fit to your needs:
- You need to provide at least your IBM Entitlement key (link to get your key)
- You can change the version, name of namespaces or storageclass to use
- list of available component
- If you are not running a production service, set production to false
- if you don’t have GPUs but still want to deploy watsonx, set NO_GPU to true
-
You can use openshift console to follow the pipeline. If you prefer you can download the
tkn
cli (https://docs.openshift.com/container-platform/4.15/cli_reference/tkn_cli/installing-tkn.html#installing-tkn)
tkn pr logs -n <pipeline_name> --follow