Option 2: Generating the custom resource with the deployment script

Depending on the capabilities that you want to install, the deployment script generates a custom resource file with the selected automation containers.

About this task

The script creates a custom resource (CR) file to deploy by the Cloud Pak operator. The deployment script prompts the user to enter values to get access to the container images and to select what is installed with the deployment.

If you ran the cp4a-prerequisites.sh script to prepare your databases and Kubernetes secrets from the same local cert-kubernetes directory, then the CP4BA capabilities you selected in this script are displayed when you run the deployment script. It is highly recommended that you use the cp4a-prerequisites.sh script before you run the deployment script, as it speeds up the time it takes to install and reduces the risk of error. For more information, see Recommended: Preparing databases and secrets for your chosen capabilities by running a script.

Note: The deployment script uses a custom resource (CR) template file for each pattern. The pattern template names include "production" and are found in the cert-kubernetes/descriptors/patterns folder. The CR files are configured by the deployment script. You can also use the appropriate CR template from the CASE package as your starting point and customize the YAML file instead of generating the CR with the script.
Remember: You can run the scripts only on an amd64/x86 machine. The Linux-based client machine can connect to a Linux on Z or a Linux on Power based cluster. If you cannot use an amd64/x86 machine, you can install your production deployment in the OpenShift console or start with a CR template file.

Procedure

  1. Log in to the cluster with the cluster administrator that you used in Option 1: Preparing your cluster for an online deployment or a non-administrator user who has access to the project.

    Using the Red Hat OpenShift CLI:

    oc login https://<cluster-ip>:<port> -u <cluster-admin> -p <password> 
  2. View the list of projects in your cluster to see the target project before you run the deployment script.
    oc get projects
    Note: If you used the All namespaces option to install the Cloud Pak operator, then you must have another project in addition to openshift-operators in the cluster before you create the deployment. Change the scope to the project that you created for your deployment (cp4ba-project).
    oc project <project_name>

    The specified project is used in all subsequent operations that manipulate project-scoped content.

  3. If you need to, download the cert-kubernetes repository to an amd64/x86 Linux® based VM/machine.

    For more information about downloading cert-kubernetes, see Option 1: Preparing your cluster for an online deployment.

  4. Run the deployment script from the local directory where you downloaded the cert-kubernetes repository, and follow the prompts in the command window.
    Note:

    Multiple capabilities can be selected and deployed in the same namespace. The script proposes new options each time you select a capability. Some capabilities are mutually exclusive, so these combinations are never proposed. For more information about the capabilities and their dependencies, see Capabilities for production deployments.

    If you select Workflow Runtime and Workstreams two server instances are created, one server for each capability. If you want to install both capabilities into one server instance, you need to create the CR by hand and use the fully customizable (FC) template (ibm_cp4a_cr_production_FC_workflow-workstreams.yaml).

    Warning: The script deletes any previously generated custom resource files under the cert-kubernetes/scripts/generated-cr folder. If you want to keep them, make copies of the YAML files somewhere else.
    cd cert-kubernetes/scripts
    ./cp4a-deployment.sh
    Remember: The cert-kubernetes folder is under [PATH_TO_EXTRACTED_FILES]/ibm-cp-automation/inventory/cp4aOperatorSDK/files/deploy/crs.
    1. Accept the license. You must agree to the license that is found in cert-kubernetes/LICENSE.
    2. If you already deployed a CP4BA FileNet Content Manager instance in your namespace, then select Yes. The default is No.
    3. If the cp4ba-prerequisites folder is not found under your scripts directory, then select a New installation type. If you ran the cp4a-prerequisites.sh script, then your capabilities selection is already captured.
    4. Select the Production deployment type.

      The cp4a-deployment.sh script checks your local file system for the property files that are created by the cp4a-prerequisites.sh script. If the following files are found, then the script assumes that you ran the cp4a-prerequisites.sh script, generated the database scripts and secrets, and validated that the property values that you entered are correct for your deployment.

      cert-kubernetes/scripts/.tmp/.TEMPORARY.property
      cert-kubernetes/scripts/cp4ba-prerequisites/propertyfile/cp4ba_db_name_user.property
      cert-kubernetes/scripts/cp4ba-prerequisites/propertyfile/cp4ba_db_server.property
      cert-kubernetes/scripts/cp4ba-prerequisites/propertyfile/cp4ba_LDAP.property
      cert-kubernetes/scripts/cp4ba-prerequisites/propertyfile/cp4ba_user_profile.property
    5. Set the deployment profile to the size that you want to use for your deployment. The default is small.
    6. Select the platform type: ROKS (1) or OCP (2).
    7. If you did not run the cp4a-prerequisites.sh script, then you need to select the capabilities and optional components that you want to install.
      Remember: If you do not use the cp4a-prerequisites.sh script, you must create the required databases, and the Kubernetes secrets for the capabilities that you want to install manually. The documented steps to prepare the databases are under each capability in Preparing your chosen capabilities.
      1) FileNet Content Manager
      2) Operational Decision Manager
      3) Automation Decision Services
      4) Business Automation Application
      5) Business Automation Workflow (a) Workflow Authoring (b) Workflow Runtime
      6) Automation Workstream Services
      7) Automation Document Processing (a) Development Environment (b) Runtime Environment
      8) Workflow Process Service Authoring

      Business Automation Workflow Authoring (5a) cannot be installed together with Automation Workstream Services (6). However, Business Automation Workflow Runtime (5b) can be installed together with Automation Workstream Services (6). Business Automation Navigator is automatically installed in the environment as it is part of the Cloud Pak for Business Automation foundation pattern.

      Automation Document Processing (7a and 7b) does not support a cluster with a Linux on Z (s390x) architecture.

      For more information about dependencies, see Capabilities for production deployments.

      Tip: After you make a first selection, you can make more selections to combine multiple capabilities. Press [ENTER] to skip optional components and again when you are done.
    8. If you need to, provide a URL to the .zip file that contains your custom JDBC or IBM Content Collector for SAP Applications drivers.

      For more information, see Optional: Preparing customized versions of JDBC drivers and ICCSAP libraries.

    9. If you did not run the cp4a-prerequisites.sh script, enter your dynamic storage classes for slow, medium, fast file storage (RWX), and a block storage class name (RWO).
    10. Optional: If you did not run the cp4a-prerequisites.sh script, select the LDAP type that is used for the deployment: Microsoft Active Directory (1) or IBM Tivoli Directory Server (2).
    11. A summary of your selection is displayed. Click "Yes" to verify that the information is correct.

Results

A custom resource file is created scripts/generated-cr/ibm_cp4a_cr_final.yaml.

Tip: You can rename the file and move it to another folder, or you can continue to use the file from this location. Because the maximum length of labels in Kubernetes is 63 characters, be careful with the lengths of your CR name and instance names. Some components can configure multiple instances, each instance must have a different name. The total length of the CR name and an instance name must not exceed 24 characters, otherwise some component deployments fail. When your deployment contains Workflow Authoring, the total length of the CR name cannot exceed 22 characters.

If you selected "FileNet Content Manager" with no other capabilities, then the script names the custom resource file ibm_content_cr_final.yaml. The custom resource in this case sets the Kind parameter to Content instead of ICP4ACluster.

What to do next

Go to Checking and completing your custom resource.