This is a test Airflow instance used for integration testing.
You could do this all without this instance, but it gives you a few DAGs that will purposely fail and succeed so you can test Lumen more effectively.
> python -m venv .
By putting the AIRFLOW_HOME
env in the bin/activate
file, you set the path each time you set up your venv.
> echo "export AIRFLOW_HOME=$PWD" >> bin/activate
> source bin/activate
> pip install apache-airflow
> airflow initdb
> airflow create_user -r Admin -u admin -e admin@example.com -f admin -l user -p admin
> mkdir ./plugins/
> ln -s <your plugin dev path> ./plugins/
> pip install -r ./plugins/<your plugin name>/requirements.txt
Setting up email notifications requires you to edit and add your smtp server credentials to your airflow.cfg Ensure that these values are set. User, password, host, and mail_from are all values you should fill in from your smtp server settings:
[smtp]
smtp_host = YOUR_SMTP_HOST
smtp_starttls = True
smtp_ssl = False
smtp_user = YOUR_EMAIL_ADDRESS
smtp_password = 16_DIGIT_APP_PASSWORD
smtp_port = 587
smtp_mail_from = YOUR_EMAIL_ADDRESS
In order to deploy your emails on these platforms, add the above variables as environmental variables in the the platform's provided interface. Below I'll show how to do this for astronomer and google cloud composer...
Astronomer specifically has setup instructions going through how to setup a smtp server.
Enter in the environmental variables (smtp_host, smtp_starttls, stmp_ssl, stmp_user, smtp_password, smtp_port, smtp_mail_from) on the deployment page under "environmental variables"
Enter in the environmental variables (smtp_host, smtp_starttls, stmp_ssl, stmp_user, smtp_password, smtp_port, smtp_mail_from) on the deployment page under "environmental variables", or you can also alternatively set all of the variables in the airflow.cfg file in your gcp bucket