From 56be189d7b5359d720415e6792f3b51c9947f6dc Mon Sep 17 00:00:00 2001 From: Tommy Hughes Date: Mon, 27 Nov 2023 16:05:30 -0600 Subject: [PATCH] fixes Signed-off-by: Tommy Hughes --- serverlessworkflow/modules/ROOT/nav.adoc | 1 + .../modules/ROOT/pages/cloud/index.adoc | 8 ++ .../operator/build-and-deploy-workflows.adoc | 83 -------------- .../cloud/operator/supporting-services.adoc | 106 ++++++++++++++++++ 4 files changed, 115 insertions(+), 83 deletions(-) create mode 100644 serverlessworkflow/modules/ROOT/pages/cloud/operator/supporting-services.adoc diff --git a/serverlessworkflow/modules/ROOT/nav.adoc b/serverlessworkflow/modules/ROOT/nav.adoc index d020166e1..37c110c81 100644 --- a/serverlessworkflow/modules/ROOT/nav.adoc +++ b/serverlessworkflow/modules/ROOT/nav.adoc @@ -88,6 +88,7 @@ *** xref:cloud/operator/referencing-resource-files.adoc[Referencing Workflow Resources] *** xref:cloud/operator/configuring-workflows.adoc[Configuration] *** xref:cloud/operator/build-and-deploy-workflows.adoc[Building and Deploying Workflow Images] +*** xref:cloud/operator/supporting-services.adoc[Deploy Supporting Services] *** xref:cloud/operator/workflow-status-conditions.adoc[Custom Resource Status] *** xref:cloud/operator/building-custom-images.adoc[Building Custom Images] *** xref:cloud/operator/known-issues.adoc[Roadmap and Known Issues] diff --git a/serverlessworkflow/modules/ROOT/pages/cloud/index.adoc b/serverlessworkflow/modules/ROOT/pages/cloud/index.adoc index 95a21f96f..1b7322c34 100644 --- a/serverlessworkflow/modules/ROOT/pages/cloud/index.adoc +++ b/serverlessworkflow/modules/ROOT/pages/cloud/index.adoc @@ -69,6 +69,14 @@ xref:cloud/operator/build-and-deploy-workflows.adoc[] Learn how to build and deploy workflow services with {operator_name} -- +[.card] +-- +[.card-title] +xref:cloud/operator/supporting-services.adoc[] +[.card-description] +Learn how to deploy supporting services with {operator_name} +-- + [.card] -- [.card-title] diff --git a/serverlessworkflow/modules/ROOT/pages/cloud/operator/build-and-deploy-workflows.adoc b/serverlessworkflow/modules/ROOT/pages/cloud/operator/build-and-deploy-workflows.adoc index 34c6640ab..24c70313d 100644 --- a/serverlessworkflow/modules/ROOT/pages/cloud/operator/build-and-deploy-workflows.adoc +++ b/serverlessworkflow/modules/ROOT/pages/cloud/operator/build-and-deploy-workflows.adoc @@ -422,88 +422,6 @@ In your editor, change the first line in the `Dockerfile` entry where it reads ` This image must be compatible with your operator's installation. -[#deploy-supporting-services] -== Deploy supporting services - -=== Data Index - -By default, workflows use an embedded version of xref:data-index/data-index-core-concepts.adoc[Data Index]. Alternatively, can you deploy Data Index via `SonataFlowPlatform` configuration. The operator will then configure all new workflows, with the "prod" profile, to use that Data Index. - -Following is a basic configuration. It will deploy an ephemeral Data Index to the same namespace as the `SonataFlowPlatform`. - -.Example of a SonataFlowPlatform instance with an ephemeral Data Index deployment -[source,yaml,subs="attributes+"] ----- -apiVersion: sonataflow.org/v1alpha08 -kind: SonataFlowPlatform -metadata: - name: sonataflow-platform -spec: - services: - dataIndex: {} ----- - -If you require Data Index persistence, this can be done with a `postgresql` database. - -Following is a services configuration with the persistence option enabled. You'll first need to create a secret with your database credentials. - -.Create a Secret for datasource authentication. -[source,bash,subs="attributes+"] ----- -kubectl create secret generic --from-literal=POSTGRESQL_USER= --from-literal=POSTGRESQL_PASSWORD= -n workflows ----- - -.Example of a SonataFlowPlatform instance with a Data Index deployment persisted to a postgresql database -[source,yaml,subs="attributes+"] ----- -apiVersion: sonataflow.org/v1alpha08 -kind: SonataFlowPlatform -metadata: - name: sonataflow-platform -spec: - services: - dataIndex: - persistence: - postgresql: - secretRef: - name: <1> - serviceRef: - name: <2> ----- - -<1> Name of your postgresql credentials secret -<2> Name of your postgresql k8s service - -.Example of a SonataFlowPlatform instance with a persisted Data Index deployment and custom pod configuration -[source,yaml,subs="attributes+"] ----- -apiVersion: sonataflow.org/v1alpha08 -kind: SonataFlowPlatform -metadata: - name: sonataflow-platform -spec: - services: - dataIndex: - enabled: false <1> - persistence: - postgresql: - secretRef: - name: - userKey: <2> - jdbcUrl: "jdbc:postgresql://host:port/database?currentSchema=data-index-service" <3> - podTemplate: - replicas: 1 <4> - container: - image: <5> ----- - -<1> Determines whether "prod" profile workflows should be configured to use this service, defaults to `true` -<2> Secret key of your postgresql credentials user, defaults to `POSTGRESQL_USER` -<3> PostgreSql JDBC URL -<4> Number of Data Index pods, defaults to `1` -<5> Custom Data Index container image name - - [#build-deploy-workflow] == Build and deploy your workflow @@ -649,6 +567,5 @@ Ideally you should use this feature if there's a problem with your workflow or t * xref:cloud/operator/known-issues.adoc[] * xref:cloud/operator/developing-workflows.adoc[] -* xref:data-index/data-index-service.adoc[] include::../../../pages/_common-content/report-issue.adoc[] diff --git a/serverlessworkflow/modules/ROOT/pages/cloud/operator/supporting-services.adoc b/serverlessworkflow/modules/ROOT/pages/cloud/operator/supporting-services.adoc new file mode 100644 index 000000000..bc288e071 --- /dev/null +++ b/serverlessworkflow/modules/ROOT/pages/cloud/operator/supporting-services.adoc @@ -0,0 +1,106 @@ += Supporting Services +:compat-mode!: +// Metadata: +:description: Deploy Supporting Services with {operator_name} +:keywords: kogito, sonataflow, workflow, serverless, operator, kubernetes, openshift, containers, data, index, job, service +// links +:kogito_serverless_operator_url: https://github.com/apache/incubator-kie-kogito-serverless-operator/ + +By default, workflows use an embedded version of xref:data-index/data-index-core-concepts.adoc[Data Index]. This document describes how to deploy supporting services, like Data Index, on a cluster using the link:{kogito_serverless_operator_url}[{operator_name}]. + +[IMPORTANT] +==== +{operator_name} is under active development with features yet to be implemented. Please see xref:cloud/operator/known-issues.adoc[]. +==== + +.Prerequisites +* The {operator_name} installed. See xref:cloud/operator/install-serverless-operator.adoc[] guide +* A postgresql database, if persistence is required + +[#deploy-supporting-services] +== Deploy supporting services + +=== Data Index + +You can deploy Data Index via `SonataFlowPlatform` configuration. The operator will then configure all new workflows, with the "prod" profile, to use that Data Index. + +Following is a basic configuration. It will deploy an ephemeral Data Index to the same namespace as the `SonataFlowPlatform`. + +.Example of a SonataFlowPlatform instance with an ephemeral Data Index deployment +[source,yaml,subs="attributes+"] +---- +apiVersion: sonataflow.org/v1alpha08 +kind: SonataFlowPlatform +metadata: + name: sonataflow-platform +spec: + services: + dataIndex: {} +---- + +If you require Data Index persistence, this can be done with a `postgresql` database. + +Following is a services configuration with the persistence option enabled. You'll first need to create a secret with your database credentials. + +.Create a Secret for datasource authentication. +[source,bash,subs="attributes+"] +---- +kubectl create secret generic --from-literal=POSTGRESQL_USER= --from-literal=POSTGRESQL_PASSWORD= -n workflows +---- + +.Example of a SonataFlowPlatform instance with a Data Index deployment persisted to a postgresql database +[source,yaml,subs="attributes+"] +---- +apiVersion: sonataflow.org/v1alpha08 +kind: SonataFlowPlatform +metadata: + name: sonataflow-platform +spec: + services: + dataIndex: + persistence: + postgresql: + secretRef: + name: <1> + serviceRef: + name: <2> +---- + +<1> Name of your postgresql credentials secret +<2> Name of your postgresql k8s service + +.Example of a SonataFlowPlatform instance with a persisted Data Index deployment and custom pod configuration +[source,yaml,subs="attributes+"] +---- +apiVersion: sonataflow.org/v1alpha08 +kind: SonataFlowPlatform +metadata: + name: sonataflow-platform +spec: + services: + dataIndex: + enabled: false <1> + persistence: + postgresql: + secretRef: + name: + userKey: <2> + jdbcUrl: "jdbc:postgresql://host:port/database?currentSchema=data-index-service" <3> + podTemplate: + replicas: 1 <4> + container: + image: <5> +---- + +<1> Determines whether "prod" profile workflows should be configured to use this service, defaults to `true` +<2> Secret key of your postgresql credentials user, defaults to `POSTGRESQL_USER` +<3> PostgreSql JDBC URL +<4> Number of Data Index pods, defaults to `1` +<5> Custom Data Index container image name + +== Additional resources + +* xref:data-index/data-index-service.adoc[] +* xref:cloud/operator/known-issues.adoc[] + +include::../../../pages/_common-content/report-issue.adoc[]