Skip to content

Commit

Permalink
Add ARM64 integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Molter73 committed Oct 20, 2023
1 parent 83a09f8 commit 65ebedc
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration-test-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
matrix:
directory: ${{ fromJSON(needs.common-variables.outputs.build-dirs) }}
env:
PLATFORM: linux/amd64,linux/s390x,linux/ppc64le
PLATFORM: linux/amd64,linux/s390x,linux/ppc64le,linux/arm64
COLLECTOR_QA_TAG: ${{ inputs.collector-qa-tag }}

steps:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,27 @@ jobs:
job-tag: ${{ inputs.job-tag }}
secrets: inherit

arm-integration-tests:
uses: ./.github/workflows/integration-tests-vm-type.yml
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'run-multiarch-builds')
strategy:
# ensure that if one part of the matrix fails, the
# rest will continue
fail-fast: false
matrix:
vm_type:
- rhel-arm64
- ubuntu-os-arm64
- sles-arm64
- fcarm

with:
vm_type: ${{ matrix.vm_type }}
collector-tag: ${{ inputs.collector-tag }}
collector-qa-tag: ${{ inputs.collector-qa-tag }}
job-tag: ${{ inputs.job-tag }}
secrets: inherit

notify:
runs-on: ubuntu-latest
if: always() && contains(join(needs.*.result, ','), 'failure') && github.event_name == 'push'
Expand Down
37 changes: 37 additions & 0 deletions ansible/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ excluded_pairs:
- [ 'rhel-8-6-s390x', 'ebpf' ]
# Also exclude Power & core_bpf, since it is currently unsupported
- [ 'p', 'core_bpf' ]
# No ebpf support for arm... Yet...?
- [ 'rhel-9-arm64', 'ebpf' ]
- [ 'ubuntu-2004-lts-arm64', 'ebpf' ]
- [ 'ubuntu-2204-lts-arm64', 'ebpf' ]
- [ 'sles-15-arm64', 'ebpf' ]
- [ 'fedora-coreos-stable-arm64', 'ebpf' ]

virtual_machines:
rhel:
Expand All @@ -33,6 +39,13 @@ virtual_machines:
- rhel-8
- rhel-9

rhel-arm64:
project: rhel-cloud
arch: arm64
machine_type: t2a-standard-2
families:
- rhel-9-arm64

rhel-s390x:
project: rhel-s390x-cloud
arch: s390x
Expand Down Expand Up @@ -85,12 +98,27 @@ virtual_machines:
#- sles-12
- sles-15

sles-arm64:
project: suse-cloud
arch: arm64
machine_type: t2a-standard-2
families:
- sles-15-arm64

ubuntu-os:
project: ubuntu-os-cloud
families:
- ubuntu-2004-lts
- ubuntu-2204-lts

ubuntu-os-arm64:
project: ubuntu-os-cloud
arch: arm64
machine_type: t2a-standard-2
families:
- ubuntu-2004-lts-arm64
- ubuntu-2204-lts-arm64

ubuntu-os-pro:
project: ubuntu-os-pro-cloud
families:
Expand All @@ -106,6 +134,15 @@ virtual_machines:
families:
- fedora-coreos-stable

# This should be 'fedora-coreos-arm64', but because of
# GCP VM name length restrictions, we need it to be shorter
fcarm:
project: fedora-coreos-cloud
arch: arm64
machine_type: t2a-standard-2
families:
- fedora-coreos-stable-arm64

garden-linux:
project: sap-se-gcp-gardenlinux
images:
Expand Down
2 changes: 2 additions & 0 deletions ansible/group_vars/platform_fcarm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
ansible_user: core
1 change: 1 addition & 0 deletions ansible/roles/create-all-vms/tasks/by-family.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
vm_available_zones: "{{ gcp_available_zones }}"
vm_ignition: "{{ item.0.value.ignition | default({}) }}"
vm_arch: "{{ item.0.value.arch | default('amd64') }}"
vm_machine_type: "{{ item.0.value.machine_type | default('e2-standard-2') }}"
1 change: 1 addition & 0 deletions ansible/roles/create-all-vms/tasks/by-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@
vm_available_zones: "{{ gcp_available_zones }}"
vm_ignition: "{{ item.0.value.ignition | default({}) }}"
vm_arch: "{{ item.0.value.arch | default('amd64') }}"
vm_machine_type: "{{ item.0.value.machine_type | default('e2-standard-2') }}"
4 changes: 2 additions & 2 deletions ansible/roles/create-vm/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
pi_name: "{{ vm_name }}"
when: vm_arch == "ppc64le" and [vm_family, vm_collection_method] not in excluded_pairs

- name: Create X86 VM
- name: Create GCP VM
google.cloud.gcp_compute_instance:
name: "{{ vm_name }}"
project: "{{ gcp_project }}"
Expand Down Expand Up @@ -78,7 +78,7 @@
loop_var: gcp_zone
register: instance_result
when: >
vm_arch == "amd64" and not condition and [vm_family, vm_collection_method] not in excluded_pairs
(vm_arch == "amd64" or vm_arch == "arm64") and not condition and [vm_family, vm_collection_method] not in excluded_pairs
vars:
condition: "{{ (instance_result | default({'changed': false})).changed }}"

Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/destroy-vm/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---

- name: Destroy X86 VM
- name: Destroy GCP VM
delegate_to: localhost
google.cloud.gcp_compute_instance:
name: "{{ inventory_hostname }}"
Expand All @@ -10,7 +10,7 @@
# zone is set by the GCP inventory automatically
zone: "{{ zone }}"
state: absent
when: vm_arch == "amd64"
when: vm_arch == "amd64" or vm_arch == "arm64"

- name: Delete IBM Z VM
include_tasks: destroy-s390x-vm.yml
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/container/QA_TAG
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0
1.1.1
4 changes: 4 additions & 0 deletions integration-tests/container/containerstats/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ FROM base AS base-amd64

RUN yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

FROM base AS base-arm64

RUN yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

FROM base-${TARGETARCH} as final

RUN yum install -y docker-ce docker-ce-cli && \
Expand Down

0 comments on commit 65ebedc

Please sign in to comment.