Skip to content

Install automatically IBM Cloudpak for Data using Tekton Pipeline

Notifications You must be signed in to change notification settings

schabrolles/cpd-install-pipeline

Repository files navigation

cpd-install-pipeline

Install automatically IBM Cloudpak for Data using Tekton Pipeline

image

Prerequisite:

  • Openshift Cluster > 4.12
  • Openshift Pipeline Operator
  • Cluster can access to registries icr.io and cp.icr.io

Table of Content:

Installation

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

1- Adding helm repo to openshift to use Graphical Interface

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-installfor example.
  • Switch to developer view / add
  • Select Helm charts and search for cp-install
image
  • Click on Create
image
  • Select the Chart version you want.
  • if you Run on Power or Z, set the arch value before validating

1bis- Configuring cpd-install Tekton Pipeline from the cli

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 (only ppc64le or s390x) (arch="" means x86 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

Starting the pipeline

2- Starting pipeline with GUI

Note:

  • After having deploy the helm charts, verify that the tekton-patch pipeline ran successfuly.
  • This tekton-patch pipeline update the openshift-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.

pipeline-gui1

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

pipeline-gui2

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

pipeline-gui3

2bis- Starting pipeline from cli (by applying YAML)

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`
tkn pr logs -n <pipeline_name> --follow

About

Install automatically IBM Cloudpak for Data using Tekton Pipeline

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages