-
Notifications
You must be signed in to change notification settings - Fork 8
/
deploy.sh
executable file
·39 lines (33 loc) · 1009 Bytes
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
set -e
TOPIC=${1:-panoptes-pipeline-image}
BASE_TAG=$(git rev-parse HEAD)
PROJECT_ID=panoptes-exp
echo "Building image"
gcloud builds submit --tag "gcr.io/${PROJECT_ID}/${TOPIC}:${BASE_TAG}" .
#gcloud compute instances update-container \
# pipeline-processing \
# --zone us-central1-a \
# --container-image "gcr.io/${PROJECT_ID}/${TOPIC}:${BASE_TAG}"
echo "Deploying ${TOPIC} to Cloud Run"
gcloud run deploy "${TOPIC}" \
--region "us-west1" \
--image "gcr.io/${PROJECT_ID}/${TOPIC}:${BASE_TAG}" \
--no-allow-unauthenticated \
--platform managed \
--cpu 2 \
--memory "8Gi" \
--max-instances 500 \
--concurrency 1 \
--timeout "20m"
echo "Deploying ${TOPIC/image/observation} to Cloud Run"
gcloud run deploy "${TOPIC/image/observation}" \
--region "us-west1" \
--image "gcr.io/${PROJECT_ID}/${TOPIC}:${BASE_TAG}" \
--no-allow-unauthenticated \
--platform managed \
--cpu 2 \
--memory "8Gi" \
--max-instances 50 \
--concurrency 1 \
--timeout "20m"