7장. Build and deploy serverless workflows


To deploy a workflow and make it available in the Orchestrator plugin, follow these main steps:

  • Building workflow images
  • Generating workflow manifests
  • Deploying workflows to a cluster

This process moves the workflow from your local machine to deployment on a cluster.

7.1. Benefits of workflow images

While the OpenShift Serverless Logic Operator supports the building of workflows dynamically, this approach is primarily for experimentation. For production deployments, building images is the preferred method due to the following reasons:

  • Production readiness: Prebuilt images can be scanned, secured, and tested before going live.
  • GitOps compatibility: The Orchestrator relies on a central OpenShift Serverless Logic Operator instance to track workflows and their state. To use this tracking service, you must deploy workflows with the gitops profile, which expects a prebuilt image.
  • Testing and quality: Building an image gives you more control over the testing process.

7.1.1. Project structure overview

The project utilizes Quarkus project layout (Maven project structure). This structure is illustrated by the following 01_basic workflow example:

01_basic
├── pom.xml
├── README.md
└── src
    └── main
        ├── docker
        │   ├── Dockerfile.jvm
        │   ├── Dockerfile.legacy-jar
        │   ├── Dockerfile.native
        │   └── Dockerfile.native-micro
        └── resources
            ├── application.properties
            ├── basic.svg
            ├── basic.sw.yaml
            ├── schemas
            │   ├── basic__main-schema.json
            │   └── workflow-output-schema.json
            └── secret.properties

The main workflow resources are located under the src/main/resources/ directory.

The kn-workflow CLI generated this project structure. You can try generating the structure yourself by following the Getting Started guide. For more information on the Quarkus project, see Creating your first application.

7.1.2. Creating and running your serverless workflow project locally

The kn-workflow CLI is an essential tool that generates workflow manifests and project structures. To ensure successful development and immediate testing, begin developing a new serverless workflow locally by completing the following steps:

Procedure

  1. Use the kn-workflow CLI to create a new workflow project, which adheres to the Quarkus structure as shown in the following example:

    kn-workflow quarkus create --name <specify project name, for example ,00_new_project>
  2. Edit the workflow, add schema and specific files, and run it locally from project folder as shown in the following example:

    kn-workflow quarkus run
  3. Run the workflow locally using the kn-workflow run which pulls the following image:

    registry.redhat.io/openshift-serverless-1/logic-swf-devmode-rhel8:1.36.0
  4. For building the workflow image, the kn-workflow CLI pulls the following images:

    registry.redhat.io/openshift-serverless-1/logic-swf-builder-rhel8:1.36.0-8
    registry.access.redhat.com/ubi9/openjdk-17:1.21-2
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동