Nomad operators and configuration for long-running tasks
Project description
airflow-nomad
Run and monitor Nomad-managed jobs from Apache Airflow.
from airflow import DAG
from airflow_nomad import Job, Nomad, NomadAirflowConfiguration, Task, TaskGroup
dag = DAG(dag_id="nightly-nomad", schedule="@daily")
config = NomadAirflowConfiguration(
job=Job(
id="nightly",
type="batch",
task_groups=[
TaskGroup(
name="nightly",
tasks=[Task(name="nightly", driver="exec", config={"command": "/opt/jobs/nightly"})],
)
],
)
)
Nomad(dag=dag, cfg=config)
The generated task lifecycle writes and registers the jobspec, monitors current
allocations with airflow-ha, handles retriggers, stops the job, and optionally
removes the generated configuration.
Documentation
Published documentation is available at airflow-laminar.github.io/airflow-nomad.
Ecosystem
- nomad-pydantic supplies jobspec models and the Nomad CLI client.
- supervisor-pydantic, systemd-pydantic, and cron-pydantic model alternative runtimes.
- airflow-supervisor and airflow-systemd provide analogous long-running job lifecycles.
- airflow-cron converts cron jobs into ordinary Airflow tasks.
- airflow-pydantic supplies declarative task and connection models.
- airflow-config produces YAML-driven DAGs.
[!NOTE] This library was generated using copier from the Base Python Project Template repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file airflow_nomad-0.1.0.tar.gz.
File metadata
- Download URL: airflow_nomad-0.1.0.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b1d3d00793a8e2d478477e6287f82590c0c2c9ac6caa26e92a3bf51cd3b018c
|
|
| MD5 |
652fe4e1b583951fb4119deba8c7e7cc
|
|
| BLAKE2b-256 |
316aec577380258fd7163914a3eb2b779fa776433d848333273e311b6d005761
|
File details
Details for the file airflow_nomad-0.1.0-py3-none-any.whl.
File metadata
- Download URL: airflow_nomad-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbc0fa70b68f82f34c6d3183de01eb80377caa94dacc4d7a7cb9cdabcd46de2b
|
|
| MD5 |
1affbf14e6b23b756ae242cabb8b5289
|
|
| BLAKE2b-256 |
344fc3f81bdcf1b42ec72f6ca6492bbf17db4cbc0c9048459b574b1b5b608fb7
|