From 3cf8d8dcdbc3c2dc5856c4842d2a646b340402cb Mon Sep 17 00:00:00 2001 From: fantonangeli Date: Mon, 14 Oct 2024 17:38:22 +0200 Subject: [PATCH 01/12] Add SonataFlow Management Console guide --- serverlessworkflow/antora.yml | 1 + serverlessworkflow/modules/ROOT/nav.adoc | 1 + .../deployments/deploying-on-openshift.adoc | 4 +- ...aflow-management-console-on-openshift.adoc | 149 ++++++++++++++++++ 4 files changed, 153 insertions(+), 2 deletions(-) create mode 100644 serverlessworkflow/modules/ROOT/pages/use-cases/advanced-developer-use-cases/deployments/deploying-sonataflow-management-console-on-openshift.adoc diff --git a/serverlessworkflow/antora.yml b/serverlessworkflow/antora.yml index 090b78b87..9f1fde0e9 100644 --- a/serverlessworkflow/antora.yml +++ b/serverlessworkflow/antora.yml @@ -47,6 +47,7 @@ asciidoc: sonataflow_devmode_imagename: quay.io/kiegroup/kogito-swf-devmode-nightly sonataflow_builder_imagename: quay.io/kiegroup/kogito-swf-builder-nightly sonataflow_devmode_devui_url: /q/dev-ui/org.apache.kie.sonataflow.sonataflow-quarkus-devui/ + sonataflow_management_console_imagename: quay.io/kiegroup/osl-management-console-image serverless_logic_web_tools_name: Serverless Logic Web Tools serverless_workflow_vscode_extension_name: KIE Serverless Workflow Editor kie_kogito_examples_repo_name: incubator-kie-kogito-examples diff --git a/serverlessworkflow/modules/ROOT/nav.adoc b/serverlessworkflow/modules/ROOT/nav.adoc index 3fcd0031b..4bf4bd112 100644 --- a/serverlessworkflow/modules/ROOT/nav.adoc +++ b/serverlessworkflow/modules/ROOT/nav.adoc @@ -107,6 +107,7 @@ **** xref:use-cases/advanced-developer-use-cases/deployments/deploying-on-minikube.adoc[Deploying on Minikube] **** xref:use-cases/advanced-developer-use-cases/deployments/deploying-on-kubernetes.adoc[Deploying on Kubernetes] **** xref:use-cases/advanced-developer-use-cases/deployments/deploying-on-openshift.adoc[Deploying on OpenShift] +**** xref:use-cases/advanced-developer-use-cases/deployments/deploying-sonataflow-management-console-on-openshift.adoc[Deploying Management Console on OpenShift] *** Persistence **** xref:use-cases/advanced-developer-use-cases/persistence/persistence-core-concepts.adoc[] **** xref:use-cases/advanced-developer-use-cases/persistence/persistence-with-postgresql.adoc[] diff --git a/serverlessworkflow/modules/ROOT/pages/use-cases/advanced-developer-use-cases/deployments/deploying-on-openshift.adoc b/serverlessworkflow/modules/ROOT/pages/use-cases/advanced-developer-use-cases/deployments/deploying-on-openshift.adoc index 3b15f5884..03c1dba1a 100644 --- a/serverlessworkflow/modules/ROOT/pages/use-cases/advanced-developer-use-cases/deployments/deploying-on-openshift.adoc +++ b/serverlessworkflow/modules/ROOT/pages/use-cases/advanced-developer-use-cases/deployments/deploying-on-openshift.adoc @@ -42,7 +42,7 @@ For the following steps we will be using the link:{ocp_local_url}[OpenShift Loca _If you already have an OpenShift cluster available you can skip this section._ -Instructions to install Openshift Local can be found {ocp_local_url_install}[here]. +Instructions to install OpenShift Local can be found {ocp_local_url_install}[here]. Once you have OpenShift Local running, proceed to the next topic. [IMPORTANT] @@ -176,4 +176,4 @@ include::./common/_proc_deploy_sw_oc.adoc[] // deploy with quarkus-cli include::./common/_proc_deploy_sw_quarkus_cli.adoc[] -include::../../../../pages/_common-content/report-issue.adoc[] \ No newline at end of file +include::../../../../pages/_common-content/report-issue.adoc[] diff --git a/serverlessworkflow/modules/ROOT/pages/use-cases/advanced-developer-use-cases/deployments/deploying-sonataflow-management-console-on-openshift.adoc b/serverlessworkflow/modules/ROOT/pages/use-cases/advanced-developer-use-cases/deployments/deploying-sonataflow-management-console-on-openshift.adoc new file mode 100644 index 000000000..d1dd8c1ac --- /dev/null +++ b/serverlessworkflow/modules/ROOT/pages/use-cases/advanced-developer-use-cases/deployments/deploying-sonataflow-management-console-on-openshift.adoc @@ -0,0 +1,149 @@ += Deploying {product_name} Management Console on OpenShift +:compat-mode!: +// Metadata: +:description: Deploying Management Console on OpenShift +:keywords: kogito, workflow, quarkus, serverless, kn, oc, openshift, sonataflow +:table-caption: Data Set +// envs for common content +:management_console: SonataFlow Management Console +:registry: OpenShift's +:command_line_tool: oc +:command_line_tool_name: OpenShift CLI +:ocp_name: OpenShift Container Platform +:platform: OpenShift +// links +:ocp_cli_url: https://docs.openshift.com/container-platform/4.12/cli_reference/openshift_cli/getting-started-cli.html#cli-about-cli_cli-developer-commands + + +This document describes how to deploy the {product_name} Management Console using on OpenShift. + +The SonataFlow Management Console is a web interface designed to manage and monitor workflows in a production-ready environment. It allows users to initiate workflows, trigger Cloud Events, and monitor their execution. + +.Prerequisites +* Your xref:use-cases/advanced-developer-use-cases/deployments/deploying-on-openshift.adoc[{product_name} application] is deployed and ready to use. +* link:{ocp_cli_url}[OpenShift CLI] is installed. +* (Optional) xref:security/orchestrating-third-party-services-with-oauth2.adoc[Keycloak server] is installed in OpenShift. + +== Set up {ocp_name} and deploy your SonataFlow application on OpenShift + +The SonataFlow Management Console relies on the underlying services of the SonataFlow application, including the Data Index service. The Data Index provides data from workflow executions, enabling the Management Console to display workflow information. + +Ensure that your Data Index service is deployed and accessible before deploying the Management Console. +Instructions to set up {ocp_name} and deploy your SonataFlow application on OpenShift can be found xref:use-cases/advanced-developer-use-cases/deployments/deploying-on-openshift.adoc[here]. + +== (Optional) Deploy Keycloak for production + +_If you already have Keycloak deployment or server available you can skip this section._ + +For production environments, deploy Keycloak to handle authentication or choose your orwn OAuth2 server. You can refer to the SonataFlow Keycloak documentation xref:security/orchestrating-third-party-services-with-oauth2.adoc[here]. + +== Deploy {management_console} + +Create the deployment for the SonataFlow Management Console by applying the following YAML definition: + +.Example configuration in `osl-management-console-deployment.yaml` +[source,yaml,subs="attributes+"] +---- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: osl-management-console +spec: + replicas: 1 + selector: + matchLabels: + app: osl-management-console + template: + metadata: + labels: + app: osl-management-console + spec: + containers: + - name: osl-management-console + image: {sonataflow_management_console_imagename}:latest + imagePullPolicy: Always + ports: + - containerPort: 8080 + name: http + protocol: TCP + env: + - name: SONATAFLOW_MANAGEMENT_CONSOLE_KOGITO_ENV_MODE + value: DEV <1> + - name: SONATAFLOW_MANAGEMENT_CONSOLE_DATA_INDEX_ENDPOINT + value: DATA-INDEX-URL <2> +---- +<1> (Optional) Environment mode: "PROD" or "DEV". PROD enables Keycloak integration. +<2> The URL to the Data Index Deployment created xref:use-cases/advanced-developer-use-cases/deployments/deploying-on-openshift.adoc[here]. + +.Apply {management_console} Deployment +[source,shell] +---- +oc apply -f osl-management-console-deployment.yaml +---- + +== Create the Service + +Once the deployment is created, expose it through a service. Create a service definition by applying the following YAML: + +.Example configuration in `osl-management-console-service.yaml` +[source,yaml] +---- +apiVersion: v1 +kind: Service +metadata: + name: osl-management-console-service +spec: + selector: + app: osl-management-console + ports: + - name: http + protocol: TCP + port: 8080 + targetPort: 8080 +---- + +.Apply {management_console} Service +[source,shell] +---- +oc apply -f osl-management-console-service.yaml +---- +This will create a service exposing the SonataFlow Management Console. + +== Create the Route + +Finally, expose the service with a route, so that it can be accessed externally. + +Create the route by applying the following YAML: + +.Example configuration in `osl-management-console-route.yaml` +[source,yaml] +---- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + name: osl-management-console-route +spec: + to: + kind: Service + name: osl-management-console-service + port: + targetPort: http +---- + +.Apply {management_console} Route +[source,shell] +---- +oc apply -f osl-management-console-route.yaml +---- + +== Optional: Keycloak authentication for Production + +In a production environment, you can integrate the SonataFlow Management Console with a Keycloak server for authentication or any OAuth2 server. + +Set the following environment variables in your deployment: + +* `SONATAFLOW_MANAGEMENT_CONSOLE_DATA_INDEX_ENDPOINT="PROD"` +* `KOGITO_CONSOLES_KEYCLOAK_HEALTH_CHECK_URL` – The Keycloak realm’s health check URL. +* `KOGITO_CONSOLES_KEYCLOAK_URL` – The Keycloak server URL. + +include::../../../../pages/_common-content/report-issue.adoc[] From a4f68d2cb0904e9ac160b2e3046ba5321505c77f Mon Sep 17 00:00:00 2001 From: fantonangeli Date: Wed, 16 Oct 2024 22:18:22 +0200 Subject: [PATCH 02/12] Fixes comment: https://github.com/apache/incubator-kie-kogito-docs/pull/674#discussion_r1802770531 --- serverlessworkflow/modules/ROOT/nav.adoc | 2 +- .../deploying-sonataflow-management-console-on-openshift.adoc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename serverlessworkflow/modules/ROOT/pages/{use-cases/advanced-developer-use-cases/deployments => cloud}/deploying-sonataflow-management-console-on-openshift.adoc (98%) diff --git a/serverlessworkflow/modules/ROOT/nav.adoc b/serverlessworkflow/modules/ROOT/nav.adoc index 4bf4bd112..4cba27b8c 100644 --- a/serverlessworkflow/modules/ROOT/nav.adoc +++ b/serverlessworkflow/modules/ROOT/nav.adoc @@ -69,6 +69,7 @@ // * Java Workflow Library TODO: https://issues.redhat.com/browse/KOGITO-9454 * xref:cloud/index.adoc[Cloud] ** xref:cloud/custom-ingress-authz.adoc[Securing Workflows] +** xref:cloud/deploying-sonataflow-management-console-on-openshift.adoc[Deploying Management Console on OpenShift] ** Operator *** xref:cloud/operator/install-serverless-operator.adoc[Installation] *** xref:cloud/operator/global-configuration.adoc[Admin Configuration] @@ -107,7 +108,6 @@ **** xref:use-cases/advanced-developer-use-cases/deployments/deploying-on-minikube.adoc[Deploying on Minikube] **** xref:use-cases/advanced-developer-use-cases/deployments/deploying-on-kubernetes.adoc[Deploying on Kubernetes] **** xref:use-cases/advanced-developer-use-cases/deployments/deploying-on-openshift.adoc[Deploying on OpenShift] -**** xref:use-cases/advanced-developer-use-cases/deployments/deploying-sonataflow-management-console-on-openshift.adoc[Deploying Management Console on OpenShift] *** Persistence **** xref:use-cases/advanced-developer-use-cases/persistence/persistence-core-concepts.adoc[] **** xref:use-cases/advanced-developer-use-cases/persistence/persistence-with-postgresql.adoc[] diff --git a/serverlessworkflow/modules/ROOT/pages/use-cases/advanced-developer-use-cases/deployments/deploying-sonataflow-management-console-on-openshift.adoc b/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc similarity index 98% rename from serverlessworkflow/modules/ROOT/pages/use-cases/advanced-developer-use-cases/deployments/deploying-sonataflow-management-console-on-openshift.adoc rename to serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc index d1dd8c1ac..d1196ae56 100644 --- a/serverlessworkflow/modules/ROOT/pages/use-cases/advanced-developer-use-cases/deployments/deploying-sonataflow-management-console-on-openshift.adoc +++ b/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc @@ -146,4 +146,4 @@ Set the following environment variables in your deployment: * `KOGITO_CONSOLES_KEYCLOAK_HEALTH_CHECK_URL` – The Keycloak realm’s health check URL. * `KOGITO_CONSOLES_KEYCLOAK_URL` – The Keycloak server URL. -include::../../../../pages/_common-content/report-issue.adoc[] +include::../../pages/_common-content/report-issue.adoc[] From 2ec52ff4d8821f302259d2de5ced51cedab3ebe7 Mon Sep 17 00:00:00 2001 From: fantonangeli Date: Wed, 16 Oct 2024 22:22:04 +0200 Subject: [PATCH 03/12] Fixes comment: https://github.com/apache/incubator-kie-kogito-docs/pull/674#discussion_r1800610026 --- serverlessworkflow/antora.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serverlessworkflow/antora.yml b/serverlessworkflow/antora.yml index 9f1fde0e9..9eaa30771 100644 --- a/serverlessworkflow/antora.yml +++ b/serverlessworkflow/antora.yml @@ -47,7 +47,7 @@ asciidoc: sonataflow_devmode_imagename: quay.io/kiegroup/kogito-swf-devmode-nightly sonataflow_builder_imagename: quay.io/kiegroup/kogito-swf-builder-nightly sonataflow_devmode_devui_url: /q/dev-ui/org.apache.kie.sonataflow.sonataflow-quarkus-devui/ - sonataflow_management_console_imagename: quay.io/kiegroup/osl-management-console-image + sonataflow_management_console_imagename: apache/incubator-kie-sonataflow-management-console-image serverless_logic_web_tools_name: Serverless Logic Web Tools serverless_workflow_vscode_extension_name: KIE Serverless Workflow Editor kie_kogito_examples_repo_name: incubator-kie-kogito-examples From 9aef3025bf58ea228be6f15ed7976bedef3b089a Mon Sep 17 00:00:00 2001 From: fantonangeli Date: Wed, 16 Oct 2024 22:33:38 +0200 Subject: [PATCH 04/12] Fixes comment: https://github.com/apache/incubator-kie-kogito-docs/pull/674#discussion_r1802776260 --- .../deploying-sonataflow-management-console-on-openshift.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc b/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc index d1196ae56..fa37cd4a0 100644 --- a/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc +++ b/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc @@ -73,7 +73,8 @@ spec: value: DATA-INDEX-URL <2> ---- <1> (Optional) Environment mode: "PROD" or "DEV". PROD enables Keycloak integration. -<2> The URL to the Data Index Deployment created xref:use-cases/advanced-developer-use-cases/deployments/deploying-on-openshift.adoc[here]. +<2> The URL to the Data Index Deployment created xref:use-cases/advanced-developer-use-cases/deployments/deploying-on-openshift.adoc[here]. + +Please note it's required the Data Index URL to be exposed. .Apply {management_console} Deployment [source,shell] From 95c90142c1d6212b20c758eb48b29d3ab858277f Mon Sep 17 00:00:00 2001 From: fantonangeli Date: Wed, 16 Oct 2024 22:56:21 +0200 Subject: [PATCH 05/12] Fixes comment: https://github.com/apache/incubator-kie-kogito-docs/pull/674#discussion_r1803544869 --- ...ploying-sonataflow-management-console-on-openshift.adoc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc b/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc index fa37cd4a0..17c47d0e7 100644 --- a/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc +++ b/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc @@ -17,7 +17,7 @@ This document describes how to deploy the {product_name} Management Console using on OpenShift. -The SonataFlow Management Console is a web interface designed to manage and monitor workflows in a production-ready environment. It allows users to initiate workflows, trigger Cloud Events, and monitor their execution. +The SonataFlow Management Console is a web interface designed to manage and monitor workflows. It allows users to initiate workflows, trigger Cloud Events, and monitor their execution. .Prerequisites * Your xref:use-cases/advanced-developer-use-cases/deployments/deploying-on-openshift.adoc[{product_name} application] is deployed and ready to use. @@ -29,7 +29,10 @@ The SonataFlow Management Console is a web interface designed to manage and moni The SonataFlow Management Console relies on the underlying services of the SonataFlow application, including the Data Index service. The Data Index provides data from workflow executions, enabling the Management Console to display workflow information. Ensure that your Data Index service is deployed and accessible before deploying the Management Console. -Instructions to set up {ocp_name} and deploy your SonataFlow application on OpenShift can be found xref:use-cases/advanced-developer-use-cases/deployments/deploying-on-openshift.adoc[here]. + +.See also: +. xref:use-cases/advanced-developer-use-cases/deployments/deploying-on-openshift.adoc[Deploying your SonataFlow application on OpenShift ] +. xref:cloud/operator/supporting-services.adoc[Data Index installation with the Operator] == (Optional) Deploy Keycloak for production From 21feb0cda22bb5c011163520f7512780d3de8b28 Mon Sep 17 00:00:00 2001 From: fantonangeli Date: Wed, 16 Oct 2024 22:58:24 +0200 Subject: [PATCH 06/12] Fixes comment: https://github.com/apache/incubator-kie-kogito-docs/pull/674#discussion_r1803546290 --- ...eploying-sonataflow-management-console-on-openshift.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc b/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc index 17c47d0e7..7cd12bce5 100644 --- a/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc +++ b/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc @@ -82,7 +82,7 @@ Please note it's required the Data Index URL to be exposed. .Apply {management_console} Deployment [source,shell] ---- -oc apply -f osl-management-console-deployment.yaml +kubeclt apply -f osl-management-console-deployment.yaml ---- == Create the Service @@ -109,7 +109,7 @@ spec: .Apply {management_console} Service [source,shell] ---- -oc apply -f osl-management-console-service.yaml +kubeclt apply -f osl-management-console-service.yaml ---- This will create a service exposing the SonataFlow Management Console. @@ -137,7 +137,7 @@ spec: .Apply {management_console} Route [source,shell] ---- -oc apply -f osl-management-console-route.yaml +kubeclt apply -f osl-management-console-route.yaml ---- == Optional: Keycloak authentication for Production From 13c2afda83c5d795639c361055a8c21e26e8f468 Mon Sep 17 00:00:00 2001 From: fantonangeli Date: Wed, 16 Oct 2024 23:01:17 +0200 Subject: [PATCH 07/12] Fixes comment: https://github.com/apache/incubator-kie-kogito-docs/pull/674#discussion_r1803546651 --- .../deploying-sonataflow-management-console-on-openshift.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc b/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc index 7cd12bce5..8e4d812b8 100644 --- a/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc +++ b/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc @@ -113,7 +113,7 @@ kubeclt apply -f osl-management-console-service.yaml ---- This will create a service exposing the SonataFlow Management Console. -== Create the Route +== Create the Route (OpenShift only) Finally, expose the service with a route, so that it can be accessed externally. From cf06430a892cabb79f57525f8f693cf06a9671c6 Mon Sep 17 00:00:00 2001 From: fantonangeli Date: Wed, 16 Oct 2024 23:23:07 +0200 Subject: [PATCH 08/12] Fixes comment: https://github.com/apache/incubator-kie-kogito-docs/pull/674#discussion_r1803548125 --- serverlessworkflow/modules/ROOT/nav.adoc | 2 +- ...low-management-console-on-kubernetes.adoc} | 23 +++++++++++-------- 2 files changed, 15 insertions(+), 10 deletions(-) rename serverlessworkflow/modules/ROOT/pages/cloud/{deploying-sonataflow-management-console-on-openshift.adoc => deploying-sonataflow-management-console-on-kubernetes.adoc} (86%) diff --git a/serverlessworkflow/modules/ROOT/nav.adoc b/serverlessworkflow/modules/ROOT/nav.adoc index 4cba27b8c..646561881 100644 --- a/serverlessworkflow/modules/ROOT/nav.adoc +++ b/serverlessworkflow/modules/ROOT/nav.adoc @@ -69,7 +69,7 @@ // * Java Workflow Library TODO: https://issues.redhat.com/browse/KOGITO-9454 * xref:cloud/index.adoc[Cloud] ** xref:cloud/custom-ingress-authz.adoc[Securing Workflows] -** xref:cloud/deploying-sonataflow-management-console-on-openshift.adoc[Deploying Management Console on OpenShift] +** xref:cloud/deploying-sonataflow-management-console-on-kubernetes.adoc[Deploying Management Console on Kubernetes] ** Operator *** xref:cloud/operator/install-serverless-operator.adoc[Installation] *** xref:cloud/operator/global-configuration.adoc[Admin Configuration] diff --git a/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc b/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-kubernetes.adoc similarity index 86% rename from serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc rename to serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-kubernetes.adoc index 8e4d812b8..fb0e2ab10 100644 --- a/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-openshift.adoc +++ b/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-kubernetes.adoc @@ -1,7 +1,7 @@ -= Deploying {product_name} Management Console on OpenShift += Deploying {product_name} Management Console on Kubernetes :compat-mode!: // Metadata: -:description: Deploying Management Console on OpenShift +:description: Deploying Management Console on Kubernetes :keywords: kogito, workflow, quarkus, serverless, kn, oc, openshift, sonataflow :table-caption: Data Set // envs for common content @@ -11,20 +11,18 @@ :command_line_tool_name: OpenShift CLI :ocp_name: OpenShift Container Platform :platform: OpenShift -// links -:ocp_cli_url: https://docs.openshift.com/container-platform/4.12/cli_reference/openshift_cli/getting-started-cli.html#cli-about-cli_cli-developer-commands -This document describes how to deploy the {product_name} Management Console using on OpenShift. +This document describes how to deploy the {product_name} Management Console using on Kubernetes. The SonataFlow Management Console is a web interface designed to manage and monitor workflows. It allows users to initiate workflows, trigger Cloud Events, and monitor their execution. .Prerequisites -* Your xref:use-cases/advanced-developer-use-cases/deployments/deploying-on-openshift.adoc[{product_name} application] is deployed and ready to use. -* link:{ocp_cli_url}[OpenShift CLI] is installed. -* (Optional) xref:security/orchestrating-third-party-services-with-oauth2.adoc[Keycloak server] is installed in OpenShift. +* Your xref:cloud/operator/build-and-deploy-workflows.adoc[{product_name} application] is deployed and ready to use. +* A Kubernetes or OpenShift cluster with admin privileges and kubectl installed. +* (Optional) xref:security/orchestrating-third-party-services-with-oauth2.adoc[Keycloak server] is installed. -== Set up {ocp_name} and deploy your SonataFlow application on OpenShift +== Set up {ocp_name} and deploy your SonataFlow application The SonataFlow Management Console relies on the underlying services of the SonataFlow application, including the Data Index service. The Data Index provides data from workflow executions, enabling the Management Console to display workflow information. @@ -140,6 +138,13 @@ spec: kubeclt apply -f osl-management-console-route.yaml ---- +== Create the Ingress (Kubernetes only) + +For Kubernetes you can expose the SonataFlow Management Console using an Ingress. + +To create an Ingress, refer to the official Kubernetes documentation here: link:https://kubernetes.io/docs/concepts/services-networking/ingress/[Kubernetes Ingress Guide]. + + == Optional: Keycloak authentication for Production In a production environment, you can integrate the SonataFlow Management Console with a Keycloak server for authentication or any OAuth2 server. From b944e5cfd53346b4db0d9e3ae0e9b46fa81a4e9f Mon Sep 17 00:00:00 2001 From: fantonangeli Date: Thu, 17 Oct 2024 15:29:46 +0200 Subject: [PATCH 09/12] Various fixes --- ...flow-management-console-on-kubernetes.adoc | 62 +++++++++---------- 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-kubernetes.adoc b/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-kubernetes.adoc index fb0e2ab10..f516c7253 100644 --- a/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-kubernetes.adoc +++ b/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-kubernetes.adoc @@ -1,4 +1,4 @@ -= Deploying {product_name} Management Console on Kubernetes += Deploying {product_name} Management Console on {platform} :compat-mode!: // Metadata: :description: Deploying Management Console on Kubernetes @@ -6,23 +6,21 @@ :table-caption: Data Set // envs for common content :management_console: SonataFlow Management Console -:registry: OpenShift's -:command_line_tool: oc -:command_line_tool_name: OpenShift CLI -:ocp_name: OpenShift Container Platform -:platform: OpenShift +:management_console_prefix: sonataflow-management-console +:command_line_tool: kubectl +:platform: Kubernetes -This document describes how to deploy the {product_name} Management Console using on Kubernetes. +This document describes how to deploy the {product_name} Management Console on {platform} The SonataFlow Management Console is a web interface designed to manage and monitor workflows. It allows users to initiate workflows, trigger Cloud Events, and monitor their execution. .Prerequisites * Your xref:cloud/operator/build-and-deploy-workflows.adoc[{product_name} application] is deployed and ready to use. -* A Kubernetes or OpenShift cluster with admin privileges and kubectl installed. +* A {platform} or OpenShift cluster with admin privileges and {command_line_tool} installed. * (Optional) xref:security/orchestrating-third-party-services-with-oauth2.adoc[Keycloak server] is installed. -== Set up {ocp_name} and deploy your SonataFlow application +== Set up {platform} and deploy your SonataFlow application The SonataFlow Management Console relies on the underlying services of the SonataFlow application, including the Data Index service. The Data Index provides data from workflow executions, enabling the Management Console to display workflow information. @@ -36,31 +34,31 @@ Ensure that your Data Index service is deployed and accessible before deploying _If you already have Keycloak deployment or server available you can skip this section._ -For production environments, deploy Keycloak to handle authentication or choose your orwn OAuth2 server. You can refer to the SonataFlow Keycloak documentation xref:security/orchestrating-third-party-services-with-oauth2.adoc[here]. +For production environments, deploy Keycloak to handle authentication or choose your own OAuth2 server. You can refer to the SonataFlow Keycloak documentation xref:security/orchestrating-third-party-services-with-oauth2.adoc[here]. == Deploy {management_console} Create the deployment for the SonataFlow Management Console by applying the following YAML definition: -.Example configuration in `osl-management-console-deployment.yaml` +.Example configuration in `{management_console_prefix}-deployment.yaml` [source,yaml,subs="attributes+"] ---- apiVersion: apps/v1 kind: Deployment metadata: - name: osl-management-console + name: {management_console_prefix} spec: replicas: 1 selector: matchLabels: - app: osl-management-console + app: {management_console_prefix} template: metadata: labels: - app: osl-management-console + app: {management_console_prefix} spec: containers: - - name: osl-management-console + - name: {management_console_prefix} image: {sonataflow_management_console_imagename}:latest imagePullPolicy: Always ports: @@ -78,25 +76,25 @@ spec: Please note it's required the Data Index URL to be exposed. .Apply {management_console} Deployment -[source,shell] +[source,shell,subs="attributes+"] ---- -kubeclt apply -f osl-management-console-deployment.yaml +{command_line_tool} apply -f {management_console_prefix}-deployment.yaml ---- == Create the Service Once the deployment is created, expose it through a service. Create a service definition by applying the following YAML: -.Example configuration in `osl-management-console-service.yaml` -[source,yaml] +.Example configuration in `{management_console_prefix}-service.yaml` +[source,yaml,subs="attributes+"] ---- apiVersion: v1 kind: Service metadata: - name: osl-management-console-service + name: {management_console_prefix}-service spec: selector: - app: osl-management-console + app: {management_console_prefix} ports: - name: http protocol: TCP @@ -105,9 +103,9 @@ spec: ---- .Apply {management_console} Service -[source,shell] +[source,shell,subs="attributes+"] ---- -kubeclt apply -f osl-management-console-service.yaml +{command_line_tool} apply -f {management_console_prefix}-service.yaml ---- This will create a service exposing the SonataFlow Management Console. @@ -117,32 +115,32 @@ Finally, expose the service with a route, so that it can be accessed externally. Create the route by applying the following YAML: -.Example configuration in `osl-management-console-route.yaml` -[source,yaml] +.Example configuration in `{management_console_prefix}-route.yaml` +[source,yaml,subs="attributes+"] ---- apiVersion: route.openshift.io/v1 kind: Route metadata: - name: osl-management-console-route + name: {management_console_prefix}-route spec: to: kind: Service - name: osl-management-console-service + name: {management_console_prefix}-service port: targetPort: http ---- .Apply {management_console} Route -[source,shell] +[source,shell,subs="attributes+"] ---- -kubeclt apply -f osl-management-console-route.yaml +{command_line_tool} apply -f {management_console_prefix}-route.yaml ---- -== Create the Ingress (Kubernetes only) +== Create the Ingress ({platform} only) -For Kubernetes you can expose the SonataFlow Management Console using an Ingress. +For {platform} you can expose the SonataFlow Management Console using an Ingress. -To create an Ingress, refer to the official Kubernetes documentation here: link:https://kubernetes.io/docs/concepts/services-networking/ingress/[Kubernetes Ingress Guide]. +To create an Ingress, refer to the official {platform} documentation here: link:https://kubernetes.io/docs/concepts/services-networking/ingress/[{platform} Ingress Guide]. == Optional: Keycloak authentication for Production From ba30d993f3eddd5bf6033783a3be9c4c3f2b8a38 Mon Sep 17 00:00:00 2001 From: fantonangeli Date: Thu, 17 Oct 2024 19:53:46 +0200 Subject: [PATCH 10/12] Fixes comment: https://github.com/apache/incubator-kie-kogito-docs/pull/674#discussion_r1804999381 --- ...nataflow-management-console-on-kubernetes.adoc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-kubernetes.adoc b/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-kubernetes.adoc index f516c7253..614c5df21 100644 --- a/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-kubernetes.adoc +++ b/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-kubernetes.adoc @@ -1,4 +1,4 @@ -= Deploying {product_name} Management Console on {platform} += Deploying {product_name} Management Console on Kubernetes :compat-mode!: // Metadata: :description: Deploying Management Console on Kubernetes @@ -8,19 +8,18 @@ :management_console: SonataFlow Management Console :management_console_prefix: sonataflow-management-console :command_line_tool: kubectl -:platform: Kubernetes -This document describes how to deploy the {product_name} Management Console on {platform} +This document describes how to deploy the {product_name} Management Console on Kubernetes The SonataFlow Management Console is a web interface designed to manage and monitor workflows. It allows users to initiate workflows, trigger Cloud Events, and monitor their execution. .Prerequisites * Your xref:cloud/operator/build-and-deploy-workflows.adoc[{product_name} application] is deployed and ready to use. -* A {platform} or OpenShift cluster with admin privileges and {command_line_tool} installed. +* A Kubernetes or OpenShift cluster with admin privileges and {command_line_tool} installed. * (Optional) xref:security/orchestrating-third-party-services-with-oauth2.adoc[Keycloak server] is installed. -== Set up {platform} and deploy your SonataFlow application +== Set up Kubernetes and deploy your SonataFlow application The SonataFlow Management Console relies on the underlying services of the SonataFlow application, including the Data Index service. The Data Index provides data from workflow executions, enabling the Management Console to display workflow information. @@ -136,11 +135,11 @@ spec: {command_line_tool} apply -f {management_console_prefix}-route.yaml ---- -== Create the Ingress ({platform} only) +== Create the Ingress (Kubernetes only) -For {platform} you can expose the SonataFlow Management Console using an Ingress. +For Kubernetes you can expose the SonataFlow Management Console using an Ingress. -To create an Ingress, refer to the official {platform} documentation here: link:https://kubernetes.io/docs/concepts/services-networking/ingress/[{platform} Ingress Guide]. +To create an Ingress, refer to the official Kubernetes documentation here: link:https://kubernetes.io/docs/concepts/services-networking/ingress/[Kubernetes Ingress Guide]. == Optional: Keycloak authentication for Production From bb5285952fc6bc6972791920551168aa880a324c Mon Sep 17 00:00:00 2001 From: fantonangeli Date: Mon, 21 Oct 2024 14:16:16 +0200 Subject: [PATCH 11/12] Updated image name following https://github.com/apache/incubator-kie-tools/pull/2689 --- serverlessworkflow/antora.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serverlessworkflow/antora.yml b/serverlessworkflow/antora.yml index 9eaa30771..a160706a8 100644 --- a/serverlessworkflow/antora.yml +++ b/serverlessworkflow/antora.yml @@ -47,7 +47,7 @@ asciidoc: sonataflow_devmode_imagename: quay.io/kiegroup/kogito-swf-devmode-nightly sonataflow_builder_imagename: quay.io/kiegroup/kogito-swf-builder-nightly sonataflow_devmode_devui_url: /q/dev-ui/org.apache.kie.sonataflow.sonataflow-quarkus-devui/ - sonataflow_management_console_imagename: apache/incubator-kie-sonataflow-management-console-image + sonataflow_management_console_imagename: apache/incubator-kie-sonataflow-management-console serverless_logic_web_tools_name: Serverless Logic Web Tools serverless_workflow_vscode_extension_name: KIE Serverless Workflow Editor kie_kogito_examples_repo_name: incubator-kie-kogito-examples From 5586f9b1eaecd50ab1018dfbe3395b46ba30981f Mon Sep 17 00:00:00 2001 From: fantonangeli Date: Mon, 21 Oct 2024 14:17:06 +0200 Subject: [PATCH 12/12] Fixes comment: https://github.com/apache/incubator-kie-kogito-docs/pull/674#discussion_r1805956086 --- .../deploying-sonataflow-management-console-on-kubernetes.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-kubernetes.adoc b/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-kubernetes.adoc index 614c5df21..936ebc8e2 100644 --- a/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-kubernetes.adoc +++ b/serverlessworkflow/modules/ROOT/pages/cloud/deploying-sonataflow-management-console-on-kubernetes.adoc @@ -68,7 +68,7 @@ spec: - name: SONATAFLOW_MANAGEMENT_CONSOLE_KOGITO_ENV_MODE value: DEV <1> - name: SONATAFLOW_MANAGEMENT_CONSOLE_DATA_INDEX_ENDPOINT - value: DATA-INDEX-URL <2> + value: publicly.accesible.url.of.data-index-service/graphql <2> ---- <1> (Optional) Environment mode: "PROD" or "DEV". PROD enables Keycloak integration. <2> The URL to the Data Index Deployment created xref:use-cases/advanced-developer-use-cases/deployments/deploying-on-openshift.adoc[here]. +