Skip to content

Commit

Permalink
Merge pull request #1760 from edx/katebygrace/collect-metrics-secrets
Browse files Browse the repository at this point in the history
Katebygrace/collect metrics secrets
  • Loading branch information
katebygrace authored May 20, 2024
2 parents 2c479b2 + 31fa59d commit 238a078
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions dataeng/resources/snowflake-collect-metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,19 @@ source "${PYTHON_VENV}/bin/activate"
cd $WORKSPACE/analytics-tools/snowflake
make requirements

python3 secrets-manager.py -w -n analytics-secure/snowflake/rsa_key_snowflake_task_automation_user.p8 -v rsa_key_snowflake_task_automation_user
python3 secrets-manager.py -w -n analytics-secure/snowflake/rsa_key_passphrase_snowflake_task_automation_user -v rsa_key_passphrase_snowflake_task_automation_user



python collect-metrics.py \
--metric_name $METRIC_NAME \
--key_path $WORKSPACE/analytics-secure/snowflake/rsa_key_snowflake_task_automation_user.p8 \
--passphrase_path $WORKSPACE/analytics-secure/snowflake/rsa_key_passphrase_snowflake_task_automation_user \
--automation_user $SNOWFLAKE_USER \
--account $SNOWFLAKE_ACCOUNT \
--warehouse $SNOWFLAKE_WAREHOUSE
--warehouse $SNOWFLAKE_WAREHOUSE \
--key_file "$(cat "rsa_key_snowflake_task_automation_user")" \
--passphrase_file "$(cat "rsa_key_passphrase_snowflake_task_automation_user")"


rm rsa_key_snowflake_task_automation_user
rm rsa_key_passphrase_snowflake_task_automation_user

0 comments on commit 238a078

Please sign in to comment.