workflow

module
v0.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2023 License: Apache-2.0

README

KubeVela Workflow

Go Report Card codecov LICENSE Total alerts



Table of Contents



Why use KubeVela Workflow

🌬️ Lightweight Workflow Engine: KubeVela Workflow won't create a pod or job for process control. Instead, everything can be done in steps and there will be no redundant resource consumption.

Flexible, Extensible and Programmable: All the steps are based on the CUE language, which means if you want to customize a new step, you just need to write CUE codes and no need to compile or build anything, KubeVela Workflow will evaluate these codes.

💪 Rich built-in capabilities: You can control the process with conditional judgement, inputs/outputs, timeout, etc. You can also use the built-in steps to do some common tasks, such as deploy resources, suspend, notification, step-group and more!

🔐 Safe execution with schema checksum checking: Every step will be checked with the schema, which means you can't run a step with a wrong parameter. This will ensure the safety of the workflow execution.

How can KubeVela Workflow be used

During the evolution of the OAM and KubeVela project, workflow, as an important part to control the delivery process, has gradually matured. Therefore, we separated the workflow code from the KubeVela repository to make it standalone. As a general workflow engine, it can be used directly or as an SDK by other projects.

As a standalone workflow engine

Unlike the workflow in the KubeVela Application, this workflow will only be executed once, and will not keep reconciliation, no garbage collection when the workflow object deleted or updated. You can use it for one-time operations like:

  • Glue and orchestrate operations, such as control the deploy process of multiple resources(e.g. your Applications), scale up/down, read-notify processes, or the sequence between http requests.
  • Orchestrate delivery process without day-2 management, just deploy. The most common use case is to initialize your infrastructure for some environment.

Please refer to the installation and quick start sections for more.

As an SDK

You can use KubeVela Workflow as an SDK to integrate it into your project. For example, the KubeVela Project use it to control the process of application delivery.

You just need to initialize a workflow instance and generate all the task runners with the instance, then execute the task runners. Please check out the example in Workflow or KubeVela.

Installation

Install Workflow

Helm

helm repo add kubevela https://kubevela.github.io/charts
helm repo update
helm install --create-namespace -n vela-system vela-workflow kubevela/vela-workflow

KubeVela Addon

If you have installed KubeVela, you can install Workflow with the KubeVela Addon:

vela addon enable vela-workflow

Install Vela CLI

Please checkout: Install Vela CLI

Install built-in steps in KubeVela(Optional)

Use vela def apply <directory> to install built-in step definitions in KubeVela and Workflow Addon.

Note that if you installed Workflow using KubeVela Addon, then the definitions in the addon will be installed automatically.

Checkout this doc for more details.

Quick Start

You can either run a WorkflowRun directly or from a Workflow Template.

Please checkout the WorkflowRun Specification and WorkflowRun Status for more details.

Run a WorkflowRun directly

Please refer to the following examples:

Run a WorkflowRun from a Workflow Template

Please refer to the following examples:

Features

How to write custom steps

If you're not familiar with CUE, please checkout the CUE documentation first.

You can customize your steps with CUE and some built-in operations. Please checkout the tutorial for more details.

Note that you cannot use the application operations since there're no application data like components/traits/policy in the WorkflowRun.

Contributing

Check out CONTRIBUTING to see how to develop with KubeVela Workflow.

Directories

Path Synopsis
api
condition
Package condition contains condition types +kubebuilder:object:generate=true
Package condition contains condition types +kubebuilder:object:generate=true
v1alpha1
Package v1alpha1 contains resources relating to the Open Application Model.
Package v1alpha1 contains resources relating to the Open Application Model.
pkg
cue

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL