ci: use Container-Optimized OS public image on the VM (#5617)
* ci(compute): use debian public image on the VM, not the container Previous behavior: We were pulling the debian image the wrong way, as this was being used as a container but it was meant to be the VM image The image being pulled to create the internal container has been causing crashes as this images do not exists on Google's container repositories Expected behavior: Use a public image as debian-11 to get multiple benefits from it, as being able to use machine-images (#5615) and automatic disk resizing (which is now possible as we're using COS images, but those are more restrictive) Solution Add `--image-project=debian-cloud` and `--image-family=debian-11` as stated in the official documentation: https://cloud.google.com/sdk/gcloud/reference/compute/instances/create-with-container#--image-project More info: https://cloud.google.com/compute/docs/images/os-details#import * fix: use a public image with docker on the host * fix(logs): missing sudo before docker command Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
61af406d35
commit
7b73aa0c84
|
|
@ -120,6 +120,8 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
gcloud compute instance-templates create-with-container zebrad-${{ needs.versioning.outputs.major_version || env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \
|
gcloud compute instance-templates create-with-container zebrad-${{ needs.versioning.outputs.major_version || env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \
|
||||||
--boot-disk-type=pd-ssd \
|
--boot-disk-type=pd-ssd \
|
||||||
|
--image-project=cos-cloud \
|
||||||
|
--image-family=cos-stable \
|
||||||
--container-image ${{ env.GAR_BASE }}/zebrad@${{ needs.build.outputs.image_digest }} \
|
--container-image ${{ env.GAR_BASE }}/zebrad@${{ needs.build.outputs.image_digest }} \
|
||||||
--create-disk name=zebrad-cache-${{ env.GITHUB_SHA_SHORT }},auto-delete=yes,size=300GB,type=pd-ssd \
|
--create-disk name=zebrad-cache-${{ env.GITHUB_SHA_SHORT }},auto-delete=yes,size=300GB,type=pd-ssd \
|
||||||
--container-mount-disk mount-path="/zebrad-cache",name=zebrad-cache-${{ env.GITHUB_SHA_SHORT }} \
|
--container-mount-disk mount-path="/zebrad-cache",name=zebrad-cache-${{ env.GITHUB_SHA_SHORT }} \
|
||||||
|
|
@ -196,6 +198,8 @@ jobs:
|
||||||
gcloud compute instances create-with-container "zebrad-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }}" \
|
gcloud compute instances create-with-container "zebrad-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }}" \
|
||||||
--boot-disk-size 300GB \
|
--boot-disk-size 300GB \
|
||||||
--boot-disk-type=pd-ssd \
|
--boot-disk-type=pd-ssd \
|
||||||
|
--image-project=cos-cloud \
|
||||||
|
--image-family=cos-stable \
|
||||||
--container-stdin \
|
--container-stdin \
|
||||||
--container-tty \
|
--container-tty \
|
||||||
--container-image ${{ env.GAR_BASE }}/zebrad@${{ needs.build.outputs.image_digest }} \
|
--container-image ${{ env.GAR_BASE }}/zebrad@${{ needs.build.outputs.image_digest }} \
|
||||||
|
|
|
||||||
|
|
@ -144,9 +144,10 @@ jobs:
|
||||||
gcloud compute instances create-with-container "${{ inputs.test_id }}-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }}" \
|
gcloud compute instances create-with-container "${{ inputs.test_id }}-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }}" \
|
||||||
--boot-disk-size 300GB \
|
--boot-disk-size 300GB \
|
||||||
--boot-disk-type pd-ssd \
|
--boot-disk-type pd-ssd \
|
||||||
|
--image-project=cos-cloud \
|
||||||
|
--image-family=cos-stable \
|
||||||
--create-disk name="${{ inputs.test_id }}-${{ env.GITHUB_SHA_SHORT }}",device-name="${{ inputs.test_id }}-${{ env.GITHUB_SHA_SHORT }}",size=300GB,type=pd-ssd \
|
--create-disk name="${{ inputs.test_id }}-${{ env.GITHUB_SHA_SHORT }}",device-name="${{ inputs.test_id }}-${{ env.GITHUB_SHA_SHORT }}",size=300GB,type=pd-ssd \
|
||||||
--container-image gcr.io/google-containers/busybox \
|
--container-image=gcr.io/google-containers/busybox \
|
||||||
--container-restart-policy=never \
|
|
||||||
--machine-type ${{ env.MACHINE_TYPE }} \
|
--machine-type ${{ env.MACHINE_TYPE }} \
|
||||||
--scopes cloud-platform \
|
--scopes cloud-platform \
|
||||||
--metadata=google-monitoring-enabled=TRUE,google-logging-enabled=TRUE,enable-oslogin=TRUE \
|
--metadata=google-monitoring-enabled=TRUE,google-logging-enabled=TRUE,enable-oslogin=TRUE \
|
||||||
|
|
@ -363,9 +364,10 @@ jobs:
|
||||||
gcloud compute instances create-with-container "${{ inputs.test_id }}-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }}" \
|
gcloud compute instances create-with-container "${{ inputs.test_id }}-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }}" \
|
||||||
--boot-disk-size 300GB \
|
--boot-disk-size 300GB \
|
||||||
--boot-disk-type pd-ssd \
|
--boot-disk-type pd-ssd \
|
||||||
|
--image-project=cos-cloud \
|
||||||
|
--image-family=cos-stable \
|
||||||
--create-disk image=${{ env.CACHED_DISK_NAME }},name="${{ inputs.test_id }}-${{ env.GITHUB_SHA_SHORT }}",device-name="${{ inputs.test_id }}-${{ env.GITHUB_SHA_SHORT }}",size=300GB,type=pd-ssd \
|
--create-disk image=${{ env.CACHED_DISK_NAME }},name="${{ inputs.test_id }}-${{ env.GITHUB_SHA_SHORT }}",device-name="${{ inputs.test_id }}-${{ env.GITHUB_SHA_SHORT }}",size=300GB,type=pd-ssd \
|
||||||
--container-image gcr.io/google-containers/busybox \
|
--container-image=gcr.io/google-containers/busybox \
|
||||||
--container-restart-policy=never \
|
|
||||||
--machine-type ${{ env.MACHINE_TYPE }} \
|
--machine-type ${{ env.MACHINE_TYPE }} \
|
||||||
--scopes cloud-platform \
|
--scopes cloud-platform \
|
||||||
--metadata=google-monitoring-enabled=TRUE,google-logging-enabled=TRUE,enable-oslogin=TRUE \
|
--metadata=google-monitoring-enabled=TRUE,google-logging-enabled=TRUE,enable-oslogin=TRUE \
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,8 @@ jobs:
|
||||||
gcloud compute instance-templates create-with-container zcashd-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \
|
gcloud compute instance-templates create-with-container zcashd-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \
|
||||||
--boot-disk-size 10GB \
|
--boot-disk-size 10GB \
|
||||||
--boot-disk-type=pd-ssd \
|
--boot-disk-type=pd-ssd \
|
||||||
|
--image-project=cos-cloud \
|
||||||
|
--image-family=cos-stable \
|
||||||
--container-stdin \
|
--container-stdin \
|
||||||
--container-tty \
|
--container-tty \
|
||||||
--container-image electriccoinco/zcashd \
|
--container-image electriccoinco/zcashd \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue