Easily deploy Airflow for local development
Project description
Dockflow CLI
This package requires docker to be installed and running on your machine.
Getting started
-
Install dockflow:
pip install dockflow
-
Authenticate docker to pull from private GCR repository:
2.1. First make sure that yourgcloud
is authenticated.
2.2. Ensure you are in the correct project usinggcloud config set project <project name>
2.3. Usegcloud auth configure-docker
to auth docker to pull from private container repo.
Quickstart
- Ensure that your docker file sharing settings allows access to your development directory.
- Navigate to the root directory of your
dags
folder. - Use
dockflow config
and enter your container repo url excluding the version.- This will save the url in a config file.
- Eg.
gcr.io/<project>/<container>
- This should only be used if the container repo changes.
- If the image version tag is not
composer-1.10.6-airflow-1.10.6
specify the tag usingdockflow start -iv <version>
- Use
dockflow start
(This will mount the dag folder and start Airflow). - Use the UI to add connections.
- Admin -> Connections -> Create
- Use
dockflow refresh
to refresh the configs cache or to bundle configs. - Remember to use
dockflow stop
to shut down the instance to save local machine resources.- The state will be persisted in the same directory as the
dags
folder.
- The state will be persisted in the same directory as the
- To stop and remove the container use
dockflow stop --rm
Available composer versions
- composer-1.11.2-airflow-1.10.9
- composer-1.10.6-airflow-1.10.6 (default)
- composer-1.7.2-airflow-1.10.2
CloudSQL Proxy
docker run -d \
-v <PATH_TO_KEY_FILE>:/config \
-p 127.0.0.1:5432:5432 \
--network='dockflow' \
--name='cloudsql' \
gcr.io/cloudsql-docker/gce-proxy:1.17 /cloud_sql_proxy \
-instances=<INSTANCE_CONNECTION_NAME>=tcp:0.0.0.0:5432 -credential_file=/config
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
dockflow-1.0.3.tar.gz
(5.1 kB
view details)
Built Distribution
File details
Details for the file dockflow-1.0.3.tar.gz
.
File metadata
- Download URL: dockflow-1.0.3.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16f9293f755dbc30608d58fddd5a6ae36a6d2a3a4d972274a4863cf79c099ad6 |
|
MD5 | f0c18a632b0f05ead9eddb50cc1b7de3 |
|
BLAKE2b-256 | 18b46aaaf873c798b23447c6c9ea90885b885f54591d886a3a60573b412e2afa |
File details
Details for the file dockflow-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: dockflow-1.0.3-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b346592de01d106100a11ebf990397f3643cde454140efb4e5529d6d16437f8a |
|
MD5 | 4b22b97818ff9ece9da246246275ba05 |
|
BLAKE2b-256 | 7f417fdf47e4caae6884476be07c80f261cc52b4eab934a0d582569e74c26d4d |