From d5befd1176a3840f2ff4185811d9926a898e8577 Mon Sep 17 00:00:00 2001 From: Fedor Korotkov Date: Tue, 23 Aug 2022 11:30:12 -0400 Subject: [PATCH] Support GCP's new Arm architecture (#1027) --- docs/guide/custom-vms.md | 1 + docs/guide/docker-builder-vm.md | 53 ++++++++++++++++------ docs/guide/supported-computing-services.md | 6 ++- 3 files changed, 44 insertions(+), 16 deletions(-) diff --git a/docs/guide/custom-vms.md b/docs/guide/custom-vms.md index 1de3b476..6ad12c0d 100644 --- a/docs/guide/custom-vms.md +++ b/docs/guide/custom-vms.md @@ -16,6 +16,7 @@ compute_engine_instance: image_project: cirrus-images # GCP project. image: family/docker-kvm # family or a full image name. platform: linux + architecture: arm64 # optional. By default, amd64 is assumed. cpu: 4 # optional. Defaults to 2 CPUs. memory: 16G # optional. Defaults to 4G. disk: 100 # optional. By default, uses the smallest disk size required by the image. diff --git a/docs/guide/docker-builder-vm.md b/docs/guide/docker-builder-vm.md index 082f6e3a..00b58701 100644 --- a/docs/guide/docker-builder-vm.md +++ b/docs/guide/docker-builder-vm.md @@ -4,10 +4,21 @@ In essence, a `docker_builder` is basically [a `task`](writing-tasks.md) that is executed in a VM with pre-installed Docker. A `docker_builder` can be defined the same way as a `task`: -```yaml -docker_builder: - build_script: docker build --tag myrepo/foo:latest . -``` +=== "amd64" + + ```yaml + docker_builder: + build_script: docker build --tag myrepo/foo:latest . + ``` + +=== "arm64" + + ```yaml + docker_builder: + env: + CIRRUS_ARCH: arm64 + build_script: docker build --tag myrepo/foo:latest . + ``` Leveraging features such as [Task Dependencies](writing-tasks.md#depepndencies), [Conditional Execution](writing-tasks.md#conditional-execution) and [Encrypted Variables](writing-tasks.md#encrypted-variables) with a Docker Builder can help building relatively @@ -56,7 +67,6 @@ For your convenience, a Docker Builder VM has some common packages pre-installed * AWS CLI * Docker Compose -* Heroku CLI * OpenJDK 11 * Python * Ruby with Bundler @@ -66,15 +76,30 @@ For your convenience, a Docker Builder VM has some common packages pre-installed Under the hood a simple integration with [Google Compute Engine](supported-computing-services.md#compute-engine) is used and basically `docker_builder` is a syntactic sugar for the following [`compute_engine_instance`](custom-vms.md) configuration: -```yaml -task: - compute_engine_instance: - image_project: cirrus-images - image: family/docker-builder - platform: linux - cpu: 4 - memory: 16G -``` +=== "amd64" + + ```yaml + task: + compute_engine_instance: + image_project: cirrus-images + image: family/docker-builder + platform: linux + cpu: 4 + memory: 16G + ``` + +=== "arm64" + + ```yaml + task: + compute_engine_instance: + image_project: cirrus-images + image: family/docker-builder-arm64 + architecture: arm64 + platform: linux + cpu: 4 + memory: 16G + ``` You can check Packer templates of the VM image in [`cirruslabs/vm-images` repository](https://github.com/cirruslabs/vm-images). diff --git a/docs/guide/supported-computing-services.md b/docs/guide/supported-computing-services.md index 61038043..27ff799b 100644 --- a/docs/guide/supported-computing-services.md +++ b/docs/guide/supported-computing-services.md @@ -266,7 +266,8 @@ like this: ```yaml gce_instance: image_project: ubuntu-os-cloud - image_name: ubuntu-1904-disco-v20190417 + image_name: ubuntu-2204-jammy-arm64-v20220712a + architecture: arm64 # optional. By default, amd64 is assumed. zone: us-central1-a cpu: 8 memory: 40GB @@ -297,7 +298,8 @@ task: ```yaml gce_instance: image_project: ubuntu-os-cloud - image_family: ubuntu-1904 + image_family: ubuntu-2204-lts-arm64 + architecture: arm64 ``` #### Custom VM images