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 Decision Central and for running them in Decision Servers managed by Decision Central. This environment consists of Decision Central and one or more Decision Servers.
You can use Decision 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 Decision Central. A single Decision Central pod is not replicated; only a single copy of Decision Central is used. In an HA Decision Central deployment, you can scale Decision Central.
An HA Decision 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.
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 Decision 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 Decision Central and one Decision Server in an authoring or managed server environment
To deploy single Decision Central and one Decision Server in an authoring or managed server environment, use the rhdm72-authoring.yaml
template file. You can extract this file from the rhdm-7.2.0-openshift-templates.zip
product deliverable file. You can download the file from the Software Downloads page.
Procedure
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
rhdm72-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>/rhdm72-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.
-
Replace
-
In the OpenShift Web UI, select Add to Project → Import YAML / JSON and then select or paste the
Set the following parameters as necessary:
-
Decision Central Server Keystore Secret Name (
DECISION_CENTRAL_HTTPS_SECRET
): The name of the secret for Decision Central, as created in Section 2.3, “Creating the secrets for Decision 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 Decision 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 Decision Central that the Decision Server is to join. -
Decision 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 Decision Central”. -
Decision Central Server Keystore Password (
DECISION_CENTRAL_HTTPS_PASSWORD
): The password for the keystore that you created in Section 2.3, “Creating the secrets for Decision 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 isopenshift
. 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 Decision 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.
-
Decision Central Server Keystore Secret Name (
If you want to deploy additional Decision Servers and connect them to this Decision 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 Decision Central.
-
KIE Server Controller User (
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 theid
setting for the Maven repository.ImportantTo export or push Decision 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 Decision 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 Decision Central and to connect additional Decision Servers to the Decision Central, set the following parameters:
-
Username for the Maven service hosted by Decision Central (
DECISION_CENTRAL_MAVEN_USERNAME
): The user name for the built-in Maven repository. -
Password for the Maven service hosted by Decision Central (
DECISION_CENTRAL_MAVEN_PASSWORD
): The password for the built-in Maven repository.
-
Maven repository URL (
You can use Git hooks to facilitate interaction between the internal Git repository of Decision 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”.
-
Git hooks directory (
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.
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 nameadminUser
, roles:kie-server,rest-all,admin
-
KIE_SERVER_CONTROLLER_USER
: default user namecontrollerUser
, roles:kie-server,rest-all,guest
-
DECISION_CENTRAL_MAVEN_USERNAME
(not needed if you configure the use of an external Maven repository): default user namemavenUser
. No roles are required. -
KIE_SERVER_USER
: default user nameexecutionUser
, roleskie-server,rest-all,guest
-
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 Decision 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:
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. -
Decision Central RH-SSO Client name (
DECISION_CENTRAL_SSO_CLIENT
): The RH-SSO client name for Decision Central. -
Decision Central RH-SSO Client Secret (
DECISION_CENTRAL_SSO_SECRET
): The secret string that is set in RH-SSO for the client for Decision 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 totrue
if your RH-SSO installation does not use a valid HTTPS certificate.
-
RH-SSO URL (
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. -
Decision Central RH-SSO Client name (
DECISION_CENTRAL_SSO_CLIENT
): The name of the client to create in RH-SSO for Decision Central. -
Decision Central RH-SSO Client Secret (
DECISION_CENTRAL_SSO_SECRET
): The secret string to set in RH-SSO for the client for Decision Central. -
Decision Central Custom http Route Hostname (
DECISION_CENTRAL_HOSTNAME_HTTP
): The fully qualified host name to use for the HTTP endpoint for Decision Central. If you need to create a client in RH-SSO, you can not leave this parameter blank. -
Decision Central Custom https Route Hostname (
DECISION_CENTRAL_HOSTNAME_HTTPS
): The fully qualified host name to use for the HTTPS endpoint for Decision 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 totrue
if your RH-SSO installation does not use a valid HTTPS certificate.
-
RH-SSO URL (
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 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 totrue
, mapped roles replace the roles defined on the LDAP server; if set tofalse
, both mapped roles and roles defined on the LDAP server are set as user application roles. The default setting isfalse
.
-
RoleMapping rolesProperties file path (
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.
-
If the
- Complete and run the command line.
3.2. Deploying high-availability Decision Central and one Decision Server in an authoring or managed server environment
To deploy high-availability Decision Central and one Decision Server in an authoring or managed server environment, use the rhdm72-authoring-ha.yaml
template file. You can download the file from the Software Downloads page.
In the current version, the high-availability functionality is a technology preview.
Procedure
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
rhdm72-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>/rhdm72-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.
-
Replace
-
In the OpenShift Web UI, select Add to Project → Import YAML / JSON and then select or paste the
Set the following parameters as necessary:
-
Decision Central Server Keystore Secret Name (
DECISION_CENTRAL_HTTPS_SECRET
): The name of the secret for Decision Central, as created in Section 2.3, “Creating the secrets for Decision 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 Decision 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 Decision Central that the Decision Server is to join. -
Decision 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 Decision Central”. -
Decision Central Server Keystore Password (
DECISION_CENTRAL_HTTPS_PASSWORD
): The password for the keystore that you created in Section 2.3, “Creating the secrets for Decision 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 isopenshift
. 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 Decision 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.
-
Decision Central Server Keystore Secret Name (
If you want to deploy additional Decision Servers and connect them to this Decision 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 Decision Central.
-
KIE Server Controller User (
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 theid
setting for the Maven repository.ImportantTo export or push Decision 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 Decision 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 Decision Central and to connect additional Decision Servers to the Decision Central, set the following parameters:
-
Username for the Maven service hosted by Decision Central (
DECISION_CENTRAL_MAVEN_USERNAME
): The user name for the built-in Maven repository. -
Password for the Maven service hosted by Decision Central (
DECISION_CENTRAL_MAVEN_PASSWORD
): The password for the built-in Maven repository.
-
Maven repository URL (
You can use Git hooks to facilitate interaction between the internal Git repository of Decision 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”.
-
Git hooks directory (
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.
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 nameadminUser
, roles:kie-server,rest-all,admin
-
KIE_SERVER_CONTROLLER_USER
: default user namecontrollerUser
, roles:kie-server,rest-all,guest
-
DECISION_CENTRAL_MAVEN_USERNAME
(not needed if you configure the use of an external Maven repository): default user namemavenUser
. No roles are required. -
KIE_SERVER_USER
: default user nameexecutionUser
, roleskie-server,rest-all,guest
-
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 Decision 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:
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. -
Decision Central RH-SSO Client name (
DECISION_CENTRAL_SSO_CLIENT
): The RH-SSO client name for Decision Central. -
Decision Central RH-SSO Client Secret (
DECISION_CENTRAL_SSO_SECRET
): The secret string that is set in RH-SSO for the client for Decision 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 totrue
if your RH-SSO installation does not use a valid HTTPS certificate.
-
RH-SSO URL (
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. -
Decision Central RH-SSO Client name (
DECISION_CENTRAL_SSO_CLIENT
): The name of the client to create in RH-SSO for Decision Central. -
Decision Central RH-SSO Client Secret (
DECISION_CENTRAL_SSO_SECRET
): The secret string to set in RH-SSO for the client for Decision Central. -
Decision Central Custom http Route Hostname (
DECISION_CENTRAL_HOSTNAME_HTTP
): The fully qualified host name to use for the HTTP endpoint for Decision Central. If you need to create a client in RH-SSO, you can not leave this parameter blank. -
Decision Central Custom https Route Hostname (
DECISION_CENTRAL_HOSTNAME_HTTPS
): The fully qualified host name to use for the HTTPS endpoint for Decision 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 totrue
if your RH-SSO installation does not use a valid HTTPS certificate.
-
RH-SSO URL (
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 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 totrue
, mapped roles replace the roles defined on the LDAP server; if set tofalse
, both mapped roles and roles defined on the LDAP server are set as user application roles. The default setting isfalse
.
-
RoleMapping rolesProperties file path (
If an AMQ 7.1 image is not available in the
openshift
namespace with default settings, set the following parameters:-
AMQ ImageStream Namespace (
AMQ_IMAGE_STREAM_NAMESPACE
): Namespace in which the ImageStream for the AMQ image is installed. The default setting isopenshift
. -
AMQ ImageStream Name (
AMQ_IMAGE_STREAM_NAME
): The name of the image stream for the AMQ broker. The default setting isamq-broker71-openshift
. -
AMQ ImageStream Tag (
AMQ_IMAGE_STREAM_TAG
): The AMQ image stream tag. The default setting is1.0
.
-
AMQ ImageStream Namespace (
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.
-
If the
- 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 Decision 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
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:
-
Prepare the
id_rsa
file with a private key that matches a public key stored in the repository. -
Prepare the
known_hosts
file with the correct name, address, and public key for the repository. 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
Mount the secret in the SSH key path of the Decision 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.
-
Prepare the
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 Decision Central from a repository, this repository remains configured as the upstream repository. Create a file named
post-commit
with permission values755
and the following content:git push
Supply the Git hooks directory to the Decision Central deployment. You can use a configuration map or a persistent volume.
If the Git hooks consist of one or several fixed script files, use a configuration map. Complete the following steps:
- Change into the Git hooks directory that you have created.
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
Mount the configuration map on the Decision 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 ofGIT_HOOKS_DIR
that was set when configuring the template.
-
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.
Wait a few minutes, then review the list and status of pods in yor project. Because Decision 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 Decision Central to deploy, undeploy, and manage services on this Decision Server.
To deploy an additional Decision Server, use the rhdm72-kieserver.yaml
template file. You can download the file from the Software Downloads page.
Procedure
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
rhdm72-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>/rhdm72-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.
-
Replace
-
In the OpenShift Web UI, select Add to Project → Import YAML / JSON and then select or paste the
Set the following parameters:
-
KIE server controller service (
KIE_SERVER_CONTROLLER_SERVICE
): The OpenShift service name for the Decision Central that you installed for this environment. -
KIE server controller user (
KIE_SERVER_CONTROLLER_USER
): The controller user name for logging onto the Decision Central that you configured. -
KIE server controller password (
KIE_SERVER_CONTROLLER_PWD
): The controller password for logging onto the Decision 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 Decision 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 controller service (
Set the parameters for access to the Maven repository, depending on whether you configured the Decision Central to use the built-in or external repository:
For a built-in repository:
-
Name of the Maven service hosted by Decision Central (
DECISION_CENTRAL_MAVEN_SERVICE
): The service name for the built-in Maven repository of the Decision Central. -
Username for the Maven service hosted by Decision Central (
DECISION_CENTRAL_MAVEN_USERNAME
): The user name for the built-in Maven repository of the Decision Central. Enter the user name that you configured for the Decision Central asDECISION_CENTRAL_MAVEN_USERNAME
. -
Password to access the Maven service hosted by Decision Central (
DECISION_CENTRAL_MAVEN_PASSWORD
): The password for the built-in Maven repository of the Decision Central. Enter the password that you configured for the Decision Central asDECISION_CENTRAL_MAVEN_PASSWORD
.
-
Name of the Maven service hosted by Decision Central (
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.NoteYou can set up access to both the built-in Maven repository of the Decision Central an external Maven repository if your services have dependencies in both repositories.
-
Maven repository URL (
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.
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 nameadminUser
, roles:kie-server,rest-all,admin
-
KIE_SERVER_USER
: default user nameexecutionUser
, roleskie-server,rest-all,guest
-
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:
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 totrue
if your RH-SSO installation does not use a valid HTTPS certificate.
-
RH-SSO URL (
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 totrue
if your RH-SSO installation does not use a valid HTTPS certificate.
-
RH-SSO URL (
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 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 totrue
, mapped roles replace the roles defined on the LDAP server; if set tofalse
, both mapped roles and roles defined on the LDAP server are set as user application roles. The default setting isfalse
.
-
RoleMapping rolesProperties file path (
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.
-
A
- 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
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
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 theAUTH_ROLE_MAPPER_ROLES_PROPERTIES
file) andexisting_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
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-rhdmcentr
: Decision Central -
myapp-kieserver
: Decision Server
Where
myapp
is 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
Where
mapping_dir
is the directory name (without file name) set in theAUTH_ROLE_MAPPER_ROLES_PROPERTIES
parameter, for example,/opt/eap/standalone/configuration/rolemapping
.-