Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Tommy Hughes <[email protected]>
  • Loading branch information
tchughesiv committed Feb 15, 2024
1 parent a36ccd0 commit 56be189
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 83 deletions.
1 change: 1 addition & 0 deletions serverlessworkflow/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
8 changes: 8 additions & 0 deletions serverlessworkflow/modules/ROOT/pages/cloud/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <creds-secret> --from-literal=POSTGRESQL_USER=<user> --from-literal=POSTGRESQL_PASSWORD=<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: <creds-secret> <1>
serviceRef:
name: <postgresql-service> <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: <creds-secret>
userKey: <secret-user-key> <2>
jdbcUrl: "jdbc:postgresql://host:port/database?currentSchema=data-index-service" <3>
podTemplate:
replicas: 1 <4>
container:
image: <image:tag> <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

Expand Down Expand Up @@ -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[]
Original file line number Diff line number Diff line change
@@ -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 <creds-secret> --from-literal=POSTGRESQL_USER=<user> --from-literal=POSTGRESQL_PASSWORD=<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: <creds-secret> <1>
serviceRef:
name: <postgresql-service> <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: <creds-secret>
userKey: <secret-user-key> <2>
jdbcUrl: "jdbc:postgresql://host:port/database?currentSchema=data-index-service" <3>
podTemplate:
replicas: 1 <4>
container:
image: <image:tag> <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[]

0 comments on commit 56be189

Please sign in to comment.