Red Hat Training

A Red Hat training course is available for Red Hat Decision Manager

Chapter 3. Authoring or managed server environment

You can deploy an environment for creating and modifying services using Business Central and for running them in Decision Servers managed by Business Central. This environment consists of Business Central and one or more Decision Servers.

You can use Business Central both to develop services and to deploy them to one or several Decision Servers. For example, you can deploy test versions of services to one Decision Server and production versions to another Decision Server.

To avoid accidentally deploying wrong versions to a production Decision Server, you can create separate environments to author services (authoring environment) and to manage deployment of production services (managed server environment). You can use a shared external Maven repository between these environments, so that services developed in the authoring environment are available in the managed server environment. However, the procedures to deploy these environments are the same.

Depending on your needs, you can deploy either a single or high-availability Business Central. A single Business Central pod is not replicated; only a single copy of Business Central is used. In an HA Business Central deployment, you can scale Business Central.

An HA Business Central provides maximum reliability and responsiveness for authoring services, but has higher memory and storage requirements and also requires support for persistent volumes with ReadWriteMany mode.

Important

In the current version, the high-availability functionality is a technology preview.

You can scale Decision Server pods as necessary in any version of the authoring or managed server environment.

To deploy an authoring or managed server environment, first deploy the single or high-availability Business Central and a single Decision Server using the authoring template.

To add additional Decision Servers, you can deploy the Decision Server template in the same project.

3.1. Deploying single Business Central and one Decision Server in an authoring or managed server environment

To deploy single Business Central and one Decision Server in an authoring or managed server environment, use the rhdm73-authoring.yaml template file. You can extract this file from the rhdm-7.3.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 rhdm73-authoring.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>/rhdm73-authoring.yaml -p DECISION_CENTRAL_HTTPS_SECRET=decisioncentral-app-secret -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.
  2. Set the following parameters as necessary:

    • Business Central Server Keystore Secret Name (DECISION_CENTRAL_HTTPS_SECRET): The name of the secret for Business Central, as created in Section 2.3, “Creating the secrets for Business Central”.
    • KIE Server Keystore Secret Name (KIE_SERVER_HTTPS_SECRET): The name of the secret for Decision Server, as created in Section 2.2, “Creating the secrets for Decision Server”.
    • Application Name (APPLICATION_NAME): The name of the OpenShift application. It is used in the default URLs for Business Central and Decision 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 Decision Server is to join.
    • Business Central Server Certificate Name (DECISION_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 (DECISION_CENTRAL_HTTPS_PASSWORD): The password for the keystore that you created in Section 2.3, “Creating the secrets for Business Central”.
    • 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 Decision 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 Decision Server”.
    • 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 the following user names and passwords:

    • KIE Admin User (KIE_ADMIN_USER) and KIE Admin Password (KIE_ADMIN_PWD): The user name and password for the administrative user in Business Central.
    • KIE Server User (KIE_SERVER_USER) and KIE Server Password (KIE_SERVER_PWD): The user name and password that a client application must use to connect to the Decision Server.
  3. If you want to deploy additional Decision Servers and connect them to this Business Central, set the following parameters:

    • KIE Server Controller User (KIE_SERVER_CONTROLLER_USER) and KIE Server Controller Password (KIE_SERVER_CONTROLLER_PWD): The user name and password that a Decision Server must use to connect to the Business Central.
  4. If you want to place the built KJAR files into an external Maven repository, set the following parameters:

    • Maven repository URL (MAVEN_REPO_URL): The URL for the Maven repository.
    • Maven repository username (MAVEN_REPO_USERNAME): The user name for the Maven repository.
    • Maven repository password (MAVEN_REPO_PASSWORD): The password for the Maven repository.
    • Maven repository ID (MAVEN_REPO_ID): The Maven ID, which must match the id setting for the Maven repository.

      Important

      To export or push Business Central projects as KJAR artifacts to the external Maven repository, you must also add the repository information in the pom.xml file for every project. For information about exporting Business Central projects to an external repository, see Packaging and deploying a Red Hat Decision Manager project.

      Alternatively, if you want to use the Maven repository that is built into Business Central and to connect additional Decision Servers to the Business Central, set the following parameters:

    • Username for the Maven service hosted by Business Central (DECISION_CENTRAL_MAVEN_USERNAME): The user name for the built-in Maven repository.
    • Password for the Maven service hosted by Business Central (DECISION_CENTRAL_MAVEN_PASSWORD): The password for the built-in Maven repository. :params_offline_central:
  5. If your OpenShift environment does not have outgoing access to the public Internet, set the following parameters:

    • Maven mirror URL (MAVEN_MIRROR_URL): The URL for the Maven mirror repository that you set up in Section 2.4, “Preparing a Maven mirror repository for offline use”. This URL must be accessible from a pod in your OpenShift environment.
    • Maven mirror of (MAVEN_MIRROR_OF): The Maven mirrorOf value that determines which artifacts are to be retrieved from the mirror. For instructions about setting the mirrorOf value, see Mirror Settings in the Apache Maven documentation. The default value is external:*. With this value, Maven retrieves every required artifact from the mirror and does not query any other repositories.

      • If you configure an external Maven repository (MAVEN_REPO_URL), change MAVEN_MIRROR_OF to exclude the artifacts in this repository from the mirror, for example, external:*,!repo-custom. Replace repo-custom with the ID that you configured in MAVEN_REPO_ID.
      • If you configure a built-in Business Central Maven repository (BUSINESS_CENTRAL_MAVEN_SERVICE), change MAVEN_MIRROR_OF to exclude the artifacts in this repository from the mirror: external:*,!repo-rhdmcentr.
      • If you configure both repositories, change MAVEN_MIRROR_OF to exclude the artifacts in both repositories from the mirror: external:*,!repo-rhdmcentr,!repo-custom. Replace repo-custom with the ID that you configured in MAVEN_REPO_ID.
  6. You can use Git hooks to facilitate interaction between the internal Git repository of Business Central and an external Git repository. To configure Git hooks, set the following parameter:

    • Git hooks directory (GIT_HOOKS_DIR): The fully qualified path to a Git hooks directory, for example, /opt/eap/standalone/data/kie/git/hooks. You must provide the content of this directory and mount it at the specified path; for instructions, see Section 3.3, “Providing the Git hooks directory”.
  7. 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_CONTROLLER_USER: default user name controllerUser, roles: kie-server,rest-all,guest
      • DECISION_CENTRAL_MAVEN_USERNAME (not needed if you configure the use of an external Maven repository): default user name mavenUser. No roles are required.
      • 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 Decision Manager must exist. Decision Server. If the client does not yet exist, the template can create it during deployment. Clients within RH-SSO must also exist for Business Central and for Decision Server. If the clients do not yet exist, the template can create them 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 clients for Red Hat Decision Manager within RH-SSO already exist, 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 Decision Manager.
        • Business Central RH-SSO Client name (DECISION_CENTRAL_SSO_CLIENT): The RH-SSO client name for Business Central.
        • Business Central RH-SSO Client Secret (DECISION_CENTRAL_SSO_SECRET): The secret string that is set in RH-SSO for the client for Business Central.
        • KIE Server RH-SSO Client name (KIE_SERVER_SSO_CLIENT): The RH-SSO client name for Decision Server.
        • KIE Server RH-SSO Client Secret (KIE_SERVER_SSO_SECRET): The secret string that is set in RH-SSO for the client for Decision 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 clients for Red Hat Decision 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 Decision Manager.
        • Business Central RH-SSO Client name (DECISION_CENTRAL_SSO_CLIENT): The name of the client to create in RH-SSO for Business Central.
        • Business Central RH-SSO Client Secret (DECISION_CENTRAL_SSO_SECRET): The secret string to set in RH-SSO for the client for Business Central.
        • Business Central Custom http Route Hostname (DECISION_CENTRAL_HOSTNAME_HTTP): The fully qualified host name to use for the HTTP endpoint for Business Central. If you need to create a client in RH-SSO, you can not leave this parameter blank.
        • Business Central Custom https Route Hostname (DECISION_CENTRAL_HOSTNAME_HTTPS): The fully qualified host name to use for the HTTPS endpoint for Business Central. If you need to create a client in RH-SSO, you can not leave this parameter blank.
        • KIE Server RH-SSO Client name (KIE_SERVER_SSO_CLIENT): The name of the client to create in RH-SSO for Decision Server.
        • KIE Server RH-SSO Client Secret (KIE_SERVER_SSO_SECRET): The secret string to set in RH-SSO for the client for Decision Server.
        • KIE Server Custom http Route Hostname (KIE_SERVER_HOSTNAME_HTTP): The fully qualified host name to use for the HTTP endpoint for Decision 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 Decision 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 Decision 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 LdapExtended 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 Decision 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.5, “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.
  8. 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.2. Deploying high-availability Business Central and one Decision Server in an authoring or managed server environment

To deploy high-availability Business Central and one Decision Server in an authoring or managed server environment, use the rhdm73-authoring-ha.yaml template file. You can download the file from the Software Downloads page.

Important

In the current version, the high-availability functionality is a technology preview.

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 rhdm73-authoring-ha.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>/rhdm73-authoring-ha.yaml -p DECISION_CENTRAL_HTTPS_SECRET=decisioncentral-app-secret -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.
  2. Set the following parameters as necessary:

    • Business Central Server Keystore Secret Name (DECISION_CENTRAL_HTTPS_SECRET): The name of the secret for Business Central, as created in Section 2.3, “Creating the secrets for Business Central”.
    • KIE Server Keystore Secret Name (KIE_SERVER_HTTPS_SECRET): The name of the secret for Decision Server, as created in Section 2.2, “Creating the secrets for Decision Server”.
    • Application Name (APPLICATION_NAME): The name of the OpenShift application. It is used in the default URLs for Business Central and Decision 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 Decision Server is to join.
    • Business Central Server Certificate Name (DECISION_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 (DECISION_CENTRAL_HTTPS_PASSWORD): The password for the keystore that you created in Section 2.3, “Creating the secrets for Business Central”.
    • 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 Decision 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 Decision Server”.
    • 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 the following user names and passwords:

    • KIE Admin User (KIE_ADMIN_USER) and KIE Admin Password (KIE_ADMIN_PWD): The user name and password for the administrative user in Business Central.
    • KIE Server User (KIE_SERVER_USER) and KIE Server Password (KIE_SERVER_PWD): The user name and password that a client application must use to connect to the Decision Server.
  3. If you want to deploy additional Decision Servers and connect them to this Business Central, set the following parameters:

    • KIE Server Controller User (KIE_SERVER_CONTROLLER_USER) and KIE Server Controller Password (KIE_SERVER_CONTROLLER_PWD): The user name and password that a Decision Server must use to connect to the Business Central.
  4. If you want to place the built KJAR files into an external Maven repository, set the following parameters:

    • Maven repository URL (MAVEN_REPO_URL): The URL for the Maven repository.
    • Maven repository username (MAVEN_REPO_USERNAME): The user name for the Maven repository.
    • Maven repository password (MAVEN_REPO_PASSWORD): The password for the Maven repository.
    • Maven repository ID (MAVEN_REPO_ID): The Maven ID, which must match the id setting for the Maven repository.

      Important

      To export or push Business Central projects as KJAR artifacts to the external Maven repository, you must also add the repository information in the pom.xml file for every project. For information about exporting Business Central projects to an external repository, see Packaging and deploying a Red Hat Decision Manager project.

      Alternatively, if you want to use the Maven repository that is built into Business Central and to connect additional Decision Servers to the Business Central, set the following parameters:

    • Username for the Maven service hosted by Business Central (DECISION_CENTRAL_MAVEN_USERNAME): The user name for the built-in Maven repository.
    • Password for the Maven service hosted by Business Central (DECISION_CENTRAL_MAVEN_PASSWORD): The password for the built-in Maven repository. :params_offline_central:
  5. If your OpenShift environment does not have outgoing access to the public Internet, set the following parameters:

    • Maven mirror URL (MAVEN_MIRROR_URL): The URL for the Maven mirror repository that you set up in Section 2.4, “Preparing a Maven mirror repository for offline use”. This URL must be accessible from a pod in your OpenShift environment.
    • Maven mirror of (MAVEN_MIRROR_OF): The Maven mirrorOf value that determines which artifacts are to be retrieved from the mirror. For instructions about setting the mirrorOf value, see Mirror Settings in the Apache Maven documentation. The default value is external:*. With this value, Maven retrieves every required artifact from the mirror and does not query any other repositories.

      • If you configure an external Maven repository (MAVEN_REPO_URL), change MAVEN_MIRROR_OF to exclude the artifacts in this repository from the mirror, for example, external:*,!repo-custom. Replace repo-custom with the ID that you configured in MAVEN_REPO_ID.
      • If you configure a built-in Business Central Maven repository (BUSINESS_CENTRAL_MAVEN_SERVICE), change MAVEN_MIRROR_OF to exclude the artifacts in this repository from the mirror: external:*,!repo-rhdmcentr.
      • If you configure both repositories, change MAVEN_MIRROR_OF to exclude the artifacts in both repositories from the mirror: external:*,!repo-rhdmcentr,!repo-custom. Replace repo-custom with the ID that you configured in MAVEN_REPO_ID.
  6. You can use Git hooks to facilitate interaction between the internal Git repository of Business Central and an external Git repository. To configure Git hooks, set the following parameter:

    • Git hooks directory (GIT_HOOKS_DIR): The fully qualified path to a Git hooks directory, for example, /opt/eap/standalone/data/kie/git/hooks. You must provide the content of this directory and mount it at the specified path; for instructions, see Section 3.3, “Providing the Git hooks directory”.
  7. 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_CONTROLLER_USER: default user name controllerUser, roles: kie-server,rest-all,guest
      • DECISION_CENTRAL_MAVEN_USERNAME (not needed if you configure the use of an external Maven repository): default user name mavenUser. No roles are required.
      • 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 Decision Manager must exist. Decision Server. If the client does not yet exist, the template can create it during deployment. Clients within RH-SSO must also exist for Business Central and for Decision Server. If the clients do not yet exist, the template can create them 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 clients for Red Hat Decision Manager within RH-SSO already exist, 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 Decision Manager.
        • Business Central RH-SSO Client name (DECISION_CENTRAL_SSO_CLIENT): The RH-SSO client name for Business Central.
        • Business Central RH-SSO Client Secret (DECISION_CENTRAL_SSO_SECRET): The secret string that is set in RH-SSO for the client for Business Central.
        • KIE Server RH-SSO Client name (KIE_SERVER_SSO_CLIENT): The RH-SSO client name for Decision Server.
        • KIE Server RH-SSO Client Secret (KIE_SERVER_SSO_SECRET): The secret string that is set in RH-SSO for the client for Decision 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 clients for Red Hat Decision 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 Decision Manager.
        • Business Central RH-SSO Client name (DECISION_CENTRAL_SSO_CLIENT): The name of the client to create in RH-SSO for Business Central.
        • Business Central RH-SSO Client Secret (DECISION_CENTRAL_SSO_SECRET): The secret string to set in RH-SSO for the client for Business Central.
        • Business Central Custom http Route Hostname (DECISION_CENTRAL_HOSTNAME_HTTP): The fully qualified host name to use for the HTTP endpoint for Business Central. If you need to create a client in RH-SSO, you can not leave this parameter blank.
        • Business Central Custom https Route Hostname (DECISION_CENTRAL_HOSTNAME_HTTPS): The fully qualified host name to use for the HTTPS endpoint for Business Central. If you need to create a client in RH-SSO, you can not leave this parameter blank.
        • KIE Server RH-SSO Client name (KIE_SERVER_SSO_CLIENT): The name of the client to create in RH-SSO for Decision Server.
        • KIE Server RH-SSO Client Secret (KIE_SERVER_SSO_SECRET): The secret string to set in RH-SSO for the client for Decision Server.
        • KIE Server Custom http Route Hostname (KIE_SERVER_HOSTNAME_HTTP): The fully qualified host name to use for the HTTP endpoint for Decision 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 Decision 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 Decision 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 LdapExtended 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 Decision 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.5, “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.
  8. If an AMQ scaledown controller image is not available in the openshift namespace and you installed the scaledown controller image stream (see Section 2.1, “Ensuring the availability of image streams and the image registry”), set the following parameter:

    • AMQ Scaledown Controller ImageStream Namespace (AMQ_SCALEDOWN_CONTROLLER_IMAGE_STREAM_NAMESPACE): Namespace in which the image stream for the AMQ scaledown controller image is installed. The default setting is 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. Providing the Git hooks directory

If you configure the GIT_HOOKS_DIR parameter, you must provide a directory of Git hooks and must mount this directory on the Business Central deployment.

The typical use of Git hooks is interaction with an upstream repository. To enable Git hooks to push commits into an upstream repository, you must also provide a secret key that corresponds to a public key configured on the upstream repository.

Procedure

  1. If interaction with an upstream repository using SSH authentication is required, complete the following steps to prepare and mount a secret with the necessary files:

    1. Prepare the id_rsa file with a private key that matches a public key stored in the repository.
    2. Prepare the known_hosts file with the correct name, address, and public key for the repository.
    3. Create a secret with the two files using the oc command, for example:

      oc create secret git-hooks-secret --from-file=id_rsa=id_rsa --from-file=known_hosts=known_hosts
    4. Mount the secret in the SSH key path of the Business Central deployment, for example:

      oc set volume dc/<myapp>-rhdmcentr --add --type secret --secret-name git-hooks-secret --mount-path=/home/jboss/.ssh --name=ssh-key

      Where <myapp> is the application name that was set when configuring the template.

  2. Create the Git hooks directory. For instructions, see the Git hooks reference documentation.

    For example, a simple git hooks directory can provide a post-commit hook that pushes the changes upstream. If the project was imported into Business Central from a repository, this repository remains configured as the upstream repository. Create a file named post-commit with permission values 755 and the following content:

    git push
  3. Supply the Git hooks directory to the Business Central deployment. You can use a configuration map or a persistent volume.

    1. If the Git hooks consist of one or several fixed script files, use a configuration map. Complete the following steps:

      1. Change into the Git hooks directory that you have created.
      2. Create an OpenShift configuration map from the files in the directory. Run the following command:

        oc create configmap git-hooks --from-file=<file_1>=<file_1> --from-file=<file_2>=<file_2> ...

        Where file_1, file_2 and so on are git hook script files. For example:

        oc create configmap git-hooks --from-file=post-commit=post-commit
      3. Mount the configuration map on the Business Central deployment in the path that you have configured:

        oc set volume dc/<myapp>-rhdmcentr --add --type configmap --configmap-name git-hooks  --mount-path=<git_hooks_dir> --name=git-hooks

        Where <myapp> is the application name that was set when configuring the template and <git_hooks_dir> is the value of GIT_HOOKS_DIR that was set when configuring the template.

    2. If the Git hooks consist of long files or depend on binaries, such as executable or KJAR files, use a persistence volume. You must create a persistent volume, create a persistent volume claim and associate the volume with the claim, transfer files to the volume, and mount the volume in the myapp-rhdmcentr deployment configuration (where myapp is the application name). For instructions about creating and mounting persistence volumes, see Using persistent volumes. For instructions about copying files onto a persistent volume, see Transferring files in and out of containers.
  4. Wait a few minutes, then review the list and status of pods in yor project. Because Business Central does not start until you provide the Git hooks directory, the Decision Server might not start at all. To see if it has started, check the output of the following command:

    oc get pods

    If a working Decision Server pod is not present, start it:

    oc rollout latest dc/<myapp>-kieserver

    Where <myapp> is the application name that was set when configuring the template.

3.4. Deploying an additional Decision Server

As a part of a managed server infrastructure, you can deploy an additional Decision Server on the OpenShift infrastructure. You can then use Business Central to deploy, undeploy, and manage services on this Decision Server.

To deploy an additional Decision Server, use the rhdm73-kieserver.yaml template 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 rhdm73-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>/rhdm73-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.
  2. Set the following parameters:

    • KIE server controller service (KIE_SERVER_CONTROLLER_SERVICE): The OpenShift service name for the Business Central that you installed for this environment.
    • KIE server controller user (KIE_SERVER_CONTROLLER_USER): The controller user name for logging onto the Business Central that you configured.
    • KIE server controller password (KIE_SERVER_CONTROLLER_PWD): The controller password for logging onto the Business Central that you configured.
    • KIE Server Keystore Secret Name (KIE_SERVER_HTTPS_SECRET): The name of the secret for Decision Server, as created in Section 2.2, “Creating the secrets for Decision Server”.
    • Application Name (APPLICATION_NAME): The name of the OpenShift application. It is used in the default URL for Decision 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 Decision Server is to join.
    • 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 Decision 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 Decision Server”.
    • KIE Server Mode (KIE_SERVER_MODE): In the rhdm73-kieserver.yaml template the default value is PRODUCTION; in this mode, you can not deploy SNAPSHOT versions of KJAR artifacts and can not change versions of an artifact in an existing container. (To deploy a new version with PRODUCTION mode, you can create a new container on the same Decision Server). To deploy SNAPSHOT versions or to change versions of an artifact in an existing container, set this parameter to DEVELOPMENT.
    • 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. Set the parameters for access to the Maven repository, depending on whether you configured the Business Central to use the built-in or external repository:

    1. For a built-in repository:

      • Name of the Maven service hosted by Business Central (DECISION_CENTRAL_MAVEN_SERVICE): The service name for the built-in Maven repository of the Business Central.
      • Username for the Maven service hosted by Business Central (DECISION_CENTRAL_MAVEN_USERNAME): The user name for the built-in Maven repository of the Business Central. Enter the user name that you configured for the Business Central as DECISION_CENTRAL_MAVEN_USERNAME.
      • Password to access the Maven service hosted by Business Central (DECISION_CENTRAL_MAVEN_PASSWORD): The password for the built-in Maven repository of the Business Central. Enter the password that you configured for the Business Central as DECISION_CENTRAL_MAVEN_PASSWORD.
    2. For an external repository:

      • Maven repository URL (MAVEN_REPO_URL): The URL for the Maven repository with services.
      • Maven repository username (MAVEN_REPO_USERNAME): The user name for the Maven repository.
      • Maven repository password (MAVEN_REPO_PASSWORD): The password for the Maven repository.

        Note

        You can set up access to both the built-in Maven repository of the Business Central an external Maven repository if your services have dependencies in both repositories.

  4. If your OpenShift environment does not have outgoing access to the public Internet, set the following parameters:

    • Maven mirror URL (MAVEN_MIRROR_URL): The URL for the Maven mirror repository that you set up in Section 2.4, “Preparing a Maven mirror repository for offline use”. This URL must be accessible from a pod in your OpenShift environment.
    • Maven mirror of (MAVEN_MIRROR_OF): The Maven mirrorOf value that determines which artifacts are to be retrieved from the mirror. For instructions about setting the mirrorOf value, see Mirror Settings in the Apache Maven documentation. The default value is external:*. With this value, Maven retrieves every required artifact from the mirror and does not query any other repositories.

      • If you configure an external Maven repository (MAVEN_REPO_URL), change MAVEN_MIRROR_OF to exclude the artifacts in this repository from the mirror, for example, external:*,!repo-custom. Replace repo-custom with the ID that you configured in MAVEN_REPO_ID.
      • If you configure a built-in Business Central Maven repository (BUSINESS_CENTRAL_MAVEN_SERVICE), change MAVEN_MIRROR_OF to exclude the artifacts in this repository from the mirror: external:*,!repo-rhdmcentr.
      • If you configure both repositories, change MAVEN_MIRROR_OF to exclude the artifacts in both repositories from the mirror: external:*,!repo-rhdmcentr,!repo-custom. Replace repo-custom with the ID that you configured in MAVEN_REPO_ID.
  5. 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 Decision 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 Decision 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 Decision Manager.
        • KIE Server RH-SSO Client name (KIE_SERVER_SSO_CLIENT): The RH-SSO client name for Decision Server.
        • KIE Server RH-SSO Client Secret (KIE_SERVER_SSO_SECRET): The secret string that is set in RH-SSO for the client for Decision 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 Decision 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 Decision Manager.
        • KIE Server RH-SSO Client name (KIE_SERVER_SSO_CLIENT): The name of the client to create in RH-SSO for Decision Server.
        • KIE Server RH-SSO Client Secret (KIE_SERVER_SSO_SECRET): The secret string to set in RH-SSO for the client for Decision Server.
        • KIE Server Custom http Route Hostname (KIE_SERVER_HOSTNAME_HTTP): The fully qualified host name to use for the HTTP endpoint for Decision 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 Decision 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 Decision 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 LdapExtended 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 Decision 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.5, “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.
  6. Complete the creation of the environment, depending on the method that you are using:

    • In the OpenShift Web UI, click Create.

      • A This will create resources that may have security or project behavior implications pop-up message might be displayed. If it is displayed, click Create Anyway.
    • Complete and run the command line.

3.5. 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 by entering the following command:

    oc create configmap ldap-role-mapping --from-file=<new_name>=<existing_name>

    Replace <new_name> with 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> with 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 configuration that is configured for role mapping.

    The following deployment configurations can be affected in this environment:

    • myapp-rhdmcentr: Business Central
    • myapp-kieserver: Decision Server

    Replace myapp with the application name. Sometimes, several Decision 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

    Replace <mapping_dir> with the directory name (without file name) set in the AUTH_ROLE_MAPPER_ROLES_PROPERTIES parameter, for example, /opt/eap/standalone/configuration/rolemapping .