Docker-airflow: Split initdb from webserver

Created on 3 Mar 2018  路  2Comments  路  Source: puckel/docker-airflow

Hello

I am working on the kubernetes helm chart for airflow, based on this container.
I wonder it it would make sense to split the wait for the databases + initdb out of the web instance?
When we create 2 instances of the web container, they both have to wait for the postgres and the redis server, then they both perform the initdb operation. Can't this be done on the scheduler instance which for the moment needs to be unique?

Proposal: move these lines:

    wait_for_port "Postgres" "$POSTGRES_HOST" "$POSTGRES_PORT"
    wait_for_redis
    airflow initdb

in the scheduler section.

Most helpful comment

Another option would be to move initdb into a separate section in entrypoint.sh. This would allow the use of an init container in Kubernetes.

All 2 comments

Another option would be to move initdb into a separate section in entrypoint.sh. This would allow the use of an init container in Kubernetes.

@puckel what do you think about it?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pnats picture pnats  路  5Comments

britishbadger picture britishbadger  路  5Comments

mikonapoli picture mikonapoli  路  5Comments

jensenity picture jensenity  路  7Comments

plim0793 picture plim0793  路  6Comments