Cloud Pak for Business Automation

 View Only

Part 1: Set up the prerequisites for ODM CP4A enterprise deployment (20.0.3)

By Lawrence Louie posted Wed February 10, 2021 06:18 PM

  
Authors: Lawrence Louie, Xiao Hua Lu
Reviewers:  Adam Davis, Alain Robert, Yan Fen Guo


This is a step-by-step guide to help you install the prerequisites that you need for Cloud Pak for Automation deployment on ODM 20.0.3 on Red Hat Openshift Container Platform (OCP) 4.6. You do not need to have expert knowledge of OCP.  


The first thing to do is to download the devOp tools. You also need two users, ocadmin and user1
 - ocadmin has the OpenShift cluster-admin role.
 - user1 is a regular OpenShift user.


Before you begin:

1. Make sure your environment meets the system requirements (Operating System, Browser, Database, and so on).
2. Make sure your computer is able to access the internet. 
3. Make sure you have operating system administrative rights to create users on the system and also have kubeadmin to access the kubernetes cluster. 
4. Make sure you already have the storage classes setup for your OCP cluster.  


Installing the prerequisites:

1. Open a Secure Shell to a node on your cluster
ssh root@<ip address of your node>

2. Install some necessary tools by running a yum command
yum install git httpd-tools podman -y

3. Create the two users: admin user and regular user

Log in to your OCP cluster with your kubeadmin credentials and get the token from the "Copy Login Command."

token


A token key is generated, which you must save.  This token will expired in 24 hours.

In your shell, enter the copied Login token you have earlier, ex: oc login --token=....  --server=..... :6443

Create the ocadmin and user1 with the password using the following command:
 htpasswd -c -B -b users.htpasswd ocadmin ocadmin
 htpasswd -B -b users.htpasswd user1 user1

Create the secret with the user id/password file link to openshift.
oc create secret generic htpass-secret --from-file=htpasswd=users.htpasswd -n openshift-config

Create the htpasswd-cr.yaml file and put the content below into the file. 
apiVersion: config.openshift.io/v1
kind: OAuth
metadata:
  name: cluster
spec:
  identityProviders:
  - name: my_htpasswd_provider
    mappingMethod: claim
    type: HTPasswd
    htpasswd:
      fileData:
        name: htpass-secret

Complete the configuration of the identify provider
oc apply -f htpasswd-cr.yaml

Create the ocadmin/cp4auser user to openshift with the following commands
oc create user ocadmin
oc create user user1​

Grant the ocadmin user with the cluster admin privilege

oc adm policy add-cluster-role-to-user cluster-admin ocadmin​

Next step: 

After completing all of these steps, you are ready to move to part 2. 

In part 2, you will setup your Operational Decision Manager deployment using the deployment script and the enterprise decisions pattern. 


#CloudPakforBusinessAutomation
#OperationalDecisionManager(ODM)
#whatsnew
0 comments
94 views

Permalink