From 2071c7078704ba48388ae1ab1f46597a5e35ba89 Mon Sep 17 00:00:00 2001 From: Mikhail Ramendik <33361640+mramendi@users.noreply.github.com> Date: Mon, 30 Nov 2020 02:34:26 +0000 Subject: [PATCH] Operator procedure for immutable KIE server from Maven repo (#131) * Operator procedure for immutable KIE server from Maven repo * Reference external Maven repo with the KIE server immutable Maven * SME review * peer review --- .../openshift/operator-deploy-basic-proc.adoc | 11 +++++++-- .../operator-deploy-kieserver-proc.adoc | 23 +++++++++++++------ 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/doc-content/enterprise-only/openshift/operator-deploy-basic-proc.adoc b/doc-content/enterprise-only/openshift/operator-deploy-basic-proc.adoc index b29ea6f85c..0a21fcf60a 100644 --- a/doc-content/enterprise-only/openshift/operator-deploy-basic-proc.adoc +++ b/doc-content/enterprise-only/openshift/operator-deploy-basic-proc.adoc @@ -27,7 +27,6 @@ endif::DM[] ==== + ** `rhpam-production`: An environment for running existing services for staging and production purposes. This environment includes {CENTRAL} Monitoring, Smart Router, and two groups of {KIE_SERVER} pods. You can deploy and undeploy services on every such group and also scale the group up or down as necessary. Use {CENTRAL} Monitoring to deploy, run, and stop the services and to monitor their execution. -** `rhpam-production-immutable`: An alternate environment for running existing services for staging and production purposes. This environment includes {CENTRAL} Monitoring. You can configure one or more {KIE_SERVER} pods that build a service from source and replicate each pod as necessary. In this environment, when you deploy a {KIE_SERVER} pod, it builds an image that loads and starts a service or group of services. You cannot stop any service on the pod or add any new service to the pod. If you want to use another version of a service or modify the configuration in any other way, you deploy a new server image to replace the old one. In this system, the {KIE_SERVER} runs like any other pod on the OpenShift environment. You can use any container-based integration workflows and you do not need to use any other tools to manage the pods. endif::PAM[] ifdef::DM[] ** `rhdm-trial`: A trial environment that you can set up quickly and use to evaluate or demonstrate developing and running assets. Includes {CENTRAL} and a {KIE_SERVER}. This environment does not use any persistent storage, and any work you do in the environment is not saved. @@ -39,8 +38,16 @@ ifdef::DM[] In {PRODUCT} {ENTERPRISE_VERSION}, high-availability {CENTRAL} functionality is for Technology Preview only. For more information about Red Hat Technology Preview features, see https://access.redhat.com/support/offerings/techpreview/[Technology Preview Features Support Scope]. ==== + -** `rhdm-production-immutable`: An alternate environment for running existing services for staging and production purposes. You can configure one or more {KIE_SERVER} replicated pods that build a service from source. In this environment, when you deploy a {KIE_SERVER} pod, it builds an image that loads and starts a service or group of services. You cannot stop any service on the pod or add any new service to the pod. If you want to use another version of a service or modify the configuration in any other way, you deploy a new server image and displace the old one. In this system, the {KIE_SERVER} runs like any other pod on the OpenShift environment. You can use any container-based integration workflows and do not need to use any other tools to manage the pods. endif::DM[] +** `{PRODUCT_INIT}-production-immutable`: An alternate environment for running existing services for staging and production purposes. You can configure one or more {KIE_SERVER} pods that build services from source or pull them from a Maven repository. You can then replicate each pod as necessary. ++ +You cannot remove any service from the pod or add any new service to the pod. If you want to use another version of a service or to modify the configuration in any other way, deploy a new server image to replace the old one. You can use any container-based integration workflows to manage the pods. ++ +When configuring this environment, in the *KIE Servers* tab you must customize the {KIE_SERVER} and either click the *Set immutable server configuration* button or set the `KIE_SERVER_CONTAINER_DEPLOYMENT` environment variable. For instructions about configuring the {KIE_SERVER}, see xref:operator-deploy-kieserver-proc_{context}[]. +ifdef::PAM[] ++ +Optionally, you can also use the *Console* tab to include {CENTRAL} Monitoring in this environment to monitor, stop, and restart the execution of process services. For instructions about configuring {CENTRAL} Monitoring, see xref:operator-deploy-central-proc_{context}[]. +endif::PAM[] + . If you want to enable automatic upgrades to new versions, select the *Enable Upgrades* box. If this box is selected, when a new patch version of {PRODUCT} {ENTERPRISE_VERSION} becomes available, the operator automatically upgrades your deployment to this version. All services are preserved and normally remain available throughout the upgrade process. + diff --git a/doc-content/enterprise-only/openshift/operator-deploy-kieserver-proc.adoc b/doc-content/enterprise-only/openshift/operator-deploy-kieserver-proc.adoc index f66d8ab661..c4baeebe4a 100644 --- a/doc-content/enterprise-only/openshift/operator-deploy-kieserver-proc.adoc +++ b/doc-content/enterprise-only/openshift/operator-deploy-kieserver-proc.adoc @@ -26,17 +26,23 @@ Optionally, you can set custom configuration for {KIE_SERVERS}. In this case, de + For instructions about creating custom images, see xref:customimage-con_{context}[]. + -. If you want to configure an immutable {KIE_SERVER}, complete the following additional steps: +. If you want to configure an immutable {KIE_SERVER} using a Source to Image (S2I) build, complete the following additional steps: ++ +[IMPORTANT] +==== +If you want to configure an immutable {KIE_SERVER} that pulls services from the Maven repository, do not click *Set Immutable server configuration* and do not complete these steps. Instead, set the `KIE_SERVER_CONTAINER_REPLOYMENT` environment variable. +==== ++ .. Click *Set Immutable server configuration*. -.. In the *KIE Server container deployment* field, enter the identifying information of the decision services (KJAR files) that the deployment must pull from the Maven repository. The format is `=::` or, if you want to specify an alias name for the container, `()=::`. You can provide two or more KJAR files using the `|` separator, as illustrated in the following example: `containerId=groupId:artifactId:version|c2(alias2)=g2:a2:v2`. -.. If your OpenShift environment does not have a connection to the public Internet, enter the URL of the Maven mirror that you set up according to <> in the *Maven mirror URL* field. +.. In the *KIE Server container deployment* field, enter the identifying information of the services (KJAR files) that the deployment must extract from the result of a Source to Image (S2I) build. The format is `=::` or, if you want to specify an alias name for the container, `()=::`. You can provide two or more KJAR files using the `|` separator, as illustrated in the following example: `containerId=groupId:artifactId:version|c2(alias2)=g2:a2:v2`. +.. If your OpenShift environment does not have a connection to the public Internet, enter the URL of the Maven mirror that you set up according to <> in the *Maven mirror URL* field. .. In the *Artifact directory* field, enter the path within the project that contains the required binary files (KJAR files and any other necessary files) after a successful Maven build. Normally this directory is the target directory of the build. However, you can provide prebuilt binaries in this directory in the Git repository. .. If you want to use a custom base {KIE_SERVER} image for the S2I build, click *Set Base build image* and then enter the name of the image stream in the *Name* field. If the image stream is not in the `openshift` namespace, enter the namespace in the *Namespace* field. If you want to use a Docker image name and not an OpenShift image stream tag, change the *Kind* value to `DockerImage`. -.. If you want to create the immutable server from source in a Git repository using the Source to Image (S2I) process, click the *Set Git source* button and enter information in the following fields: +.. Click *Set Git source* and enter information in the following fields: *** *S2I Git URI*:The URI for the Git repository that contains the source for your services. *** *Reference*: The branch in the Git repository. *** *Context directory*: (Optional) The path to the source within the project downloaded from the Git repository. By default, the root directory of the downloaded project is the source directory. -.. If you are using S2I and want to set a Git Webhook so that changes in the Git repository cause an automatic rebuild of the {KIE_SERVER}, click *Add new Webhook*. Then select the type of the Webhook in the *Type* field and enter the secret string for the Webhook in the *Secret* field. +.. If you want to set a Git Webhook so changes in the Git repository cause an automatic rebuild of the {KIE_SERVER}, click *Add new Webhook*. Select the type of the Webhook from the *Type* list and enter the secret string for the Webhook in the *Secret* field. . Optionally, enter requested and maximum CPU and memory limits in the fields under *Resource quotas*. If you are configuring several {KIE_SERVERS}, the limits apply to each server separately. . If you selected RH-SSO authentication, configure RH-SSO for the {KIE_SERVER}: .. Enter the client name in the *Client name* field and the client secret in the *Client secret* field. If a client with this name does not exist, the deployment attempts to create a new client with this name and secret. @@ -106,8 +112,10 @@ If you are using a MySQL version 8 image provided by Red Hat on {OPENSHIFT}, to If you created users on the MySQL version 8 server before enabling the `mysql_native_password` plugin, you must update the `mysql-user` table after you enable the plugin. endif::PAM[] . Optionally, depending on your needs, set environment variables. To set an environment variable, click *Add new Environment variable*, then enter the name and value for the variable in the *Name* and *Value* fields. -** If you want to configure your {KIE_SERVER} deployment to use Prometheus to collect and store metrics, set the `PROMETHEUS_SERVER_EXT_DISABLED` environment variable to `false`. For instructions about configuring Prometheus metrics collection, see {URL_MANAGING_KIE_SERVER}#prometheus-monitoring-ocp-proc_execution-server[_{MANAGING_KIE_SERVER}_]. -** If you want to use an external Maven repository, set the following variables: +** If you want to configure an immutable KIE server that pulls services from the configured Maven repository, enter the following settings: +... Set the `KIE_SERVER_CONTAINER_DEPLOYMENT` environment variable. The variable must contain the identifying information of the services (KJAR files) that the deployment must pull from the Maven repository. The format is `=::` or, if you want to specify an alias name for the container, `()=::`. You can provide two or more KJAR files using the `|` separator, as illustrated in the following example: `containerId=groupId:artifactId:version|c2(alias2)=g2:a2:v2`. +... Configure an external Maven repository. +** If you want to configure an external Maven repository, set the following variables: *** `MAVEN_REPO_URL`: The URL for the Maven repository *** `MAVEN_REPO_ID`: An identifier for the Maven repository, for example, `repo-custom` *** `MAVEN_REPO_USERNAME`: The user name for the Maven repository @@ -120,6 +128,7 @@ If you configure an external Maven repository (`MAVEN_REPO_URL`), change `MAVEN_ + If your authoring environment uses a built-in {CENTRAL} Maven repository, change `MAVEN_MIRROR_OF` to exclude the artifacts in this repository from the mirror: `external:*,!repo-{PRODUCT_INIT}centr`. + +** If you want to configure your {KIE_SERVER} deployment to use Prometheus to collect and store metrics, set the `PROMETHEUS_SERVER_EXT_DISABLED` environment variable to `false`. For instructions about configuring Prometheus metrics collection, see {URL_MANAGING_SETTINGS}#prometheus-monitoring-ocp-proc_execution-server[_{MANAGING_KIE_SERVER}_]. ** In some authoring environments, you might need to ensure that several users can deploy services on the same {KIE_SERVER} at the same time. By default, after deploying a service onto a {KIE_SERVER} using {CENTRAL}, the user needs to wait for some seconds before more services can be deployed. The `OpenShiftStartupStrategy` setting is enabled by default and causes this limitation. To remove the limitation, you can configure an `{PRODUCT_INIT}-authoring` environment to use the _controller strategy_. Do not make this change unless a specific need for it exists; if you decide to enable controller strategy, make this change on {CENTRAL} and on all {KIE_SERVERS} in the same environment. + [NOTE]