Skip to main content

Nomad operators and configuration for long-running tasks

Project description

airflow-nomad

Run and monitor Nomad-managed jobs from Apache Airflow.

Build Status codecov License PyPI

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

[!NOTE] This library was generated using copier from the Base Python Project Template repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

airflow_nomad-0.1.0.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

airflow_nomad-0.1.0-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

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

Hashes for airflow_nomad-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2b1d3d00793a8e2d478477e6287f82590c0c2c9ac6caa26e92a3bf51cd3b018c
MD5 652fe4e1b583951fb4119deba8c7e7cc
BLAKE2b-256 316aec577380258fd7163914a3eb2b779fa776433d848333273e311b6d005761

See more details on using hashes here.

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

Hashes for airflow_nomad-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dbc0fa70b68f82f34c6d3183de01eb80377caa94dacc4d7a7cb9cdabcd46de2b
MD5 1affbf14e6b23b756ae242cabb8b5289
BLAKE2b-256 344fc3f81bdcf1b42ec72f6ca6492bbf17db4cbc0c9048459b574b1b5b608fb7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page