Skip to content

Commit

Permalink
mount configs
Browse files Browse the repository at this point in the history
  • Loading branch information
colmsnowplow committed Jul 25, 2023
1 parent 9126845 commit f31d46e
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions templates/user-data.sh.tmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
readonly CONFIG_DIR=/opt/snowplow/config

sudo mkdir -p $${CONFIG_DIR}

sudo base64 --decode << EOF > $${CONFIG_DIR}/config.hocon
${config_b64}
EOF

sudo base64 --decode << EOF > $${CONFIG_DIR}/iglu_config.json
${iglu_config_b64}
EOF

# Launch the loader
sudo docker run \
-d \
Expand All @@ -7,13 +19,14 @@ sudo docker run \
--memory=$(get_application_memory_mb)m \
--log-opt max-size=10m \
--log-opt max-file=5 \
--mount type=bind,source=$${CONFIG_DIR},target=/snowplow/config \
--env AZURE_TENANT_ID=${tenant_id} \
--env AZURE_CLIENT_ID=${client_id} \
--env AZURE_CLIENT_SECRET=${client_secret} \
--env JDK_JAVA_OPTIONS='${java_opts}' \
--env "CONFIG_FORCE_telemetry_instanceId=$(get_instance_id)" \
snowplow/rdb-loader-snowflake:${version} \
--config ${config_b64} \
--iglu-config ${iglu_config_b64}
--config /snowplow/config/config.hocon \
--iglu-config /snowplow/config/iglu_config.json

${telemetry_script}

0 comments on commit f31d46e

Please sign in to comment.