You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "gmunozfe (via GitHub)" <gi...@apache.org> on 2025/01/13 17:05:38 UTC

Re: [PR] [kie-kogito-examples-2041] [sonataflow] Implement a getting started example for operator use case [incubator-kie-kogito-examples]

gmunozfe commented on code in PR #2042:
URL: https://github.com/apache/incubator-kie-kogito-examples/pull/2042#discussion_r1913512464


##########
serverless-operator-examples/serverless-workflow-get-random-catfact/README.md:
##########
@@ -0,0 +1,64 @@
+# {product_name} Operator - Get Random Cat Fact Example
+
+## Description
+
+The goal of this example is to showcase use of [{product_name} plugin for Knative CLI](https://sonataflow.org/serverlessworkflow/main/testing-and-troubleshooting/kn-plugin-workflow-overview.html) for local development and subsequent deployment of finished {product_name} application.
+
+### Use Case
+
+This example is doing basic decision based on input provided to the workflow. If the input matches a string, workflow will query a specific endpoint and store the result, otherwise it uses a static string.
+The example contains workflow defintion, necesarry application.properties and an openAPI spec file to be able to query external service.

Review Comment:
   typo
   ```suggestion
   The example contains workflow definition, necessary application.properties and an openAPI spec file to be able to query external service.
   ```



##########
serverless-operator-examples/README.md:
##########
@@ -0,0 +1,13 @@
+ Serverless Operator Examples
+
+## Description
+
+In this folder, you can find examples showcasing SonataFlow applications and their development on Cloud environment. These examples are suitable if you would like to work with SonataFlow without the need to work with Java and Quarkus.
+
+
+## Requirements
+
+* Docker or Podman, required for local development scenarios.
+* Access to a Kubernetes cluster.
+* Worklow plugin for KN CLI installed.
+* Visual Studio Code with serverless workflow ediotr extension installed.

Review Comment:
   typo
   ```suggestion
   * Visual Studio Code with serverless workflow editor extension installed.
   ```



##########
serverless-operator-examples/serverless-workflow-get-random-catfact/README.md:
##########
@@ -0,0 +1,64 @@
+# {product_name} Operator - Get Random Cat Fact Example
+
+## Description
+
+The goal of this example is to showcase use of [{product_name} plugin for Knative CLI](https://sonataflow.org/serverlessworkflow/main/testing-and-troubleshooting/kn-plugin-workflow-overview.html) for local development and subsequent deployment of finished {product_name} application.
+
+### Use Case
+
+This example is doing basic decision based on input provided to the workflow. If the input matches a string, workflow will query a specific endpoint and store the result, otherwise it uses a static string.
+The example contains workflow defintion, necesarry application.properties and an openAPI spec file to be able to query external service.
+
+### Prerequisites
+
+1. Install [{product_name} plugin for Knative CLI](https://sonataflow.org/serverlessworkflow/main/testing-and-troubleshooting/kn-plugin-workflow-overview.html)
+2. Install the [Operator](https://kiegroup.github.io/kogito-docs/serverlessworkflow/latest/cloud/operator/install-serverless-operator.html)
+3. Checkout this example locally
+
+### Run the example in local environment
+
+In order to ensure the developed workflows does what it is meant to do, `run` command allows users to spin up a container in development mode on localhost. A [management console](https://sonataflow.org/serverlessworkflow/main/testing-and-troubleshooting/quarkus-dev-ui-extension/quarkus-dev-ui-overview.html) is available for users to play with the workflows.
+
+1. Navigate to the root directory of the example
+2. Execute `kn workflow run`
+3. Navigate to `http://localhost:8080/q/dev-ui/org.apache.kie.sonataflow.sonataflow-quarkus-devui/workflows` to access the management console
+4. You can modify the project, any changes will be detected and the container will update
+
+### Deploy the example to cluster
+
+Once the workflow is stable and working, `deploy` command allows users to create deployments of the workflow on the targetted cluster. To deploy a workflow application, [{product_name} plugin for Knative CLI](https://sonataflow.org/serverlessworkflow/main/testing-and-troubleshooting/kn-plugin-workflow-overview.html) relies on configuration in `<home_directory>/.kube/config`. If you cluster has managed access, users need to login prior to the use of CLI.
+
+1. Create a namespace for your deployment `oc create namespace catfactexample`
+2. Navigate to the root directory of the example
+3. Execute `kn workflow deploy -n catfactexample`
+4. Access your cluster, you should see new deployment in `catfactexample` namespace
+5. Management console can be accessed on the `<WORKFLOW_GENERATED_ROUTE_URL>/q/dev-ui/org.apache.kie.sonataflow.sonataflow-quarkus-devui/workflows`

Review Comment:
   Perhaps you could clarify which will be the content of <WORKFLOW_GENERATED_ROUTE_URL>



-- 
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