Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
test: update for ARM testing
Browse files Browse the repository at this point in the history
  • Loading branch information
henrywang committed Jan 31, 2024
1 parent 24af094 commit 5bce8b9
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 18 deletions.
12 changes: 1 addition & 11 deletions os-replace.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
#!/bin/bash
set -exuo pipefail

# Required env variables list
# PLATFORM: openstack, gcp, aws
# TEST_OS: rhel-9-4, centos-stream-9
# ARCH: x86_64, aarch64
# QUAY_USERNAME, QUAY_PASSWORD
# DOWNLOAD_NODE
# For RHEL only: RHEL_REGISTRY_URL, QUAY_SECRET
# For GCP only: GCP_SERVICE_ACCOUNT_FILE, GCP_SERVICE_ACCOUNT_NAME, GCP_PROJECT
# For AWS only: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION

# Colorful timestamped output.
function greenprint {
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
Expand Down Expand Up @@ -173,7 +163,7 @@ ansible-playbook -v \
playbooks/remove.yaml

greenprint "Clean up"
rm -rf "$TEMPDIR" auth.json rhel-9-4.repo
rm -rf auth.json rhel-9-4.repo
unset ANSIBLE_CONFIG

greenprint "🎉 All tests passed."
Expand Down
2 changes: 1 addition & 1 deletion playbooks/check-system.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
block:
- assert:
that:
- result_usr_mount_point.stdout == usr_mount_path
- result_usr_mount_point.stdout == usr_mount_path or result_usr_mount_point.stdout == "overlay[/usr]"
fail_msg: "/usr does not mount on {{ usr_mount_path }}"
success_msg: "/usr mounts on {{ usr_mount_path }}"
always:
Expand Down
15 changes: 9 additions & 6 deletions playbooks/deploy-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
x86_64:
"0": t2.medium
"1": t3.medium
"2": t3a.medium
"3": m4.large
"2": m6a.large
aarch64:
"0": t4g.medium
"1": c7g.medium
"2": m6g.medium

tasks:
- set_fact:
Expand All @@ -36,15 +39,15 @@
set_fact:
random_instance_type: "{{ lookup('env', 'instance_type') | default(instance_type[arch][instance_type_index], true) }}"

- name: get all availability zones
amazon.aws.aws_az_info:
register: ec2_zones
- name: "get available zone for instance {{ random_instance_type }}"
shell: aws ec2 describe-instance-type-offerings --location-type availability-zone --filters="Name=instance-type,Values={{ random_instance_type }}" --query InstanceTypeOfferings | jq -r '.[0].Location'
register: ec2_zone

- name: get subnet
amazon.aws.ec2_vpc_subnet_info:
filters:
"tag:Name": "kite-ci"
"availabilityZone": "{{ ec2_zones.availability_zones[0].zone_name }}"
"availabilityZone": "{{ ec2_zone.stdout }}"
register: ec2_vpc_subnet

- name: get security group
Expand Down
18 changes: 18 additions & 0 deletions playbooks/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@
test_image_url: ""

tasks:
- name: check bios or uefi
stat:
path: /sys/firmware/efi

- name: check partition size
command: df -Th
ignore_errors: true
become: true

- name: check disk partition table
command: fdisk -l
ignore_errors: true
become: true

- name: check mount table
command: findmnt
ignore_errors: true

- name: Install podman and skopeo
package:
name:
Expand Down

0 comments on commit 5bce8b9

Please sign in to comment.