Table of contents

Provisioning an instance of OpenPages by using the command line

Before you can use OpenPages®, you must provision an instance.

Before you begin

About this task

You can provision instances by using the command line or the Cloud Pak for Data web client. For information about using the web client, see Provisioning an instance of OpenPages.

Procedure

  1. Log in to your Red Hat® OpenShift® cluster as a project administrator:
    oc login OpenShift_URL:port
  2. Change to the project (namespace) where Cloud Pak for Data is installed.
  3. Create a yaml file, for example openpages-instance1.yaml.
  4. Copy the following text into the yaml file, and then update it for your environment.
    Table 1. Parameters for OpenPages instances
    Parameter Description
    name The name of the instance
    namespace Use one of the following values:
    • If you're using a tethered project for OpenPages, use the name of the tethered project.
    • Otherwise, use the project where Cloud Pak for Data is installed.
    zenControlPlaneNamespace The project where Cloud Pak for Data is installed.
    description A description of the instance
    version The version of OpenPages that you want to install, for example version: "8.203.1"
    databaseType Use one of the following values:
    • If you're using a database that is outside of Cloud Pak for Data, type external.
    • Otherwise, type internal.
    dbSecretName Required if databaseType is external

    Type the name of the secret that contains the database connection information.

    appStorageClass The storage class for application files.
    db*StorageClass Required if databaseType is internal

    For each parameter, type the storage class to use.

    dedicatedDbNodes Use one of the following values:
    • If your cluster administrator set up dedicated nodes for the database, type true.
    • Otherwise, type false.
    dbNodeLabelValue If dedicatedDbNodes is set to true, type the label of the dedicated nodes.
    scaleConfig Use one of the following values:
    • xsmall
    • small
    • medium
    • large

    For more information, see Scaling options for OpenPages instances.

    apiVersion: openpages.cpd.ibm.com/v1 
    kind: OpenPagesInstance 
    metadata: 
      name: <instance_name> 
      namespace: <openpages_namespace> 
      annotations: 
        "ansible.sdk.operatorframework.io/verbosity": "3" 
      labels: 
        app.kubernetes.io/name: openpages 
        app.kubernetes.io/instance: openpagesinstance1 
        app.kubernetes.io/version: "<openpages_version>" 
        app.kubernetes.io/managed-by: ibm-cpd-openpages-operator 
    spec: 
      zenControlPlaneNamespace: <cpd_namespace> 
      description: "<instance_description>" 
      version: "<openpages_version>"
      metadata: 
        databaseType: <db_type> 
        dbSecretName: "<db_secret>" 
        appStorageClass: <app_storage_class> 
        dbBackupStorageClass: <db_backup_class> 
        dbDataStorageClass: <db_backup_class> 
        dbMetaStorageClass: <db_backup_class> 
        dedicatedDbNodes: <true|false> 
        dbNodeLabelValue: "<node_label>"  
        scaleConfig: <size> 
      license: 
        accept: true
  5. To customize the database resources, add the following lines under spec:
      customScaleConfig:
        opdb:
          resources:
            cpu: <number of CPUs>
            memory: <memory in GB>
  6. To customize the application resources, see Scaling the OpenPages application server pod.
  7. Change to the project where Cloud Pak for Data is installed and run the following command:
    oc create -f <your instance yml file>

Results

The following example shows the configuration for an instance that uses an internal database and Portworx storage:
apiVersion: openpages.cpd.ibm.com/v1 
kind: OpenPagesInstance 
metadata: 
  name: openpagesinstance1  
  namespace: zen 
  annotations: 
    "ansible.sdk.operatorframework.io/verbosity": "3" 
  labels: 
    app.kubernetes.io/name: openpages 
    app.kubernetes.io/instance: openpagesinstance1 
    app.kubernetes.io/version: "8.203.1" 
    app.kubernetes.io/managed-by: ibm-cpd-openpages-operator 
spec: 
  zenControlPlaneNamespace: zen 
  description: "OpenPages instance"  
  version: "8.203.1"
  metadata: 
    databaseType: internal  
    dbSecretName: "" 
    appStorageClass: portworx-shared-gp3 
    dbBackupStorageClass: portworx-db2-rwx-sc 
    dbDataStorageClass: portworx-db2-rwo-sc 
    dbMetaStorageClass: portworx-db2-rwx-sc  
    dedicatedDbNodes: false 
    dbNodeLabelValue: "" 
    scaleConfig: xsmall 
  license: 
    accept: true
The following example shows the configuration with the additional parameters for custom scaling:
apiVersion: openpages.cpd.ibm.com/v1 
kind: OpenPagesInstance 
metadata: 
  name: openpagesinstance1  
  namespace: zen 
  annotations: 
    "ansible.sdk.operatorframework.io/verbosity": "3" 
  labels: 
    app.kubernetes.io/name: openpages 
    app.kubernetes.io/instance: openpagesinstance1 
    app.kubernetes.io/version: "8.203.1" 
    app.kubernetes.io/managed-by: ibm-cpd-openpages-operator 
spec: 
  zenControlPlaneNamespace: zen 
  description: "OpenPages instance"  
  version: "8.203.1"
  metadata: 
    databaseType: internal  
    dbSecretName: "" 
    appStorageClass: portworx-shared-gp3 
    dbBackupStorageClass: portworx-db2-rwx-sc 
    dbDataStorageClass: portworx-db2-rwo-sc 
    dbMetaStorageClass: portworx-db2-rwx-sc  
    dedicatedDbNodes: false 
    dbNodeLabelValue: "" 
    scaleConfig: xsmall 
  customScaleConfig:
    opdb:
      resources:
        cpu: 4
        memory: 12 Gi
    opapp:
        replicas: 2
        resources:
          limits:
              cpu: 4
              memory: 6Gi
          requests:
              cpu: 4
              memory: 6Gi
  license: 
    accept: true

What to do next

After you provision the instance, you need to do some post-installation tasks before users use OpenPages.