Preparing storage on IBM Cloud Public (ROKS)

 Containers: 
 V20.0.0.2 
All instances of an operator on IBM Cloud® need a place to store its log files. If you plan to run the deployment script to generate a custom resource (CR), the script creates a persistent volume claim (PVC) and copies the JDBC drivers for you. However, if you manually compile the CR then you must review all of the steps.

Before you begin

Before you deploy an automation container on IBM Cloud, that is your target cluster platform is ROKS, you must configure your client environment and create an OpenShift cluster.

  1. If you do not have an account, create an account on IBM Cloud.
  2. If you do not already have a cluster, then create one. From the IBM Cloud Overview page, in the OpenShift Cluster tile, click Create Cluster. Refer to the IBM Cloud documentation to create a Kubernetes cluster. The cluster that you create includes attached storage.
  3. Make sure that you have the following list of software on your computer so you can use the command-line interfaces (CLIs). As an administrator of the cluster you must be able to interact with your environment.

About this task

You must prepare the storage of the operator before you create an instance of the operator.

Note: In 20.0.0.2, you can use the deployment script to create the operator instance or create it manually. Previously, you had to create it manually. If you choose to compile your CR file from a descriptor template, then you also need to manually install the operator and create the necessary storage for it.
You can attach endurance storage with gid storage classes. The deployment script creates the following classes, which define the reclaimPolicy to Retain for production environments.
  • cp4a-file-retain-bronze-gid
  • cp4a-file-retain-silver-gid
  • cp4a-file-retain-gold-gid

The YAML files to create these storage classes are provided in the descriptors folder.

Note: The link goes to the 20.0.3 branch on github.com. If you need a different version (20.0.2 IF001 or 20.0.2), switch the branch in the Switch branches/tags menu.
Important: If you plan to run the installation scripts and want to use the default storage, all you need to do in this task is to decide whether to create a new namespace here or use the setup cluster script to do it. If you do not intend to run the scripts, then complete all of the steps that apply to your configuration.
Important: If you plan to run the installation scripts and want to use the default storage, decide whether to create a new namespace before you run the scripts. You can create a namespace beforehand or when you run the setup cluster script. If you do not want to use the IBM Entitled Registry to pull the container images, then you need a namespace to load the images to a target registry. For more information, see Getting access to the container images on IBM Cloud Public (ROKS).

If you do not intend to run the scripts, then complete all of the steps that apply to your configuration.

Procedure

  1. Log in to your ROKS cluster.
    oc login --token=token --server=https://cluster_ip:port
  2. Create a project (cp4a-project) for the operator by running the following command.
    oc new-project project_name --description="description" --display-name="display_name"
  3.  V20.0.0.2  Add privileges to the projects.

    Grant ibm-anyuid-scc privileges to any authenticated user and grant ibm-privileged-scc privileges to any authenticated user.

    oc project project_name
    oc adm policy add-scc-to-group ibm-anyuid-scc system:authenticated
    oc adm policy add-scc-to-user ibm-privileged-scc system:authenticated
    Note: You need a privileged account to run the oc adm policy command. The project_name is the name of the project in the previous step. The project_name must have privileges to the registry where the images are loaded. The project_name must also have privileges to push the images into another namespace.
  4. Optional: If you want to create a storage class manually, then create a YAML file name it operator-sc.yaml.

    Refer to the YAML files provided in the descriptors folder.

  5. Optional: If you did the previous step, apply the new storage class.
    oc apply -f operator-sc.yaml
  6. Optional:  V20.0.0.2  If you want to create a fast storage class manually, then create a YAML file for the shared log volume, and name it operator-fast-sc.yaml.
  7. Optional:  V20.0.0.2  If you did the previous step, apply the new fast storage class.
    oc apply -f operator-fast-sc.yaml
  8. Optional: Create a claim for the PV dynamically by using the corresponding YAML file.

    Replace the storage classes with the names of the storage classes that you created.

  9. Optional: If you did the previous step, deploy the PVC.
    oc create -f descriptors/operator-shared-pvc.yaml
  10. Optional:  V20.0.0.2  If you intend to install Content Collector for SAP as an optional component of the Content Manager pattern, then you must download the necessary libraries and put them in a directory under cert-kubernetes/scripts.
    1. Make a saplibs directory in cert-kubernetes/scripts.
      Give read and write permissions to the directory by running the chmod command.
    2. Download the SAP Netweaver SDK 7.50 library from the SAP Service Marketplace.
    3. Download the SAP JCo Release 3.0.x from the SAP Service Marketplace.
    4. Extract all of the content of the packages to the saplibs directory.
    5. Check you have all of the following libraries.
      saplibs/
      ├── libicudata.so.50
      ├── libicudecnumber.so
      ├── libicui18n.so.50
      ├── libicuuc.so.50
      ├── libsapcrypto.so
      ├── libsapjco3.so
      ├── libsapnwrfc.so
      └── sapjco3.jar

Results

Wait for the confirmation message that the PVC is bound before you move to the next step.

What to do next

You can now set up your cluster manually or use the setup cluster script. For more information, see Setting up the cluster.