Skip to content

Commit

Permalink
Update secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
JackMorganNZ committed Apr 6, 2020
1 parent 176e5b6 commit 1bc5ea3
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 24 deletions.
11 changes: 6 additions & 5 deletions infrastructure/app-sample.yaml
Expand Up @@ -5,8 +5,9 @@ beta_settings:
cloud_sql_instances: "SET ME!"

env_variables:
DJANGO_SECRET_KEY: "SET ME!"
GOOGLE_CLOUD_SQL_DATABASE_USERNAME: "SET ME!"
GOOGLE_CLOUD_SQL_DATABASE_PASSWORD: "SET ME!"
GOOGLE_CLOUD_SQL_CONNECTION_NAME: "SET ME!"
GOOGLE_CLOUD_STORAGE_BUCKET_NAME: "SET ME!"
DJANGO_SECRET_KEY: "SET ME!"
GOOGLE_CLOUD_SQL_DATABASE_USERNAME: "SET ME!"
GOOGLE_CLOUD_SQL_DATABASE_PASSWORD: "SET ME!"
GOOGLE_CLOUD_SQL_CONNECTION_NAME: "SET ME!"
GOOGLE_CLOUD_STORAGE_BUCKET_NAME: "SET ME!"
JOBE_API_KEY: "SET ME!"
19 changes: 10 additions & 9 deletions infrastructure/dev-deploy/app-dev.yaml
Expand Up @@ -5,16 +5,17 @@ beta_settings:
cloud_sql_instances: ${GOOGLE_CLOUD_SQL_CONNECTION_NAME}

env_variables:
INCLUDE_INCONTEXT_L10N: ${INCLUDE_INCONTEXT_L10N}
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}
GOOGLE_CLOUD_SQL_DATABASE_USERNAME: ${GOOGLE_CLOUD_SQL_DATABASE_USERNAME}
GOOGLE_CLOUD_SQL_DATABASE_PASSWORD: ${GOOGLE_CLOUD_SQL_DATABASE_PASSWORD}
GOOGLE_CLOUD_SQL_CONNECTION_NAME: ${GOOGLE_CLOUD_SQL_CONNECTION_NAME}
GOOGLE_CLOUD_STORAGE_BUCKET_NAME: cs-unplugged-dev.appspot.com
INCLUDE_INCONTEXT_L10N: ${INCLUDE_INCONTEXT_L10N}
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}
GOOGLE_CLOUD_SQL_DATABASE_USERNAME: ${GOOGLE_CLOUD_SQL_DATABASE_USERNAME}
GOOGLE_CLOUD_SQL_DATABASE_PASSWORD: ${GOOGLE_CLOUD_SQL_DATABASE_PASSWORD}
GOOGLE_CLOUD_SQL_CONNECTION_NAME: ${GOOGLE_CLOUD_SQL_CONNECTION_NAME}
GOOGLE_CLOUD_STORAGE_BUCKET_NAME: cs-unplugged-dev.appspot.com
JOBE_API_KEY: ${JOBE_API_KEY}

resources:
cpu: 1
memory_gb: 3.75
cpu: 1
memory_gb: 3.75

manual_scaling:
instances: 1
instances: 1
2 changes: 1 addition & 1 deletion infrastructure/dev-deploy/decrypt-dev-secrets.sh
Expand Up @@ -7,7 +7,7 @@
# Google Cloud Platform Service Account for using with gcloud.
# - load-dev-deploy-envs.sh
# Loads environment variables used when running Django.
openssl aes-256-cbc -K "${encrypted_323d8adec5b7_key}" -iv "${encrypted_323d8adec5b7_iv}" -in ./infrastructure/dev-deploy/dev-deploy-secrets.tar.enc -out dev-deploy-secrets.tar -d
openssl aes-256-cbc -K "${encrypted_d482352db195_key}" -iv "${encrypted_d482352db195_iv}" -in ./infrastructure/dev-deploy/dev-deploy-secrets.tar.enc -out dev-deploy-secrets.tar -d

# Unzip the decrypted secret archive into the current folder.
tar -xf dev-deploy-secrets.tar
Binary file modified infrastructure/dev-deploy/dev-deploy-secrets.tar.enc
Binary file not shown.
17 changes: 9 additions & 8 deletions infrastructure/prod-deploy/app-prod.yaml
Expand Up @@ -5,13 +5,14 @@ beta_settings:
cloud_sql_instances: ${GOOGLE_CLOUD_SQL_CONNECTION_NAME}

env_variables:
INCLUDE_INCONTEXT_L10N: ${INCLUDE_INCONTEXT_L10N}
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}
GOOGLE_CLOUD_SQL_DATABASE_USERNAME: ${GOOGLE_CLOUD_SQL_DATABASE_USERNAME}
GOOGLE_CLOUD_SQL_DATABASE_PASSWORD: ${GOOGLE_CLOUD_SQL_DATABASE_PASSWORD}
GOOGLE_CLOUD_SQL_CONNECTION_NAME: ${GOOGLE_CLOUD_SQL_CONNECTION_NAME}
GOOGLE_CLOUD_STORAGE_BUCKET_NAME: cs-unplugged.appspot.com
INCLUDE_INCONTEXT_L10N: ${INCLUDE_INCONTEXT_L10N}
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}
GOOGLE_CLOUD_SQL_DATABASE_USERNAME: ${GOOGLE_CLOUD_SQL_DATABASE_USERNAME}
GOOGLE_CLOUD_SQL_DATABASE_PASSWORD: ${GOOGLE_CLOUD_SQL_DATABASE_PASSWORD}
GOOGLE_CLOUD_SQL_CONNECTION_NAME: ${GOOGLE_CLOUD_SQL_CONNECTION_NAME}
GOOGLE_CLOUD_STORAGE_BUCKET_NAME: cs-unplugged.appspot.com
JOBE_API_KEY: ${JOBE_API_KEY}

resources:
cpu: 1
memory_gb: 3.75
cpu: 1
memory_gb: 3.75
2 changes: 1 addition & 1 deletion infrastructure/prod-deploy/decrypt-prod-secrets.sh
Expand Up @@ -7,7 +7,7 @@
# Google Cloud Platform Service Account for using with gcloud.
# - load-prod-deploy-envs.sh
# Loads environment variables used when running Django.
openssl aes-256-cbc -K "${encrypted_9cabeeff4658_key}" -iv "${encrypted_9cabeeff4658_iv}" -in ./infrastructure/prod-deploy/prod-deploy-secrets.tar.enc -out prod-deploy-secrets.tar -d
openssl aes-256-cbc -K "${encrypted_b62ab4281615_key}" -iv "${encrypted_b62ab4281615_iv}" -in ./infrastructure/prod-deploy/prod-deploy-secrets.tar.enc -out prod-deploy-secrets.tar -d

# Unzip the decrypted secret archive into the current folder.
tar -xf prod-deploy-secrets.tar
Binary file modified infrastructure/prod-deploy/prod-deploy-secrets.tar.enc
Binary file not shown.

0 comments on commit 1bc5ea3

Please sign in to comment.