Este contenido no está disponible en el idioma seleccionado.
Chapter 3. Managed environment
You can deploy a managed environment that includes several different pods running Process Server. By default, no processes are initially loaded on the servers. The database servers are, by default, also run in pods. Each Process Server pod can be separately scaled as necessary.
A pod with Business Central Monitoring and a pod with Smart Router are also deployed. You must use Business Central Monitoring to deploy, load, and unload processes on your Process Servers; you can also use it to view monitoring information.
Smart Router is a single endpoint that can receive calls from client applications to any of your processes and route each call automatically to the server that actually runs the process.
You must provide a Maven repository with the processes (KJAR files) that you want to deploy on the servers. Your integration process must ensure that the required versions of the processes are uploaded to the Maven repository. You can use Business Central in a development environment to create the processes and upload them to the Maven repository.
Red Hat Process Automation Manager includes two base templates for managed environments:
-
rhpam70-sit.yamlis a typical staging environment. It includes two Process Server pods (with database pods), Smart Router, and Business Central monitoring. -
rhpam70-prod.yamlis a typical production environment. It includes two Process Server pods (with database pods), Smart Router in a high-availability configuration, and Business Central monitoring in a high-availability configuration.
To deploy a managed environment, pick one of the templates, modify it according to your needs if necessary, and then deploy it.
3.1. Deploying a managed environment Copiar enlaceEnlace copiado en el portapapeles!
Deploy a managed environment using one of the following template files:
-
rhpam70-sit.yamlif you need to use minimal resources and do not need high-availability configuration for Business Central Monitoring and Smart Router rhpam70-prod.yamlif you need high-availability configuration for Business Central Monitoring and Smart RouterYou can extract the template files from the
rhpam-7.0.0-openshift-templates.zipproduct deliverable file. You can download the file from the Software Downloads page for Red Hat Process Automation Manager 7.0.
If you want to modify the environment defined by the template file, see Section 3.2, “Modifying a template for a managed environment”.
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 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-file-name> -p BUSINESS_CENTRAL_HTTPS_SECRET=businesscentral-app-secret -p KIE_SERVER_HTTPS_SECRET=kieserver-app-secret -p MAVEN_REPO_URL=<maven-repo-url>
oc new-app -f <template-file-name> -p BUSINESS_CENTRAL_HTTPS_SECRET=businesscentral-app-secret -p KIE_SERVER_HTTPS_SECRET=kieserver-app-secret -p MAVEN_REPO_URL=<maven-repo-url>Copy to Clipboard Copied! Toggle word wrap Toggle overflow In this command line:
-
Replace
<template-file-name>with the full pathname of the template file that you have modified. -
Replace
<maven-repo-url>with the a URL for a Maven repository where the necessary KJAR files are available. -
Use as many
-p PARAMETER=valuepairs 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
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”. -
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 URLs for Business Central and Process Server. 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”. -
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”. 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”), 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 Business Central Monitoring. -
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 any of the Process Servers.
-
Business Central Server Keystore Secret Name (
If you modified the 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_URL): 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 name (
KIE_SERVER_EXTERNALDB_DB): The database name to use on the external database server.
If you created a custom image for using an external database server other than MySQL or PostgreSQL, as described in Section 3.3, “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,
rhpam70-kieserver-mssql-openshift -
For MariaDB,
rhpam70-kieserver-mariadb-openshift -
For IBM DB2,
rhpam70-kieserver-db2-openshift -
For Oracle Database,
rhpam70-kieserver-oracle-openshift -
For Sybase,
rhpam70-kieserver-sybase-openshift
-
For Microsoft SQL Server,
Complete the creation of the environment. Depending on the method that you are using:
- In the OpenShift Web UI, click Create.
- Complete and run the command line.
3.2. Modifying a template for a managed environment Copiar enlaceEnlace copiado en el portapapeles!
To adjust the managed environment to your needs, you need to modify the rhpam70-sit.yaml or rhpam70-prod.yaml template before deploying the environment.
By default, the templates create two replicated Process Server pods. You can deploy separate processes on each of the pods. To add more replicated Process Server pods, you need to modify the template before deploying the environment.
By default, the templates create a PostgreSQL pod to provide the database server for each replicated Process Server. If you prefer to use PostgreSQL or to use an external server (outside the OpenShift project), you need to modify the template before deploying the environment.
For the rhpam70-prod.yaml template you can also adjust the initial number of replicas for Business Central Monitoring.
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
## 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.
Note that named blocks can be nested.
Procedure
If you want to add more replicated Process Server pods, repeat the following actions for every additional pod:
-
Pick a number for the new pod. The default pods have the numbers
1and2, so you can use3for the first new pod, then4and so on. Copy the following blocks of the file, marked with comments from
BEGINtoEND, into the end of the file:-
KIE server services 1 -
PostgreSQL service 1 -
KIE server routes 1 -
KIE server deployment config 1 -
PostgreSQL deployment config 1 -
PostgreSQL persistent volume claim 1
-
-
In the new copies, replace all instances of
-1with the new pod number, for example,-3.
-
Pick a number for the new pod. The default pods have the numbers
If you want to use MySQL instead of PostgreSQL, replace several blocks of the file, marked with comments from
BEGINtoEND, with blocks from therhpam70-kieserver-postgresql.yamlfile, then modify some of the newly added blocks:Replace the block named
MySQL database parameterswith the block namedPosgreSQL database parameters. (Take this block and all subsequent replacement blocks from therhpam70-kieserver-postgresql.yamlfile.)Repeat the following actions for every replicated Process Server pod number, for example,
1and2in the unmodified template.Nrefers to the pod number, for example,1.-
Replace the block named
PosgreSQL service Nwith the block namedMySQL service. -
Replace the block named
PosgreSQL driver settings Nwith the block namedMySQL driver settings. -
Replace the block named
PosgreSQL deployment config Nwith the block namedMySQL deployment config. -
Replace the block named
PosgreSQL persistent volume claim Nwith the block namedMySQL persistent volume claim. In all the newly added blocks, make the following replacements manually, where
Nis the pod number:-
-mysqlwith-mysql-N, except in-mysql-pvoland in-mysql-claim -
-mysql-claimwith-mysql-claim-N
-
-
Replace the block named
If you want to use an external database server, replace several blocks of the file, marked with comments from
BEGINtoEND, with blocks from therhpam70-kieserver-externaldb.yamlfile, remove some blocks, and modify some of the newly added blocks:Replace the block named
MySQL database parameterswith the block namedExternal database parameters. (Take this block and all subsequent replacement blocks from therhpam70-kieserver-external.yamlfile.)Repeat the following actions for every replicated Process Server pod number, for example,
1and2in the unmodified template.Nrefers to the pod number, for example,1.-
Remove the block named
PosgreSQL service N -
Remove the block named
PosgreSQL deployment config N -
Remove the block named
PosgreSQL persistent volume claim N -
Replace the block named
PosgreSQL driver settings Nwith the block namedExternal database driver settings. In the new
External database driver settingsblock, if any of the following values are different for different Process Server pods in the infrastructure, set the values for this particular pod:-
RHPAM_USERNAME: The user name for logging in to the database server -
RHPAM_PASSWORD: The password for logging in to the database server -
RHPAM_XA_CONNECTION_PROPERTY_URL: The full URL for logging in to the database server -
RHPAM_SERVICE_HOST: The host name of the database server -
RHPAM_DATABASE: The database name
-
-
Remove the block named
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.3, “Building a custom Process Server image for an external database”.
-
If you want to change the number of replicas initially created for Business Central Monitoring, on the line below the comment
## Replicas for Business Central Monitoring, change the number of replicas to the desired value.
3.3. Building a custom Process Server image for an external database Copiar enlaceEnlace copiado en el portapapeles!
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
occommand as a user with thecluster-adminrole. - For IBM DB2, Oracle Database, or Sybase, you have downloaded the JDBC driver from the database server vendor.
Procedure
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.jarWhere
<local_path_or_url>is the path to the local directory or the URL for the HTTP server where the driver is provided.
-
For IBM DB2,
-
To install the source code for the custom build, download the
rhpam-7.0.0-openshift-templates.zipproduct deliverable file from the Software Downloads page for Red Hat Process Automation Manager 7.0. Unzip the file and, using the command line, change to thetemplates/contrib/jdbcdirectory of the unzipped file. 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
-
For Microsoft SQL Server,
Run the following command:
- For Microsoft SQL Server or MariaDB:
../build.sh
../build.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow - For IBM DB2, Oracle Database, or Sybase:
../build.sh --artifact-repo=<local_path_or_url>
../build.sh --artifact-repo=<local_path_or_url>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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
../build.sh --artifact-repo=/home/builder/drivers ../build.sh --artifact-repo=http://nexus.example.com/nexus/content/groups/publicCopy to Clipboard Copied! Toggle word wrap Toggle overflow 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
../build.sh --registry=docker-registry.custom-domain:80 ../build.sh --artifact-repo=/home/builder/drivers --registry=docker-registry.custom-domain:80Copy to Clipboard Copied! Toggle word wrap Toggle overflow