Create Azkaban Project using CLI
Azkaban Project file is a zip file in which workflow files are contained. Azkaban project file can be uploaded either via Azkaban Web UI or via Azkaban CLI to create workflow in Azkaban.
Create Azkaban Project File
First, create flow file, for example, spark-pi-client.flow
.
---
config:
failure.emails: admin@your-domain.com
nodes:
- name: Start
type: noop
- name: SparkPi
type: command
config:
command: ssh spark@chango-private-3.chango.private "/home/spark/spark-pi-client.flow"
dependsOn:
- Start
- name: End
type: noop
dependsOn:
- SparkPi
And create project file flow20.project
.
Finally, package as zip file.
Upload Azkaban Project File with Azkaban CLI
First, access to the host where Azkaban CLI
is installed.
Login as azkaban cli user with activating python virtual environment.
Create azkaban project with the name of spark-pi-client
with CLI.
azkaban upload -c -p spark-pi-client -u azkaban@http://[azkaban-web-host]:28081 ./spark-pi-client.zip
azkaban
is azkaban
.
To update azkaban project, parameter -c
needs to be removed from the above command.