Add Redis to notifier production setup (#2258)
Co-authored-by: Kyle Ju <kyleju@chromium.org>
This commit is contained in:
Родитель
eea1a0ab80
Коммит
88014a2844
|
@ -0,0 +1,24 @@
|
|||
runtime: python39
|
||||
service: notifier
|
||||
|
||||
handlers:
|
||||
- url: /tasks/detect-intent
|
||||
script: auto
|
||||
# Header checks prevent raw access to this handler. Tasks have headers.
|
||||
|
||||
- url: /tasks/email-subscribers
|
||||
script: auto
|
||||
# Header checks prevent raw access to this handler. Tasks have headers.
|
||||
|
||||
app_engine_apis: true
|
||||
|
||||
# Set up VPC Access Connector for Redis.
|
||||
vpc_access_connector:
|
||||
name: projects/cr-status-staging/locations/us-central1/connectors/redis-connector
|
||||
|
||||
env_variables:
|
||||
DJANGO_SETTINGS_MODULE: 'settings'
|
||||
DJANGO_SECRET: 'this-is-a-secret'
|
||||
# Redis envs
|
||||
REDISHOST: '10.231.56.251'
|
||||
REDISPORT: '6379'
|
|
@ -12,13 +12,13 @@ handlers:
|
|||
|
||||
app_engine_apis: true
|
||||
|
||||
# Set up VPC Access Connector for Redis.
|
||||
# Set up VPC Access Connector for Redis in prod.
|
||||
vpc_access_connector:
|
||||
name: projects/cr-status-staging/locations/us-central1/connectors/redis-connector
|
||||
name: projects/cr-status/locations/us-central1/connectors/redis-connector
|
||||
|
||||
env_variables:
|
||||
DJANGO_SETTINGS_MODULE: 'settings'
|
||||
DJANGO_SECRET: 'this-is-a-secret'
|
||||
# Redis envs
|
||||
REDISHOST: '10.231.56.251'
|
||||
# Redis envs for prod
|
||||
REDISHOST: '10.250.3.187'
|
||||
REDISPORT: '6379'
|
||||
|
|
|
@ -11,9 +11,11 @@
|
|||
deployVersion=$1
|
||||
appName=${2:-cr-status}
|
||||
|
||||
deployYaml="app.staging.yaml"
|
||||
deployAppYaml="app.staging.yaml"
|
||||
deployNotifierYaml="notifier.staging.yaml"
|
||||
if [[ "${appName}" == "cr-status" ]]; then
|
||||
deployYaml="app.yaml"
|
||||
deployAppYaml="app.yaml"
|
||||
deployNotifierYaml="notifier.yaml"
|
||||
fi
|
||||
|
||||
usage="Usage: deploy.sh `date +%Y-%m-%d`"
|
||||
|
@ -34,7 +36,7 @@ gcloud beta app deploy \
|
|||
--project $appName \
|
||||
--version $deployVersion \
|
||||
--no-promote \
|
||||
$BASEDIR/../notifier.yaml \
|
||||
$BASEDIR/../$deployYaml \
|
||||
$BASEDIR/../$deployNotifierYaml \
|
||||
$BASEDIR/../$deployAppYaml \
|
||||
$BASEDIR/../dispatch.yaml \
|
||||
$BASEDIR/../cron.yaml
|
||||
|
|
Загрузка…
Ссылка в новой задаче