Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #39 #43

Merged
merged 1 commit into from
Oct 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix issue #39
  • Loading branch information
puckel committed Oct 17, 2016
commit 5477ea72f56bb511338d1445754c9715e11adfcc
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,13 @@ Go to Admin -> Connections and Edit "mysql_default" set this values (equivalent
- Login : airflow
- Password : airflow

For encrypted connection passwords (in Local or Celery Executor), you must have the same fernet_key. By default docker-airflow generates the fernet_key at startup, you have to set an environment variable in the docker-compose (ie: docker-compose-LocalExecutor.yml) file to set the same key accross containers. To generate a fernet_key :

python -c "from cryptography.fernet import Fernet; FERNET_KEY = Fernet.generate_key().decode(); print FERNET_KEY"

Check [Airflow Documentation](http://pythonhosted.org/airflow/)


## Install custom python package

- Create a file "requirements.txt" with the dedired python modules
Expand Down
2 changes: 2 additions & 0 deletions docker-compose-LocalExecutor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ services:
environment:
# - LOAD_EX=n
- EXECUTOR=Local
# - FERNET_KEY=9IoTgQ_EJ0hCsamBU3Mctc7F9OkODnndOKCwkwXCAA
# volumes:
# - /localpath/to/dags:/usr/local/airflow/dags
ports:
Expand All @@ -31,5 +32,6 @@ services:
# - /localpath/to/dags:/usr/local/airflow/dags
environment:
# - LOAD_EX=n
# - FERNET_KEY=9IoTgQ_EJ0hCsamBU3Mctc7F9OkODnndOKCwkwXCAA
- EXECUTOR=Local
command: scheduler -n 5
3 changes: 2 additions & 1 deletion script/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ POSTGRES_HOST="postgres"
POSTGRES_PORT="5432"
RABBITMQ_HOST="rabbitmq"
RABBITMQ_CREDS="airflow:airflow"
FERNET_KEY=$(python -c "from cryptography.fernet import Fernet; FERNET_KEY = Fernet.generate_key().decode(); print FERNET_KEY")
: ${FERNET_KEY:=$(python -c "from cryptography.fernet import Fernet; FERNET_KEY = Fernet.generate_key().decode(); print FERNET_KEY")}
# FERNET_KEY=$(python -c "from cryptography.fernet import Fernet; FERNET_KEY = Fernet.generate_key().decode(); print FERNET_KEY")

# Load DAGs exemples (default: Yes)
if [ "x$LOAD_EX" = "xn" ]; then
Expand Down