Red Hat Training

A Red Hat training course is available for Red Hat Process Automation Manager

Chapter 3. Environment with immutable servers

You can deploy an environment that includes one or more pods running Process Server with preloaded services. The database servers are, by default, also run in pods. Each Process Server pod can be separately scaled as necessary.

In this case, any services (KJAR files) must be loaded onto a Process Server at the time the image is created. You cannot load or unload services on a running Process Server. The advantage of this approach is that the Process Server with the services in it runs like any other containerized service and does not require specialized management. The Process Server runs like any other pod on the OpenShift environment; you can use any container-based integration workflows as necessary.

Optionally, you can also deploy a pod with Business Central Monitoring and a pod with Smart Router. You can use Business Central Monitoring to start and stop (but not deploy) services on your Process Servers and to view monitoring data.

Smart Router is a single endpoint that can receive calls from client applications to any of your services and route each call automatically to the server that actually runs the service.

When you create a Process Server image, you can build your services using S2I (Source to Image). Provide a Git repository with the source of your services and other business assets; if you develop the services or assets in Business Central, copy the source into a separate repository for the S2I build. OpenShift automatically builds the source, installs the services into the Process Server image, and starts the containers with the services.

If you are using Business Central for authoring services, you can extract the source for your process and place it into a separate Git repository (such as GitHub or an on-premise installation of GitLab) for use in the S2I build.

Alternatively, you can create a similar Process Server deployment using services that are already built as KJAR files. In this case, you must provide the services in a Maven repository; you can use the built-in repository of the Business Central or your own repository (for example, a Nexus deployment). The KJAR files are retrieved from the Maven repository during the startup of the pod and not updated or changed after that. The files are retrieved at every restart or scaling of the pod, so you must ensure they do not change on the Maven repository to keep the deployment immutable.

With both methods of creating immutable images, no further management of the image is required. If you want to use a new version of a service, you can build a new image.

If you want to use Business Central Monitoring, you must install the Monitoring and Smart Router template before creating any Process Server images. You must also provide a Maven repository. Your integration process must ensure that all the versions of KJAR files built into any Process Server image are also available in the Maven repository.

3.1. Deploying monitoring and Smart Router for an environment with immutable servers

If you want to use Business Central Monitoring and Smart Router for an environment with immutable servers, you must deploy them before deploying any Process Servers. If you do not want to use these components, skip this procedure.

To deploy Business Central Monitoring and Smart Router for an environment with immutable servers, use the rhpam72-prod-immutable-monitor.yaml template file. You can extract this file from the rhpam-7.2.0-openshift-templates.zip product deliverable file. You can download the file from the Software Downloads page.

Procedure

  1. Use one of the following methods to deploy the template:

    • In the OpenShift Web UI, select Add to Project → Import YAML / JSON and then select or paste the rhpam72-prod-immutable-monitor.yaml file. In the Add Template window, ensure Process the template is selected and click Continue.
    • To use the OpenShift command line console, prepare the following command line:

      oc new-app -f <template-path>/rhpam72-prod-immutable-monitor.yaml -p BUSINESS_CENTRAL_HTTPS_SECRET=businesscentral-app-secret -p KIE_SERVER_ROUTER_HTTPS_SECRET=smartrouter-app-secret

      In this command line:

      • Replace <template-path> with the path to the downloaded template file.
      • Use as many -p PARAMETER=value pairs as needed to set the required parameters. You can view the template file to see descriptions for all parameters.
  2. Set the following parameters as necessary:

    • Business Central Server Keystore Secret Name (BUSINESS_CENTRAL_HTTPS_SECRET): The name of the secret for Business Central, as created in Section 2.3, “Creating the secrets for Business Central”.
    • Smart Router Keystore Secret Name (KIE_SERVER_ROUTER_HTTPS_SECRET): The name of the secret for Smart Router, as created in Section 2.4, “Creating the secrets for Smart Router”.
    • Application Name (APPLICATION_NAME): The name of the OpenShift application. It is used in the default URLs for Business Central Monitoring and Smart Router. OpenShift also uses the application name to create a separate set of deployment configurations, services, routes, labels, and artifacts. You can deploy several applications using the same template into the same project, as long as you use different application names.
    • Maven repository URL (MAVEN_REPO_URL): A URL for a Maven repository. You must upload all the processes (KJAR files) that are to be deployed in your environment into this repository.
    • Maven repository username (MAVEN_REPO_USERNAME): The username for the Maven repository.
    • Maven repository password (MAVEN_REPO_PASSWORD): The username for the Maven repository.
    • Business Central Server Certificate Name (BUSINESS_CENTRAL_HTTPS_NAME): The name of the certificate in the keystore that you created in Section 2.3, “Creating the secrets for Business Central”.
    • Business Central Server Keystore Password (BUSINESS_CENTRAL_HTTPS_PASSWORD): The password for the keystore that you created in Section 2.3, “Creating the secrets for Business Central”.
    • Smart Router Certificate Name (KIE_SERVER_ROUTER_HTTPS_NAME): The name of the certificate in the keystore that you created in Section 2.4, “Creating the secrets for Smart Router”.
    • Smart Router Keystore Password (KIE_SERVER_ROUTER_HTTPS_PASSWORD): The password for the keystore that you created in Section 2.4, “Creating the secrets for Smart Router”.
    • ImageStream Namespace (IMAGE_STREAM_NAMESPACE): The namespace where the image streams are available. If the image streams were already available in your OpenShift environment (see Section 2.1, “Ensuring the availability of image streams and the image registry”), the namespace is openshift. If you have installed the image streams file, the namespace is the name of the OpenShift project.

      You can also set other parameters as necessary.

  3. If you want to use RH-SSO or LDAP authentication, complete the following additional configuration. Do not configure LDAP authentication and RH-SSO authentication in the same deployment.

    1. In the RH-SSO or LDAP service, create all user names in the deployment parameters. If you do not set any of the parameters, create users with the default user names. The created users must also be assigned to roles:

      • KIE_ADMIN_USER: default user name adminUser, roles: kie-server,rest-all,admin
      • KIE_SERVER_MONITOR_USER: user name monitorUser. You must not change this user name. You also must configure the KIE_SERVER_MONITOR_PASSWORD parameter to the same value as the password for this user in the RH-SSO service. Otherwise, the suggested parameter settings for the server deployments will be incorrect. Roles: kie-server,rest-all,guest
    2. If you want to configure Red Hat Single Sign On (RH-SSO) authentication, an RH-SSO realm that applies to Red Hat Process Automation Manager must exist. A client within RH-SSO must also exist for Business Central Monitoring. If the client does not yet exist, the template can create it during deployment.

      For the user roles that you can configure in RH-SSO, see Roles and users.

      Use one of the following procedures:

      1. If the client for Red Hat Process Automation Manager within RH-SSO already exists, set the following parameters in the template:

        • RH-SSO URL (SSO_URL): The URL for RH-SSO.
        • RH-SSO Realm name (SSO_REALM): The RH-SSO realm for Red Hat Process Automation Manager.
        • Business Central Monitoring RH-SSO Client name (BUSINESS_CENTRAL_SSO_CLIENT): The RH-SSO client name for Business Central Monitoring.
        • Business Central Monitoring RH-SSO Client Secret (BUSINESS_CENTRAL_SSO_SECRET): The secret string that is set in RH-SSO for the client for Business Central Monitoring.
        • RH-SSO Disable SSL Certificate Validation (SSO_DISABLE_SSL_CERTIFICATE_VALIDATION): Set to true if your RH-SSO installation does not use a valid HTTPS certificate.
      2. To create the client for Red Hat Process Automation Manager within RH-SSO, set the following parameters in the template:

        • RH-SSO URL (SSO_URL): The URL for RH-SSO.
        • RH-SSO Realm name (SSO_REALM): The RH-SSO realm for Red Hat Process Automation Manager.
        • Business Central Monitoring RH-SSO Client name (BUSINESS_CENTRAL_SSO_CLIENT): The name of the client to create in RH-SSO for Business Central Monitoring.
        • Business Central Monitoring RH-SSO Client Secret (BUSINESS_CENTRAL_SSO_SECRET): The secret string to set in RH-SSO for the client for Business Central Monitoring.
        • Business Central Monitoring Custom http Route Hostname (BUSINESS_CENTRAL_HOSTNAME_HTTP): The fully qualified host name to use for the HTTP endpoint for Business Central Monitoring. If you need to create a client in RH-SSO, you can not leave this parameter blank.
        • Business Central Monitoring Custom https Route Hostname (BUSINESS_CENTRAL_HOSTNAME_HTTPS): The fully qualified host name to use for the HTTPS endpoint for Business Central Monitoring. If you need to create a client in RH-SSO, you can not leave this parameter blank.
        • RH-SSO Realm Admin Username (SSO_USERNAME) and RH-SSO Realm Admin Password (SSO_PASSWORD): The user name and password for the realm administrator user for the RH-SSO realm for Red Hat Process Automation Manager.
        • RH-SSO Disable SSL Certificate Validation (SSO_DISABLE_SSL_CERTIFICATE_VALIDATION): Set to true if your RH-SSO installation does not use a valid HTTPS certificate.
    3. To configure LDAP, set the AUTH_LDAP* parameters of the template. These parameters correspond to the settings of the LdatExtended Login module of Red Hat JBoss EAP. For instructions about using these settings, see LdapExtended Login Module.

      If the LDAP server does not define all the roles required for your deployment, you can map LDAP groups to Red Hat Process Automation Manager roles. To enable LDAP role mapping, set the following parameters:

      • RoleMapping rolesProperties file path (AUTH_ROLE_MAPPER_ROLES_PROPERTIES): The fully qualified pathname of a file that defines role mapping, for example, /opt/eap/standalone/configuration/rolemapping/rolemapping.properties. You must provide this file and mount it at this path in all applicable deployment configurations; for instructions, see Section 3.4, “Providing the LDAP role mapping file”.
      • RoleMapping replaceRole property (AUTH_ROLE_MAPPER_REPLACE_ROLE): If set to true, mapped roles replace the roles defined on the LDAP server; if set to false, both mapped roles and roles defined on the LDAP server are set as user application roles. The default setting is false.
  4. Complete the creation of the environment, depending on the method that you are using:

    • In the OpenShift Web UI, click Create.

      • If the This will create resources that may have security or project behavior implications message appears, click Create Anyway.
    • Complete and run the command line.
  5. Record the suggested command line that is displayed. This command line includes the parameters that you must set when deploying the immutable servers.

3.2. Deploying an immutable Process Server from service source code

To deploy an immutable Process Server from service source code, use the rhpam72-prod-immutable-kieserver.yaml template file. You can extract this file from the rhpam-7.2.0-openshift-templates.zip product deliverable file. You can download the file from the Software Downloads page.

If you want to modify the environment defined by the template file, see Section 3.5, “Modifying the server configuration built from source code for an immutable server environment”.

When you deploy an immutable Process Server, the deployment procedure retrieves the source code for any services that must run on this server, builds the services, and includes them in the server image.

You can configure the Process Server to connect to Smart Router and to Business Central Monitoring. If you use the server with Business Central Monitoring, you must ensure that the same versions of KJAR files are uploaded to the Maven repository that the Business Central Monitoring instance uses.

Procedure

  1. Use one of the following methods to deploy the template:

    • In the OpenShift Web UI, select Add to Project → Import YAML / JSON and then select or paste the rhpam72-prod-immutable-kieserver.yaml file. In the Add Template window, ensure Process the template is selected and click Continue.
    • To use the OpenShift command line console, prepare the following command line:

      oc new-app -f <template-path>/rhpam72-prod-immutable-kieserver.yaml -p KIE_SERVER_HTTPS_SECRET=kieserver-app-secret

      In this command line:

      • Replace <template-path> with the path to the downloaded template file.
      • Use as many -p PARAMETER=value pairs as needed to set the required parameters. You can view the template file to see descriptions for all parameters.

        Alternatively, if you have deployed the monitoring infrastructure (see Section 3.1, “Deploying monitoring and Smart Router for an environment with immutable servers”), use the command line that was displayed when you deployed the infrastructure and add the -p KIE_SERVER_HTTPS_SECRET=kieserver-app-secret parameter.

  2. Set the following parameters as necessary:

    • KIE Server Keystore Secret Name (KIE_SERVER_HTTPS_SECRET): The name of the secret for Process Server, as created in Section 2.2, “Creating the secrets for Process Server”.
    • Application Name (APPLICATION_NAME): The name of the OpenShift application. It is used in the default URL for Process Server. OpenShift uses the application name to create a separate set of deployment configurations, services, routes, labels, and artifacts. You can deploy several applications using the same template into the same project, as long as you use different application names. Also, the application name determines the name of the server configuration (server template) on the Business Central that the Process Server is to join. If you are deploying several Process Servers, you must ensure each of the servers has a different application name.
    • KIE Server Certificate Name (KIE_SERVER_HTTPS_NAME): The name of the certificate in the keystore that you created in Section 2.2, “Creating the secrets for Process Server”.
    • KIE Server Keystore Password (KIE_SERVER_HTTPS_PASSWORD): The password for the keystore that you created in Section 2.2, “Creating the secrets for Process Server”.
    • KIE Server Container Deployment (KIE_SERVER_CONTAINER_DEPLOYMENT): The identifying information of the decision service (KJAR file) that is built from your source. The format is: <containerId>=<groupId>:<artifactId>:<version>. You can provide two or more KJAR files using the | separator, for example: containerId=groupId:artifactId:version|c2=g2:a2:v2. The Maven build process must produce all these files from the source in the Git repository.
    • Git Repository URL (SOURCE_REPOSITORY_URL): The URL for the Git repository that contains the source for your decision service.
    • Git Reference (SOURCE_REPOSITORY_REF): The branch in the Git repository
    • Context Directory (CONTEXT_DIR): The path to the source within the project downloaded from the Git repository
    • Artifact Directory (ARTIFACT_DIR): The path within the project that contains the required binary files (KJAR files and any other necessary files) after a successful Maven build. Normally this directory is the target directory of the build. However, you can provide prebuilt binaries in this directory in the Git repository
    • ImageStream Namespace (IMAGE_STREAM_NAMESPACE): The namespace where the image streams are available. If the image streams were already available in your OpenShift environment (see Section 2.1, “Ensuring the availability of image streams and the image registry”), the namespace is openshift. If you have installed the image streams file, the namespace is the name of the OpenShift project.
  3. If your build includes dependencies that are not available on the public Maven tree and require a separate repository, set the parameters to provide this repository:

    • Maven repository URL (MAVEN_REPO_URL): The URL for the Maven repository.
    • Maven repository username (MAVEN_REPO_USERNAME): The username for the Maven repository.
    • Maven repository password (MAVEN_REPO_PASSWORD): The password for the Maven repository.
  4. If your OpenShift environment does not have a connection to the public Internet, set the following parameter:

  5. If you want to use Business Central Monitoring or Smart Router, set the parameters that were displayed in the sample command line after you deployed the monitoring infrastructure (see Section 3.1, “Deploying monitoring and Smart Router for an environment with immutable servers”).
  6. If you want to use RH-SSO or LDAP authentication, complete the following additional configuration. Do not configure LDAP authentication and RH-SSO authentication in the same deployment.

    1. In the RH-SSO or LDAP service, create all user names in the deployment parameters. If you do not set any of the parameters, create users with the default user names. The created users must also be assigned to roles:

      • KIE_ADMIN_USER: default user name adminUser, roles: kie-server,rest-all,admin
      • KIE_SERVER_USER: default user name executionUser, roles kie-server,rest-all,guest
    2. If you want to configure Red Hat Single Sign On (RH-SSO) authentication, an RH-SSO realm that applies to Red Hat Process Automation Manager must exist. A client within RH-SSO must also exist for

      For the user roles that you can configure in RH-SSO, see Roles and users.

      Use one of the following procedures:

      1. If the client for Red Hat Process Automation Manager within RH-SSO already exists, set the following parameters in the template:

        • RH-SSO URL (SSO_URL): The URL for RH-SSO.
        • RH-SSO Realm name (SSO_REALM): The RH-SSO realm for Red Hat Process Automation Manager.
        • KIE Server RH-SSO Client name (KIE_SERVER_SSO_CLIENT): The RH-SSO client name for Process Server.
        • KIE Server RH-SSO Client Secret (KIE_SERVER_SSO_SECRET): The secret string that is set in RH-SSO for the client for Process Server.
        • RH-SSO Disable SSL Certificate Validation (SSO_DISABLE_SSL_CERTIFICATE_VALIDATION): Set to true if your RH-SSO installation does not use a valid HTTPS certificate.
      2. To create the client for Red Hat Process Automation Manager within RH-SSO, set the following parameters in the template:

        • RH-SSO URL (SSO_URL): The URL for RH-SSO.
        • RH-SSO Realm name (SSO_REALM): The RH-SSO realm for Red Hat Process Automation Manager.
        • KIE Server RH-SSO Client name (KIE_SERVER_SSO_CLIENT): The name of the client to create in RH-SSO for Process Server.
        • KIE Server RH-SSO Client Secret (KIE_SERVER_SSO_SECRET): The secret string to set in RH-SSO for the client for Process Server.
        • KIE Server Custom http Route Hostname (KIE_SERVER_HOSTNAME_HTTP): The fully qualified host name to use for the HTTP endpoint for Process Server. If you need to create a client in RH-SSO, you can not leave this parameter blank.
        • KIE Server Custom https Route Hostname (KIE_SERVER_HOSTNAME_HTTPS): The fully qualified host name to use for the HTTPS endpoint for Process Server. If you need to create a client in RH-SSO, you can not leave this parameter blank.
        • RH-SSO Realm Admin Username (SSO_USERNAME) and RH-SSO Realm Admin Password (SSO_PASSWORD): The user name and password for the realm administrator user for the RH-SSO realm for Red Hat Process Automation Manager.
        • RH-SSO Disable SSL Certificate Validation (SSO_DISABLE_SSL_CERTIFICATE_VALIDATION): Set to true if your RH-SSO installation does not use a valid HTTPS certificate.
    3. To configure LDAP, set the AUTH_LDAP* parameters of the template. These parameters correspond to the settings of the LdatExtended Login module of Red Hat JBoss EAP. For instructions about using these settings, see LdapExtended Login Module.

      If the LDAP server does not define all the roles required for your deployment, you can map LDAP groups to Red Hat Process Automation Manager roles. To enable LDAP role mapping, set the following parameters:

      • RoleMapping rolesProperties file path (AUTH_ROLE_MAPPER_ROLES_PROPERTIES): The fully qualified pathname of a file that defines role mapping, for example, /opt/eap/standalone/configuration/rolemapping/rolemapping.properties. You must provide this file and mount it at this path in all applicable deployment configurations; for instructions, see Section 3.4, “Providing the LDAP role mapping file”.
      • RoleMapping replaceRole property (AUTH_ROLE_MAPPER_REPLACE_ROLE): If set to true, mapped roles replace the roles defined on the LDAP server; if set to false, both mapped roles and roles defined on the LDAP server are set as user application roles. The default setting is false.
  7. If you modified the template to use an external database server for the Process Server, as described in Section 3.5, “Modifying the server configuration built from source code for an immutable server environment”, set the following parameters:

    • KIE Server External Database Driver (KIE_SERVER_EXTERNALDB_DRIVER): The driver for the server, depending on the server type:

      • mysql
      • postgresql
      • mariadb
      • mssql
      • db2
      • oracle
      • sybase
    • KIE Server External Database User (KIE_SERVER_EXTERNALDB_USER) and KIE Server External Database Password (KIE_SERVER_EXTERNALDB_PWD): The user name and password for the external database server.
    • KIE Server External Database URL (KIE_SERVER_EXTERNALDB_HOST): The JDBC URL for the external database server.
    • KIE Server External Database Dialect (KIE_SERVER_EXTERNALDB_DIALECT): The Hibernate dialect for the server, depending on the server type:

      • org.hibernate.dialect.MySQL5Dialect (used for MySQL and MariaDB)
      • org.hibernate.dialect.PostgreSQLDialect
      • org.hibernate.dialect.SQLServer2012Dialect (used for MS SQL)
      • org.hibernate.dialect.DB2Dialect
      • org.hibernate.dialect.Oracle12cDialect
      • org.hibernate.dialect.SybaseASE15Dialect
    • KIE Server External Database Host (KIE_SERVER_EXTERNALDB_HOST): The host name of the external database server.
    • KIE Server External Database Port (KIE_SERVER_EXTERNALDB_PORT): The port number of the external database server.
    • KIE Server External Database name (KIE_SERVER_EXTERNALDB_DB): The database name to use on the external database server.
  8. If you created a custom image for using an external database server other than MySQL or PostgreSQL, as described in Section 3.6, “Building a custom Process Server image for an external database”, set the KIE Server Image Stream Name (KIE_SERVER_IMAGE_STREAM_NAME) parameter to the following value:

    • For Microsoft SQL Server, rhpam72-kieserver-mssql-openshift
    • For MariaDB, rhpam72-kieserver-mariadb-openshift
    • For IBM DB2, rhpam72-kieserver-db2-openshift
    • For Oracle Database, rhpam72-kieserver-oracle-openshift
    • For Sybase, rhpam72-kieserver-sybase-openshift
  9. Complete the creation of the environment, depending on the method that you are using:

    • In the OpenShift Web UI, click Create.

      • If the This will create resources that may have security or project behavior implications message appears, click Create Anyway.
    • Complete and run the command line.

3.3. Deploying an immutable Process Server from KJAR services

To deploy an immutable Process Server from KJAR services, use one of the following template files:

  • rhpam72-kieserver-postgresql.yaml to use a PostgreSQL pod for persistent storage. Use this template unless there is a sufficient reason to use another template.
  • rhpam72-kieserver-mysql.yaml to use a MySQL pod for persistent storage.
  • rhpam72-kieserver-externaldb.yaml to use an external database server for persistent storage.

    Important

    The standard Process Server image for an external database server includes drivers for MySQL and PostgreSQL external database servers. If you want to use another database server, you must build a custom Process Server image. For instructions, see Section 3.6, “Building a custom Process Server image for an external database”.

You can extract these template files from the rhpam-7.2.0-openshift-templates.zip product deliverable file. You can download the file from the Software Downloads page.

In this method of deployment, the Process Server retrieves all the required KJAR files during the startup of the pod.

You can configure the Process Server to connect to Smart Router and to Business Central Monitoring. If you use the server with Business Central Monitoring, you must ensure that the same versions of KJAR files are uploaded to the Maven repository that the Business Central Monitoring instance uses.

Procedure

  1. Use one of the following methods to deploy the template:

    • In the OpenShift Web UI, select Add to Project → Import YAML / JSON and then select or paste the template file. In the Add Template window, ensure Process the template is selected and click Continue.
    • To use the OpenShift command line console, prepare the following command line:

      oc new-app -f <template-path>/<template-file-name>.yaml -p KIE_SERVER_HTTPS_SECRET=kieserver-app-secret

      In this command line:

      • Replace <template-path> with the path to the template file.
      • Replace <template-file-name> with the name of the template file.
      • Use as many -p PARAMETER=value pairs as needed to set the required parameters. You can view the template file to see descriptions for all parameters.
  2. Set the following parameters as necessary:

    • KIE Server Keystore Secret Name (KIE_SERVER_HTTPS_SECRET): The name of the secret for Process Server, as created in Section 2.2, “Creating the secrets for Process Server”.
    • Application Name (APPLICATION_NAME): The name of the OpenShift application. It is used in the default URL for Process Server. OpenShift uses the application name to create a separate set of deployment configurations, services, routes, labels, and artifacts. You can deploy several applications using the same template into the same project, as long as you use different application names. Also, the application name determines the name of the server configuration (server template) on the Business Central that the Process Server is to join. If you are deploying several Process Servers, you must ensure each of the servers has a different application name.
    • KIE Server Certificate Name (KIE_SERVER_HTTPS_NAME): The name of the certificate in the keystore that you created in Section 2.2, “Creating the secrets for Process Server”.
    • KIE Server Keystore Password (KIE_SERVER_HTTPS_PASSWORD): The password for the keystore that you created in Section 2.2, “Creating the secrets for Process Server”.
    • KIE Server Container Deployment (KIE_SERVER_CONTAINER_DEPLOYMENT): The identifying information of the decision services (KJAR files) that the deployment must pull from the Maven repository. The format is: <containerId>=<groupId>:<artifactId>:<version>. You can provide two or more KJAR files using the | separator, for example: containerId=groupId:artifactId:version|c2=g2:a2:v2.
    • Maven repository URL (MAVEN_REPO_URL): The URL for the Maven repository.
    • Maven repository username (MAVEN_REPO_USERNAME): The username for the Maven repository.
    • Maven repository password (MAVEN_REPO_PASSWORD): The password for the Maven repository.
    • Disable KIE server management (KIE_SERVER_MGMT_DISABLED): You must set this parameter to true for an immutable deployment.
    • KIE Server Startup Strategy (KIE_SERVER_STARTUP_STRATEGY): You must set this parameter to LocalContainersStartupStrategy for an immutable deployment.
    • ImageStream Namespace (IMAGE_STREAM_NAMESPACE): The namespace where the image streams are available. If the image streams were already available in your OpenShift environment (see Section 2.1, “Ensuring the availability of image streams and the image registry”), the namespace is openshift. If you have installed the image streams file, the namespace is the name of the OpenShift project.
  3. If you want to use Business Central Monitoring or Smart Router, set some of the parameters that were displayed in the sample command line after you deployed the monitoring infrastructure (see Section 3.1, “Deploying monitoring and Smart Router for an environment with immutable servers”), namely:

    • Set KIE_ADMIN_USER, KIE_ADMIN_PWD, KIE_SERVER_USER, KIE_SERVER_PWD, and KIE_SERVER_ROUTER_SERVICE to the values that were displayed for these parameters.
    • Set KIE_SERVER_CONTROLLER_USER to the value that was displayed for KIE_SERVER_MONITOR_USER.
    • Set KIE_SERVER_CONTROLLER_PWD to the value that was displayed for KIE_SERVER_MONITOR_PWD.
    • Set KIE_SERVER_CONTROLLER_SERVICE to the value that was displayed for KIE_SERVER_MONITOR_SERVICE.
  4. If you want to use RH-SSO or LDAP authentication, complete the following additional configuration. Do not configure LDAP authentication and RH-SSO authentication in the same deployment.

    1. In the RH-SSO or LDAP service, create all user names in the deployment parameters. If you do not set any of the parameters, create users with the default user names. The created users must also be assigned to roles:

      • KIE_ADMIN_USER: default user name adminUser, roles: kie-server,rest-all,admin
      • KIE_SERVER_USER: default user name executionUser, roles kie-server,rest-all,guest
    2. If you want to configure Red Hat Single Sign On (RH-SSO) authentication, an RH-SSO realm that applies to Red Hat Process Automation Manager must exist. A client within RH-SSO must also exist for

      For the user roles that you can configure in RH-SSO, see Roles and users.

      Use one of the following procedures:

      1. If the client for Red Hat Process Automation Manager within RH-SSO already exists, set the following parameters in the template:

        • RH-SSO URL (SSO_URL): The URL for RH-SSO.
        • RH-SSO Realm name (SSO_REALM): The RH-SSO realm for Red Hat Process Automation Manager.
        • KIE Server RH-SSO Client name (KIE_SERVER_SSO_CLIENT): The RH-SSO client name for Process Server.
        • KIE Server RH-SSO Client Secret (KIE_SERVER_SSO_SECRET): The secret string that is set in RH-SSO for the client for Process Server.
        • RH-SSO Disable SSL Certificate Validation (SSO_DISABLE_SSL_CERTIFICATE_VALIDATION): Set to true if your RH-SSO installation does not use a valid HTTPS certificate.
      2. To create the client for Red Hat Process Automation Manager within RH-SSO, set the following parameters in the template:

        • RH-SSO URL (SSO_URL): The URL for RH-SSO.
        • RH-SSO Realm name (SSO_REALM): The RH-SSO realm for Red Hat Process Automation Manager.
        • KIE Server RH-SSO Client name (KIE_SERVER_SSO_CLIENT): The name of the client to create in RH-SSO for Process Server.
        • KIE Server RH-SSO Client Secret (KIE_SERVER_SSO_SECRET): The secret string to set in RH-SSO for the client for Process Server.
        • KIE Server Custom http Route Hostname (KIE_SERVER_HOSTNAME_HTTP): The fully qualified host name to use for the HTTP endpoint for Process Server. If you need to create a client in RH-SSO, you can not leave this parameter blank.
        • KIE Server Custom https Route Hostname (KIE_SERVER_HOSTNAME_HTTPS): The fully qualified host name to use for the HTTPS endpoint for Process Server. If you need to create a client in RH-SSO, you can not leave this parameter blank.
        • RH-SSO Realm Admin Username (SSO_USERNAME) and RH-SSO Realm Admin Password (SSO_PASSWORD): The user name and password for the realm administrator user for the RH-SSO realm for Red Hat Process Automation Manager.
        • RH-SSO Disable SSL Certificate Validation (SSO_DISABLE_SSL_CERTIFICATE_VALIDATION): Set to true if your RH-SSO installation does not use a valid HTTPS certificate.
    3. To configure LDAP, set the AUTH_LDAP* parameters of the template. These parameters correspond to the settings of the LdatExtended Login module of Red Hat JBoss EAP. For instructions about using these settings, see LdapExtended Login Module.

      If the LDAP server does not define all the roles required for your deployment, you can map LDAP groups to Red Hat Process Automation Manager roles. To enable LDAP role mapping, set the following parameters:

      • RoleMapping rolesProperties file path (AUTH_ROLE_MAPPER_ROLES_PROPERTIES): The fully qualified pathname of a file that defines role mapping, for example, /opt/eap/standalone/configuration/rolemapping/rolemapping.properties. You must provide this file and mount it at this path in all applicable deployment configurations; for instructions, see Section 3.4, “Providing the LDAP role mapping file”.
      • RoleMapping replaceRole property (AUTH_ROLE_MAPPER_REPLACE_ROLE): If set to true, mapped roles replace the roles defined on the LDAP server; if set to false, both mapped roles and roles defined on the LDAP server are set as user application roles. The default setting is false.
  5. If you are using the rhpam72-kieserver-externaldb.yaml template to use an external database server for the Process Server, set the following parameters:

    • KIE Server External Database Driver (KIE_SERVER_EXTERNALDB_DRIVER): The driver for the server, depending on the server type:

      • mysql
      • postgresql
      • mariadb
      • mssql
      • db2
      • oracle
      • sybase
    • KIE Server External Database User (KIE_SERVER_EXTERNALDB_USER) and KIE Server External Database Password (KIE_SERVER_EXTERNALDB_PWD): The user name and password for the external database server.
    • KIE Server External Database URL (KIE_SERVER_EXTERNALDB_HOST): The JDBC URL for the external database server.
    • KIE Server External Database Dialect (KIE_SERVER_EXTERNALDB_DIALECT): The Hibernate dialect for the server, depending on the server type:

      • org.hibernate.dialect.MySQL5Dialect (used for MySQL and MariaDB)
      • org.hibernate.dialect.PostgreSQLDialect
      • org.hibernate.dialect.SQLServer2012Dialect (used for MS SQL)
      • org.hibernate.dialect.DB2Dialect
      • org.hibernate.dialect.Oracle12cDialect
      • org.hibernate.dialect.SybaseASE15Dialect
    • KIE Server External Database Host (KIE_SERVER_EXTERNALDB_HOST): The host name of the external database server.
    • KIE Server External Database Port (KIE_SERVER_EXTERNALDB_PORT): The port number of the external database server.
    • KIE Server External Database name (KIE_SERVER_EXTERNALDB_DB): The database name to use on the external database server.
  6. If you created a custom image for using an external database server other than MySQL or PostgreSQL, as described in Section 3.6, “Building a custom Process Server image for an external database”, set the KIE Server Image Stream Name (KIE_SERVER_IMAGE_STREAM_NAME) parameter to the following value:

    • For Microsoft SQL Server, rhpam72-kieserver-mssql-openshift
    • For MariaDB, rhpam72-kieserver-mariadb-openshift
    • For IBM DB2, rhpam72-kieserver-db2-openshift
    • For Oracle Database, rhpam72-kieserver-oracle-openshift
    • For Sybase, rhpam72-kieserver-sybase-openshift
  7. Complete the creation of the environment, depending on the method that you are using:

    • In the OpenShift Web UI, click Create.

      • If the This will create resources that may have security or project behavior implications message appears, click Create Anyway.
    • Complete and run the command line.

3.4. Providing the LDAP role mapping file

If you configure the AUTH_ROLE_MAPPER_ROLES_PROPERTIES parameter, you must provide a file that defines the role mapping. Mount this file on all affected deployment configurations.

Procedure

  1. Create the role mapping properties file, for example, my-role-map. The file must contain entries in the following format:

    ldap_role = product_role1, product_role2...

    For example:

    admins = kie-server,rest-all,admin
  2. Create an OpenShift configuration map from the file. Run the following command:

    oc create configmap ldap_role_mapping --from-file=<new_name>=<existing_name>

    Where new_name is the name that the file is to have on the pods (it must be the same as the name specified in the AUTH_ROLE_MAPPER_ROLES_PROPERTIES file) and existing_name is the name of the file that you created. For example:

    oc create configmap ldap_role_mapping --from-file=rolemapping.properties=my-role-map
  3. Mount the configuration map on every deployment config that is configured for role mapping. The following deployment configs can be affected in this environment:

    • myapp-rhpamcentrmon: Business Central Monitoring
    • myapp-kieserver: Process Server

    Where myapp is the application name. Sometimes, several Process Server deployments can be present under different application names.

    For every deployment configuration, run the command:

     oc set volume dc/<deployment_config_name> --add --type configmap --configmap-name ldap_role_mapping --mount-path=<mapping_dir> --name=ldap_role_mapping

    Where mapping_dir is the directory name (without file name) set in the AUTH_ROLE_MAPPER_ROLES_PROPERTIES parameter, for example, /opt/eap/standalone/configuration/rolemapping .

3.5. Modifying the server configuration built from source code for an immutable server environment

By default, the immutable server configuration built from source code creates a separate PostgreSQL pod to provide the database server for each replicable Process Server. If you prefer to use MySQL or to use an external server (outside the OpenShift project), you must modify the rhpam72-prod-immutable-kieserver.yaml template before deploying the server.

An OpenShift template defines a set of objects that can be created by OpenShift. To change an environment configuration, you need to modify, add, or delete these objects. To simplify this task, comments are provided in the Red Hat Process Automation Manager templates.

Some comments mark blocks within the template, staring with BEGIN and ending with END. For example, the following block is named Sample block:

## Sample block BEGIN
sample line 1
sample line 2
sample line 3
## Sample block END

For some changes, you might need to replace a block in one template file with a block from another template file provided with Red Hat Process Automation Manager. In this case, delete the block, then paste the new block in its exact location.

Procedure

  • If you want to use MySQL instead of PostgreSQL, replace several blocks of the file, marked with comments from BEGIN to END, with blocks from the rhpam72-kieserver-mysql.yaml file:

    1. Replace the block named PostgreSQL database parameters with the block named MySQL database parameters. (Take this block and all subsequent replacement blocks from the rhpam72-kieserver-postgresql.yaml file.)
    2. Replace the block named PostgreSQL service with the block named MySQL service.
    3. Replace the block named PostgreSQL driver settings with the block named MySQL driver settings.
    4. Replace the block named PostgreSQL deployment config with the block named MySQL deployment config.
    5. Replace the block named PostgreSQL persistent volume claim with the block named MySQL persistent volume claim.
  • If you want to use an external database server, replace several blocks of the file, marked with comments from BEGIN to END, with blocks from the rhpam72-kieserver-externaldb.yaml file, and also remove some blocks:

    1. Replace the block named PostgreSQL database parameters with the block named External database parameters. (Take this block and all subsequent replacement blocks from the rhpam72-kieserver-externaldb.yaml file.)
    2. Replace the block named PostgreSQL driver settings with the block named External database driver settings.
    3. Remove the following blocks of the file, marked with comments from BEGIN to END:

      • PostgreSQL service
      • PostgreSQL deployment config
      • PostgreSQL persistent volume claim
Important

The standard Process Server image includes drivers for MySQL and PostgreSQL external database servers. If you want to use another database server, you must build a custom Process Server image. For instructions, see Section 3.6, “Building a custom Process Server image for an external database”.

3.6. Building a custom Process Server image for an external database

If you want to use an external database server for a Process Server and this server is neither MySQL nor PostgreSQL, you must build a custom Process Server image with drivers for this server before deploying your environment.

You can use this build procedure to provide drivers for the following database servers:

  • Microsoft SQL Server
  • MariaDB
  • IBM DB2
  • Oracle Database
  • Sybase

For the tested versions of the database servers, see Red Hat Process Automation Manager 7 Supported Configurations.

The build procedure creates a custom image that extends the existing Process Server image. It pushes this custom image into a new ImageStream in the openshift namespace with the same version tag as the original image.

Prerequisites

  • You have logged on to your project in the OpenShift environment using the oc command as a user with the cluster-admin role.
  • For IBM DB2, Oracle Database, or Sybase, you have downloaded the JDBC driver from the database server vendor.

Procedure

  1. For IBM DB2, Oracle Database, or Sybase, provide the JDBC driver JAR in a local directory or on an HTTP server. Within the local directory or HTTP server, the following paths are expected:

    • For IBM DB2, <local_path_or_url>/com/ibm/db2/jcc/db2jcc4/10.5/db2jcc4-10.5.jar
    • For Oracle Database, <local_path_or_url>/com/oracle/ojdbc7/12.1.0.1/ojdbc7-12.1.0.1.jar
    • For Sybase, <local_path_or_url>/com/sysbase/jconn4/16.0_PL05/jconn4-16.0_PL05.jar

      Where <local_path_or_url> is the path to the local directory or the URL for the HTTP server where the driver is provided.

  2. To install the source code for the custom build, download the rhpam-7.2.0-openshift-templates.zip product deliverable file from the Software Downloads page. Unzip the file and, using the command line, change to the templates/contrib/jdbc directory of the unzipped file.
  3. Change to the following subdirectory:

    • For Microsoft SQL Server, mssql-driver-image
    • For MariaDB, mariadb-driver-image
    • For IBM DB2, db2-driver-image
    • For Oracle Database, oracle-driver-image
    • For Sybase, sybase-driver-image
  4. Run the following command:

    • For Microsoft SQL Server or MariaDB:
    ../build.sh
    • For IBM DB2, Oracle Database, or Sybase:
    ../build.sh --artifact-repo=<local_path_or_url>

    Where <local_path_or_url> is the path to the local directory or the URL for the HTTP server where the driver is provided. For example:

    ../build.sh --artifact-repo=/home/builder/drivers
    ../build.sh --artifact-repo=http://nexus.example.com/nexus/content/groups/public

    If you want to configure your OpenShift docker registry address in the process, add also the --registry=<registry_name.domain_name:port> parameter to your build command.

    Examples:

    ../build.sh --registry=docker-registry.custom-domain:80
    
    ../build.sh --artifact-repo=/home/builder/drivers --registry=docker-registry.custom-domain:80