Tutorial
Follow the tutorial to schedule and orchestrate your first workflows.
Kestra is an open-source orchestrator designed to bring Infrastructure as Code (IaC) best practices to all workflows — from those orchestrating mission-critical applications, IT operations, business processes, and data pipelines, to simple Zapier-style automations.
You can use Kestra to:
- run workflows on-demand, event-driven or based on a regular schedule
- programmatically interact with any system or programming language
- orchestrate microservices, batch jobs, ad-hoc scripts (written in Python, R, Julia, Node.js, and more), SQL queries, data ingestion syncs, dbt or Spark jobs, or any other applications or processes
This tutorial will guide you through key concepts in Kestra. We'll build upon the "Hello world" flow from the Quickstart, and we'll gradually introduce new concepts including namespaces
, tasks
, parametrization with inputs
and scheduling using triggers
.
We'll then dive into parallel
task execution, error handling, as well as custom scripts and microservices running in isolated containers. Let's get started!
Using JSON Schema to Validate a Flow
Kestra provides a JSON Schema to validate your flow definitions. This ensures that your flows are correctly structured and helps catch errors early in the development process.
JSON Schema in VSCode
To use the JSON Schema in Visual Studio Code (VSCode), follow these steps:
- Install the YAML extension by Red Hat.
- Open your VSCode settings (
Ctrl+,
orCmd+,
). - Search for
YAML: Schemas
and click onEdit in settings.json
. - Add the following configuration to associate the Kestra JSON Schema with your flow files:
{
"yaml.schemas": {
"https://your-kestra-instance.com/api/v1/schemas/flow.json": "/*.yaml"
}
}
Replace https://your-kestra-instance.com/api/v1/schemas/flow.json
with the actual URL of your Kestra JSON Schema.
Globally Available Location for JSON Schema
The JSON Schema for Kestra flows is available at the following URL:
https://your-kestra-instance.com/api/v1/schemas/flow.json
Replace https://your-kestra-instance.com
with the actual URL of your Kestra instance.
Fundamentals
Start by building a "Hello world" example.
Inputs
Inputs allow you to make your flows more dynamic and reusable.
Outputs
Outputs allow you to pass data between tasks and flows.
Triggers
Triggers automatically start your flow based on events.
Flowable Tasks
Run tasks or subflows in parallel, create loops and conditional branching.
Errors and Retries
Handle errors with automatic retries and notifications.
Docker
Run custom Python, R, Julia, Node.js and Shell scripts in isolated containers.
Was this page helpful?