From 9aa781abc6923c5d1d5a016dd18ea61aa4d9f9c6 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Mon, 3 Jun 2024 10:25:43 -0700 Subject: [PATCH] Add Amazon 2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Amazon 7 is an implementation detail, the actual OS is Amazon 2: https://aws.amazon.com/amazon-linux-2 This adds a new target amazon2-AARCH64, whose ABS template remains the same (amazon-7-aarch64), but platform is different: ❯ bundle exec beaker-hostgenerator amazon2-AARCH64a --hypervisor abs --- HOSTS: amazon2-AARCH64-1: platform: amazon-2-aarch64 template: amazon-7-arm64 hypervisor: abs roles: - agent CONFIG: {} ❯ bundle exec beaker-hostgenerator amazon7-AARCH64a --hypervisor abs --- HOSTS: amazon7-AARCH64-1: platform: amazon-7-aarch64 hypervisor: abs template: amazon-7-arm64 roles: - agent CONFIG: {} The `template` is what we request from ABS. The `platform` is what beaker uses when constructing `Beaker::Platform.new` and allows tests to introspect the platform they're running on, such as `if platform =~ /amazon-/` --- lib/beaker-hostgenerator/data.rb | 9 +++++++ .../generated/default/amazon2-AARCH64f | 14 ++++++++++ .../generated/default/amazon2-AARCH64m | 14 ++++++++++ ...on2-AARCH64f-solaris11-64-amazon2-AARCH64l | 26 ++++++++++++++++++ ...on2-AARCH64m-solaris11-32-amazon2-AARCH64u | 26 ++++++++++++++++++ ...olaris11-32l-amazon2-AARCH64-solaris11-32f | 27 +++++++++++++++++++ ...olaris11-64d-amazon2-AARCH64-solaris11-64c | 27 +++++++++++++++++++ .../osinfo-version-0/amazon2-AARCH64f | 14 ++++++++++ .../osinfo-version-0/amazon2-AARCH64m | 14 ++++++++++ .../osinfo-version-1/amazon2-AARCH64f | 14 ++++++++++ .../osinfo-version-1/amazon2-AARCH64m | 14 ++++++++++ 11 files changed, 199 insertions(+) create mode 100644 test/fixtures/generated/default/amazon2-AARCH64f create mode 100644 test/fixtures/generated/default/amazon2-AARCH64m create mode 100644 test/fixtures/generated/multiplatform/amazon2-AARCH64f-solaris11-64-amazon2-AARCH64l create mode 100644 test/fixtures/generated/multiplatform/amazon2-AARCH64m-solaris11-32-amazon2-AARCH64u create mode 100644 test/fixtures/generated/multiplatform/solaris11-32l-amazon2-AARCH64-solaris11-32f create mode 100644 test/fixtures/generated/multiplatform/solaris11-64d-amazon2-AARCH64-solaris11-64c create mode 100644 test/fixtures/generated/osinfo-version-0/amazon2-AARCH64f create mode 100644 test/fixtures/generated/osinfo-version-0/amazon2-AARCH64m create mode 100644 test/fixtures/generated/osinfo-version-1/amazon2-AARCH64f create mode 100644 test/fixtures/generated/osinfo-version-1/amazon2-AARCH64m diff --git a/lib/beaker-hostgenerator/data.rb b/lib/beaker-hostgenerator/data.rb index 9b94fe17..000b3fde 100644 --- a/lib/beaker-hostgenerator/data.rb +++ b/lib/beaker-hostgenerator/data.rb @@ -122,6 +122,14 @@ def osinfo 'template' => 'amazon-7-x86_64', }, }, + 'amazon2-AARCH64' => { + general: { + 'platform' => 'amazon-2-aarch64', + }, + abs: { + 'template' => 'amazon-7-arm64', + }, + }, 'archlinuxrolling-64' => { general: { 'platform' => 'archlinux-rolling-x64', @@ -1123,6 +1131,7 @@ def generate_osinfo # Amazon Linux yield %w[amazon7-64 amazon-7-x86_64] yield %w[amazon7-AARCH64 amazon-7-aarch64] + yield %w[amazon2-AARCH64 amazon-2-aarch64] yield %w[amazon2023-64 amazon-2023-x86_64] yield %w[amazon2023-AARCH64 amazon-2023-aarch64] diff --git a/test/fixtures/generated/default/amazon2-AARCH64f b/test/fixtures/generated/default/amazon2-AARCH64f new file mode 100644 index 00000000..746d3476 --- /dev/null +++ b/test/fixtures/generated/default/amazon2-AARCH64f @@ -0,0 +1,14 @@ +--- +arguments_string: amazon2-AARCH64f +environment_variables: {} +expected_hash: + HOSTS: + amazon2-AARCH64-1: + platform: amazon-2-aarch64 + hypervisor: vmpooler + roles: + - agent + - frictionless + CONFIG: + pooling_api: https://vmpooler-prod.k8s.infracore.puppet.net/ +expected_exception: diff --git a/test/fixtures/generated/default/amazon2-AARCH64m b/test/fixtures/generated/default/amazon2-AARCH64m new file mode 100644 index 00000000..0855ece6 --- /dev/null +++ b/test/fixtures/generated/default/amazon2-AARCH64m @@ -0,0 +1,14 @@ +--- +arguments_string: amazon2-AARCH64m +environment_variables: {} +expected_hash: + HOSTS: + amazon2-AARCH64-1: + platform: amazon-2-aarch64 + hypervisor: vmpooler + roles: + - agent + - master + CONFIG: + pooling_api: https://vmpooler-prod.k8s.infracore.puppet.net/ +expected_exception: diff --git a/test/fixtures/generated/multiplatform/amazon2-AARCH64f-solaris11-64-amazon2-AARCH64l b/test/fixtures/generated/multiplatform/amazon2-AARCH64f-solaris11-64-amazon2-AARCH64l new file mode 100644 index 00000000..9eb8de65 --- /dev/null +++ b/test/fixtures/generated/multiplatform/amazon2-AARCH64f-solaris11-64-amazon2-AARCH64l @@ -0,0 +1,26 @@ +--- +arguments_string: amazon2-AARCH64f-solaris11-64-amazon2-AARCH64l +environment_variables: {} +expected_hash: + HOSTS: + amazon2-AARCH64-1: + platform: amazon-2-aarch64 + hypervisor: vmpooler + roles: + - agent + - frictionless + solaris11-64-1: + platform: solaris-11-i386 + template: solaris-11-x86_64 + hypervisor: vmpooler + roles: + - agent + amazon2-AARCH64-2: + platform: amazon-2-aarch64 + hypervisor: vmpooler + roles: + - agent + - classifier + CONFIG: + pooling_api: https://vmpooler-prod.k8s.infracore.puppet.net/ +expected_exception: diff --git a/test/fixtures/generated/multiplatform/amazon2-AARCH64m-solaris11-32-amazon2-AARCH64u b/test/fixtures/generated/multiplatform/amazon2-AARCH64m-solaris11-32-amazon2-AARCH64u new file mode 100644 index 00000000..033ac607 --- /dev/null +++ b/test/fixtures/generated/multiplatform/amazon2-AARCH64m-solaris11-32-amazon2-AARCH64u @@ -0,0 +1,26 @@ +--- +arguments_string: amazon2-AARCH64m-solaris11-32-amazon2-AARCH64u +environment_variables: {} +expected_hash: + HOSTS: + amazon2-AARCH64-1: + platform: amazon-2-aarch64 + hypervisor: vmpooler + roles: + - agent + - master + solaris11-32-1: + platform: solaris-11-i386 + template: solaris-11-x86_64 + hypervisor: vmpooler + roles: + - agent + amazon2-AARCH64-2: + platform: amazon-2-aarch64 + hypervisor: vmpooler + roles: + - agent + - ca + CONFIG: + pooling_api: https://vmpooler-prod.k8s.infracore.puppet.net/ +expected_exception: diff --git a/test/fixtures/generated/multiplatform/solaris11-32l-amazon2-AARCH64-solaris11-32f b/test/fixtures/generated/multiplatform/solaris11-32l-amazon2-AARCH64-solaris11-32f new file mode 100644 index 00000000..676c8a49 --- /dev/null +++ b/test/fixtures/generated/multiplatform/solaris11-32l-amazon2-AARCH64-solaris11-32f @@ -0,0 +1,27 @@ +--- +arguments_string: solaris11-32l-amazon2-AARCH64-solaris11-32f +environment_variables: {} +expected_hash: + HOSTS: + solaris11-32-1: + platform: solaris-11-i386 + template: solaris-11-x86_64 + hypervisor: vmpooler + roles: + - agent + - classifier + amazon2-AARCH64-1: + platform: amazon-2-aarch64 + hypervisor: vmpooler + roles: + - agent + solaris11-32-2: + platform: solaris-11-i386 + template: solaris-11-x86_64 + hypervisor: vmpooler + roles: + - agent + - frictionless + CONFIG: + pooling_api: https://vmpooler-prod.k8s.infracore.puppet.net/ +expected_exception: diff --git a/test/fixtures/generated/multiplatform/solaris11-64d-amazon2-AARCH64-solaris11-64c b/test/fixtures/generated/multiplatform/solaris11-64d-amazon2-AARCH64-solaris11-64c new file mode 100644 index 00000000..ac6bb45c --- /dev/null +++ b/test/fixtures/generated/multiplatform/solaris11-64d-amazon2-AARCH64-solaris11-64c @@ -0,0 +1,27 @@ +--- +arguments_string: solaris11-64d-amazon2-AARCH64-solaris11-64c +environment_variables: {} +expected_hash: + HOSTS: + solaris11-64-1: + platform: solaris-11-i386 + template: solaris-11-x86_64 + hypervisor: vmpooler + roles: + - agent + - database + amazon2-AARCH64-1: + platform: amazon-2-aarch64 + hypervisor: vmpooler + roles: + - agent + solaris11-64-2: + platform: solaris-11-i386 + template: solaris-11-x86_64 + hypervisor: vmpooler + roles: + - agent + - dashboard + CONFIG: + pooling_api: https://vmpooler-prod.k8s.infracore.puppet.net/ +expected_exception: diff --git a/test/fixtures/generated/osinfo-version-0/amazon2-AARCH64f b/test/fixtures/generated/osinfo-version-0/amazon2-AARCH64f new file mode 100644 index 00000000..49f66a87 --- /dev/null +++ b/test/fixtures/generated/osinfo-version-0/amazon2-AARCH64f @@ -0,0 +1,14 @@ +--- +arguments_string: "--osinfo-version 0 amazon2-AARCH64f" +environment_variables: {} +expected_hash: + HOSTS: + amazon2-AARCH64-1: + platform: amazon-2-aarch64 + hypervisor: vmpooler + roles: + - agent + - frictionless + CONFIG: + pooling_api: https://vmpooler-prod.k8s.infracore.puppet.net/ +expected_exception: diff --git a/test/fixtures/generated/osinfo-version-0/amazon2-AARCH64m b/test/fixtures/generated/osinfo-version-0/amazon2-AARCH64m new file mode 100644 index 00000000..368b1953 --- /dev/null +++ b/test/fixtures/generated/osinfo-version-0/amazon2-AARCH64m @@ -0,0 +1,14 @@ +--- +arguments_string: "--osinfo-version 0 amazon2-AARCH64m" +environment_variables: {} +expected_hash: + HOSTS: + amazon2-AARCH64-1: + platform: amazon-2-aarch64 + hypervisor: vmpooler + roles: + - agent + - master + CONFIG: + pooling_api: https://vmpooler-prod.k8s.infracore.puppet.net/ +expected_exception: diff --git a/test/fixtures/generated/osinfo-version-1/amazon2-AARCH64f b/test/fixtures/generated/osinfo-version-1/amazon2-AARCH64f new file mode 100644 index 00000000..eb458882 --- /dev/null +++ b/test/fixtures/generated/osinfo-version-1/amazon2-AARCH64f @@ -0,0 +1,14 @@ +--- +arguments_string: "--osinfo-version 1 amazon2-AARCH64f" +environment_variables: {} +expected_hash: + HOSTS: + amazon2-AARCH64-1: + platform: amazon-2-aarch64 + hypervisor: vmpooler + roles: + - agent + - frictionless + CONFIG: + pooling_api: https://vmpooler-prod.k8s.infracore.puppet.net/ +expected_exception: diff --git a/test/fixtures/generated/osinfo-version-1/amazon2-AARCH64m b/test/fixtures/generated/osinfo-version-1/amazon2-AARCH64m new file mode 100644 index 00000000..8930eb08 --- /dev/null +++ b/test/fixtures/generated/osinfo-version-1/amazon2-AARCH64m @@ -0,0 +1,14 @@ +--- +arguments_string: "--osinfo-version 1 amazon2-AARCH64m" +environment_variables: {} +expected_hash: + HOSTS: + amazon2-AARCH64-1: + platform: amazon-2-aarch64 + hypervisor: vmpooler + roles: + - agent + - master + CONFIG: + pooling_api: https://vmpooler-prod.k8s.infracore.puppet.net/ +expected_exception: