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

Document setup for airflow and postgres #7

Open
tdunning opened this issue Aug 27, 2021 · 0 comments
Open

Document setup for airflow and postgres #7

tdunning opened this issue Aug 27, 2021 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@tdunning
Copy link
Member

I will add comments on this issue over time to remember what setup has been done

This can be collected into a Kubernetes configuration for postgres at some point when we have that running in our production environment.

CREATE DATABASE airflow_db;
CREATE USER airflow_user WITH PASSWORD 'airflow_pass';
GRANT ALL PRIVILEGES ON DATABASE airflow_db TO airflow_user;
ALTER ROLE airflow_user SET search_path = airflow;
  • allow other servers to connect by setting up /etc/postgresql/10/main/pg_hba.conf
    My first attempt is this line:
host    airflow_db      airflow_user    192.168.86.12/30        scram-sha-256

This may be possible to degrade to a local connection.

Pending Questions

How do we set up the SQL Alchemy driver that airflow uses to not store the user and password in-line?
Possible answer

Which parts of Airflow connect to postgres? Do we need to allow connections from non-local workers? If we can do that, we can add a Linux user id for postgres_user and have postgres trust that the unix domain socket can verify the identity. That would avoid having to put a password into the connection string.

@tdunning tdunning added the documentation Improvements or additions to documentation label Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant