-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1764 from Logflare/chore/update-prod-deploy-scripts
Chore/update prod deploy scripts
- Loading branch information
Showing
3 changed files
with
73 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
steps: | ||
# create instance template | ||
- name: gcr.io/cloud-builders/gcloud | ||
allowExitCodes: [1] | ||
args: | ||
- compute | ||
- instance-templates | ||
- create-with-container | ||
- $_TEMPLATE_NAME | ||
- --machine-type=c2d-standard-56 | ||
- --project=logflare-232118 | ||
- --network-interface=network=global,network-tier=PREMIUM | ||
- --maintenance-policy=MIGRATE | ||
- --service-account=compute-engine-2022@logflare-232118.iam.gserviceaccount.com | ||
- --scopes=https://www.googleapis.com/auth/cloud-platform | ||
- --tags=phoenix-http,https-server | ||
- --container-image=${_CONTAINER_IMAGE} | ||
- --container-privileged | ||
- --container-restart-policy=always | ||
- --container-env=LOGFLARE_GRPC_PORT=4001,LOGFLARE_MIN_CLUSTER_SIZE=3 | ||
- --create-disk=auto-delete=yes,device-name=logflare-c2-16cpu-docker-global-cos89-13,image=projects/cos-cloud/global/images/cos-stable-101-17162-40-52,mode=rw,size=25,type=pd-ssd | ||
- --no-shielded-secure-boot | ||
- --shielded-vtpm | ||
- --shielded-integrity-monitoring | ||
- --labels=container-vm=cos-stable-101-17162-40-52 | ||
|
||
# # update instance group to the new template | ||
# - name: gcr.io/cloud-builders/gcloud | ||
# args: | ||
# - beta | ||
# - compute | ||
# - instance-groups | ||
# - managed | ||
# - rolling-action | ||
# - start-update | ||
# - ${_INSTANCE_GROUP} | ||
# - --project=logflare-staging | ||
# - --zone=us-central1-a | ||
# - --type=proactive | ||
# - --max-surge=1 | ||
# - --max-unavailable=0 | ||
# - --min-ready=60 | ||
# - --minimal-action=replace | ||
# - --most-disruptive-allowed-action=replace | ||
# - --replacement-method=substitute | ||
# - --version=template=projects/logflare-staging/global/instanceTemplates/${_TEMPLATE_NAME} | ||
|
||
substitutions: | ||
# _COOKIE: default | ||
# _CLUSTER: main | ||
# _INSTANCE_TYPE: c2d-standard-56 | ||
# _INSTANCE_GROUP: instance-group-staging-${_CLUSTER} | ||
# _IMAGE_TAG: $SHORT_SHA | ||
_TEMPLATE_NAME: logflare-prod-${_NORMALIZED_IMAGE_TAG} | ||
_CONTAINER_IMAGE: gcr.io/logflare-staging/logflare_app:${_IMAGE_TAG} | ||
timeout: 1800s | ||
options: | ||
dynamicSubstitutions: true | ||
substitutionOption: "ALLOW_LOOSE" |