Hello :wave:. Hoping someone could help with runni...
# getting-started
m
Hello 👋. Hoping someone could help with running on GCP. I want to run a meltano docker container on Airflow (in Cloud Composer). I’ve gotten tap-purecloud to target-bigquery working locally and it inserts records to BigQuery fine. However locally I’m using a service account json key file for BigQuery permission and it wouldn’t be good practice to have that in the container image. I’m thinking I could pass the content of that key file as an environment variable then write it to target-bigquery’s expected default location,
project/client_secrets.json
. That seems pretty inelegant though. I’m new to docker/containers so am wondering if there’s a better approach?
As a side note I was hoping to use Airflow’s docker operator instead of KubernetesPodOperator as I think it’d be easier to set up. I only expect my pipeline to run for a few minutes and once a day so I think it’d be simpler to avoid having to figure out stuff for Kubernetes too.
a
Hi Mark. I'm not that familiar with Cloud Composer, but the normal Kubernetes approach is to use secrets - these can be mounted as files or used to populate environment variables: https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets Perhaps these docs for Cloud Composer are helpful: https://cloud.google.com/composer/docs/secret-manager One question for my own "market research" if you're up for it - is the Cloud Composer infrastructure just doing this one sync or are you already running lots of pipelines and this tap-purecloud -> target-bigquery if one of many?
m
Hi Aaron. Thanks for those links, mounting a file sounds like what I want to do. We already have a good few (like 15ish) DAGs running on Cloud Composer. They mostly run dbt cleaning but some are custom extract and load pipelines. This would be our first use of Meltano.
In case this thread is found by anyone searching in future I eventually figured it out and wrote a blog post explaining what to do. The TL;DR is pass secret values as env vars, and secret files like the service account keyfile should be “mounted” to the container at run time. I stored the secrets in the Kubernetes cluster Cloud Composer runs on. https://meltano.slack.com/archives/CMN8HELB0/p1641473284007700