Skip to main content

Workflow & Data Orchestration (Managed Apache Airflow)

Okustera Managed Apache Airflow delivers enterprise-grade workflow orchestration and ETL data pipeline scheduling as a zero-license-tax sovereign cloud service—an open-standard alternative to AWS MWAA and Google Cloud Composer.

Provision dedicated, elastic Apache Airflow workspaces in the Cloud Portal (/workflows), via REST API (/api/v1/workflows/*), or declaratively with Terraform, and access your web console at https://airflow.okustera.com.

Okustera Managed Workflows & Pipelines (Apache Airflow) Console


Elastic Task Execution Model​

Rather than maintaining static, always-on worker VMs that sit idle between scheduled runs, Okustera Managed Apache Airflow spawns isolated, ephemeral task containers on demand for every task execution in a Directed Acyclic Graph (DAG) and reclaims resources immediately upon completion.


Key Capabilities​

  • Serverless Task Elasticity: Each DAG task executes in an isolated ephemeral worker with customizable CPU and memory limits, scaling automatically from zero to hundreds of parallel tasks.
  • 100% Sovereign Persistence: Metadata, DAG definitions, and execution logs remain strictly inside European sovereign infrastructure with encryption at rest and in transit.
  • Flexible DAG Deployment:
    • Git Synchronization: Automatically synchronize DAG repositories from GitHub, GitLab, or private Git servers.
    • Portal & API Upload: Drag-and-drop Python DAG scripts in the Cloud Portal UI or upload programmatically via POST /api/v1/workflows/dags/upload.
    • Terraform IaC: Declare DAG files and workspace parameters alongside the rest of your infrastructure.
  • Unified Security & Observability: Protected by Okustera IAM and TLS termination, with real-time task log streaming directly in the Cloud Portal and metrics integrated into Grafana.

Declarative Management via Terraform​

Workspaces and DAG definitions are managed declaratively using the official Okustera Terraform Provider:

# Provision a dedicated Managed Apache Airflow workspace
resource "okustera_airflow_workspace" "analytics" {
name = "analytics-etl"
airflow_version = "2.10.5"
max_workers = 32
}

# Inspect operational health and telemetry of the Airflow workspace
data "okustera_workflow_status" "cluster" {}

# Deploy a production ETL DAG pipeline
resource "okustera_workflow_dag" "analytics_pipeline" {
dag_id = "tenant_analytics_pipeline"
filename = "analytics_pipeline.py"
is_paused = false

content = <<-EOT
from airflow import DAG
from airflow.operators.bash import BashOperator
from datetime import datetime, timedelta

default_args = {
'owner': 'data-engineering',
'depends_on_past': False,
'retries': 2,
'retry_delay': timedelta(minutes=5),
}

with DAG(
dag_id='tenant_analytics_pipeline',
default_args=default_args,
description='Nightly customer analytics and financial billing DAG',
schedule_interval='@daily',
start_date=datetime(2026, 1, 1),
catchup=False,
tags=['production', 'analytics', 'finops'],
) as dag:

task_extract = BashOperator(
task_id='extract_metrics',
bash_command='echo "Extracting telemetry metrics..."',
)

task_process = BashOperator(
task_id='process_aggregates',
bash_command='echo "Processing data aggregates..."',
)

task_extract >> task_process
EOT
}

output "workflow_status" {
value = data.okustera_workflow_status.cluster.status
}

output "dag_parsed_schedule" {
value = okustera_workflow_dag.analytics_pipeline.schedule_interval
}

Refer to the okustera_airflow_workspace, okustera_workflow_dag, and okustera_workflow_status references for full schema details.


Example: S3-to-PostgreSQL ETL DAG​

The following Python DAG extracts customer event files from Okustera S3 Object Storage, transforms records with pandas, and loads aggregated rows into a Managed PostgreSQL database:

import io
import os
from datetime import datetime, timedelta
from airflow import DAG
from airflow.operators.python import PythonOperator
import boto3
import pandas as pd
import psycopg2

default_args = {
"owner": "data-team",
"depends_on_past": False,
"email_on_failure": False,
"retries": 2,
"retry_delay": timedelta(minutes=5),
}

def extract_and_transform_s3_events():
"""Extract telemetry data from Okustera S3 and transform with pandas."""
s3 = boto3.client(
"s3",
endpoint_url="https://s3.okustera.com",
aws_access_key_id=os.environ["OKUSTERA_S3_ACCESS_KEY"],
aws_secret_access_key=os.environ["OKUSTERA_S3_SECRET_KEY"],
)

obj = s3.get_object(Bucket="customer-events", Key="batches/latest.csv")
df = pd.read_csv(io.BytesIO(obj["Body"].read()))

df_clean = df.dropna(subset=["event_id", "timestamp"])
df_clean["processed_at"] = datetime.utcnow().isoformat()

csv_buffer = io.StringIO()
df_clean.to_csv(csv_buffer, index=False)
s3.put_object(
Bucket="customer-events",
Key="processed/latest_cleaned.csv",
Body=csv_buffer.getvalue(),
)
print(f"Successfully processed {len(df_clean)} records.")

def load_to_postgresql():
"""Load transformed dataset into Managed PostgreSQL."""
conn = psycopg2.connect(
host=os.environ["POSTGRES_HOST"],
port=int(os.environ.get("POSTGRES_PORT", "5432")),
dbname="analytics",
user=os.environ["POSTGRES_USER"],
password=os.environ["POSTGRES_PASSWORD"],
)
cursor = conn.cursor()
cursor.execute("""
CREATE TABLE IF NOT EXISTS customer_events_summary (
event_id VARCHAR(64) PRIMARY KEY,
processed_at TIMESTAMP,
event_count INT
);
""")
conn.commit()
cursor.close()
conn.close()
print("Database sync completed successfully.")

with DAG(
"okustera_s3_postgres_pipeline",
default_args=default_args,
description="Sovereign ETL data pipeline on Managed Apache Airflow",
schedule_interval="0 2 * * *",
start_date=datetime(2026, 1, 1),
catchup=False,
tags=["sovereign", "etl", "s3", "postgres"],
) as dag:

t1 = PythonOperator(
task_id="extract_transform_s3",
python_callable=extract_and_transform_s3_events,
)

t2 = PythonOperator(
task_id="load_postgresql",
python_callable=load_to_postgresql,
)

t1 >> t2

Managing Workflows in the Cloud Portal​

The Okustera Cloud Portal (/workflows) provides an integrated web interface for data engineers and pipeline operators:

1. Uploading a Python DAG​

  1. Navigate to Workflows in the left sidebar.
  2. Click Upload DAG and drag and drop your .py DAG file (or browse to select it).
  3. The Airflow Scheduler automatically detects the uploaded DAG within seconds and registers it in your workspace catalog.

2. Triggering and Inspecting DAG Runs​

  1. In the DAG list, locate your workflow (e.g., tenant_analytics_pipeline).
  2. Click Trigger DAG and optionally provide runtime configuration JSON (e.g., {"date": "2026-09-28", "batch_size": 500}).
  3. Confirm to start the run and inspect the live execution timeline and task states.

3. Viewing Live Task Execution Logs​

  1. Click any running or completed task in the execution graph.
  2. Select Task Logs to stream execution logs directly in the portal without needing cluster shell access.

4. Pausing and Deleting DAGs​

  • Toggle Pause / Unpause to halt scheduled triggers while preserving historical run records.
  • Click Delete DAG to remove the script and clean up scheduler metadata.

REST API Reference​

Workspace Lifecycle Management​

  • GET /api/v1/workflows/airflow/workspaces — List provisioned Apache Airflow workspaces for the tenant.
  • POST /api/v1/workflows/airflow/workspaces — Provision a new isolated Apache Airflow workspace.
  • GET /api/v1/workflows/airflow/workspaces/{name} — Retrieve workspace details, endpoints, and health status.
  • DELETE /api/v1/workflows/airflow/workspaces/{name} — Deprovision an Apache Airflow workspace.
  • GET /api/v1/workflows/airflow/workspaces/{name}/stats — Retrieve scheduler health, active worker count, and DAG statistics.
  • GET /api/v1/workflows/airflow/workspaces/{name}/dags — List DAGs registered in a specific workspace.
  • POST /api/v1/workflows/airflow/workspaces/{name}/dags/{dag_id}/trigger — Trigger a DAG run inside a specific workspace.
  • GET /api/v1/workflows/airflow/workspaces/{name}/dags/{dag_id}/logs — Retrieve task execution logs from a specific workspace.

Cluster & DAG Orchestration​

  • GET /api/v1/workflows/status — Inspect operational health of the managed Airflow workspace.
  • GET /api/v1/workflows/dags — List workflow DAGs accessible to the current tenant.
  • GET /api/v1/workflows/dags/{dag_id} — Retrieve metadata, schedule, and execution timetable for a DAG.
  • PATCH /api/v1/workflows/dags/{dag_id} — Pause or unpause a workflow DAG.
  • POST /api/v1/workflows/dags/{dag_id}/trigger — Trigger immediate DAG execution with optional JSON parameters.
  • GET /api/v1/workflows/dags/{dag_id}/runs — List historical and active DAG runs with state and duration.
  • GET /api/v1/workflows/dags/{dag_id}/runs/{run_id}/tasks — List task instances and execution status for a run.
  • GET /api/v1/workflows/dags/{dag_id}/runs/{run_id}/tasks/{task_id}/logs — Retrieve streaming task execution logs.
  • POST /api/v1/workflows/dags/upload — Upload a Python DAG file with automatic scheduler synchronization.
  • DELETE /api/v1/workflows/dags/{dag_id} — Delete a DAG file and purge scheduler metadata.