You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "domhanak (via GitHub)" <gi...@apache.org> on 2025/01/09 10:24:51 UTC
[PR] kie-kogito-docs#695: Holistic review of serverless-workflow documenta… [incubator-kie-kogito-docs]
domhanak opened a new pull request, #696:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/696
…tion Q1/2025
<!-- Please don't forget your Issue link -->
Closes/Fixes/Resolves #695
<!-- Please provide a short description of what this PR does -->
**Description:**
See the asociated issue.
Also adds guides that were missing here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-kogito-docs#695: Holistic review of serverless-workflow documenta… [incubator-kie-kogito-docs]
Posted by "domhanak (via GitHub)" <gi...@apache.org>.
domhanak merged PR #696:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/696
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-kogito-docs#695: Holistic review of serverless-workflow documenta… [incubator-kie-kogito-docs]
Posted by "domhanak (via GitHub)" <gi...@apache.org>.
domhanak commented on code in PR #696:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/696#discussion_r1914438212
##########
serverlessworkflow/antora.yml:
##########
@@ -43,16 +45,20 @@ asciidoc:
operator_openshift_catalog: sonataflow-operator
operator_k8s_keyword: sonataflow
operator_k8s_subscription: my-sonataflow-operator
- kogito_devservices_imagename: quay.io/kiegroup/kogito-data-index-ephemeral-nightly
- sonataflow_devmode_imagename: quay.io/kiegroup/kogito-swf-devmode-nightly
- sonataflow_builder_imagename: quay.io/kiegroup/kogito-swf-builder-nightly
+ container_image_registry_base: docker.io
+ sonataflow_operator_imagename: docker.io/apache/incubator-kie-sonataflow-operator
+ sonataflow_devmode_imagename: docker.io/apache/incubator-kie-sonataflow-devmode
+ sonataflow_builder_imagename: docker.io/apache/incubator-kie-sonataflow-builder
+ sonataflow_builder_configmap_name: sonataflow-operator-builder-config
+ sonataflow_dataindex_postgresql_imagename: docker.io/apache/incubator-kie-kogito-data-index-postgresql
+ sonataflow_dataindex_ephemeral_imagename: docker.io/apache/incubator-kie-kogito-data-index-ephemeral
sonataflow_devmode_devui_url: /q/dev-ui/org.apache.kie.sonataflow.sonataflow-quarkus-devui/
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
# Jobs service image and links
- jobs_service_image_allinone_url: https://hub.docker.com/r/apache/incubator-kie-kogito-jobs-service-allinone
+ jobs_service_image_allinone_url: https://hub.docker.com/r/apache/incubator-sonataflow-data-index-postgresql
Review Comment:
This is public GH space @gmunozfe
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-kogito-docs#695: Holistic review of serverless-workflow documenta… [incubator-kie-kogito-docs]
Posted by "domhanak (via GitHub)" <gi...@apache.org>.
domhanak commented on code in PR #696:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/696#discussion_r1909140969
##########
serverlessworkflow/antora.yml:
##########
@@ -43,16 +45,20 @@ asciidoc:
operator_openshift_catalog: sonataflow-operator
operator_k8s_keyword: sonataflow
operator_k8s_subscription: my-sonataflow-operator
- kogito_devservices_imagename: quay.io/kiegroup/kogito-data-index-ephemeral-nightly
- sonataflow_devmode_imagename: quay.io/kiegroup/kogito-swf-devmode-nightly
- sonataflow_builder_imagename: quay.io/kiegroup/kogito-swf-builder-nightly
+ container_image_registry_base: docker.io
+ sonataflow_operator_imagename: docker.io/apache/incubator-kie-sonataflow-operator
+ sonataflow_devmode_imagename: docker.io/apache/incubator-kie-sonataflow-devmode
+ sonataflow_builder_imagename: docker.io/apache/incubator-kie-sonataflow-builder
+ sonataflow_builder_configmap_name: sonataflow-operator-builder-config
+ sonataflow_dataindex_postgresql_imagename: docker.io/apache/incubator-kie-kogito-data-index-postgresql
+ sonataflow_dataindex_ephemeral_imagename: docker.io/apache/incubator-kie-kogito-data-index-ephemeral
sonataflow_devmode_devui_url: /q/dev-ui/org.apache.kie.sonataflow.sonataflow-quarkus-devui/
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
# Jobs service image and links
- jobs_service_image_allinone_url: https://hub.docker.com/r/apache/incubator-kie-kogito-jobs-service-allinone
+ jobs_service_image_allinone_url: https://hub.docker.com/r/apache/incubator-sonataflow-data-index-postgresql
Review Comment:
Yea, will fix thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-kogito-docs#695: Holistic review of serverless-workflow documenta… [incubator-kie-kogito-docs]
Posted by "domhanak (via GitHub)" <gi...@apache.org>.
domhanak commented on code in PR #696:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/696#discussion_r1914439968
##########
serverlessworkflow/modules/ROOT/pages/cloud/operator/enabling-jobs-service.adoc:
##########
@@ -0,0 +1,168 @@
+= Managing Jobs Service with the Operator
+:compat-mode!:
+// Metadata:
+:description: Configure Jobs Service using the `SonataFlowPlatform` CR.
+:keywords: sonataflow, serverless, operator, kubernetes, jobs service
+
+
+This document describes how to configure the Jobs Service instance using the SonataFlowPlarform CR.
+
+== Automate the Jobs Service instance management with the `SonataFlow` Operator
+
+It is possible to deploy the Jobs Service manually, leveraging the Operator offers a more seamless integration by
+combining it with namespace configuration through the SonataFlowPlatform Custom Resource (CR). When the Operator oversees
+the lifecycle of the jobs service, it automatically injects necessary properties during creation into the SonataFlow workflows.
+This integration eliminates the need for including these properties within the SonataFlow workflow CR instance, simplifying workflow management.
+== Configuring Jobs Service in the SonataFlowPlatform CR
+
+To enable the deployment of a Jobs Service instance, the `SonataFlowPlatform` CRD exposes a set of fields that allow the user to
+configure the running instance.
+
+=== Ephemeral persistence
+The basic runtime is to deploy the Jobs Service with an ephemeral backend running in the same container
+as the Jobs Service runtime.
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+ name: sonataflow-platform
+spec:
+ services:
+ jobService: {}
+---
+
+When executing this manifest, the operator will reconcile generating a pod hosting the Jobs Service:
+
+[source,shell,subs="attributes+"]
+---
+$>kubectl get pod -n sonataflow
+NAME READY STATUS RESTARTS AGE
+sonataflow-platform-jobs-service-cdf85d969-sbwkj 1/1 Running 0 108s
+---
+
+Keep in mind that this setup is not recommended for production environments, especially because the data does not persist when the pod restarts.
+
+=== Using an existing PostgreSQL service
+For robust environments it is recommened to use an dedicated database service and configure Jobs Service to make use of it. Currently, the Jobs Service
+only supports PostgreSQL database.
+
+Configuring Jobs Service to communicate with an existing PostgreSQL instance is supported in two ways. In both cases it requires providing the persistence
+configuration, one by using the Jobs Service's persistence field and the other one using the persistence field defined in the `SonataFlowPlatform` CR
+deployed in the same namespace.
+
+By default, the persistence specification defined in the `SonataFlow` workflow's CR takes priority over the one in the `SonataFlowPlatform` persistence specification.
+
+==== Using the persistence field defined in the `SonataFlowPlatform` CR
+Using the persistence configuration in the `SonataFlowPlatform` CR located in the same namespace requires to have the `SonataFlow` CR persistence field configured
+to have an empty `{}` value, signaling the Operator to derive the persistence from the active `SonataFlowPlatform`, when available. If no persistence is defined
+the operator will fallback to the ephemeral persistence previously described.
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+ name: sonataflow-platform
+spec:
+ persistence:
+ postgresql:
+ secretRef:
+ name: postgres-secrets
+ userKey: POSTGRES_USER
+ passwordKey: POSTGRES_PASSWORD
+ serviceRef:
+ name: postgres
+ port: 5432
+ databaseName: sonataflow
+---
+
+And the `SonataFlow` CR looks like this:
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlow
+metadata:
+ name: callbackstatetimeouts
+ annotations:
+ sonataflow.org/description: Callback State Timeouts Example k8s
+ sonataflow.org/version: 0.0.1
+spec:
+ persistence: {}
+...
+---
+
+When using the `jdbcUrl` field instead of `serviceRef`, the user is responsible for providing the correct JDBC URL connection value that does not contain a `database schema`
+because the operator will use verbatim the contents of this field as the JDBC connection in the Jobs Service pod, and if it provides a schema that has been used or formatted
+by a different client, the pod will fail to run.
Review Comment:
@gmunozfe please report an enhancement for this suggestion, this is just a backport of this guide (we moved it out at some point) so please consider making it nicer in separate PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-kogito-docs#695: Holistic review of serverless-workflow documenta… [incubator-kie-kogito-docs]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #696:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/696#issuecomment-2579890337
🎊 PR Preview 19906496ff2c3990ef7688b42c7d15da8d4eea5b has been successfully built and deployed. See the documentation preview: https://sonataflow-docs-preview-pr-696.surge.sh
<!-- Sticky Pull Request Comment -->
<!-- Sticky Pull Request Comment -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-kogito-docs#695: Holistic review of serverless-workflow documenta… [incubator-kie-kogito-docs]
Posted by "domhanak (via GitHub)" <gi...@apache.org>.
domhanak commented on code in PR #696:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/696#discussion_r1920033331
##########
serverlessworkflow/antora.yml:
##########
@@ -43,16 +45,20 @@ asciidoc:
operator_openshift_catalog: sonataflow-operator
operator_k8s_keyword: sonataflow
operator_k8s_subscription: my-sonataflow-operator
- kogito_devservices_imagename: quay.io/kiegroup/kogito-data-index-ephemeral-nightly
- sonataflow_devmode_imagename: quay.io/kiegroup/kogito-swf-devmode-nightly
- sonataflow_builder_imagename: quay.io/kiegroup/kogito-swf-builder-nightly
+ container_image_registry_base: docker.io
+ sonataflow_operator_imagename: docker.io/apache/incubator-kie-sonataflow-operator
+ sonataflow_devmode_imagename: docker.io/apache/incubator-kie-sonataflow-devmode
+ sonataflow_builder_imagename: docker.io/apache/incubator-kie-sonataflow-builder
+ sonataflow_builder_configmap_name: sonataflow-operator-builder-config
+ sonataflow_dataindex_postgresql_imagename: docker.io/apache/incubator-kie-kogito-data-index-postgresql
+ sonataflow_dataindex_ephemeral_imagename: docker.io/apache/incubator-kie-kogito-data-index-ephemeral
sonataflow_devmode_devui_url: /q/dev-ui/org.apache.kie.sonataflow.sonataflow-quarkus-devui/
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
# Jobs service image and links
- jobs_service_image_allinone_url: https://hub.docker.com/r/apache/incubator-kie-kogito-jobs-service-allinone
+ jobs_service_image_allinone_url: https://hub.docker.com/r/apache/incubator-sonataflow-data-index-postgresql
Review Comment:
```suggestion
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-kogito-docs#695: Holistic review of serverless-workflow documenta… [incubator-kie-kogito-docs]
Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini commented on code in PR #696:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/696#discussion_r1909003344
##########
serverlessworkflow/antora.yml:
##########
@@ -43,16 +45,20 @@ asciidoc:
operator_openshift_catalog: sonataflow-operator
operator_k8s_keyword: sonataflow
operator_k8s_subscription: my-sonataflow-operator
- kogito_devservices_imagename: quay.io/kiegroup/kogito-data-index-ephemeral-nightly
- sonataflow_devmode_imagename: quay.io/kiegroup/kogito-swf-devmode-nightly
- sonataflow_builder_imagename: quay.io/kiegroup/kogito-swf-builder-nightly
+ container_image_registry_base: docker.io
+ sonataflow_operator_imagename: docker.io/apache/incubator-kie-sonataflow-operator
+ sonataflow_devmode_imagename: docker.io/apache/incubator-kie-sonataflow-devmode
+ sonataflow_builder_imagename: docker.io/apache/incubator-kie-sonataflow-builder
+ sonataflow_builder_configmap_name: sonataflow-operator-builder-config
+ sonataflow_dataindex_postgresql_imagename: docker.io/apache/incubator-kie-kogito-data-index-postgresql
+ sonataflow_dataindex_ephemeral_imagename: docker.io/apache/incubator-kie-kogito-data-index-ephemeral
sonataflow_devmode_devui_url: /q/dev-ui/org.apache.kie.sonataflow.sonataflow-quarkus-devui/
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
# Jobs service image and links
- jobs_service_image_allinone_url: https://hub.docker.com/r/apache/incubator-kie-kogito-jobs-service-allinone
+ jobs_service_image_allinone_url: https://hub.docker.com/r/apache/incubator-sonataflow-data-index-postgresql
Review Comment:
```suggestion
jobs_service_image_allinone_url: https://hub.docker.com/r/apache/incubator-sonataflow-data-index-postgresql
```
This image can be removed from docs. We will deprecate/delete it. cc @wmedvede
##########
serverlessworkflow/antora.yml:
##########
@@ -43,16 +45,20 @@ asciidoc:
operator_openshift_catalog: sonataflow-operator
operator_k8s_keyword: sonataflow
operator_k8s_subscription: my-sonataflow-operator
- kogito_devservices_imagename: quay.io/kiegroup/kogito-data-index-ephemeral-nightly
- sonataflow_devmode_imagename: quay.io/kiegroup/kogito-swf-devmode-nightly
- sonataflow_builder_imagename: quay.io/kiegroup/kogito-swf-builder-nightly
+ container_image_registry_base: docker.io
+ sonataflow_operator_imagename: docker.io/apache/incubator-kie-sonataflow-operator
+ sonataflow_devmode_imagename: docker.io/apache/incubator-kie-sonataflow-devmode
+ sonataflow_builder_imagename: docker.io/apache/incubator-kie-sonataflow-builder
+ sonataflow_builder_configmap_name: sonataflow-operator-builder-config
+ sonataflow_dataindex_postgresql_imagename: docker.io/apache/incubator-kie-kogito-data-index-postgresql
+ sonataflow_dataindex_ephemeral_imagename: docker.io/apache/incubator-kie-kogito-data-index-ephemeral
sonataflow_devmode_devui_url: /q/dev-ui/org.apache.kie.sonataflow.sonataflow-quarkus-devui/
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
# Jobs service image and links
- jobs_service_image_allinone_url: https://hub.docker.com/r/apache/incubator-kie-kogito-jobs-service-allinone
+ jobs_service_image_allinone_url: https://hub.docker.com/r/apache/incubator-sonataflow-data-index-postgresql
Review Comment:
But most, incubator-sonataflow-data-index-postgresql image does not exist.
##########
serverlessworkflow/modules/ROOT/pages/cloud/operator/enabling-jobs-service.adoc:
##########
@@ -0,0 +1,168 @@
+= Managing Jobs Service with the Operator
+:compat-mode!:
+// Metadata:
+:description: Configure Jobs Service using the `SonataFlowPlatform` CR.
+:keywords: sonataflow, serverless, operator, kubernetes, jobs service
+
+
+This document describes how to configure the Jobs Service instance using the SonataFlowPlarform CR.
+
+== Automate the Jobs Service instance management with the `SonataFlow` Operator
+
+It is possible to deploy the Jobs Service manually, leveraging the Operator offers a more seamless integration by
+combining it with namespace configuration through the SonataFlowPlatform Custom Resource (CR). When the Operator oversees
+the lifecycle of the jobs service, it automatically injects necessary properties during creation into the SonataFlow workflows.
+This integration eliminates the need for including these properties within the SonataFlow workflow CR instance, simplifying workflow management.
+== Configuring Jobs Service in the SonataFlowPlatform CR
Review Comment:
```suggestion
== Configuring Jobs Service in the SonataFlowPlatform CR
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-kogito-docs#695: Holistic review of serverless-workflow documenta… [incubator-kie-kogito-docs]
Posted by "gmunozfe (via GitHub)" <gi...@apache.org>.
gmunozfe commented on code in PR #696:
URL: https://github.com/apache/incubator-kie-kogito-docs/pull/696#discussion_r1913735372
##########
serverlessworkflow/modules/ROOT/pages/cloud/operator/enabling-jobs-service.adoc:
##########
@@ -0,0 +1,168 @@
+= Managing Jobs Service with the Operator
+:compat-mode!:
+// Metadata:
+:description: Configure Jobs Service using the `SonataFlowPlatform` CR.
+:keywords: sonataflow, serverless, operator, kubernetes, jobs service
+
+
+This document describes how to configure the Jobs Service instance using the SonataFlowPlarform CR.
+
+== Automate the Jobs Service instance management with the `SonataFlow` Operator
+
+It is possible to deploy the Jobs Service manually, leveraging the Operator offers a more seamless integration by
+combining it with namespace configuration through the SonataFlowPlatform Custom Resource (CR). When the Operator oversees
+the lifecycle of the jobs service, it automatically injects necessary properties during creation into the SonataFlow workflows.
+This integration eliminates the need for including these properties within the SonataFlow workflow CR instance, simplifying workflow management.
+== Configuring Jobs Service in the SonataFlowPlatform CR
+
+To enable the deployment of a Jobs Service instance, the `SonataFlowPlatform` CRD exposes a set of fields that allow the user to
+configure the running instance.
+
+=== Ephemeral persistence
+The basic runtime is to deploy the Jobs Service with an ephemeral backend running in the same container
+as the Jobs Service runtime.
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+ name: sonataflow-platform
+spec:
+ services:
+ jobService: {}
+---
+
+When executing this manifest, the operator will reconcile generating a pod hosting the Jobs Service:
+
+[source,shell,subs="attributes+"]
+---
+$>kubectl get pod -n sonataflow
+NAME READY STATUS RESTARTS AGE
+sonataflow-platform-jobs-service-cdf85d969-sbwkj 1/1 Running 0 108s
+---
+
+Keep in mind that this setup is not recommended for production environments, especially because the data does not persist when the pod restarts.
+
+=== Using an existing PostgreSQL service
+For robust environments it is recommened to use an dedicated database service and configure Jobs Service to make use of it. Currently, the Jobs Service
Review Comment:
Typo
```suggestion
For robust environments it is recommended to use an dedicated database service and configure Jobs Service to make use of it. Currently, the Jobs Service
```
##########
serverlessworkflow/antora.yml:
##########
@@ -43,16 +45,20 @@ asciidoc:
operator_openshift_catalog: sonataflow-operator
operator_k8s_keyword: sonataflow
operator_k8s_subscription: my-sonataflow-operator
- kogito_devservices_imagename: quay.io/kiegroup/kogito-data-index-ephemeral-nightly
- sonataflow_devmode_imagename: quay.io/kiegroup/kogito-swf-devmode-nightly
- sonataflow_builder_imagename: quay.io/kiegroup/kogito-swf-builder-nightly
+ container_image_registry_base: docker.io
+ sonataflow_operator_imagename: docker.io/apache/incubator-kie-sonataflow-operator
+ sonataflow_devmode_imagename: docker.io/apache/incubator-kie-sonataflow-devmode
+ sonataflow_builder_imagename: docker.io/apache/incubator-kie-sonataflow-builder
+ sonataflow_builder_configmap_name: sonataflow-operator-builder-config
+ sonataflow_dataindex_postgresql_imagename: docker.io/apache/incubator-kie-kogito-data-index-postgresql
+ sonataflow_dataindex_ephemeral_imagename: docker.io/apache/incubator-kie-kogito-data-index-ephemeral
sonataflow_devmode_devui_url: /q/dev-ui/org.apache.kie.sonataflow.sonataflow-quarkus-devui/
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
# Jobs service image and links
- jobs_service_image_allinone_url: https://hub.docker.com/r/apache/incubator-kie-kogito-jobs-service-allinone
+ jobs_service_image_allinone_url: https://hub.docker.com/r/apache/incubator-sonataflow-data-index-postgresql
Review Comment:
@domhanak Should we reference dockerhub in doc or it's better to use any other container registry (quay, mirror.gcr.io, etc) acting as its mirror to avoid quota limits for users
##########
serverlessworkflow/modules/ROOT/pages/cloud/operator/enabling-jobs-service.adoc:
##########
@@ -0,0 +1,168 @@
+= Managing Jobs Service with the Operator
+:compat-mode!:
+// Metadata:
+:description: Configure Jobs Service using the `SonataFlowPlatform` CR.
+:keywords: sonataflow, serverless, operator, kubernetes, jobs service
+
+
+This document describes how to configure the Jobs Service instance using the SonataFlowPlarform CR.
+
+== Automate the Jobs Service instance management with the `SonataFlow` Operator
+
+It is possible to deploy the Jobs Service manually, leveraging the Operator offers a more seamless integration by
+combining it with namespace configuration through the SonataFlowPlatform Custom Resource (CR). When the Operator oversees
+the lifecycle of the jobs service, it automatically injects necessary properties during creation into the SonataFlow workflows.
+This integration eliminates the need for including these properties within the SonataFlow workflow CR instance, simplifying workflow management.
+== Configuring Jobs Service in the SonataFlowPlatform CR
+
+To enable the deployment of a Jobs Service instance, the `SonataFlowPlatform` CRD exposes a set of fields that allow the user to
+configure the running instance.
+
+=== Ephemeral persistence
+The basic runtime is to deploy the Jobs Service with an ephemeral backend running in the same container
+as the Jobs Service runtime.
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+ name: sonataflow-platform
+spec:
+ services:
+ jobService: {}
+---
+
+When executing this manifest, the operator will reconcile generating a pod hosting the Jobs Service:
+
+[source,shell,subs="attributes+"]
+---
+$>kubectl get pod -n sonataflow
+NAME READY STATUS RESTARTS AGE
+sonataflow-platform-jobs-service-cdf85d969-sbwkj 1/1 Running 0 108s
+---
+
+Keep in mind that this setup is not recommended for production environments, especially because the data does not persist when the pod restarts.
+
+=== Using an existing PostgreSQL service
+For robust environments it is recommened to use an dedicated database service and configure Jobs Service to make use of it. Currently, the Jobs Service
+only supports PostgreSQL database.
+
+Configuring Jobs Service to communicate with an existing PostgreSQL instance is supported in two ways. In both cases it requires providing the persistence
+configuration, one by using the Jobs Service's persistence field and the other one using the persistence field defined in the `SonataFlowPlatform` CR
+deployed in the same namespace.
+
+By default, the persistence specification defined in the `SonataFlow` workflow's CR takes priority over the one in the `SonataFlowPlatform` persistence specification.
+
+==== Using the persistence field defined in the `SonataFlowPlatform` CR
+Using the persistence configuration in the `SonataFlowPlatform` CR located in the same namespace requires to have the `SonataFlow` CR persistence field configured
+to have an empty `{}` value, signaling the Operator to derive the persistence from the active `SonataFlowPlatform`, when available. If no persistence is defined
+the operator will fallback to the ephemeral persistence previously described.
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+ name: sonataflow-platform
+spec:
+ persistence:
+ postgresql:
+ secretRef:
+ name: postgres-secrets
+ userKey: POSTGRES_USER
+ passwordKey: POSTGRES_PASSWORD
+ serviceRef:
+ name: postgres
+ port: 5432
+ databaseName: sonataflow
+---
+
+And the `SonataFlow` CR looks like this:
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlow
+metadata:
+ name: callbackstatetimeouts
+ annotations:
+ sonataflow.org/description: Callback State Timeouts Example k8s
+ sonataflow.org/version: 0.0.1
+spec:
+ persistence: {}
+...
+---
+
+When using the `jdbcUrl` field instead of `serviceRef`, the user is responsible for providing the correct JDBC URL connection value that does not contain a `database schema`
+because the operator will use verbatim the contents of this field as the JDBC connection in the Jobs Service pod, and if it provides a schema that has been used or formatted
+by a different client, the pod will fail to run.
Review Comment:
According to this explanation, `serviceRef` may contain `database schema` (meanwhile `jdbcUrl` shouldn't). Then, the example above, could include the `database schema` for more clarity, but up to you. I see there's an example below including the schema. Other possibility could be to put an example with `jdbcUrl` . Just a suggestion.
##########
serverlessworkflow/modules/ROOT/pages/cloud/operator/enabling-jobs-service.adoc:
##########
@@ -0,0 +1,168 @@
+= Managing Jobs Service with the Operator
+:compat-mode!:
+// Metadata:
+:description: Configure Jobs Service using the `SonataFlowPlatform` CR.
+:keywords: sonataflow, serverless, operator, kubernetes, jobs service
+
+
+This document describes how to configure the Jobs Service instance using the SonataFlowPlarform CR.
+
+== Automate the Jobs Service instance management with the `SonataFlow` Operator
+
+It is possible to deploy the Jobs Service manually, leveraging the Operator offers a more seamless integration by
+combining it with namespace configuration through the SonataFlowPlatform Custom Resource (CR). When the Operator oversees
+the lifecycle of the jobs service, it automatically injects necessary properties during creation into the SonataFlow workflows.
+This integration eliminates the need for including these properties within the SonataFlow workflow CR instance, simplifying workflow management.
+== Configuring Jobs Service in the SonataFlowPlatform CR
+
+To enable the deployment of a Jobs Service instance, the `SonataFlowPlatform` CRD exposes a set of fields that allow the user to
+configure the running instance.
+
+=== Ephemeral persistence
+The basic runtime is to deploy the Jobs Service with an ephemeral backend running in the same container
+as the Jobs Service runtime.
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+ name: sonataflow-platform
+spec:
+ services:
+ jobService: {}
+---
+
+When executing this manifest, the operator will reconcile generating a pod hosting the Jobs Service:
+
+[source,shell,subs="attributes+"]
+---
+$>kubectl get pod -n sonataflow
+NAME READY STATUS RESTARTS AGE
+sonataflow-platform-jobs-service-cdf85d969-sbwkj 1/1 Running 0 108s
+---
+
+Keep in mind that this setup is not recommended for production environments, especially because the data does not persist when the pod restarts.
+
+=== Using an existing PostgreSQL service
+For robust environments it is recommened to use an dedicated database service and configure Jobs Service to make use of it. Currently, the Jobs Service
+only supports PostgreSQL database.
+
+Configuring Jobs Service to communicate with an existing PostgreSQL instance is supported in two ways. In both cases it requires providing the persistence
+configuration, one by using the Jobs Service's persistence field and the other one using the persistence field defined in the `SonataFlowPlatform` CR
+deployed in the same namespace.
+
+By default, the persistence specification defined in the `SonataFlow` workflow's CR takes priority over the one in the `SonataFlowPlatform` persistence specification.
+
+==== Using the persistence field defined in the `SonataFlowPlatform` CR
+Using the persistence configuration in the `SonataFlowPlatform` CR located in the same namespace requires to have the `SonataFlow` CR persistence field configured
+to have an empty `{}` value, signaling the Operator to derive the persistence from the active `SonataFlowPlatform`, when available. If no persistence is defined
+the operator will fallback to the ephemeral persistence previously described.
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+ name: sonataflow-platform
+spec:
+ persistence:
+ postgresql:
+ secretRef:
+ name: postgres-secrets
+ userKey: POSTGRES_USER
+ passwordKey: POSTGRES_PASSWORD
+ serviceRef:
+ name: postgres
+ port: 5432
+ databaseName: sonataflow
+---
+
+And the `SonataFlow` CR looks like this:
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlow
+metadata:
+ name: callbackstatetimeouts
+ annotations:
+ sonataflow.org/description: Callback State Timeouts Example k8s
+ sonataflow.org/version: 0.0.1
+spec:
+ persistence: {}
+...
+---
+
+When using the `jdbcUrl` field instead of `serviceRef`, the user is responsible for providing the correct JDBC URL connection value that does not contain a `database schema`
+because the operator will use verbatim the contents of this field as the JDBC connection in the Jobs Service pod, and if it provides a schema that has been used or formatted
+by a different client, the pod will fail to run.
+
+===== Using the persistence field inside the service specification
+You can specify define the persistence configuration directly in the Jobs Service specification. The structure is the same as in the `SonataFlowPlatform` CR and also
Review Comment:
Choose one verb (style)
```suggestion
You can define the persistence configuration directly in the Jobs Service specification. The structure is the same as in the `SonataFlowPlatform` CR and also
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org