Observed since 20 Oct, 21:00 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Python commandline tool to make deployment of Airflow projects easier.
The proposed CLI tool is authored to make creating and deployment of airflow projects faster and smoother. As of now, there is no tool out there that can empower the user to create a boilerplate code structure for airflow projects and make development + deployment of projects seamless.
Create a new python virtualenv. You can use the following command.
python3 -m venv <name>
Activate your virtualenv
source /path_to_venv/bin/activate
pip3 install afctl
The project is created in your present working directory. Along with this a configuration file with the same name is generated in /home/.afctl_configs directory.
afctl init <name of the project>
Eg.
afctl init project_demo
.
├── deployments
│ └── project_demo-docker-compose.yml
├── migrations
├── plugins
├── project_demo
│ ├── commons
│ └── dags
├── requirements.txt
└── tests
If you already have a git repository and want to turn it into an afctl project. Run the following command :-
afctl init .
afctl generate module -n <name of the module>
The following directory structure will be generated :
afctl generate module -n first_module
afctl generate module -n second_module
.
├── deployments
│ └── project_demo-docker-compose.yml
├── migrations
├── plugins
├── project_demo
│ ├── commons
│ └── dags
│ ├── first_module
│ └── second_module
├── requirements.txt
└── tests
├── first_module
└── second_module
afctl generate dag -n <name of dag> -m <name of module>
The following directory structure will be generate :
afctl generate dag -n new -m first_module
.
├── deployments
│ └── project_demo-docker-compose.yml
├── migrations
├── plugins
├── project_demo
│ ├── commons
│ └── dags
│ ├── first_module
│ │ └── new_dag.py
│ └── second_module
├── requirements.txt
└── tests
├── first_module
└── second_module
The dag file will look like this :
from airflow import DAG
from datetime import datetime, timedelta
default_args = {
'owner': 'project_demo',
# 'depends_on_past': ,
# 'start_date': ,
# 'email': ,
# 'email_on_failure': ,
# 'email_on_retry': ,
# 'retries': 0
}
dag = DAG(dag_id='new', default_args=default_args, schedule_interval='@once')
You can add python packages that will be required by your dags in requirements.txt. They will automatically get
installed.
afctl deploy local
If you do not want to see the logs, you can run
afctl deploy local -d
This will run it in detached mode and won't print the logs on the console.
localhost:8080afctl config add -d qubole -n <name of deployment> -e <env> -c <cluster-label> -t <auth-token>
This command will modify your config file. You can see your config file with the following command :
afctl config show
For example -
afctl config add -d qubole -n demo -e https://api.qubole.com -c airflow_1102 -t khd34djs3
afctl deploy qubole -n <name>
https://www.youtube.com/watch?v=A4rcZDGtJME&feature=youtu.be
The configuration file is used for deployment contains the following information.
global:
-airflow_version:
-git:
--origin:
--access-token:
deployment:
-qubole:
--local:
---compose:
airflow_version can be added to the project when you initialize the project.afctl init <name> -v <version>
afctl config global -o <git-origin> -t <access-token> -v <airflow_version>
Commands right now supported are
To learn more, run
afctl <command> -h
Not yet ported for Windows.
Docker-compose file : https://github.com/puckel/docker-airflow
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.7 | 8 Mar 2020 | 0 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 21:00 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:0e46b4f2e5068b504d451e02be51cb61e944bb825286b61d12a1f1bbdcc8cbe4