From 56aa4246a200e73da95d33776841612e0767a522 Mon Sep 17 00:00:00 2001 From: Rado Chmiel Date: Fri, 6 Dec 2024 14:23:02 +0100 Subject: [PATCH 1/3] Upgrade Fedora e2e tests with OAI to run on 41 --- .prow.yaml | 6 +++--- e2e/provision/distros_supported.yml | 4 ++++ .../roles/bootstrap/molecule/default/molecule.yml | 8 ++++++++ e2e/terraform/main.tf | 4 ++-- prow/config/config.yaml | 8 ++++---- 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.prow.yaml b/.prow.yaml index fe6c0a96..bc5ec5d6 100644 --- a/.prow.yaml +++ b/.prow.yaml @@ -246,7 +246,7 @@ presubmits: path: id_rsa - key: id_rsa.pub path: id_rsa.pub - - name: e2e-oai-fedora-34 + - name: e2e-oai-fedora-41 annotations: labels: run_if_changed: '^e2e/' @@ -262,8 +262,8 @@ presubmits: args: - "-c" - | - set -eE; cd "$(git rev-parse --show-toplevel)/e2e/terraform"; trap 'terraform destroy -target module.gcp-fedora-34 -auto-approve' EXIT; - terraform init && timeout 120m terraform apply -target module.gcp-fedora-34 -var="e2e_type=oai" -var="fail_fast=true" -auto-approve + set -eE; cd "$(git rev-parse --show-toplevel)/e2e/terraform"; trap 'terraform destroy -target module.gcp-fedora-41 -auto-approve' EXIT; + terraform init && timeout 120m terraform apply -target module.gcp-fedora-41 -var="e2e_type=oai" -var="fail_fast=true" -auto-approve volumeMounts: - name: satoken mountPath: "/etc/satoken" diff --git a/e2e/provision/distros_supported.yml b/e2e/provision/distros_supported.yml index 8aaa96c1..b22f612c 100644 --- a/e2e/provision/distros_supported.yml +++ b/e2e/provision/distros_supported.yml @@ -21,3 +21,7 @@ fedora_34: reload: true project_id: fedora-cloud family: fedora-cloud-34 +fedora_41: + name: fedora/41-cloud-base + project_id: fedora-cloud + family: fedora-cloud-41 diff --git a/e2e/provision/playbooks/roles/bootstrap/molecule/default/molecule.yml b/e2e/provision/playbooks/roles/bootstrap/molecule/default/molecule.yml index 8c6ddae8..55378b25 100644 --- a/e2e/provision/playbooks/roles/bootstrap/molecule/default/molecule.yml +++ b/e2e/provision/playbooks/roles/bootstrap/molecule/default/molecule.yml @@ -45,6 +45,14 @@ platforms: gui: false groups: - fedora + - name: fedora41-$POSFIX_NAME + box: generic/fedora41 + memory: 8192 + cpus: 4 + provider_options: + gui: false + groups: + - fedora provisioner: name: ansible env: diff --git a/e2e/terraform/main.tf b/e2e/terraform/main.tf index 7fbda01f..7737931f 100644 --- a/e2e/terraform/main.tf +++ b/e2e/terraform/main.tf @@ -22,9 +22,9 @@ module "gcp-fedora-34" { nephio_mgmt_cluster_type = var.mgmt_cluster_type } -module "gcp-fedora-38" { +module "gcp-fedora-41" { source = ".//modules/gcp" - vmimage = "fedora-cloud/fedora-cloud-38" + vmimage = "fedora-cloud/fedora-cloud-41" ansible_user = "fedora" nephio_e2e_type = var.e2e_type nephio_e2e_fail_fast = var.fail_fast diff --git a/prow/config/config.yaml b/prow/config/config.yaml index 44381470..82afa6ba 100644 --- a/prow/config/config.yaml +++ b/prow/config/config.yaml @@ -1907,7 +1907,7 @@ periodics: path: id_rsa - key: id_rsa.pub path: id_rsa.pub - - name: e2e-daily-fedora-34-oai + - name: e2e-daily-fedora-41-oai annotations: labels: cron: "0 15 * * 1-6" @@ -1927,8 +1927,8 @@ periodics: args: - "-c" - | - set -eE; cd "$GOPATH/src/nephio_repo/test-infra/e2e/terraform"; trap 'terraform destroy -target module.gcp-fedora-34 -auto-approve' EXIT; - terraform init && timeout 120m terraform apply -target module.gcp-fedora-34 -var="e2e_type=oai" -auto-approve + set -eE; cd "$GOPATH/src/nephio_repo/test-infra/e2e/terraform"; trap 'terraform destroy -target module.gcp-fedora-41 -auto-approve' EXIT; + terraform init && timeout 120m terraform apply -target module.gcp-fedora-41 -var="e2e_type=oai" -auto-approve volumeMounts: - name: satoken mountPath: "/etc/satoken" @@ -2047,4 +2047,4 @@ periodics: - key: id_rsa path: id_rsa - key: id_rsa.pub - path: id_rsa.pub \ No newline at end of file + path: id_rsa.pub From b3b7b032cf36e1bf170d23356c244fb953e78beb Mon Sep 17 00:00:00 2001 From: Rado Chmiel Date: Mon, 9 Dec 2024 11:08:24 +0100 Subject: [PATCH 2/3] Pinning fedora image to a version, removing old instances --- e2e/provision/distros_supported.yml | 6 +----- .../roles/bootstrap/molecule/default/molecule.yml | 8 -------- e2e/terraform/main.tf | 11 +---------- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/e2e/provision/distros_supported.yml b/e2e/provision/distros_supported.yml index b22f612c..cf623e3b 100644 --- a/e2e/provision/distros_supported.yml +++ b/e2e/provision/distros_supported.yml @@ -16,12 +16,8 @@ ubuntu_jammy: name: generic/ubuntu2204 project_id: ubuntu-os-cloud family: ubuntu-2204-lts -fedora_34: - name: fedora/34-cloud-base - reload: true - project_id: fedora-cloud - family: fedora-cloud-34 fedora_41: name: fedora/41-cloud-base + reload: true project_id: fedora-cloud family: fedora-cloud-41 diff --git a/e2e/provision/playbooks/roles/bootstrap/molecule/default/molecule.yml b/e2e/provision/playbooks/roles/bootstrap/molecule/default/molecule.yml index 55378b25..9a1ac51e 100644 --- a/e2e/provision/playbooks/roles/bootstrap/molecule/default/molecule.yml +++ b/e2e/provision/playbooks/roles/bootstrap/molecule/default/molecule.yml @@ -37,14 +37,6 @@ platforms: gui: false groups: - ubuntu - - name: fedora34-$POSFIX_NAME - box: generic/fedora34 - memory: 8192 - cpus: 4 - provider_options: - gui: false - groups: - - fedora - name: fedora41-$POSFIX_NAME box: generic/fedora41 memory: 8192 diff --git a/e2e/terraform/main.tf b/e2e/terraform/main.tf index 7737931f..a123200c 100644 --- a/e2e/terraform/main.tf +++ b/e2e/terraform/main.tf @@ -13,18 +13,9 @@ module "gcp-ubuntu-jammy" { nephio_mgmt_cluster_type = var.mgmt_cluster_type } -module "gcp-fedora-34" { - source = ".//modules/gcp" - vmimage = "fedora-cloud/fedora-cloud-34" - ansible_user = "fedora" - nephio_e2e_type = var.e2e_type - nephio_e2e_fail_fast = var.fail_fast - nephio_mgmt_cluster_type = var.mgmt_cluster_type -} - module "gcp-fedora-41" { source = ".//modules/gcp" - vmimage = "fedora-cloud/fedora-cloud-41" + vmimage = "fedora-coreos-cloud/fedora-coreos-41-20241109-3-0-gcp-x86-64" ansible_user = "fedora" nephio_e2e_type = var.e2e_type nephio_e2e_fail_fast = var.fail_fast From ae8707da36d881fa2cb7bdc78764897a2d63fb1a Mon Sep 17 00:00:00 2001 From: Rado Chmiel Date: Mon, 9 Dec 2024 11:28:56 +0100 Subject: [PATCH 3/3] Fedora-CoreOS has different default user than plain Fedora --- e2e/terraform/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/terraform/main.tf b/e2e/terraform/main.tf index a123200c..76c941e8 100644 --- a/e2e/terraform/main.tf +++ b/e2e/terraform/main.tf @@ -16,7 +16,7 @@ module "gcp-ubuntu-jammy" { module "gcp-fedora-41" { source = ".//modules/gcp" vmimage = "fedora-coreos-cloud/fedora-coreos-41-20241109-3-0-gcp-x86-64" - ansible_user = "fedora" + ansible_user = "core" nephio_e2e_type = var.e2e_type nephio_e2e_fail_fast = var.fail_fast nephio_mgmt_cluster_type = var.mgmt_cluster_type