IBM Cloud Pak System

 View Only

Derive more value out of your IBM Cloud Pak System by deploying Cloud Pak for Watson AIOps V3.2.0 using OpenShift Container Platform accelerator v4.9.0.0

By ANSHU Garg posted Wed May 11, 2022 11:30 PM

  

Overview

IBM Cloud Pak® for Watson AIOps is an AIOps platform that deploys advanced, explainable AI across the IT Operations (ITOps) toolchain so that you can confidently assess, diagnose, and resolve incidents across mission-critical workloads. To know more visit IBM Cloud Pak® for Watson AIOps documentation.

IBM Cloud Pak System(CPS) simplifies deployment of Cloud Paks offerings via OpenShift Container Platform accelerator. In few easy steps you can deploy any Cloud Pak on OpenShift accelerator in CPS.

Introduction

This tutorial walks you through the high level steps to deploy a small size instance of Cloud Pak for Watson AIOps V3.2.0  (AI manager) on Red Hat OpenShift Container Platform V4.9 from IBM Cloud Pak System V2.3.3.4. For production planning and  install steps please refer to documentation for Cloud Pak for Watson AIOps.

Before you begin you'll need to deploy OpenShift Container Platform using OpenShift Container Platform accelerator V4.9.0.0 in CPS. Visit best practices article to plan your OpenShift cluster installation for Cloud Pak for Watson AIOps.

This tutorial is based on the following assumptions:

  • The IBM Cloud Pak System is at V2.3.3.4 firmware
  • Availability of internet connectivity
  • Entitled to OpenShift Container Platform accelerator V4.9.0.0
  • Entitled to Cloud Pak for Watson AIOps V3.2.0

Before you deploy your first IBM Cloud Pak for Watson AIOps cluster on IBM Cloud Pak System, the following prerequisites need to be in place:

  • IBM Cloud Pak System V2.3.3.4
  • Red Hat subscriptions for RHEL and RHSS
            IBM Cloud Pak System comes with Red Hat subscriptions for RHEL and RHSS. Ensure you have enabled following repositories in satellite server. These are 
            prerequisite to deploy OpenShift cluster in CPS 2.3.3.4.
    •             ansible-2.9-for-rhel-8-x86_64-rpms
    •             rhel-8-for-x86_64-baseos-rpms
    •             rhel-8-for-x86_64-baseos-rpms
            
  • Active subscription with Red Hat for the OpenShift Container Platform
    Unlike the Red Hat subscription for RHEL and RHSS, the OpenShift Container Platform (OCP) subscription is not included with IBM Cloud Pak System. For detailed steps, see IBM Cloud Pak System Knowledge Center or "Prepare Red Hat Satellite Server" section from here.
  • License for IBM Cloud Pak for Watson AIOps
    IBM Cloud Pak for Watson AIOps license is not included with IBM Cloud Pak System. Procure it from https://www.ibm.com/account/us-en/.

    After you procure the license for IBM Cloud Pak for Watson AIOps V3.2.0, download IBM Cloud Pak System accelerator bundle for Red Hat Openshift V4.9.0.0 bundle from IBM Fix Central.

    Prerequisites

    Load and verify required artefacts on IBM Cloud Pak System V2.3.3.4

    By default, IBM Cloud Pak System V2.3.3.4 loads most of the required content on the system. The following list provides everything that you need to have in IBM Cloud Pak System before you start.

     Content artefact

     Type

     IBM Fix Central link

     IBM OS Image Red Hat LS V4.0.0.0 virtual machine

      Virtual Image

    IBM_OS_Image_Red Hat_LS_V4.0.0.0_VM-cps

     Foundation Pattern Type V2.1.19.0

      Accelerator

    foundation-2.1.19.0-cps

     Red Hat OS Update Service V1.0.17.0

      Accelerator

    rhus-1.0.17.0-cps

     Docker Pattern Type V1.0.15.1

      Accelerator

    docker-1.0.15.1-cps

     IBM Cloud Pak System accelerator bundle for Red Hat Openshift V4.9.0.0

      Accelerator bundle

    cps-openshift-4-9-0-0-intel

    Importing and verifying BYOL binaries

    To deploy OpenShift cluster for Cloud Pak for Watson AIOps, it is required to have BYOL binaries for OpenShift Container Platform V4.9.0.0. By default, these binaries are not available in IBM Cloud Pak System.  The process for loading the binaries has been documented here in the IBM Cloud Pak System Knowledge Center.

    Confirm that the following files are now visible from the IBM Cloud Pak System. Go to System > Storehouse browser and confirm that you see content shown in Figure 1.


                                                                                                                                               Figure 1

    Cloud Pak accelerator bundle import utility is available for OpenShift Container Platform V4.9.0.0 accelerator on IBM Cloud Pak System. It loads images to storehouse, clones the Red Hat Enterprise Linux CoreOS OVA with disk size of 16 GB and 120 GB, and makes them available in IBM Cloud Pak System Virtual Images catalog as shown in Figure 2. In addition, it also imports the accelerator into IBM Cloud Pak System.


                                                                                                                                               Figure 2


    Note:
    Only online (via entitled registry) installation of IBM Cloud Pak for Watson AIOps 3.2.0 is supported in IBM Cloud pak System 2.3.3.4; thus, no binaries for Cloud Pak are part of BYOL bundle.

    Importing and verifying accelerators

    The Cloud Pak accelerator bundle import utility (described in previous step) loads the pattern type to IBM Cloud Pak System too. After it is loaded, you should see the OpenShift 4.9.0.0 accelerator in the catalog with status available as show in Figure 3.


                                                                                                                                               Figure 3

    Deploying OpenShift with OpenShift Container Storage V4.9.0.0 accelerator

    First step towards deploying IBM Cloud Pak for Watson AIOps in CPS is to deploy OpenShift cluster. Refer to this article for detailed steps of deploying OpenShift Container Platform in IBM Cloud Pak System.

    NOTE: Ensure you deploy OCP version 4.8.12 using OpenShift with OpenShift Container Storage V4.9.0.0 accelerator.

    OpenShift CLI 

    To run some configuration changes, you'll need access to OCP cli tool (oc). This tool is set up out of the box on Primary helper VM of OpenShift instance that is deployed in CPS using OpenShift accelerator.


    IBM Cloud Pak for Watson AIOps deployment
    For detailed planning, requirements and installation steps refer to  IBM Cloud Pak for Watson AIOps documentation.

    Navigate to manage accelerator page in CPS UI  as shown in Figure 4.

    Manage accelerators menu option


                                                                                                                                               Figure 4
    Click on OpenShift cluster you deployed for installing Watson AIOps

    Retrieve kubeadmin password for OpenShift from instance as shown in Figure 5.

    get kubeadmin password


                                                                                                                                               Figure 5

    Navigate to OpenShift console from instance console list as shown in Figure 6.


                                                                                                                                               Figure 6

    Next login to OpenShift console using retrieved password and start with Cloud Pak deployment steps.

    Create a project 

    From your OpenShift console, click Home > Projects. Select Create Project, specify the Name of the project that you want to create, for example cp4waiops and click Create as shown in Figures 7.


                                                                                                                                               Figure 7

    Create the entitlement key secret

    Create a docker-registry secret to enable your deployment to pull the AI Manager images from the IBM® Entitled Registry.

    Note: Obtain the entitlement key that is assigned to your IBMid from MyIBM Container Software Library 

    From OpenShift console, click Workloads > Secrets.

    From the Project menu, select the project that you created earlier.

    Click the Create button, and select Image Pull Secret from the menu. The Create Image Pull Secret form is displayed. Enter the following values and then click Create as shown in Figure 8 and Figure 9.

    • Secret Name: ibm-entitlement-key
    • Authentication Type: Image Registry Credentials
    • Registry Server Address: cp.icr.io
    • Username: cp
    • Password: use the entitlement key that you obtained from MyIBM Container Software Library

                                                                                                                                               Figure 8



                                                                                                                                               Figure 9

    Create service account

    Create the topology service account with the entitlement key pull secret created in previous step.

    NOTE: Failing to create this service account will result in failure to bring  aiops-topology-cassandra-auth-secret-generator pod up and cause deployment to fail.

    Under User Management->ServiceAccounts, click Create ServiceAccount.

    In opened yaml view paste below content and click create.

    apiVersion: v1
    kind: ServiceAccount
    metadata:
      name: aiops-topology-service-account
      labels:
        managedByUser: 'true'
    imagePullSecrets:
      - name: ibm-entitlement-key


    Configure network policies


    Run the following command to update endpointPublishingStrategy.type in your ingresscontroller  to allow traffic from primary helper VM as root user.

    oc patch namespace default --type=json -p '[{"op":"add","path":"/metadata/labels","value":{"network.openshift.io/policy-group":"ingress"}}]'
    namespace/default patched
    


    Create the catalog source

    OpenShift cluster deployed (online deployment only) with accelerator version 4.9.0.0 in CPS 2.3.3.4 comes with catalog created. 

    Install Operator

    To install operator, refer to steps below also shown in Figure 10 for reference.

    • In OpenShift console, click Operators > OperatorHub. The OperatorHub page is displayed.
    • In the All Items field, enter IBM Cloud Pak for Watson AIOps AI Manager. The AI Manager operator is displayed.
    • Click the IBM Cloud Pak for Watson AIOps AI Manager tile. The IBM Cloud Pak for Watson AIOps AI Manager window is displayed.
    • Click Install. The Install Operator page is displayed.
    • Enter the following values:
    • Set the Namespace in which to install the Operator. Use the OwnNamespace mode and specify the project (namespace) that you created earlier.
    • Set Update Channel to v3.2.
    • Set Approval Strategy to Automatic.
    • Click Install and wait for the AI Manager operator to install.
    • Verify that the AI Manager operator is successfully installed.


                                                                                                                                               Figure 10

    Navigate to Operators > Installed Operators, and select your project from the Projects dropdown. AI Manager and its dependent operators in the project are listed with a status of Succeeded as shown in Figure 11.

                                                                                                                                               Figure 11


    Create custom resource

    Follow below steps to create custom resource.

    • From OpenShift console, click Operators > Installed Operators.
    • From the Project dropdown menu, select the project that you created earlier.
    • Select IBM Cloud Pak for Watson AIOps AI Manager operator, then click the IBM Cloud Pak for Watson AIOps AI Manager tab.
    • Click Create Installation as shown in Figure 12

                                                                                                                                               Figure 12
    • In the default Form View enter the following values as shown in Figure 13 - Figure 15.
      • Name: Specify the name that you want your AI Manager instance to be called.


                                                                                                                                               Figure 13

      • License: Expand the License section and toggle the License Acceptance switch to True to accept the license.
      • ReadWriteMany Storage Class: Set this to ocs-storagecluster-cephfs.
      • Large Block Storage Class: Set this to ocs-storagecluster-ceph-rbd
      • Image Pull Secret: Select the ibm-entitlement-key secret that you created.


                                                                                                                                               Figure 14

      • Size: Select the size that you require for your AI Manager installation.

                                                                                                                                               Figure 15
    Click create.


    Add the pull secret to the
    ibm-aiops-orchestrator operator.

    oc edit AIOpsAnalyticsOrchestrator aiops​

             NOTE: You may need to wait for few minutes before resource is available to be edited.

    Add below to spec section 

    pullSecrets:
      - ibm-aiops-pull-secret​

    Find the names of the aiops-ir-analytics pods by running the following command

    oc get pods -n <project> | grep aiops-ir-analytics
             Specify the project (namespace) that you created earlier, for example, cp4waiops in this article.

             NOTE: You may need to wait for few minutes before pods are available to be deleted.


    Restart the aiops-ir-analytics pods.

    oc delete pod <aiops-ir-analytics-pods> -n <project>​

             Specify the project (namespace) that you created earlier, for example, cp4waiops in this article

    It takes 15-20 minutes to deploy AIOps since it also deploys IBM foundation services. 

    Monitor progress by selecting the project that you specified for your AI Manager instance from the Project menu. Navigate to Operators>Installed Operators>IBM Cloud Pak for Watson AIOps AI Manager>IBM Cloud Pak for Watson AIOps AI Manager tab>Installations
    Listed instance must show Status as "Phase: Running" as shown in Figure 16.


                                                                                                                                               Figure 16

    Run below command to check details status of AIOps and components.

     oc -n ibm-common-services get secret platform-auth-idp-credentials -o jsonpath='{.data.admin_password}' | base64 -d
    yC199z5zJCvQS7get installations.orchestrator.aiops.ibm.com -A && echo "" &&  oc get ircore,AIOpsAnalyticsOrchestrator -A -o custom-columns="KIND:kind,NAMESPACE:metadata.namespace,NAME:metadata.name,STATUS:status.conditions[?(@.type==\"Ready\")].reason" && echo "" && oc get lifecycleservice -A -o custom-columns="KIND:kind,NAMESPACE:metadata.namespace,NAME:metadata.name,STATUS:status.conditions[?(@.type==\"Lifecycle Service Ready\")].reason" && echo "" && oc get BaseUI -A -o custom-columns="KIND:kind,NAMESPACE:metadata.namespace,NAME:metadata.name,STATUS:status.conditions[?(@.type==\"Ready\")].reason" && echo "" && oc get AIManager,aiopsedge,asm -A -o custom-columns="KIND:kind,NAMESPACE:metadata.namespace,NAME:metadata.name,STATUS:status.phase"


    All components should be Ready and/or Configured as shown in Figure 17.


                                                                                                                                               Figure 17

    Post installation

    Once installation is completed, verify installation is successful.

    Verify installation

    From Primary helper use OpenShift cli tool (oc) to run below command. It must show ibm-cp-watson-aiops PHASE as Running and aimanager as Completed. Refer to Figure 18 for example.

    -bash-4.2# oc get installations.orchestrator.aiops.ibm.com -A && oc get aimanager -A -o custom-columns="NAMESPACE:metadata.namespace,NAME:metadata.name,PHASE:status.phase"
    NAMESPACE   NAME                  PHASE     LICENSE    STORAGECLASS                STORAGECLASSLARGEBLOCK        AGE
    cp4waiops   ibm-cp-watson-aiops   Running   Accepted   ocs-storagecluster-cephfs   ocs-storagecluster-ceph-rbd   32m
    NAMESPACE   NAME        PHASE
    cp4waiops   aimanager   Completed
    -bash-4.2#
    




                                                                                                                                      Figure 18

    Note: It may take some time before aimanager show up as Completed. It can continue to show phase as Reconciling for some time. Run above command in some time again if it shows reconciling.

    Access AI Manager console

    Before you can access AI manager console, you need to find console URL, user name and password.

    To find console URL refer to Figure 19.  As shown, click IBM Cloud Pak for Administrator which will take you to Cloud Pak administrator console. 


                                                                                                                                                 
                                                                                                                                                 Figure 19

    Login with Cloud Pak user and password.

    To find user name run below command on Primary helper as root.

    -bash-4.2# oc -n ibm-common-services get secret platform-auth-idp-credentials -o jsonpath='{.data.admin_username}' | base64 -d && echo
    admin


    To find password run below command on Primary helper as root.

    -bash-4.2# oc -n ibm-common-services get secret platform-auth-idp-credentials -o jsonpath='{.data.admin_password}' | base64 -d
    QQh5XgLWthRRlod0532GnSXz4DohBvoE



    Once logged in to Cloud Pak Administration UI, use Cloud Pak switcher icon to navigate to Cloud Pak for AIOps console as shows in Figure 20.


                                                                                                                                                 Figure 20

    Figure 21 shows IBM Automation (cp4waiops) console URL. Click it to navigate to IBM Automation (cp4waiops)


                                                                                                                                                 Figure 21

    Figure 22 shows AIOps console.


                                                                                                                                                 Figure 22

    Cloud Pak for Watson AIOps (AI Manager) is ready and you are ready to simplify operations management and gain hidden insights with IBM Cloud Pak for Watson AIOps.






    0 comments
    8 views

    Permalink