The Astronomer CLI is the recommended way to get started developing and deploying Airflow projects to Astronomer Enterprise Edition.
curl -sSL https://install.astronomer.io | sudo bash
curl -sSL https://install.astronomer.io | sudo bash -s -- [TAGNAME]
curl -sSL https://install.astronomer.io | sudo bash -s -- v0.3.1
Note: If you get mkdir error during installation please download and run godownloader script locally.
$ cat godownloader.sh | bash -s -- -b /usr/local/bin
Confirm the install worked:
Create a project:
$ mkdir hello-astro && cd hello-astro $ astro airflow init
This will generate a skeleton project directory:
. ├── dags │ ├── example-dag.py ├── Dockerfile ├── include ├── packages.txt ├── plugins └── requirements.txt
Dags can go in the
dags folder, custom airflow plugins in
plugins, python packages needed can go in
requirements.txt, and OS level packages can go in
- Start airflow
astro airflow start to start a local version of airflow on your machine. This will spin up a few locally running docker containers - one for the airflow scheduler, one for the webserver, and one for postgres.
docker ps to verify)
The CLI includes a help command, descriptions, as well as usage info for subcommands.
To see the help overview:
$ astro help
Or for subcommands:
$ astro airflow --help
$ astro airflow deploy --help
How to get started as a developer.
$ git clone email@example.com:astronomerio/astro-cli.git $ cd astro-cli $ make build
(Optional) Install to
$ make install
astro-cli is a single component of the much larger Astronomer Enterprise platform. In order to test locally you will need to
local: enabled: true houston: http://localhost:8870/v1 orbit: http://localhost:5000
Docs (/docs) are generated using the
github.com/spf13/cobra/doc pkg. Currently this pkg is broken with go vendoring, the following instructions include a workaround
- Remove the
/vendor/github.com/spf13/cobrapkg, forcing Go to search your go path for the package instead
go run gendocs/gendocs.go
Astronomer Enterprise is under very active development. Because of this we cannot make backwards compatibility guarantees between versions.
THe astro-cli is following a semantic versioning scheme
with all releases up until 1.0.0 considered beta.
v0.3.3 the astro-cli began tightly tracking the platform release versioning, this means that compatibility is only guaranteed between matching minor versions of the platform and the astro-cli.
v0.4.0 is guaranteed to be compatible with houston-api
v0.4.x but with houston-api
These changes were introduced platform wide with v0.4.0