Skip to content

RHDH-Local and Orchestrator Integration - #55

Merged
rm3l merged 31 commits into
redhat-developer:mainfrom
jenniferubah:rhdho-local-integration
Jul 18, 2025
Merged

RHDH-Local and Orchestrator Integration#55
rm3l merged 31 commits into
redhat-developer:mainfrom
jenniferubah:rhdho-local-integration

Conversation

@jenniferubah

@jenniferubah jenniferubah commented Jun 26, 2025

Copy link
Copy Markdown
Contributor

Description

The goal of this PR is to introduce the Orchestrator plugins and workflow infrastructure within the RHDH-Local environment, which is part of the RHDH Merge effort. This will enable users to have a local standalone environment where workflows can be easily developed and tested before they are deployed. This implementation adds the Orchestrator plugins (as part of default plugins) in the dynamic-plugins.yaml and uses the sonataflow devmode image to run the workflow engine.

Which issue(s) does this PR fix or relate to

PR acceptance criteria

  • Tests
  • Documentation

How to test changes / Special notes to the reviewer

To test these changes, run podman-compose up -d. This should spin up RHDH and Sonataflow pods and accessible on localhost:7007. Please follow the Testing Orchestrator Workflow Examples section in the README.md to run workflows.

Known Issues

Summary by Sourcery

Enable local development and testing of Orchestrator workflows in RHDH Local by integrating Orchestrator plugins, adding a Sonataflow workflow engine service, providing sample workflows, and updating documentation and default configurations.

New Features:

  • Integrate Orchestrator plugins into the RHDH Local dynamic plugin setup
  • Introduce a Sonataflow devmode service in compose.yaml to run and test workflows locally
  • Include example Slack and GitHub workflows under rhdho-workflow-examples for hands-on testing

Enhancements:

  • Update default RHDH image to the community build v1.6.1 and add a dedicated backstage-network configuration
  • Revise and reformat README to add a “Testing Orchestrator Workflow Examples” section and improve overall readability
  • Add dynamic-plugins.override.yaml template with orchestrator plugin definitions and configuration

Documentation:

  • Add rhdho-workflow-examples README, application properties, schemas, and OpenAPI specs to guide orchestrator workflow testing

Summary by Sourcery

Enable local development and testing of Orchestrator workflows by integrating Orchestrator plugins into RHDH Local, adding a Sonataflow devmode service, supplying sample workflows, and updating configuration and documentation.

New Features:

  • Add Orchestrator frontend and backend plugins to the dynamic-plugins configuration.
  • Introduce a Sonataflow devmode service in compose.yaml to run and test workflows locally.
  • Provide example greeting, Slack, and GitHub workflows under rhdho-workflow-examples for hands-on testing.

Enhancements:

  • Update default RHDH image to community build v1.6.1 and configure a backstage-network for service communication.
  • Increase plugin installer’s MAX_ENTRY_SIZE and mount example workflows volume for Sonataflow.

Documentation:

  • Revise README with orchestrator plugin override instructions and a "Testing Orchestrator Workflow Examples" section.
  • Add rhdho-workflow-examples documentation, application properties, schemas, and OpenAPI specs to guide workflow setup.

@sourcery-ai

sourcery-ai Bot commented Jun 26, 2025

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Integrate Orchestrator plugins and the Sonataflow workflow engine into RHDH Local, providing out-of-the-box sample workflows and updated documentation for local development and testing.

Entity relationship diagram for workflow example schemas

erDiagram
  GREETING_WORKFLOW {
    string id
    string version
    string specVersion
    string name
    string description
    string dataInputSchema
    string start
    object[] functions
    object[] states
  }
  SLACK_WORKFLOW {
    string id
    string version
    string specVersion
    string name
    string description
    string dataInputSchema
    string start
    object[] functions
    object[] states
  }
  GITHUB_WORKFLOW {
    string id
    string version
    string specVersion
    string name
    string description
    string dataInputSchema
    string start
    object[] functions
    object[] states
  }
  GREETING_WORKFLOW ||--o| GREETING_INPUT_SCHEMA : uses
  SLACK_WORKFLOW ||--o| SLACK_INPUT_SCHEMA : uses
  GITHUB_WORKFLOW ||--o| GITHUB_INPUT_SCHEMA : uses
  GITHUB_WORKFLOW ||--o| GITHUB_OPENAPI_SPEC : uses
  SLACK_WORKFLOW ||--o| SLACK_OPENAPI_SPEC : uses
Loading

Class diagram for Orchestrator plugin configuration in dynamic-plugins.yaml

classDiagram
  class DynamicPluginsConfig {
    +includes: string[]
    +plugins: PluginConfig[]
  }
  class PluginConfig {
    +package: string
    +integrity: string
    +disabled: bool
    +pluginConfig: object
  }
  class OrchestratorFrontendConfig {
    +appIcons: object[]
    +dynamicRoutes: object[]
  }
  class OrchestratorBackendConfig {
    +dataIndexService: object
  }
  class ScaffolderOrchestratorConfig {
    +dataIndexService: object
  }
  DynamicPluginsConfig "1" -- "*" PluginConfig
  PluginConfig <|-- OrchestratorFrontendConfig
  PluginConfig <|-- OrchestratorBackendConfig
  PluginConfig <|-- ScaffolderOrchestratorConfig
Loading

File-Level Changes

Change Details Files
Integrate Orchestrator plugins into dynamic plugin configuration
  • Added frontend orchestrator plugin with icons and dynamic routes
  • Integrated backend orchestrator and scaffolder modules pointing to Sonataflow
  • Included orchestrator form widgets plugin
configs/dynamic-plugins/dynamic-plugins.yaml
Update Docker Compose setup to support Sonataflow workflow engine
  • Bumped RHDH image to community build v1.6.1 and added backstage-network
  • Configured install-dynamic-plugins service with root user, volume mounts, and increased MAX_ENTRY_SIZE
  • Introduced sonataflow service in devmode with ports, env vars, volumes and network
compose.yaml
Enhance documentation for plugin overrides and workflow testing
  • Clarified override instructions for dynamic-plugins.override.yaml
  • Added “Testing Orchestrator Workflow Examples” section with usage steps and known-issue workaround
README.md
Add sample Orchestrator workflow examples and configurations
  • Provided greeting, Slack, and GitHub workflow YAMLs
  • Included application properties, schemas, and OpenAPI specs for workflows
  • Added README in rhdho-workflow-examples directory with prerequisites
rhdho-workflow-examples/greeting.sw.yaml
rhdho-workflow-examples/github.sw.yaml
rhdho-workflow-examples/slack.sw.yaml
rhdho-workflow-examples/README.md
rhdho-workflow-examples/application.properties
rhdho-workflow-examples/application-dev.properties
rhdho-workflow-examples/schemas/greeting-input-schema.json
rhdho-workflow-examples/schemas/github-input-schema.json
rhdho-workflow-examples/schemas/slack-input-schema.json
rhdho-workflow-examples/specs/github-openapi.json
rhdho-workflow-examples/specs/slack-openapi.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@jenniferubah
jenniferubah force-pushed the rhdho-local-integration branch from 4bde23e to a9d6dff Compare June 26, 2025 01:33
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread configs/dynamic-plugins/dynamic-plugins.yaml Outdated
Comment thread compose.yaml Outdated
Comment thread compose.yaml Outdated
@jenniferubah
jenniferubah force-pushed the rhdho-local-integration branch from d7ee7db to 7a4bf1b Compare June 30, 2025 20:44
@jenniferubah
jenniferubah marked this pull request as ready for review June 30, 2025 20:45

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jenniferubah - I've reviewed your changes - here's some feedback:

  • Consider externalizing the orchestrator plugin version and download URLs into variables or a single config entry to simplify future upgrades and avoid duplication across dynamic-plugins.yaml.
  • Move sensitive values like NOTIFICATIONS_BEARER_TOKEN out of compose.yaml into an env file or secret management solution to prevent credentials from being checked into source control.
  • Add a Docker healthcheck (or readiness probe) for the sonataflow service to ensure it’s fully ready before other services or clients attempt to connect.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider externalizing the orchestrator plugin version and download URLs into variables or a single config entry to simplify future upgrades and avoid duplication across dynamic-plugins.yaml.
- Move sensitive values like NOTIFICATIONS_BEARER_TOKEN out of compose.yaml into an env file or secret management solution to prevent credentials from being checked into source control.
- Add a Docker healthcheck (or readiness probe) for the sonataflow service to ensure it’s fully ready before other services or clients attempt to connect.

## Individual Comments

### Comment 1
<location> `README.md:68` </location>
<code_context>
-   - Add your catalog entity overrides:
+     Note: In RHDH 1.7, by default, Orchestrator plugins are integrated in the dynamic plugins. If you intend to use these
+     plugins, ensure to copy the
+     orchestrator dynamic plugins from `dynamic-plugins.yamml` to your `dynamic-plugins.override.yaml` version for your local
+     development.
+
</code_context>

<issue_to_address>
Typo: 'yamml' should be 'yaml'.

The file extension should be corrected to 'yaml'.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
     orchestrator dynamic plugins from `dynamic-plugins.yamml` to your `dynamic-plugins.override.yaml` version for your local
     development.
=======
     orchestrator dynamic plugins from `dynamic-plugins.yaml` to your `dynamic-plugins.override.yaml` version for your local
     development.
>>>>>>> REPLACE

</suggested_fix>

### Comment 2
<location> `rhdho-workflow-examples/README.md:12` </location>
<code_context>
+### Prerequisites
+
+* An existing workspace in slack.
+* An existing Slack App and Bot Token with the correct scopes.
+* Ensure the app is invited to the public channel.
+  Follow [slack guide](https://api.slack.com/tutorials/tracks/getting-a-token) on setting up slack app and bot token.
</code_context>

<issue_to_address>
Consider clarifying 'the correct scopes'.

Please list the specific scopes needed for the Slack Bot Token.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
* An existing Slack App and Bot Token with the correct scopes.
* Ensure the app is invited to the public channel.
  Follow [slack guide](https://api.slack.com/tutorials/tracks/getting-a-token) on setting up slack app and bot token.
=======
* An existing Slack App and Bot Token with the following required scopes:
  * `chat:write`
  * `channels:read`
  * `groups:read`
  * `im:read`
  * `mpim:read`
* Ensure the app is invited to the public channel.
  Follow [slack guide](https://api.slack.com/tutorials/tracks/getting-a-token) on setting up slack app and bot token.
>>>>>>> REPLACE

</suggested_fix>

### Comment 3
<location> `rhdho-workflow-examples/README.md:13` </location>
<code_context>
+
+* An existing workspace in slack.
+* An existing Slack App and Bot Token with the correct scopes.
+* Ensure the app is invited to the public channel.
+  Follow [slack guide](https://api.slack.com/tutorials/tracks/getting-a-token) on setting up slack app and bot token.
+
</code_context>

<issue_to_address>
Consider specifying how to invite the app.

Adding a short instruction or link on inviting the app to a channel would improve clarity.
</issue_to_address>

## Security Issues

### Issue 1
<location> `rhdho-workflow-examples/specs/github-openapi.json:1` </location>

<issue_to_address>
**security (CKV_OPENAPI_4):** Ensure that the global security field has rules defined

<details>
<summary>Description</summary>

OpenAPI uses security schemes to reference authentication and authorization schemes.
Your APIs should have authentication schemes in place and documented in the OpenAPI specification, as well as applied to individual operations or the entire API in the security details.

</details>

<details>
<summary>Fix - Buildtime</summary>

*OpenAPI*


Ensure that you have a securityScheme component and application.
For example:
```yaml
components:
security:
```


</details>

*Source: checkov*
</issue_to_address>

### Issue 2
<location> `rhdho-workflow-examples/specs/github-openapi.json:52` </location>

<issue_to_address>
**security (CKV_OPENAPI_3):** Ensure that security schemes don't allow cleartext credentials over unencrypted channel - version 3.x.y files

<details>
<summary>Description</summary>

Sending credentials over HTTP in cleartext exposes API calls to attacks including man-in-the-middle attacks.
Ensure that you are using an encrypted channel for sending credentials.

</details>

<details>
<summary>Fix - Buildtime</summary>

*OpenAPI*


Ensure that you aren't using the unencryptedScheme.
For example:
```yaml
components:
securitySchemes:
-    unencryptedScheme:
-      type: http
-      scheme: basic
paths:
"/":
get:
security:
-        - unencryptedScheme: []
```


</details>

*Source: checkov*
</issue_to_address>

### Issue 3
<location> `rhdho-workflow-examples/specs/slack-openapi.json:1` </location>

<issue_to_address>
**security (CKV_OPENAPI_4):** Ensure that the global security field has rules defined

<details>
<summary>Description</summary>

OpenAPI uses security schemes to reference authentication and authorization schemes.
Your APIs should have authentication schemes in place and documented in the OpenAPI specification, as well as applied to individual operations or the entire API in the security details.

</details>

<details>
<summary>Fix - Buildtime</summary>

*OpenAPI*


Ensure that you have a securityScheme component and application.
For example:
```yaml
components:
security:
```


</details>

*Source: checkov*
</issue_to_address>

### Issue 4
<location> `rhdho-workflow-examples/specs/slack-openapi.json:51` </location>

<issue_to_address>
**security (CKV_OPENAPI_3):** Ensure that security schemes don't allow cleartext credentials over unencrypted channel - version 3.x.y files

<details>
<summary>Description</summary>

Sending credentials over HTTP in cleartext exposes API calls to attacks including man-in-the-middle attacks.
Ensure that you are using an encrypted channel for sending credentials.

</details>

<details>
<summary>Fix - Buildtime</summary>

*OpenAPI*


Ensure that you aren't using the unencryptedScheme.
For example:
```yaml
components:
securitySchemes:
-    unencryptedScheme:
-      type: http
-      scheme: basic
paths:
"/":
get:
security:
-        - unencryptedScheme: []
```


</details>

*Source: checkov*
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread README.md Outdated
Comment thread rhdho-workflow-examples/README.md
Comment thread rhdho-workflow-examples/README.md
Comment thread rhdho-workflow-examples/specs/github-openapi.json
Comment thread rhdho-workflow-examples/specs/github-openapi.json Outdated
Comment thread rhdho-workflow-examples/specs/slack-openapi.json
Comment thread rhdho-workflow-examples/specs/slack-openapi.json Outdated
Comment thread compose.yaml
@jenniferubah
jenniferubah force-pushed the rhdho-local-integration branch from 217fcd8 to 177d9d5 Compare July 7, 2025 21:28
@jenniferubah
jenniferubah requested review from batzionb and rm3l July 7, 2025 21:39
@masayag

masayag commented Jul 13, 2025

Copy link
Copy Markdown
Contributor

@jenniferubah can yo resolve conflict pls so we can move closer to merging the PR?

@jenniferubah
jenniferubah force-pushed the rhdho-local-integration branch from 177d9d5 to da0eb7c Compare July 13, 2025 14:19
@jenniferubah

Copy link
Copy Markdown
Contributor Author

@jenniferubah can yo resolve conflict pls so we can move closer to merging the PR?
Sure, resolved it now

Comment thread additional-config-guides/orchestrator-workflow-guide.md
Comment thread additional-config-guides/orchestrator-workflow-guide.md Outdated
Comment thread additional-config-guides/orchestrator-workflow-guide.md Outdated
Comment thread additional-config-guides/orchestrator-workflow-guide.md Outdated
Comment thread compose-with-orchestrator.yaml Outdated
Comment thread compose-with-orchestrator.yaml Outdated
Comment thread compose-with-orchestrator.yaml Outdated
-f compose-with-orchestrator.yaml \
up -d
```
Ensure to copy the orchestrator dynamic plugins from `dynamic-plugins-orchestrator.yaml` to your `dynamic-plugins.override.yaml`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if this could not be done automagically, as long as the compose-with-orchestrator.yaml is being used? With the help of the script that the init container runs, I feel like we could probably merge the content of dynamic-plugins-orchestrator.yaml and any additional user-provided plugins in dynamic-plugins.override.yaml (or the default one).
I see this new compose file as the Orchestrator flavor in RHDH Local, so IMO, users shouldn't have to explicitly add the Orchestrator plugins again.
WDYT? If too complicated, we can also leave this for a future improvement.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to automate the merge of the dynamic plugins files when the user wants to use the orchestrator compose yaml file instead of having them do it manually. And it might be complicated for this PR. I could do it in the next PR though.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

@jenniferubah
jenniferubah requested a review from rm3l July 15, 2025 18:16
@jenniferubah
jenniferubah force-pushed the rhdho-local-integration branch from a51ffda to 0a76a26 Compare July 15, 2025 18:19
Comment thread additional-config-guides/orchestrator-workflow-guide.md Outdated
Comment thread compose-with-orchestrator.yaml Outdated
Comment thread compose-with-orchestrator.yaml Outdated
@jenniferubah
jenniferubah force-pushed the rhdho-local-integration branch from 0a76a26 to 2481369 Compare July 17, 2025 23:19
@jenniferubah
jenniferubah requested a review from rm3l July 17, 2025 23:23

@rm3l rm3l left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Jul 18, 2025
@rm3l
rm3l merged commit 87387ef into redhat-developer:main Jul 18, 2025
13 checks passed
@rm3l

rm3l commented Jul 18, 2025

Copy link
Copy Markdown
Member

/cherry-pick release-1.7

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@rm3l: new pull request created: #69

Details

In response to this:

/cherry-pick release-1.7

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants