{"_id":"@batzionrotman123/orchestrator","name":"@batzionrotman123/orchestrator","dist-tags":{"latest":"1.0.0-redhat-0001"},"versions":{"1.0.0-redhat-0001":{"name":"@batzionrotman123/orchestrator","version":"1.0.0-redhat-0001","license":"Apache-2.0","main":"src/index.ts","types":"src/index.ts","publishConfig":{"access":"public","main":"dist/index.esm.js","types":"dist/index.d.ts"},"backstage":{"role":"frontend-plugin"},"homepage":"https://janus-idp.io/","repository":{"type":"git","url":"git+https://github.com/janus-idp/backstage-plugins.git"},"bugs":{"url":"https://github.com/janus-idp/backstage-plugins/issues"},"keywords":["backstage","plugin","orchestrator","workflows"],"scripts":{"start":"backstage-cli package start","build":"backstage-cli package build","export-dynamic":"janus-cli package export-dynamic-plugin","tsc":"tsc","lint":"backstage-cli package lint","test":"backstage-cli package test --passWithNoTests --coverage","clean":"backstage-cli package clean","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack"},"dependencies":{"@backstage/core-app-api":"^1.12.0","@backstage/core-components":"^0.14.0","@backstage/core-plugin-api":"^1.9.0","@backstage/errors":"^1.2.3","@backstage/plugin-catalog":"^1.17.0","@backstage/plugin-scaffolder-common":"^1.5.0","@backstage/plugin-scaffolder-react":"^1.8.0","@backstage/types":"^1.1.1","@janus-idp/backstage-plugin-orchestrator-common":"1.6.0","@kie-tools-core/editor":"^0.32.0","@kie-tools-core/envelope-bus":"^0.32.0","@kie-tools-core/keyboard-shortcuts":"^0.32.0","@kie-tools-core/notifications":"^0.32.0","@kie-tools-core/react-hooks":"^0.32.0","@kie-tools/serverless-workflow-combined-editor":"^0.32.0","@kie-tools/serverless-workflow-diagram-editor-assets":"^0.32.0","@kie-tools/serverless-workflow-diagram-editor-envelope":"^0.32.0","@kie-tools/serverless-workflow-language-service":"^0.32.0","@kie-tools/serverless-workflow-service-catalog":"^0.32.0","@kie-tools/serverless-workflow-text-editor":"^0.32.0","@material-ui/core":"^4.12.4","@material-ui/icons":"^4.11.3","@material-ui/lab":"^4.0.0-alpha.45","@monaco-editor/react":"^4.6.0","@mui/icons-material":"^5.15.3","@rjsf/core-v5":"npm:@rjsf/core@5.7.3","@rjsf/material-ui-v5":"npm:@rjsf/material-ui@5.7.3","@rjsf/utils":"5.7.3","@rjsf/validator-ajv8":"5.7.3","classnames":"^2.5.1","json-schema":"^0.4.0","moment":"^2.29.4","monaco-editor":"^0.39.0","react-hook-form":"^7.45.1","react-json-view":"^1.21.3","react-moment":"^1.1.3","react-use":"^17.4.0","swr":"^2.0.0","uuid":"^9.0.1","vscode-languageserver-types":"^3.16.0"},"devDependencies":{"@babel/core":"7.16.0","@babel/preset-env":"7.16.0","@babel/preset-react":"7.16.0","@backstage/cli":"0.25.2","@backstage/dev-utils":"1.0.27","@backstage/test-utils":"1.5.0","@janus-idp/cli":"1.7.5","@storybook/react":"7.5.3","@testing-library/react":"14.2.1","@testing-library/react-hooks":"8.0.1","@types/json-schema":"7.0.15","css-loader":"6.5.1","file-loader":"5.0.2","filemanager-webpack-plugin":"6.1.4","monaco-editor-webpack-plugin":"7.0.1","monaco-yaml":"4.0.4","sass":"1.54.5","sass-loader":"10.3.1","source-map-loader":"2.0.2","style-loader":"1.0.0","terser-webpack-plugin":"5.3.9","ts-loader":"8.4.0","url-loader":"3.0.0","webpack":"5.76.0","webpack-cli":"4.10.0","@storybook/preview-api":"7.5.3","react":"18.2.0","react-dom":"18.2.0"},"peerDependencies":{"react":"^16.13.1 || ^17.0.0 || ^18.2.0","react-router-dom":"^6.3.0"},"scalprum":{"name":"janus-idp.backstage-plugin-orchestrator","exposedModules":{"OrchestratorPlugin":"./src/index.ts"}},"_id":"@batzionrotman123/orchestrator@1.0.0-redhat-0001","gitHead":"2b4faadd43df8c740444d83a7efac955cf443922","description":"The Orchestrator for Backstage is a mechanism designed to facilitate the implementation and execution of developer self-service flows. It serves as a vital component that enhances and augments the existing scaffolder functionality of Backstage with a more","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-cGzLF/BkL5/wdbBTmmTRir39z2sqYOqbq0zA1TneiItyVJX7DA6JmJwOVr6VIpmJxr27zmYYj1sdqVF4xjEU3Q==","shasum":"8b342decda6c621e651d8d212842f0dc27490152","tarball":"https://registry.npmjs.org/@batzionrotman123/orchestrator/-/orchestrator-1.0.0-redhat-0001.tgz","fileCount":465,"unpackedSize":25526324,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8LRQklHR4oo8o2+KcBVsqKu0zOKHvJ19aH+aclYHDYwIgEhy5SJcqdDzlno497b+hwVmknCt87lNg3ieDAFnBLps="}]},"_npmUser":{"name":"batzionrotman123","email":"batzionrotman@gmail.com"},"directories":{},"maintainers":[{"name":"batzionrotman123","email":"batzionrotman@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orchestrator_1.0.0-redhat-0001_1711879356198_0.1968093429422344"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-31T10:02:36.144Z","1.0.0-redhat-0001":"2024-03-31T10:02:36.590Z","modified":"2024-03-31T10:02:36.868Z"},"maintainers":[{"name":"batzionrotman123","email":"batzionrotman@gmail.com"}],"description":"The Orchestrator for Backstage is a mechanism designed to facilitate the implementation and execution of developer self-service flows. It serves as a vital component that enhances and augments the existing scaffolder functionality of Backstage with a more","homepage":"https://janus-idp.io/","keywords":["backstage","plugin","orchestrator","workflows"],"repository":{"type":"git","url":"git+https://github.com/janus-idp/backstage-plugins.git"},"bugs":{"url":"https://github.com/janus-idp/backstage-plugins/issues"},"license":"Apache-2.0","readme":"# Orchestrator Plugin for Backstage\n\nThe Orchestrator for Backstage is a mechanism designed to facilitate the implementation and execution of developer self-service flows. It serves as a vital component that enhances and augments the existing scaffolder functionality of Backstage with a more flexible and powerful set of features including long-running and asynchronous flows.\n\nThe orchestrator works harmoniously with other Backstage components such as the Software Catalog, permissions, and plugins as well as others. By leveraging its capabilities, organizations can orchestrate and coordinate developer self-service flows effectively.\n\n## Context\n\nThe Backstage Orchestrator plugin aims to provide a better option to Scaffolder, based on workflows to have a more flexible and powerful tool that addresses the need by streamlining and automating processes, allowing developers to focus more on coding and innovation.\n\nThe orchestrator relies on [SonataFlow](https://sonataflow.org/), a powerful tool for building cloud-native workflow applications.\n\nThe main idea is to keep the same user experience for users, levering the UI components, input forms, and flow that Scaffolder provides, this way it should be straightforward for users and transparent no matter whether using Templates or Workflows, both can live together being compatible with integration points.\n\nThe orchestrator controls the flow orchestrating operations/tasks that may be executed in any external service including Scaffolder Actions, this way it is possible to leverage any existing Action hence Software Templates can be easily migrated to workflows opening the door to extend them to more complex use cases.\n\n## Capabilities\n\n**Advanced core capabilities**\n\n- Stateful/long-lived\n- Branching and parallelism\n- Error management and compensation\n- Event-driven supporting [CloudEvents](https://cloudevents.io)\n- Audit logging\n- Sub-flows\n- Choreography\n- Timer/timeout control\n- Built-in powerful expression evaluation with JQ\n- Low Code/No code\n- Cloud-native architecture Kubernetes/Openshit with Operator support\n- OpenAPI / REST built-in integration etc.\n\n**Client-side tooling**\n\n- Orchestration visualization / graphical editor\n- Integration with service catalog/actions\n- GitHub integration\n- Form generation\n- Runtime monitoring of instances\n- Dashboards\n- Potential custom integrations (user interaction, notifications, etc.)\n\n## For administrators\n\n### Installation\n\nThe Orchestrator plugin is composed of the following packages:\n\n- `@janus-idp/backstage-plugin-orchestrator-backend` package connects the Backstage server to the Orchestrator. For setup process, see [Backend Setup](#setting-up-the-orchestrator-backend-package)\n- `@janus-idp/backstage-plugin-orchestrator` package contains frontend components for the Orchestrator plugin. For setup process, see [Frontend Setup](#setting-up-the-orchestrator-frontend-package)\n- `@janus-idp/backstage-plugin-orchestrator-common` package contains shared code between the Orchestrator plugin packages.\n\n#### Prerequisites for running the plugins locally in development mode\n\n- Docker up and running\n\n#### Setting up the Orchestrator as a dynamic plugin in a Helm deployment\n\nPlease follow this link for instructions: https://github.com/janus-idp/backstage-showcase/blob/main/showcase-docs/dynamic-plugins.md#helm-deployment\n\n#### Setting up the configuration for the Orchestrator plugin\n\nThe following configuration is required for the Orchestrator plugin to work properly:\n\n```yaml title=\"app-config.yaml\"\norchestrator:\n  sonataFlowService:\n    baseUrl: http://localhost\n    port: 8899\n    autoStart: true\n    workflowsSource:\n      gitRepositoryUrl: https://github.com/tiagodolphine/backstage-orchestrator-workflows\n      localPath: /tmp/orchestrator/repository\n  dataIndexService:\n    url: http://localhost:8899\n```\n\n- When interacting with an existing SonataFlow infrastructure, the `sonataFlowService` config section must be entirely omitted and the `dataIndexService.url` must point to the existing Data Index Service.\n\nFor more information about the configuration options, including other optional properties, see the [config.d.ts](../orchestrator-common/config.d.ts) file.\n\n#### Setting up the Orchestrator backend package for the legacy backend\n\n1. Install the Orchestrator backend plugin using the following command:\n\n   ```console\n   yarn workspace backend add @janus-idp/backstage-plugin-orchestrator-backend\n   ```\n\n1. Create a new plugin instance in `packages/backend/src/plugins/orchestrator.ts` file:\n\n   ```ts title=\"packages/backend/src/plugins/orchestrator.ts\"\n   import { Router } from 'express';\n\n   import { createRouter } from '@janus-idp/backstage-plugin-orchestrator-backend';\n\n   import { PluginEnvironment } from '../types';\n\n   export default async function createPlugin(\n     env: PluginEnvironment,\n   ): Promise<Router> {\n     return await createRouter({\n       config: env.config,\n       logger: env.logger,\n       discovery: env.discovery,\n       catalogApi: env.catalogApi,\n       urlReader: env.reader,\n       scheduler: env.scheduler,\n     });\n   }\n   ```\n\n1. Import and plug the new instance into `packages/backend/src/index.ts` file:\n\n   ```ts title=\"packages/backend/src/index.ts\"\n   /* highlight-add-next-line */\n   import orchestrator from './plugins/orchestrator';\n\n   async function main() {\n     // ...\n     const createEnv = makeCreateEnv(config);\n     // ...\n     /* highlight-add-next-line */\n     const orchestratorEnv = useHotMemoize(module, () =>\n       createEnv('orchestrator'),\n     );\n     // ...\n     const apiRouter = Router();\n     // ...\n     /* highlight-add-next-line */\n     apiRouter.use('/orchestrator', await orchestrator(orchestratorEnv));\n     // ...\n   }\n   ```\n\n#### Setting up the Orchestrator backend package for the new backend\n\n1. Install the Orchestrator backend plugin using the following command:\n\n   ```console\n   yarn workspace backend add @janus-idp/backstage-plugin-orchestrator-backend\n   ```\n\n1. Add the following code to `packages/backend/src/index.ts` file:\n\n   ```ts title=\"packages/backend/src/index.ts\"\n   import { orchestratorPlugin } from '@janus-idp/backstage-plugin-orchestrator-backend/alpha';\n\n   const backend = createBackend();\n   /* highlight-add-next-line */\n   backend.add(orchestratorPlugin);\n\n   backend.start();\n   ```\n\n#### Setting up the Orchestrator frontend package\n\n1. Install the Orchestrator frontend plugin using the following command:\n\n   ```console\n   yarn workspace app add @janus-idp/backstage-plugin-orchestrator\n   ```\n\n1. Add a route to the `OrchestratorPage` and the customized template card component to Backstage App (`packages/app/src/App.tsx`):\n\n   ```tsx title=\"packages/app/src/App.tsx\"\n   /* highlight-add-next-line */\n   import { OrchestratorPage } from '@janus-idp/backstage-plugin-orchestrator';\n\n   const routes = (\n     <FlatRoutes>\n       {/* ... */}\n       {/* highlight-add-next-line */}\n       <Route path=\"/orchestrator\" element={<OrchestratorPage />} />\n     </FlatRoutes>\n   );\n   ```\n\n1. Add the Orchestrator to Backstage sidebar (`packages/app/src/components/Root/Root.tsx`):\n\n   ```tsx title=\"packages/app/src/components/Root/Root.tsx\"\n   /* highlight-add-next-line */\n   import { OrchestratorIcon } from '@janus-idp/backstage-plugin-orchestrator';\n\n   export const Root = ({ children }: PropsWithChildren<{}>) => (\n     <SidebarPage>\n       <Sidebar>\n         <SidebarGroup label=\"Menu\" icon={<MenuIcon />}>\n           {/* ... */}\n           {/* highlight-add-start */}\n           <SidebarItem\n             icon={OrchestratorIcon}\n             to=\"orchestrator\"\n             text=\"Orchestrator\"\n           />\n           {/* highlight-add-end */}\n         </SidebarGroup>\n         {/* ... */}\n       </Sidebar>\n       {children}\n     </SidebarPage>\n   );\n   ```\n\n## For users\n\n### Using the Orchestrator plugin in Backstage\n\nThe Orchestrator plugin enhances the Backstage with the execution of developer self-service flows. It provides a graphical editor to visualize workflow definitions, and a dashboard to monitor the execution of the workflows.\n\n#### Prerequisites\n\n- Your Backstage application is installed and running.\n- You have installed the Orchestrator plugin. For the installation process, see [Installation](#installation).\n\n#### Procedure\n\n1. Open your Backstage application.\n1. Click the **Orchestrator** tab from the left-side panel to navigate to the **Orchestrator** main page.\n1. Inside the **Orchestrator** main page, you can see the list of workflow definitions that are available in your Backstage application.\n","readmeFilename":"README.md"}