-
Notifications
You must be signed in to change notification settings - Fork 398
Add airflowctl 1.0.0 blog #1247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bugraoz93
wants to merge
2
commits into
apache:main
Choose a base branch
from
bugraoz93:airflowctl-v1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+212 KB
landing-pages/site/content/en/blog/airflowctl-1.0.0/images/assets_create_event.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+285 KB
landing-pages/site/content/en/blog/airflowctl-1.0.0/images/assets_get.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+498 KB
landing-pages/site/content/en/blog/airflowctl-1.0.0/images/config_get.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+243 KB
landing-pages/site/content/en/blog/airflowctl-1.0.0/images/connections_create.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+199 KB
landing-pages/site/content/en/blog/airflowctl-1.0.0/images/connections_get.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+220 KB
landing-pages/site/content/en/blog/airflowctl-1.0.0/images/connections_update.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+318 KB
landing-pages/site/content/en/blog/airflowctl-1.0.0/images/dagrun_list.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+706 KB
landing-pages/site/content/en/blog/airflowctl-1.0.0/images/dagrun_trigger.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+187 KB
landing-pages/site/content/en/blog/airflowctl-1.0.0/images/pools_list.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+296 KB
landing-pages/site/content/en/blog/airflowctl-1.0.0/images/pools_list_old.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+117 KB
landing-pages/site/content/en/blog/airflowctl-1.0.0/images/variables_export.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+323 KB
landing-pages/site/content/en/blog/airflowctl-1.0.0/images/variables_import.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+320 KB
landing-pages/site/content/en/blog/airflowctl-1.0.0/images/variables_list_old.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+175 KB
landing-pages/site/content/en/blog/airflowctl-1.0.0/images/variables_list_yaml.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
190 changes: 190 additions & 0 deletions
190
landing-pages/site/content/en/blog/airflowctl-1.0.0/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,190 @@ | ||
| --- | ||
| title: "Apache Airflow CTL aka airflowctl 1.0.0" | ||
| linkTitle: "Apache Airflow CTL aka airflowctl 1.0.0" | ||
| author: "Buğra Öztürk" | ||
| twitter: "" | ||
| github: "bugraoz93" | ||
| linkedin: "bugraozturk93" | ||
| description: "A new way of using API in Airflow. Apache Airflow CTL aka airflowctl 1.0.0 is released! Secure way to manage your Apache Airflow deployments with ease." | ||
| tags: ["release"] | ||
| date: 2025-10-15 | ||
| images: ["/images/blog/airflowctl-1.0.0/airflowctl-cover.png"] | ||
| --- | ||
|
|
||
| We are thrilled to announce the first major release of **`airflowctl` 1.0.0**, the new **secure, API-driven command-line interface (CLI)** for Apache Airflow — built under [**AIP-81**](https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-81+Enhanced+Security+in+CLI+via+Integration+of+API). | ||
|
|
||
| This release marks CLI to join the general posture on communicating through API. Airflow CLI joins the modern era of secure, auditable, and remote-first operations. | ||
|
|
||
|
|
||
| **Details**: | ||
|
|
||
| 📦 **PyPI:** [https://pypi.org/project/apache-airflow-ctl/1.0.0/](https://pypi.org/project/apache-airflow-ctl/1.0.0/) \ | ||
| 🛠️ **Release Notes:** [https://airflow.apache.org/docs/apache-airflow-ctl/stable/release_notes.html](https://airflow.apache.org/docs/apache-airflow-ctl/stable/release_notes.html) \ | ||
| 🪶 **Source Code:** [https://github.com/apache/airflow/tree/main/airflow-ctl](https://github.com/apache/airflow/tree/main/airflow-ctl) | ||
|
|
||
| ## 🎯 What is airflowctl? | ||
| `airflowctl` is a new command-line interface for Apache Airflow that interacts exclusively with the Airflow REST API. | ||
| It provides a secure, auditable, and consistent way to manage Airflow deployments — without direct access to the metadata database. | ||
|
|
||
| ## 🔄 Coexistence with Airflow CLI | ||
| The Airflow CLI will continue as intended, primarily for admin tasks such as running Airflow components (`airflow api-server`, `airflow scheduler`) or managing the metadata database (`airflow db init`). | ||
| `airflowctl` focuses on operational commands that interact with Airflow resources via the API (`airflowctl dagrun trigger`, `airflowctl connection create`, etc.). | ||
|
|
||
| We defined the commands falls under **two main categories**: | ||
| 1. **Remote Commands**: Operations that can be provided via API (e.g., managing DAGs, connections, variables, triggering DAG runs) are now available in `airflowctl` and will be the recommended approach going forward. | ||
| 2. **Local/Admin Commands**: Operations that manage Airflow components or the metadata database will remain in the Airflow CLI. | ||
|
|
||
| Of course, in the current state they will both have the remote commands. | ||
| We are planning a zero-disruption migration path where **Remote Commands** will be gradually deprecated from the Airflow CLI as they achieve parity in `airflowctl`. | ||
|
|
||
|
|
||
| ## 🔒 Why airflowctl? | ||
|
|
||
| Until now, Airflow CLI connected directly to the **metadata database**, bypassing RBAC, authentication, and API logs. | ||
| While convenient, this approach limited **security, auditing, and remote management** capabilities — especially for enterprise environments. | ||
|
|
||
| **`airflowctl`** changes that by routing every command through the **Airflow REST API**, bringing: | ||
|
|
||
| * **Authentication & RBAC enforcement** | ||
| * **Centralized logging & audit trail** | ||
| * **Secure credential storage via Keyring** | ||
| * **Remote command execution with zero DB access** | ||
| * **Consistency with Airflow UI and API behaviors** | ||
|
|
||
|
|
||
| ## 🚀 AIP-81: CLI Reimagined Through the API | ||
|
|
||
| **AIP-81** (“Enhanced Security in CLI via Integration of API”) defined a clear goal: | ||
| > “The CLI must be a first-class, secure client of the Airflow REST API — not a privileged database actor.” | ||
|
|
||
| `airflowctl` is the direct realization of that vision. | ||
|
|
||
| ### Core design principles: | ||
| - **All remote commands use the REST API** | ||
| - **RBAC and auth handled consistently via API layer** | ||
| - **Pluggable auth mechanisms** (basic auth, OAuth, token, etc.) | ||
| - **Secure credential persistence** through **system keyring** | ||
| - **Extensible** to new API endpoints as Airflow evolves | ||
|
|
||
|
|
||
| ## ⚙️ Getting Started | ||
|
|
||
| ```bash | ||
| pip install apache-airflow-ctl | ||
| ``` | ||
|
|
||
| Once installed, you can connect your CLI to an Airflow instance: | ||
|
|
||
| ```bash | ||
| airflowctl auth login --url http://localhost:8080 --username admin --password admin | ||
| ``` | ||
|
|
||
| The password field is interactive by default. You can enter your password securely without echoing it on the terminal. | ||
| Use the above command without specifying the password and run it. | ||
|
|
||
| ```bash | ||
| airflowctl auth login --url http://localhost:8080 --username admin --password | ||
| ``` | ||
|
|
||
| ## 🧩 Command Highlights | ||
|
|
||
| Here’s a quick look at some of the most popular commands, now fully API-backed in airflowctl 1.0.0: | ||
|
|
||
| ### 🧩 Assets | ||
|
|
||
|  | ||
|  | ||
|
|
||
| ### ⚙️ Config | ||
|
|
||
|  | ||
|
|
||
| ### 🔑 Connections | ||
|
|
||
|  | ||
|  | ||
|
|
||
| ### 🎯 DAG Runs | ||
|
|
||
| Trigger and inspect DAG runs securely through the API: | ||
|
|
||
|  | ||
|  | ||
|
|
||
| ### 🪣 Variables | ||
|
|
||
|  | ||
|  | ||
|
|
||
|
|
||
| All these commands — and many more — operate via Airflow’s public REST API, ensuring secure, logged, and RBAC-controlled execution. | ||
|
|
||
| ## 🔐 Key Security Features | ||
|
|
||
| ### 🔑 Keyring Integration | ||
|
|
||
| No more plaintext tokens or passwords. | ||
| airflowctl uses your OS-level keyring (e.g., macOS Keychain, Windows Credential Manager, or Linux Secret Service) to store and retrieve authentication tokens securely. | ||
|
|
||
| ### 🧱 Role-Based Access Control | ||
|
|
||
| Every command is evaluated by Airflow’s RBAC system through the API — ensuring consistent authorization with the web UI and API clients. | ||
|
|
||
| ### 🕵️♀️ Auditing and Traceability | ||
|
|
||
| All CLI commands generate API logs and can be observed through standard audit mechanisms — closing a long-standing gap between the CLI and Airflow’s security model. | ||
|
|
||
| ## 📈 Roadmap Highlights | ||
|
|
||
| airflowctl 1.0.0 is just the beginning. The foundation is in place for a fully unified, secure CLI experience. | ||
|
|
||
| ### 🧩 Coming Soon | ||
|
|
||
| * Completeness of API coverage | ||
| * Live log streaming | ||
| * Worker management | ||
| * Remote debugging | ||
| * Incremental deprecation of legacy CLI commands | ||
| * Over time, the legacy airflow CLI will be incrementally deprecated as commands achieve API parity. | ||
|
|
||
| ## 🧭 Migration | ||
|
|
||
| Migration requires mapping commands, updating authentication, and re-testing automation to ensure compatibility with the new API-backed architecture. | ||
| Because airflowctl mirrors the core CLI syntax, most workflows require minimal changes — primarily adjusting authentication and configuration. | ||
|
|
||
| Side by side comparison: | ||
|
|
||
| | Before | After | | ||
| |----------------------------------------------------------|------------------------------------------------------------| | ||
| |  |  | | ||
| |  |  | | ||
|
|
||
|
|
||
|
|
||
| ## 🙏 Community & Acknowledgments | ||
|
|
||
| This release is the result of extensive collaboration across the Apache Airflow community. | ||
| Many thanks all who worked on AIP-81, the Airflow REST API, Authentication, and the airflowctl implementation. | ||
|
|
||
| ## Leading Contributors | ||
| Special thanks to leading contributors of `airflowctl`: | ||
| **Amar Prakash Pandey, Amogh Desai, Aritra Basu, Aryan Khurana, ayush3singh, Brent Bovenzi, Brunda10, | ||
| Bugra Ozturk, Daniel Standish, D. Ferruzzi, Deji Ibrahim, Elad Kalif, Ephraim Anierobi, GPK, | ||
| Guan Ming(Wesley) Chiu, Hussein Awala, Jake Roach, Jarek Potiuk, Jed Cunningham, Jens Scheffler, | ||
| Jaejun Lee, Kalyan R, Karthikeyan Singaravelan, Kaxil Naik, Kevin Yang, Kiruban Kamaraj, LI,JHE-CHEN, | ||
| Pierre Jeambrun, Pratiksha, Sam Wheating, Tzu-ping Chung, Valentyn, Vincent, Wei Lee, Yeonguk, | ||
| Yunchi Pang, Zhen-Lun (Kevin) Hong** | ||
|
|
||
| ✨ In Summary | ||
|
|
||
| airflowctl 1.0.0 makes Airflow’s command line: | ||
|
|
||
| | Before | After | | ||
| |-----------------------|------------------------------| | ||
| | Direct DB access | API-backed security | | ||
| | No RBAC or audit | Centralized auth \& logging | | ||
| | Inconsistent behavior | Unified CLI + API experience | | ||
| | Manual secrets | Keyring-secured credentials | | ||
|
|
||
| Security first. API always. CLI reimagined. | ||
| The secure CLI foundation lays the groundwork for Airflow’s next generation. A unified, API-first platform for orchestration and operations. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also upload it to
airflowctl?Or the two way of doing things is bad?
Does ASF mandate
apachename in the PyPI package @potiuk ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet mandate - but strongly recommends and likely - if my PEP is approved https://peps.python.org/pep-0752/ it will be even possible to exclusively manage apache- prefixes by the ASF so it's desireable.