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.
eu.gcr.io/<project>/<container>
- This should only be used if the container repo changes.
- If the image version tag is not
composer-1.11.2-airflow-1.10.9
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 (default)
- composer-1.10.6-airflow-1.10.6 (No longer being updated)
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.1.0.tar.gz
(7.8 kB
view details)
Built Distribution
File details
Details for the file dockflow-1.1.0.tar.gz
.
File metadata
- Download URL: dockflow-1.1.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 018fbf52553d48ea2f608ff1bce47a75888973e129ac82c234823bd0ec7fdd22 |
|
MD5 | 078056e86cccfc90ec49c2200c17c920 |
|
BLAKE2b-256 | 20ac38964d01f4138389642535a2c19a08f299a39be8d44cb81fff9667e17efd |
File details
Details for the file dockflow-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: dockflow-1.1.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d325f4166efca1996b50e17ff7138e042a3ef4fa45d78da02e8bca5b518e9248 |
|
MD5 | 4612eb27232565642e15d9a6c4d61b65 |
|
BLAKE2b-256 | c2da98022d16f6bf914cb988423c54d9a74b2f83c81c42de1502fa496f663bd4 |