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

DE-329 airflow local ssl certificate #2822

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
12 changes: 10 additions & 2 deletions orchestration/airflow/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,24 @@ ARG GCLOUD_VERSION=google-cloud-cli-411.0.0-linux-x86_64.tar.gz

# install airflow deps
WORKDIR ${AIRFLOW_USER_HOME}
COPY orchestration-requirements.txt /opt/requirements.txt
COPY orchestration-requirements.in /opt/requirements.txt

COPY ./etc/cacert.pem /cacert.pem

ENV REQUESTS_CA_BUNDLE=/cacert.pem
ENV PIP_CERT=/cacert.pem
ENV CURL_CA_BUNDLE=/cacert.pem

RUN pip3 install --upgrade pip
RUN pip3 install --no-cache-dir -r /opt/requirements.txt

# install gcloud
USER root
RUN apt-get update && apt-get install -y ca-certificates --no-install-recommends && apt-get install git -y
COPY ./etc/sa.gcpkey.json ${GCLOUD_SERVICE_KEY}
RUN curl -LO -k https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/${GCLOUD_VERSION} && tar xf ${GCLOUD_VERSION}
RUN curl -LO https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/${GCLOUD_VERSION} && tar xf ${GCLOUD_VERSION}
ENV PATH $PATH:$AIRFLOW_USER_HOME/google-cloud-sdk/bin
RUN gcloud config set core/custom_ca_certs_file "/cacert.pem"
RUN gcloud auth activate-service-account --key-file=${GCLOUD_SERVICE_KEY}


Expand Down
3 changes: 2 additions & 1 deletion orchestration/airflow/etc/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sa.gcpkey.json
sa.gcpkey.json
cacert.pem
Loading