File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,6 +235,10 @@ if deploy_service "personas"; then
235235fi
236236
237237if deploy_service " ic" ; then
238+ DB_EXISTS=` gcloud sql databases list --project=${PROJECT?} --instance=hydra | grep ic${ENV?} `
239+ if [[ " ${DB_EXISTS} " == " " ]]; then
240+ gcloud sql databases create ic${ENV?} --project=${PROJECT?} --instance=hydra
241+ fi
238242 echo -e ${GREEN?} ' Deploy IC.' ${RESET?}
239243 gcloud beta -q --project=${PROJECT?} app deploy deploy/build/ic/ic.yaml --image-url=gcr.io/${PROJECT?} /hcls-fa-ic:latest --version=master
240244fi
@@ -245,6 +249,10 @@ if deploy_service "icdemo"; then
245249fi
246250
247251if deploy_service " dam" ; then
252+ DB_EXISTS=` gcloud sql databases list --project=${PROJECT?} --instance=hydra | grep dam${ENV?} `
253+ if [[ " ${DB_EXISTS} " == " " ]]; then
254+ gcloud sql databases create dam${ENV?} --project=${PROJECT?} --instance=hydra
255+ fi
248256 echo -e ${GREEN?} ' Deploy DAM.' ${RESET?}
249257 gcloud beta -q --project=${PROJECT?} app deploy deploy/build/dam/dam.yaml --image-url=gcr.io/${PROJECT?} /hcls-fa-dam:latest --version=master
250258fi
Original file line number Diff line number Diff line change @@ -21,3 +21,18 @@ env_variables:
2121 DAM_TYPE : " dam${YOUR_ENVIRONMENT}"
2222 PROJECT : " ${YOUR_PROJECT_ID}"
2323 CSP : " connect-src https://*.appspot.com"
24+
25+ liveness_check :
26+ path : " /liveness_check"
27+ check_interval_sec : 30
28+ timeout_sec : 4
29+ failure_threshold : 2
30+ success_threshold : 2
31+
32+ readiness_check :
33+ path : " /liveness_check"
34+ check_interval_sec : 5
35+ timeout_sec : 4
36+ failure_threshold : 2
37+ success_threshold : 2
38+ app_start_timeout_sec : 300
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ ARG HYDRA_VERSION=v1.4.2
2020
2121# Install depends and nginx
2222RUN export JQ_VERSION=1.5+dfsg-2+b1 && \
23- export NGINX_VERSION=1.14.2-2+deb10u1 && \
23+ export NGINX_VERSION=1.14.2-2+deb10u3 && \
2424 apt update && \
2525 apt install -y jq=${JQ_VERSION} nginx=${NGINX_VERSION}
2626
Original file line number Diff line number Diff line change @@ -21,3 +21,18 @@ env_variables:
2121 IC_TYPE : " ic${YOUR_ENVIRONMENT}"
2222 PROJECT : " ${YOUR_PROJECT_ID}"
2323 CSP : " connect-src https://*.appspot.com"
24+
25+ liveness_check :
26+ path : " /liveness_check"
27+ check_interval_sec : 30
28+ timeout_sec : 4
29+ failure_threshold : 2
30+ success_threshold : 2
31+
32+ readiness_check :
33+ path : " /liveness_check"
34+ check_interval_sec : 5
35+ timeout_sec : 4
36+ failure_threshold : 2
37+ success_threshold : 2
38+ app_start_timeout_sec : 300
Original file line number Diff line number Diff line change @@ -19,3 +19,18 @@ service: "personas${YOUR_ENVIRONMENT}"
1919env_variables :
2020 TYPE : " personas${YOUR_ENVIRONMENT}"
2121 PROJECT : " ${YOUR_PROJECT_ID}"
22+
23+ liveness_check :
24+ path : " /liveness_check"
25+ check_interval_sec : 30
26+ timeout_sec : 4
27+ failure_threshold : 2
28+ success_threshold : 2
29+
30+ readiness_check :
31+ path : " /liveness_check"
32+ check_interval_sec : 5
33+ timeout_sec : 4
34+ failure_threshold : 2
35+ success_threshold : 2
36+ app_start_timeout_sec : 300
Original file line number Diff line number Diff line change @@ -99,9 +99,9 @@ gcloud datastore indexes create deploy/index.yaml --project=${PROJECT?} --quiet
9999echo -e ${GREEN?} ' Creating Cloud SQL database for Hydra.' ${RESET?}
100100
101101gcloud sql instances create hydra --project=${PROJECT?} --database-version=POSTGRES_11 \
102- --tier=db-f1-micro --region=us-central1
102+ --tier=db-f1-micro --region=us-central1 --require-ssl
103103# Create user: name="${NAME}", password="${PASSWORD}"
104- gcloud sql users create hydra --project=${PROJECT?} --instance=hydra --password=hydra --require-ssl
104+ gcloud sql users create hydra --project=${PROJECT?} --instance=hydra --password=hydra
105105# Create database ic
106106gcloud sql databases create ic --project=${PROJECT?} --instance=hydra
107107# Create database dam
You can’t perform that action at this time.
0 commit comments