An apache airflow plugin for the Legion Platform.
- Start a Legion Cluster and authenticate using OAuth2. (Hit the cluster's base URL.) Copy the token to line 8 of ./dags/legion_dag.py
- Install, Start and InitDB for Airflow
- Install the plugin defined in ./plugin/ to Airflow (or softlink/copy to $AIRFLOW_HOME/plugins)
- Copy or import ./dags/legion_dag.py
- Create the Airflow connections:
legion_model
id
: legion_modeltype
: httphost
: edge.cluster-name.ailifecycle.orgschema
: https
legion_edi
id
: legion_editype
: httphost
: edi.cluster-name.ailifecycle.orgschema
: httpslogin
: ****password
: ****extra
: {"auth_url": "", "client_id": "", "client_secret": "****", "scope": "openid profile email offline_access groups"}
- Invoke
- We need a custom Airflow Connection - or maybe this one will work.
- This plugin uses Poetry instead of Pip for dependency resolution AND depends upon a local build of legion-sdk. Both of these are because airflow has an irresolvable dependency issue with Jinja2. The workaround is to revert legion's sdk Pipfile to "jinja2==2.10.0" and update your localenv with the non-conflicting version.