此内容没有您所选择的语言版本。
Chapter 2. Preparation for deploying Red Hat Process Automation Manager in your OpenShift environment
Before deploying Red Hat Process Automation Manager in your OpenShift environment, you must complete several procedures. You do not need to repeat these procedures if you want to deploy additional images, for example, for new versions of processes or for other processes.
If you are deploying a trial environment, complete the procedure described in Section 2.1, “Ensuring your environment is authenticated to the Red Hat registry” and do not complete any other preparation procedures.
To deploy Red Hat Process Automation Manager components of Red Hat OpenShift Container Platform, you must ensure that OpenShift can download the correct images from the Red Hat registry.
OpenShift must be configured to authenticate with the Red Hat registry using your service account user name and password. This configuration is specific for a namespace, and if operators work, the configuration is already completed for the openshift namespace.
However, if the image streams for Red Hat Process Automation Manager are not found in the openshift namespace or if the operator is configured to update Red Hat Process Automation Manager to a new version automatically, the operator needs to download images into the namespace of your project. You must complete the authentication configuration for this namespace.
Procedure
-
Ensure you are logged in to OpenShift with the
occommand and that your project is active. - Complete the steps documented in Registry Service Accounts for Shared Environments. You must log in to Red Hat Customer Portal to access the document and to complete the steps to create a registry service account.
- Select the OpenShift Secret tab and click the link under Download secret to download the YAML secret file.
-
View the downloaded file and note the name that is listed in the
name:entry. Run the following commands:
oc create -f <file_name>.yaml oc secrets link default <secret_name> --for=pull oc secrets link builder <secret_name> --for=pull
oc create -f <file_name>.yaml oc secrets link default <secret_name> --for=pull oc secrets link builder <secret_name> --for=pullCopy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
<file_name>with the name of the downloaded file and<secret_name>with the name that is listed in thename:entry of the file.
2.2. Creating the secrets for KIE Server 复制链接链接已复制到粘贴板!
OpenShift uses objects called secrets to hold sensitive information such as passwords or keystores. For more information about OpenShift secrets, see What is a secret in the Red Hat OpenShift Container Platform documentation.
In order to provide HTTPS access, KIE Server uses an SSL certificate. The deployment can create a sample secret automatically. However, in production environments you must create an SSL certificate for KIE Server and provide it to your OpenShift environment as a secret.
Procedure
Generate an SSL keystore named
keystore.jkswith a private and public key for SSL encryption for KIE Server. For more information about creating keystores and using certificates, see How to Configure Server Security.NoteIn a production environment, generate a valid signed certificate that matches the expected URL for KIE Server.
-
Record the name of the certificate. The default value for this name in Red Hat Process Automation Manager configuration is
jboss. -
Record the password of the keystore file. The default value for this name in Red Hat Process Automation Manager configuration is
mykeystorepass. Use the
occommand to generate a secret namedkieserver-app-secretfrom the new keystore file:oc create secret generic kieserver-app-secret --from-file=keystore.jks
$ oc create secret generic kieserver-app-secret --from-file=keystore.jksCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.3. Creating the secrets for Business Central 复制链接链接已复制到粘贴板!
In order to provide HTTPS access, Business Central uses an SSL certificate. The deployment can create a sample secret automatically. However, in production environments you must create an SSL certificate for Business Central and provide it to your OpenShift environment as a secret.
Do not use the same certificate and keystore for Business Central and KIE Server.
Procedure
Generate an SSL keystore named
keystore.jkswith a private and public key for SSL encryption for KIE Server. For more information about creating keystores and using certificates, see How to Configure Server Security.NoteIn a production environment, generate a valid signed certificate that matches the expected URL for Business Central.
-
Record the name of the certificate. The default value for this name in Red Hat Process Automation Manager configuration is
jboss. -
Record the password of the keystore file. The default value for this name in Red Hat Process Automation Manager configuration is
mykeystorepass. Use the
occommand to generate a secret namedbusinesscentral-app-secretfrom the new keystore file:oc create secret generic businesscentral-app-secret --from-file=keystore.jks
$ oc create secret generic businesscentral-app-secret --from-file=keystore.jksCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.4. Creating the secrets for the AMQ broker connection 复制链接链接已复制到粘贴板!
If you want to connect any KIE Server to an AMQ broker and to use SSL for the AMQ broker connection, you must create an SSL certificate for the connection and provide it to your OpenShift environment as a secret.
Procedure
Generate an SSL keystore named
keystore.jkswith a private and public key for SSL encryption for KIE Server. For more information about creating keystores and using certificates, see How to Configure Server Security.NoteIn a production environment, generate a valid signed certificate that matches the expected URL for the AMQ broker connection.
-
Record the name of the certificate. The default value for this name in Red Hat Process Automation Manager configuration is
jboss. -
Record the password of the keystore file. The default value for this name in Red Hat Process Automation Manager configuration is
mykeystorepass. Use the
occommand to generate a secret namedbroker-app-secretfrom the new keystore file:oc create secret generic broker-app-secret --from-file=keystore.jks
$ oc create secret generic broker-app-secret --from-file=keystore.jksCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.5. Creating the secrets for Smart Router 复制链接链接已复制到粘贴板!
In order to provide HTTPS access, Smart Router uses an SSL certificate. The deployment can create a sample secret automatically. However, in production environments you must create an SSL certificate for Smart Router and provide it to your OpenShift environment as a secret.
Do not use the same certificate and keystore for Smart Router as the ones used for KIE Server or Business Central.
Procedure
Generate an SSL keystore named
keystore.jkswith a private and public key for SSL encryption for KIE Server. For more information about creating keystores and using certificates, see How to Configure Server Security.NoteIn a production environment, generate a valid signed certificate that matches the expected URL for Smart Router.
-
Record the name of the certificate. The default value for this name in Red Hat Process Automation Manager configuration is
jboss. -
Record the password of the keystore file. The default value for this name in Red Hat Process Automation Manager configuration is
mykeystorepass. Use the
occommand to generate a secret namedsmartrouter-app-secretfrom the new keystore file:oc create secret generic smartrouter-app-secret --from-file=keystore.jks
$ oc create secret generic smartrouter-app-secret --from-file=keystore.jksCopy to Clipboard Copied! Toggle word wrap Toggle overflow
If you want to use an external database server for a KIE Server and the database server is not a MySQL or PostgreSQL server, you must build a custom KIE Server extension image with drivers for this server before deploying your environment.
Complete the steps in this build procedure to provide drivers for any of the following database servers:
- Microsoft SQL Server
- IBM DB2
- Oracle Database
- Sybase
Optionally, you can use this procedure to build a new version of drivers for any of the following database servers:
- MySQL
- MariaDB
- PostgreSQL
For the supported versions of the database servers, see Red Hat Process Automation Manager 7 Supported Configurations.
The build procedure creates a custom extension image that extends the existing KIE Server image. You must import this custom extension image into your OpenShift environment and then reference it in the EXTENSIONS_IMAGE parameter.
Prerequisites
-
You are logged in to your OpenShift environment using the
occommand. Your OpenShift user must have theregistry-viewerrole. For more information about assigning theregistry-viewerrole, see the "Accessing the registry" section in the "Registry" chapter of the OpenShift Container Platform 4.10 Documentation. - For Oracle Database, IBM DB2, or Sybase, you downloaded the JDBC driver from the database server vendor.
You have installed the following required software:
- Docker: For installation instructions, see Get Docker.
- CEKit version 3.11.0 or higher: For installation instructions, see Installation.
The following libraries and extensions for CEKit. For more information, see Dependencies.
-
docker, provided by thepython3-dockerpackage or similar package -
docker-squash, provided by thepython3-docker-squashpackage or similar package -
behave, provided by thepython3-behavepackage or similar package
-
Procedure
- For IBM DB2, Oracle Database, or Sybase, provide the JDBC driver JAR file in a local directory.
-
Download the
rhpam-7.13.5-openshift-templates.zipproduct deliverable file from the Software Downloads page of the Red Hat Customer Portal. -
Unzip the file and, using the command line, change to the
contrib/jdbc/cekitdirectory of the unzipped file. This directory contains the source code for the custom build. Enter one of the following commands, depending on the database server type:
For Microsoft SQL Server:
make mssql
make mssqlCopy to Clipboard Copied! Toggle word wrap Toggle overflow For MySQL:
make mysql
make mysqlCopy to Clipboard Copied! Toggle word wrap Toggle overflow For PostgreSQL:
make postgresql
make postgresqlCopy to Clipboard Copied! Toggle word wrap Toggle overflow For MariaDB:
make mariadb
make mariadbCopy to Clipboard Copied! Toggle word wrap Toggle overflow For IBM DB2:
make db2 artifact=/tmp/db2jcc4.jar version=10.2
make db2 artifact=/tmp/db2jcc4.jar version=10.2Copy to Clipboard Copied! Toggle word wrap Toggle overflow In this command, replace
/tmp/db2jcc4.jarwith the path name of the IBM DB2 driver and10.2with the version of the driver.For Oracle Database:
make oracle artifact=/tmp/ojdbc7.jar version=7.0
make oracle artifact=/tmp/ojdbc7.jar version=7.0Copy to Clipboard Copied! Toggle word wrap Toggle overflow In this command, replace
/tmp/ojdbc7.jarwith the path name of the Oracle Database driver and7.0with the version of the driver.For Sybase:
make build sybase artifact=/tmp/jconn4-16.0_PL05.jar version=16.0_PL05
make build sybase artifact=/tmp/jconn4-16.0_PL05.jar version=16.0_PL05Copy to Clipboard Copied! Toggle word wrap Toggle overflow In this command, replace
/tmp/jconn4-16.0_PL05.jarwith the path name of the downloaded Sybase driver and16.0_PL05with the version of the driver.Alternatively, if you need to update the driver class or driver XA class for the Sybase driver, you can set the
DRIVER_CLASSorDRIVER_XA_CLASSvariable for this command, for example:export DRIVER_CLASS=another.class.Sybase && make sybase artifact=/tmp/jconn4-16.0_PL05.jar version=16.0_PL05
export DRIVER_CLASS=another.class.Sybase && make sybase artifact=/tmp/jconn4-16.0_PL05.jar version=16.0_PL05Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Enter the following command to list the Docker images that are available locally:
docker images
docker imagesCopy to Clipboard Copied! Toggle word wrap Toggle overflow Note the name of the image that was built, for example,
jboss-kie-db2-extension-openshift-image, and the version tag of the image, for example,11.1.4.4(not thelatesttag).-
Access the registry of your OpenShift environment directly and push the image to the registry. Depending on your user permissions, you can push the image into the
openshiftnamespace or into a project namespace. For instructions about accessing the registry and pushing the images, see Accessing registry directly from the cluster in the Red Hat OpenShift Container Platform product documentation.
2.7. Preparing Git hooks 复制链接链接已复制到粘贴板!
In an authoring environment you can use Git hooks to execute custom operations when the source code of a project in Business Central is changed. The typical use of Git hooks is for interaction with an upstream repository.
To enable Git hooks to interact with an upstream repository using SSH authentication, you must also provide a secret key and a known hosts file for authentication with the repository.
Skip this procedure if you do not want to configure Git hooks.
Procedure
Create the Git hooks files. For instructions, see the Git hooks reference documentation.
NoteA
pre-commitscript is not supported in Business Central. Use apost-commitscript.Create a configuration map (ConfigMap) or persistent volume with the files. For more information about ConfigMaps, see KIE configuration and ConfigMaps.
If the Git hooks consist of one or several fixed script files, use the
occommand to create a configuration map. For example:oc create configmap git-hooks --from-file=post-commit=post-commit
oc create configmap git-hooks --from-file=post-commit=post-commitCopy to Clipboard Copied! Toggle word wrap Toggle overflow If the Git hooks consist of long files or depend on binaries, such as executable or JAR files, use a persistent volume. You must create a persistent volume, create a persistent volume claim and associate the volume with the claim, and transfer files to the volume.
For instructions about persistent volumes and persistent volume claims, see Storage in the Red Hat OpenShift Container Platform documentation. For instructions about copying files onto a persistent volume, see Transferring files in and out of containers.
If the Git hooks scripts must interact with an upstream repository using SSH authentication, prepare a secret with the necessary files:
-
Prepare the
id_rsafile with a private key that matches a public key stored in the repository. -
Prepare the
known_hostsfile with the correct name, address, and public key for the repository. Create a secret with the two files using the
occommand, for example:oc create secret git-hooks-secret --from-file=id_rsa=id_rsa --from-file=known_hosts=known_hosts
oc create secret git-hooks-secret --from-file=id_rsa=id_rsa --from-file=known_hosts=known_hostsCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteWhen the deployment uses this secret, it mounts the
id_rsaandknown_hostsfiles into the/home/jboss/.sshdirectory on Business Central pods.
-
Prepare the
If you want to deploy Business Central Monitoring or high-availability Business Central, your environment must provision persistent volumes with ReadWriteMany access mode.
If your configuration requires provisioning persistent volumes with ReadWriteMany access mode but your environment does not support such provisioning, use NFS to provision the volumes. Otherwise, skip this procedure.
Procedure
Deploy an NFS server and provision the persistent volumes using NFS. For information about provisioning persistent volumes using NFS, see the "Persistent storage using NFS" section of the OpenShift Container Platform Storage guide.
If you are planning to create immutable KIE servers using the source-to-image (S2I) process, you must provide the source code for your services in a Git repository. If you are using Business Central for authoring services, you can extract the source code for your service and place it into a separate Git repository, such as GitHub or an on-premise installation of GitLab, for use in the S2I build.
Skip this procedure if you are not planning to use the S2I process or if you are not using Business Central for authoring services.
Procedure
Use the following command to extract the source code:
git clone https://<business-central-host>:443/git/<MySpace>/<MyProject>
git clone https://<business-central-host>:443/git/<MySpace>/<MyProject>Copy to Clipboard Copied! Toggle word wrap Toggle overflow In this command, replace the following variables:
-
<business-central-host>with the host on which Business Central is running -
<MySpace>with the name of the Business Central space in which the project is located -
<MyProject>with the name of the project
NoteTo view the full Git URL for a project in Business Central, click Menu
Design <MyProject> Settings. NoteIf you are using self-signed certificates for HTTPS communication, the command might fail with an
SSL certificate problemerror message. In this case, disable SSL certificate verification ingit, for example, using theGIT_SSL_NO_VERIFYenvironment variable:env GIT_SSL_NO_VERIFY=true git clone https://<business-central-host>:443/git/<MySpace>/<MyProject>
env GIT_SSL_NO_VERIFY=true git clone https://<business-central-host>:443/git/<MySpace>/<MyProject>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
- Upload the source code to another Git repository, such as GitHub or GitLab, for the S2I build.
2.10. Preparing for deployment in a restricted network 复制链接链接已复制到粘贴板!
You can deploy Red Hat Process Automation Manager in a restricted network that is not connected to the public Internet. For instructions about operator deployment in a restricted network, see Using Operator Lifecycle Manager on restricted networks in Red Hat OpenShift Container Platform documentation.
In Red Hat Process Automation Manager 7.13, deployment on restricted networks is for Technology Preview only. For more information on Red Hat Technology Preview features, see Technology Preview Features Scope.
In order to use a deployment that does not have outgoing access to the public Internet, you must also prepare a Maven repository with a mirror of all the necessary artifacts. For instructions about creating this repository, see Section 2.11, “Preparing a Maven mirror repository for offline use”.
If your Red Hat OpenShift Container Platform environment does not have outgoing access to the public Internet, you must prepare a Maven repository with a mirror of all the necessary artifacts and make this repository available to your environment.
You do not need to complete this procedure if your Red Hat OpenShift Container Platform environment is connected to the Internet.
Prerequisites
- A computer that has outgoing access to the public Internet is available.
Procedure
Configure a Maven release repository to which you have write access. The repository must allow read access without authentication and your OpenShift environment must have network access to this repository.
You can deploy a Nexus repository manager in the OpenShift environment. For instructions about setting up Nexus on OpenShift, see Setting up Nexus in the Red Hat OpenShift Container Platform 3.11 documentation. The documented procedure is applicable to Red Hat OpenShift Container Platform 4.
Use this repository as a mirror to host the publicly available Maven artifacts. You can also provide your own services in this repository in order to deploy these services on immutable servers or to deploy them on managed servers using Business Central monitoring.
- On the computer that has an outgoing connection to the public Internet, complete the following steps:
Navigate to the Software Downloads page in the Red Hat Customer Portal (login required), and select the product and version from the drop-down options:
- Product: Process Automation Manager
Version: 7.13.5
-
Download and extract the Red Hat Process Automation Manager 7.13.5 Offliner Content List (
rhpam-7.13.5-offliner.zip) product deliverable file. -
Extract the contents of the
rhpam-7.13.5-offliner.zipfile into any directory. Change to the directory and enter the following command:
./offline-repo-builder.sh offliner.txt
./offline-repo-builder.sh offliner.txtCopy to Clipboard Copied! Toggle word wrap Toggle overflow This command creates the
repositorysubdirectory and downloads the necessary artifacts into this subdirectory. This is the mirror repository.If a message reports that some downloads have failed, run the same command again. If downloads fail again, contact Red Hat support.
-
Upload all artifacts from the
repositorysubdirectory to the Maven mirror repository that you prepared. You can use the Maven Repository Provisioner utility, available from the Maven repository tools Git repository, to upload the artifacts.
-
Download and extract the Red Hat Process Automation Manager 7.13.5 Offliner Content List (
If you developed services outside of Business Central and they have additional dependencies, add the dependencies to the mirror repository. If you developed the services as Maven projects, you can use the following steps to prepare these dependencies automatically. Complete the steps on the computer that has an outgoing connection to the public Internet.
-
Create a backup of the local Maven cache directory (
~/.m2/repository) and then clear the directory. -
Build the source of your projects using the
mvn clean installcommand. For every project, enter the following command to ensure that Maven downloads all runtime dependencies for all the artifacts generated by the project:
mvn -e -DskipTests dependency:go-offline -f /path/to/project/pom.xml --batch-mode -Djava.net.preferIPv4Stack=true
mvn -e -DskipTests dependency:go-offline -f /path/to/project/pom.xml --batch-mode -Djava.net.preferIPv4Stack=trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
/path/to/project/pom.xmlwith the path of thepom.xmlfile of the project.-
Upload all artifacts from the local Maven cache directory (
~/.m2/repository) to the Maven mirror repository that you prepared. You can use the Maven Repository Provisioner utility, available from the Maven repository tools Git repository, to upload the artifacts.
-
Create a backup of the local Maven cache directory (