From 005723f266cb620b355c34406498bfce2245c340 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Fri, 16 Jun 2023 15:16:18 +1200 Subject: [PATCH 001/110] first draft tfvars --- .../tf_files/PR-tests-template.tf | 378 ++++++++++++++++++ .../tf_files/tfvars/manager43-pr.tfvars | 11 + .../tf_files/tfvars/uyuni-pr.tfvars | 24 ++ 3 files changed, 413 insertions(+) create mode 100644 terracumber_config/tf_files/PR-tests-template.tf create mode 100644 terracumber_config/tf_files/tfvars/manager43-pr.tfvars create mode 100644 terracumber_config/tf_files/tfvars/uyuni-pr.tfvars diff --git a/terracumber_config/tf_files/PR-tests-template.tf b/terracumber_config/tf_files/PR-tests-template.tf new file mode 100644 index 000000000..17e91c087 --- /dev/null +++ b/terracumber_config/tf_files/PR-tests-template.tf @@ -0,0 +1,378 @@ +// Mandatory variables for terracumber +variable "URL_PREFIX" { + type = string +} + +// Not really used as this is for --runall parameter, and we run cucumber step by step +variable "CUCUMBER_COMMAND" { + type = string +} + +variable "CUCUMBER_GITREPO" { + type = string +} + +variable "CUCUMBER_BRANCH" { + type = string +} + +variable "CUCUMBER_RESULTS" { + type = string + default = "/root/spacewalk/testsuite" +} + +variable "MAIL_SUBJECT" { + type = string +} + +variable "MAIL_TEMPLATE" { + type = string +} + +variable "MAIL_SUBJECT_ENV_FAIL" { + type = string + default = "Failed acceptance tests on Pull Request: Environment setup failed" +} + +variable "MAIL_TEMPLATE_ENV_FAIL" { + type = string +} + +variable "ENVIRONMENT" { + type = string + default = "1" +} + +variable "HYPER" { + type = string + default = "romulus.mgr.prv.suse.net" +} + +variable "MAIL_FROM" { + type = string + default = "galaxy-ci@suse.de" +} + +variable "MAIL_TO" { + type = string + default = "galaxy-ci@suse.de" +} + +// sumaform specific variables +variable "SCC_USER" { + type = string +} + +variable "SCC_PASSWORD" { + type = string +} + +variable "GIT_USER" { + type = string + default = null // Not needed for master, as it is public +} + +variable "GIT_PASSWORD" { + type = string + default = null // Not needed for master, as it is public +} + +// Repository containing the build for the tested Uyuni Pull Request +variable "PULL_REQUEST_REPO" { + type = string +} + +variable "MASTER_REPO" { + type = string +} + +variable "MASTER_OTHER_REPO" { + type = string +} + +variable "MASTER_SUMAFORM_TOOLS_REPO" { + type = string +} + +variable "UPDATE_REPO" { + type = string +} + +variable "ADDITIONAL_REPO_URL" { + type = string +} + +variable "TEST_PACKAGES_REPO" { + type = string +} + +// Repositories containing the client tools RPMs +variable "SLE_CLIENT_REPO" { + type = string +} + +variable "RHLIKE_CLIENT_REPO" { + type = string +} + +variable "DEBLIKE_CLIENT_REPO" { + type = string +} + +variable "OPENSUSE_CLIENT_REPO" { + type = string +} + +variable "IMAGE" { + type = string +} + +variable "GIT_PROFILES_REPO" { + type = string +} + +variable "IMAGES" { + type = list(string) +} + +variable "PRODUCT_VERSION" { + type = list(string) +} + +terraform { + required_version = "1.0.10" + required_providers { + libvirt = { + source = "dmacvicar/libvirt" + version = "0.6.3" + } + } +} + + +provider "libvirt" { + uri = "qemu+tcp://${var.HYPER}/system" +} + +module "cucumber_testsuite" { + source = "./modules/cucumber_testsuite" + + product_version = var.PRODUCT_VERSION + + // Cucumber repository configuration for the controller + git_username = var.GIT_USER + git_password = var.GIT_PASSWORD + git_repo = var.CUCUMBER_GITREPO + branch = var.CUCUMBER_BRANCH + + cc_username = var.SCC_USER + cc_password = var.SCC_PASSWORD + mirror = "minima-mirror.mgr.prv.suse.net" + use_mirror_images = true + + images = var.IMAGES + + use_avahi = false + name_prefix = "suma-pr${var.ENVIRONMENT}-" + domain = "mgr.prv.suse.net" + from_email = "root@suse.de" + + no_auth_registry = "registry.mgr.prv.suse.net" + auth_registry = "registry.mgr.prv.suse.net:5000/cucutest" + auth_registry_username = "cucutest" + auth_registry_password = "cucusecret" + git_profiles_repo = var.GIT_PROFILES_REPO + + server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" + custom_download_endpoint = "ftp://minima-mirror.mgr.prv.suse.net:445" + + # when changing images, please also keep in mind to adjust the image matrix at the end of the README. + host_settings = { + controller = { + provider_settings = { + mac = "aa:b2:92:04:00:00" + } + } + server = { + provider_settings = { + mac = "aa:b2:92:04:00:01" + } + additional_repos_only = true + additional_repos = { + pull_request_repo = var.PULL_REQUEST_REPO, + master_repo = var.MASTER_REPO, + master_repo_other = var.MASTER_OTHER_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", + } + image = var.IMAGE + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + server_mounted_mirror = "minima-mirror.mgr.prv.suse.net" + } + proxy = { + provider_settings = { + mac = "aa:b2:92:04:00:02" + } + additional_repos_only = true + additional_repos = { + pull_request_repo = var.PULL_REQUEST_REPO, + master_repo = var.MASTER_REPO, + master_repo_other = var.MASTER_OTHER_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", + proxy_pool = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", + tools_update = var.OPENSUSE_CLIENT_REPO + } + image = var.IMAGE + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + suse-minion = { + image = "sles15sp4o" + name = "min-sles15" + provider_settings = { + mac = "aa:b2:92:04:00:04" + } + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + suse-sshminion = { + image = "sles15sp4o" + name = "minssh-sles15" + provider_settings = { + mac = "aa:b2:92:04:00:05" + } + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion", "iptables" ] + install_salt_bundle = true + } + redhat-minion = { + image = "rocky8o" + name = "min-rocky8" + provider_settings = { + mac = "aa:b2:92:04:00:06" + memory = 2048 + vcpu = 2 + } + additional_repos = { + client_repo = var.RHLIKE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + debian-minion = { + image = "ubuntu2204o" + name = "min-ubuntu2204" + provider_settings = { + mac = "aa:b2:92:04:00:07" + } + additional_repos = { + client_repo = var.DEBLIKE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + // FIXME: cloudl-init fails if venv-salt-minion is not avaiable + // We can set "install_salt_bundle = true" as soon as venv-salt-minion is available Uyuni:Stable + install_salt_bundle = false + } + build-host = { + image = "sles15sp4o" + name = "min-build" + provider_settings = { + mac = "aa:b2:92:04:00:09" + memory = 2048 + } + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + pxeboot-minion = { + image = "sles15sp4o" + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + kvm-host = { + image = var.IMAGE + name = "min-kvm" + additional_grains = { + hvm_disk_image = { + leap = { + hostname = "suma-pr1-min-nested" + image = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" + hash = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" + } + sles = { + hostname = "suma-pr1-min-nested" + image = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" + hash = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" + } + } + } + provider_settings = { + mac = "aa:b2:92:04:00:0a" + } + additional_repos_only = true + additional_repos = { + client_repo = var.OPENSUSE_CLIENT_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + } + nested_vm_host = "suma-pr1-min-nested" + nested_vm_mac = "aa:b2:92:04:00:0b" + provider_settings = { + pool = "ssd" + network_name = null + bridge = "br1" + additional_network = "192.168.101.0/24" + } +} + + +resource "null_resource" "add_test_information" { + triggers = { + always_run = "${timestamp()}" + } + provisioner "file" { + source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" + destination = "/tmp/set_custom_header.sh" + connection { + type = "ssh" + user = "root" + password = "linux" + host = "${module.cucumber_testsuite.configuration.server.hostname}" + } + } +} + + +output "configuration" { + value = module.cucumber_testsuite.configuration +} diff --git a/terracumber_config/tf_files/tfvars/manager43-pr.tfvars b/terracumber_config/tf_files/tfvars/manager43-pr.tfvars new file mode 100644 index 000000000..b8b789f73 --- /dev/null +++ b/terracumber_config/tf_files/tfvars/manager43-pr.tfvars @@ -0,0 +1,11 @@ +IMAGE="sles15sp4o" +GIT_PROFILES_REPO="https://github.com/SUSE/spacewalk.git#:testsuite/features/profiles/internal_prv" +IMAGES=["rocky8o", "opensuse154o", "sles15sp4o", "ubuntu2204o"] +PRODUCT_VERSION="4.3-nightly" +MAIL_TEMPLATE_ENV_FAIL="../mail_templates/mail-template-jenkins-suma43-pull-request-env-fail.txt" +MAIL_TEMPLATE="../mail_templates/mail-template-jenkins-suma43-pull-request.txt" +MAIL_SUBJECT="$status acceptance tests on SUMA 4.3 Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" +CUCUMBER_BRANCH="Manager-4.3" +CUCUMBER_GITREPO="https://github.com/SUSE/spacewalk/spacewalk.git" +CUCUMBER_COMMAND="export PRODUCT='SUSE-Manager' && run-testsuite" +URL_PREFIX="https://ci.suse.de/view/Manager/view/Uyuni/job/suma43-prs-ci-tests" \ No newline at end of file diff --git a/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars b/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars new file mode 100644 index 000000000..767417b41 --- /dev/null +++ b/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars @@ -0,0 +1,24 @@ +IMAGE="opensuse154-ci-pro" +GIT_PROFILES_REPO="https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" +IMAGES=["rocky8o", "opensuse154o", "opensuse154-ci-pro", "sles15sp4o", "ubuntu2204o"] +PRODUCT_VERSION="uyuni-pr" +MAIL_TEMPLATE_ENV_FAIL="../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" +MAIL_TEMPLATE="../mail_templates/mail-template-jenkins-pull-request.txt" +MAIL_SUBJECT="$status acceptance tests on Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" +CUCUMBER_BRANCH="master" +CUCUMBER_GITREPO="https://github.com/uyuni-project/uyuni.git" +CUCUMBER_COMMAND="export PRODUCT='Uyuni' && run-testsuite" +URL_PREFIX="https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" +SLE_CLIENT_REPO=${SLE_CLIENT_REPO} +RHLIKE_CLIENT_REPO=${RHLIKE_CLIENT_REPO} +DEBLIKE_CLIENT_REPO=${DEBLIKE_CLIENT_REPO} +OPENSUSE_CLIENT_REPO=${OPENSUSE_CLIENT_REPO} +PULL_REQUEST_REPO=${PULL_REQUEST_REPO} +MASTER_OTHER_REPO=${MASTER_OTHER_REPO} +MASTER_SUMAFORM_TOOLS_REPO=${MASTER_SUMAFORM_TOOLS_REPO} +TEST_PACKAGES_REPO=${TEST_PACKAGES_REPO} +MASTER_REPO=${MASTER_REPO} +UPDATE_REPO=${UPDATE_REPO} +ADDITIONAL_REPO_URL=${ADDITIONAL_REPO_URL} +CUCUMBER_GITREPO=${cucumber_gitrepo} +CUCUMBER_BRANCH=${cucumber_ref} \ No newline at end of file From ede8e0c04877d83b89036040eb4d776bb18d2841 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Fri, 16 Jun 2023 15:20:29 +1200 Subject: [PATCH 002/110] Add space --- terracumber_config/tf_files/tfvars/manager43-pr.tfvars | 2 +- terracumber_config/tf_files/tfvars/uyuni-pr.tfvars | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/terracumber_config/tf_files/tfvars/manager43-pr.tfvars b/terracumber_config/tf_files/tfvars/manager43-pr.tfvars index b8b789f73..51fa4bff4 100644 --- a/terracumber_config/tf_files/tfvars/manager43-pr.tfvars +++ b/terracumber_config/tf_files/tfvars/manager43-pr.tfvars @@ -8,4 +8,4 @@ MAIL_SUBJECT="$status acceptance tests on SUMA 4.3 Pull Request: $tests scenario CUCUMBER_BRANCH="Manager-4.3" CUCUMBER_GITREPO="https://github.com/SUSE/spacewalk/spacewalk.git" CUCUMBER_COMMAND="export PRODUCT='SUSE-Manager' && run-testsuite" -URL_PREFIX="https://ci.suse.de/view/Manager/view/Uyuni/job/suma43-prs-ci-tests" \ No newline at end of file +URL_PREFIX="https://ci.suse.de/view/Manager/view/Uyuni/job/suma43-prs-ci-tests" diff --git a/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars b/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars index 767417b41..753aa8b5f 100644 --- a/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars +++ b/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars @@ -21,4 +21,4 @@ MASTER_REPO=${MASTER_REPO} UPDATE_REPO=${UPDATE_REPO} ADDITIONAL_REPO_URL=${ADDITIONAL_REPO_URL} CUCUMBER_GITREPO=${cucumber_gitrepo} -CUCUMBER_BRANCH=${cucumber_ref} \ No newline at end of file +CUCUMBER_BRANCH=${cucumber_ref} From 3d7b03834ae77060e8677c1a2c13a841dbb6d93f Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Fri, 16 Jun 2023 15:23:18 +1200 Subject: [PATCH 003/110] Add comments --- terracumber_config/tf_files/tfvars/manager43-pr.tfvars | 2 ++ terracumber_config/tf_files/tfvars/uyuni-pr.tfvars | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/terracumber_config/tf_files/tfvars/manager43-pr.tfvars b/terracumber_config/tf_files/tfvars/manager43-pr.tfvars index 51fa4bff4..5f69e734a 100644 --- a/terracumber_config/tf_files/tfvars/manager43-pr.tfvars +++ b/terracumber_config/tf_files/tfvars/manager43-pr.tfvars @@ -1,3 +1,5 @@ +############ Unique to spacewalk ###########3 + IMAGE="sles15sp4o" GIT_PROFILES_REPO="https://github.com/SUSE/spacewalk.git#:testsuite/features/profiles/internal_prv" IMAGES=["rocky8o", "opensuse154o", "sles15sp4o", "ubuntu2204o"] diff --git a/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars b/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars index 753aa8b5f..212b2422e 100644 --- a/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars +++ b/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars @@ -1,3 +1,5 @@ +############ Unique to uyuni ######################## + IMAGE="opensuse154-ci-pro" GIT_PROFILES_REPO="https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" IMAGES=["rocky8o", "opensuse154o", "opensuse154-ci-pro", "sles15sp4o", "ubuntu2204o"] @@ -9,6 +11,9 @@ CUCUMBER_BRANCH="master" CUCUMBER_GITREPO="https://github.com/uyuni-project/uyuni.git" CUCUMBER_COMMAND="export PRODUCT='Uyuni' && run-testsuite" URL_PREFIX="https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" + +############### GENERIC PART BETWEEN THE TWO PIPELINE ######################## +## This variables are not correctly describe SLE_CLIENT_REPO=${SLE_CLIENT_REPO} RHLIKE_CLIENT_REPO=${RHLIKE_CLIENT_REPO} DEBLIKE_CLIENT_REPO=${DEBLIKE_CLIENT_REPO} From 2404c648ce734f1ed1e59d4cf5246ab33e271c16 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Mon, 19 Jun 2023 10:54:03 +1200 Subject: [PATCH 004/110] Frist version with env settings variable depending on environment. Two solution available --- .../solution1/PR-tests-template-solution-1.tf | 237 ++++++++++++++++++ .../tf_files/solution1/env1.tfvars.json | 18 ++ .../tf_files/solution1/env2.tfvars.json | 18 ++ .../tf_files/solution1/variable.tf | 164 ++++++++++++ .../solution2/PR-tests-template-solution-1.tf | 237 ++++++++++++++++++ .../solution2/environnment.tfvars.json | 38 +++ .../tf_files/solution2/variable.tf | 148 +++++++++++ 7 files changed, 860 insertions(+) create mode 100644 terracumber_config/tf_files/solution1/PR-tests-template-solution-1.tf create mode 100644 terracumber_config/tf_files/solution1/env1.tfvars.json create mode 100644 terracumber_config/tf_files/solution1/env2.tfvars.json create mode 100644 terracumber_config/tf_files/solution1/variable.tf create mode 100644 terracumber_config/tf_files/solution2/PR-tests-template-solution-1.tf create mode 100644 terracumber_config/tf_files/solution2/environnment.tfvars.json create mode 100644 terracumber_config/tf_files/solution2/variable.tf diff --git a/terracumber_config/tf_files/solution1/PR-tests-template-solution-1.tf b/terracumber_config/tf_files/solution1/PR-tests-template-solution-1.tf new file mode 100644 index 000000000..0be8df31f --- /dev/null +++ b/terracumber_config/tf_files/solution1/PR-tests-template-solution-1.tf @@ -0,0 +1,237 @@ +terraform { + required_version = "1.0.10" + required_providers { + libvirt = { + source = "dmacvicar/libvirt" + version = "0.6.3" + } + } +} + + +provider "libvirt" { + uri = "qemu+tcp://${var.hypervisor}/system" +} + +module "cucumber_testsuite" { + source = "./modules/cucumber_testsuite" + + product_version = var.PRODUCT_VERSION + + // Cucumber repository configuration for the controller + git_username = var.GIT_USER + git_password = var.GIT_PASSWORD + git_repo = var.CUCUMBER_GITREPO + branch = var.CUCUMBER_BRANCH + + cc_username = var.SCC_USER + cc_password = var.SCC_PASSWORD + mirror = "minima-mirror.mgr.prv.suse.net" + use_mirror_images = true + + images = var.IMAGES + + use_avahi = false + name_prefix = "suma-pr${var.environment_number}-" + domain = "mgr.prv.suse.net" + from_email = "root@suse.de" + + no_auth_registry = "registry.mgr.prv.suse.net" + auth_registry = "registry.mgr.prv.suse.net:5000/cucutest" + auth_registry_username = "cucutest" + auth_registry_password = "cucusecret" + git_profiles_repo = var.GIT_PROFILES_REPO + + server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" + custom_download_endpoint = "ftp://minima-mirror.mgr.prv.suse.net:445" + + # when changing images, please also keep in mind to adjust the image matrix at the end of the README. + host_settings = { + controller = { + provider_settings = { + mac = var.mac["controller"] + } + } + server = { + provider_settings = { + mac = var.mac["server"] + } + additional_repos_only = true + additional_repos = { + pull_request_repo = var.PULL_REQUEST_REPO, + master_repo = var.MASTER_REPO, + master_repo_other = var.MASTER_OTHER_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", + } + image = var.IMAGE + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + server_mounted_mirror = "minima-mirror.mgr.prv.suse.net" + } + proxy = { + provider_settings = { + mac = var.mac["proxy"] + } + additional_repos_only = true + additional_repos = { + pull_request_repo = var.PULL_REQUEST_REPO, + master_repo = var.MASTER_REPO, + master_repo_other = var.MASTER_OTHER_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", + proxy_pool = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", + tools_update = var.OPENSUSE_CLIENT_REPO + } + image = var.IMAGE + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + suse-minion = { + image = "sles15sp4o" + name = "min-sles15" + provider_settings = { + mac = var.mac["suse-minion"] + } + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + suse-sshminion = { + image = "sles15sp4o" + name = "minssh-sles15" + provider_settings = { + mac = var.mac["suse-sshminion"] + } + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion", "iptables" ] + install_salt_bundle = true + } + redhat-minion = { + image = "rocky8o" + name = "min-rocky8" + provider_settings = { + mac = var.mac["redhat-minion"] + memory = 2048 + vcpu = 2 + } + additional_repos = { + client_repo = var.RHLIKE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + debian-minion = { + image = "ubuntu2204o" + name = "min-ubuntu2204" + provider_settings = { + mac = var.mac["debian-minion"] + } + additional_repos = { + client_repo = var.DEBLIKE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + // FIXME: cloudl-init fails if venv-salt-minion is not avaiable + // We can set "install_salt_bundle = true" as soon as venv-salt-minion is available Uyuni:Stable + install_salt_bundle = false + } + build-host = { + image = "sles15sp4o" + name = "min-build" + provider_settings = { + mac = var.mac["build-host"] + memory = 2048 + } + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + pxeboot-minion = { + image = "sles15sp4o" + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + kvm-host = { + image = var.IMAGE + name = "min-kvm" + additional_grains = { + hvm_disk_image = { + leap = { + hostname = "suma-pr${var.environment_number}-min-nested" + image = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" + hash = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" + } + sles = { + hostname = "suma-pr${var.environment_number}-min-nested" + image = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" + hash = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" + } + } + } + provider_settings = { + mac = var.mac["kvm-host"] + } + additional_repos_only = true + additional_repos = { + client_repo = var.OPENSUSE_CLIENT_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + } + nested_vm_host = "suma-pr${var.environment_number}-min-nested" + nested_vm_mac = var.mac["nested-vm"] + provider_settings = { + pool = "ssd" + network_name = null + bridge = "br1" + additional_network = var.additional_network + } +} + + +resource "null_resource" "add_test_information" { + triggers = { + always_run = "${timestamp()}" + } + provisioner "file" { + source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" + destination = "/tmp/set_custom_header.sh" + connection { + type = "ssh" + user = "root" + password = "linux" + host = "${module.cucumber_testsuite.configuration.server.hostname}" + } + } +} + + +output "configuration" { + value = module.cucumber_testsuite.configuration +} diff --git a/terracumber_config/tf_files/solution1/env1.tfvars.json b/terracumber_config/tf_files/solution1/env1.tfvars.json new file mode 100644 index 000000000..cb8e5602e --- /dev/null +++ b/terracumber_config/tf_files/solution1/env1.tfvars.json @@ -0,0 +1,18 @@ +{ + "environment_number": "1", + "mac": { + "controller": "aa:b2:92:04:00:00", + "server": "aa:b2:92:04:00:01", + "proxy": "aa:b2:92:04:00:02", + "suse-minion": "aa:b2:92:04:00:04", + "suse-sshminion": "aa:b2:92:04:00:05", + "redhat-minion": "aa:b2:92:04:00:06", + "debian-minion": "aa:b2:92:04:00:07", + "build-host": "aa:b2:92:04:00:09", + "pxeboot-minion": "?", + "kvm-host": "aa:b2:92:04:00:0a", + "nested-vm": "aa:b2:92:04:00:0b" + }, + "hypervisor": "romulus.mgr.prv.suse.net", + "additional_network": "192.168.101.0/24" +} \ No newline at end of file diff --git a/terracumber_config/tf_files/solution1/env2.tfvars.json b/terracumber_config/tf_files/solution1/env2.tfvars.json new file mode 100644 index 000000000..cc5390c1b --- /dev/null +++ b/terracumber_config/tf_files/solution1/env2.tfvars.json @@ -0,0 +1,18 @@ +{ + "environment_number": "2", + "mac": { + "controller": "aa:b2:92:04:00:10", + "server": "aa:b2:92:04:00:11", + "proxy": "aa:b2:92:04:00:12", + "suse-minion": "aa:b2:92:04:00:14", + "suse-sshminion": "aa:b2:92:04:00:15", + "redhat-minion": "aa:b2:92:04:00:16", + "debian-minion": "aa:b2:92:04:00:17", + "build-host": "aa:b2:92:04:00:19", + "pxeboot-minion": "?", + "kvm-host": "aa:b2:92:04:00:1a", + "nested-vm": "aa:b2:92:04:00:1b" + }, + "hypervisor": "romulus.mgr.prv.suse.net", + "additional_network": "192.168.102.0/24" +} \ No newline at end of file diff --git a/terracumber_config/tf_files/solution1/variable.tf b/terracumber_config/tf_files/solution1/variable.tf new file mode 100644 index 000000000..18c03250d --- /dev/null +++ b/terracumber_config/tf_files/solution1/variable.tf @@ -0,0 +1,164 @@ +// Mandatory variables for terracumber +variable "URL_PREFIX" { + type = string +} + +// Not really used as this is for --runall parameter, and we run cucumber step by step +variable "CUCUMBER_COMMAND" { + type = string +} + +variable "CUCUMBER_GITREPO" { + type = string +} + +variable "CUCUMBER_BRANCH" { + type = string +} + +variable "CUCUMBER_RESULTS" { + type = string + default = "/root/spacewalk/testsuite" +} + +variable "MAIL_SUBJECT" { + type = string +} + +variable "MAIL_TEMPLATE" { + type = string +} + +variable "MAIL_SUBJECT_ENV_FAIL" { + type = string + default = "Failed acceptance tests on Pull Request: Environment setup failed" +} + +variable "MAIL_TEMPLATE_ENV_FAIL" { + type = string +} + +variable "ENVIRONMENT" { + type = string + default = "1" +} + +variable "HYPER" { + type = string + default = "romulus.mgr.prv.suse.net" +} + +variable "MAIL_FROM" { + type = string + default = "galaxy-ci@suse.de" +} + +variable "MAIL_TO" { + type = string + default = "galaxy-ci@suse.de" +} + +// sumaform specific variables +variable "SCC_USER" { + type = string +} + +variable "SCC_PASSWORD" { + type = string +} + +variable "GIT_USER" { + type = string + default = null // Not needed for master, as it is public +} + +variable "GIT_PASSWORD" { + type = string + default = null // Not needed for master, as it is public +} + +// Repository containing the build for the tested Uyuni Pull Request +variable "PULL_REQUEST_REPO" { + type = string +} + +variable "MASTER_REPO" { + type = string +} + +variable "MASTER_OTHER_REPO" { + type = string +} + +variable "MASTER_SUMAFORM_TOOLS_REPO" { + type = string +} + +variable "UPDATE_REPO" { + type = string +} + +variable "ADDITIONAL_REPO_URL" { + type = string +} + +variable "TEST_PACKAGES_REPO" { + type = string +} + +// Repositories containing the client tools RPMs +variable "SLE_CLIENT_REPO" { + type = string +} + +variable "RHLIKE_CLIENT_REPO" { + type = string +} + +variable "DEBLIKE_CLIENT_REPO" { + type = string +} + +variable "OPENSUSE_CLIENT_REPO" { + type = string +} + +variable "IMAGE" { + type = string +} + +variable "GIT_PROFILES_REPO" { + type = string +} + +variable "IMAGES" { + type = list(string) +} + +variable "PRODUCT_VERSION" { + type = list(string) +} + +### Related to environment solution 1 ### + +variable "mac" { + type = map(string) + description = "Mac to correctly update the mac address depending on environment" +} + +variable "environment_number" { + type = string + description = "Use to set name_prefix" +} + +variable "hypervisor" { + type = string + description = "Choose the correct hypervisor depending on environment number : 1/2 ( romulus.mgr.prv.suse.net ) 3/4 ( vulcan.mgr.prv.suse.net ) 5/6 ( hyperion.mgr.prv.suse.net ) 7/8 ( daiquiri.mgr.prv.suse.net ) 9/10 ( mojito.mgr.prv.suse.net )" +} + +variable "additional_network" { + type = string + description = "Additional network depending on environment " +} + + diff --git a/terracumber_config/tf_files/solution2/PR-tests-template-solution-1.tf b/terracumber_config/tf_files/solution2/PR-tests-template-solution-1.tf new file mode 100644 index 000000000..241da9cf5 --- /dev/null +++ b/terracumber_config/tf_files/solution2/PR-tests-template-solution-1.tf @@ -0,0 +1,237 @@ +terraform { + required_version = "1.0.10" + required_providers { + libvirt = { + source = "dmacvicar/libvirt" + version = "0.6.3" + } + } +} + + +provider "libvirt" { + uri = "qemu+tcp://${var.environment_configuration[var.ENVIRONMENT].hypervisor}/system" +} + +module "cucumber_testsuite" { + source = "./modules/cucumber_testsuite" + + product_version = var.PRODUCT_VERSION + + // Cucumber repository configuration for the controller + git_username = var.GIT_USER + git_password = var.GIT_PASSWORD + git_repo = var.CUCUMBER_GITREPO + branch = var.CUCUMBER_BRANCH + + cc_username = var.SCC_USER + cc_password = var.SCC_PASSWORD + mirror = "minima-mirror.mgr.prv.suse.net" + use_mirror_images = true + + images = var.IMAGES + + use_avahi = false + name_prefix = "suma-pr${var.ENVIRONMENT}-" + domain = "mgr.prv.suse.net" + from_email = "root@suse.de" + + no_auth_registry = "registry.mgr.prv.suse.net" + auth_registry = "registry.mgr.prv.suse.net:5000/cucutest" + auth_registry_username = "cucutest" + auth_registry_password = "cucusecret" + git_profiles_repo = var.GIT_PROFILES_REPO + + server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" + custom_download_endpoint = "ftp://minima-mirror.mgr.prv.suse.net:445" + + # when changing images, please also keep in mind to adjust the image matrix at the end of the README. + host_settings = { + controller = { + provider_settings = { + mac = var.environment_configuration[var.ENVIRONMENT].mac["controller"] + } + } + server = { + provider_settings = { + mac = var.environment_configuration[var.ENVIRONMENT].mac["server"] + } + additional_repos_only = true + additional_repos = { + pull_request_repo = var.PULL_REQUEST_REPO, + master_repo = var.MASTER_REPO, + master_repo_other = var.MASTER_OTHER_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", + } + image = var.IMAGE + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + server_mounted_mirror = "minima-mirror.mgr.prv.suse.net" + } + proxy = { + provider_settings = { + mac = var.environment_configuration[var.ENVIRONMENT].mac["proxy"] + } + additional_repos_only = true + additional_repos = { + pull_request_repo = var.PULL_REQUEST_REPO, + master_repo = var.MASTER_REPO, + master_repo_other = var.MASTER_OTHER_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", + proxy_pool = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", + tools_update = var.OPENSUSE_CLIENT_REPO + } + image = var.IMAGE + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + suse-minion = { + image = "sles15sp4o" + name = "min-sles15" + provider_settings = { + mac = var.environment_configuration[var.ENVIRONMENT].mac["suse-minion"] + } + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + suse-sshminion = { + image = "sles15sp4o" + name = "minssh-sles15" + provider_settings = { + mac = var.environment_configuration[var.ENVIRONMENT].mac["suse-sshminion"] + } + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion", "iptables" ] + install_salt_bundle = true + } + redhat-minion = { + image = "rocky8o" + name = "min-rocky8" + provider_settings = { + mac = var.environment_configuration[var.ENVIRONMENT].mac["redhat-minion"] + memory = 2048 + vcpu = 2 + } + additional_repos = { + client_repo = var.RHLIKE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + debian-minion = { + image = "ubuntu2204o" + name = "min-ubuntu2204" + provider_settings = { + mac = var.environment_configuration[var.ENVIRONMENT].mac["debian-minion"] + } + additional_repos = { + client_repo = var.DEBLIKE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + // FIXME: cloudl-init fails if venv-salt-minion is not avaiable + // We can set "install_salt_bundle = true" as soon as venv-salt-minion is available Uyuni:Stable + install_salt_bundle = false + } + build-host = { + image = "sles15sp4o" + name = "min-build" + provider_settings = { + mac = var.environment_configuration[var.ENVIRONMENT].mac["build-host"] + memory = 2048 + } + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + pxeboot-minion = { + image = "sles15sp4o" + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + kvm-host = { + image = var.IMAGE + name = "min-kvm" + additional_grains = { + hvm_disk_image = { + leap = { + hostname = "suma-pr${var.ENVIRONMENT}-min-nested" + image = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" + hash = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" + } + sles = { + hostname = "suma-pr${var.ENVIRONMENT}-min-nested" + image = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" + hash = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" + } + } + } + provider_settings = { + mac = var.environment_configuration[var.ENVIRONMENT].mac["kvm-host"] + } + additional_repos_only = true + additional_repos = { + client_repo = var.OPENSUSE_CLIENT_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + } + nested_vm_host = "suma-pr${var.ENVIRONMENT}-min-nested" + nested_vm_mac = var.environment_configuration[var.ENVIRONMENT].mac["nested-vm"] + provider_settings = { + pool = "ssd" + network_name = null + bridge = "br1" + additional_network = var.environment_configuration[var.ENVIRONMENT].additional_network + } +} + + +resource "null_resource" "add_test_information" { + triggers = { + always_run = "${timestamp()}" + } + provisioner "file" { + source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" + destination = "/tmp/set_custom_header.sh" + connection { + type = "ssh" + user = "root" + password = "linux" + host = "${module.cucumber_testsuite.configuration.server.hostname}" + } + } +} + + +output "configuration" { + value = module.cucumber_testsuite.configuration +} diff --git a/terracumber_config/tf_files/solution2/environnment.tfvars.json b/terracumber_config/tf_files/solution2/environnment.tfvars.json new file mode 100644 index 000000000..51a29efeb --- /dev/null +++ b/terracumber_config/tf_files/solution2/environnment.tfvars.json @@ -0,0 +1,38 @@ +{ + "environment_configuration" : { + "1": { + "mac" : { + "controller": "aa:b2:92:04:00:00", + "server": "aa:b2:92:04:00:01", + "proxy": "aa:b2:92:04:00:02", + "suse-minion": "aa:b2:92:04:00:04", + "suse-sshminion": "aa:b2:92:04:00:05", + "redhat-minion": "aa:b2:92:04:00:06", + "debian-minion": "aa:b2:92:04:00:07", + "build-host": "aa:b2:92:04:00:09", + "pxeboot-minion": "?", + "kvm-host": "aa:b2:92:04:00:0a", + "nested-vm": "aa:b2:92:04:00:0b" + }, + "hypervisor": "romulus.mgr.prv.suse.net", + "additional_network": "192.168.101.0/24" + }, + "2" : { + "mac" : { + "controller": "aa:b2:92:04:00:10", + "server": "aa:b2:92:04:00:11", + "proxy": "aa:b2:92:04:00:12", + "suse-minion": "aa:b2:92:04:00:14", + "suse-sshminion": "aa:b2:92:04:00:15", + "redhat-minion": "aa:b2:92:04:00:16", + "debian-minion": "aa:b2:92:04:00:17", + "build-host": "aa:b2:92:04:00:19", + "pxeboot-minion": "?", + "kvm-host": "aa:b2:92:04:00:1a", + "nested-vm": "aa:b2:92:04:00:1b" + }, + "hypervisor": "romulus.mgr.prv.suse.net", + "additional_network": "192.168.102.0/24" + } + } +} \ No newline at end of file diff --git a/terracumber_config/tf_files/solution2/variable.tf b/terracumber_config/tf_files/solution2/variable.tf new file mode 100644 index 000000000..02854abf0 --- /dev/null +++ b/terracumber_config/tf_files/solution2/variable.tf @@ -0,0 +1,148 @@ +// Mandatory variables for terracumber +variable "URL_PREFIX" { + type = string +} + +// Not really used as this is for --runall parameter, and we run cucumber step by step +variable "CUCUMBER_COMMAND" { + type = string +} + +variable "CUCUMBER_GITREPO" { + type = string +} + +variable "CUCUMBER_BRANCH" { + type = string +} + +variable "CUCUMBER_RESULTS" { + type = string + default = "/root/spacewalk/testsuite" +} + +variable "MAIL_SUBJECT" { + type = string +} + +variable "MAIL_TEMPLATE" { + type = string +} + +variable "MAIL_SUBJECT_ENV_FAIL" { + type = string + default = "Failed acceptance tests on Pull Request: Environment setup failed" +} + +variable "MAIL_TEMPLATE_ENV_FAIL" { + type = string +} + +variable "ENVIRONMENT" { + type = string + default = "1" +} + +variable "HYPER" { + type = string + default = "romulus.mgr.prv.suse.net" +} + +variable "MAIL_FROM" { + type = string + default = "galaxy-ci@suse.de" +} + +variable "MAIL_TO" { + type = string + default = "galaxy-ci@suse.de" +} + +// sumaform specific variables +variable "SCC_USER" { + type = string +} + +variable "SCC_PASSWORD" { + type = string +} + +variable "GIT_USER" { + type = string + default = null // Not needed for master, as it is public +} + +variable "GIT_PASSWORD" { + type = string + default = null // Not needed for master, as it is public +} + +// Repository containing the build for the tested Uyuni Pull Request +variable "PULL_REQUEST_REPO" { + type = string +} + +variable "MASTER_REPO" { + type = string +} + +variable "MASTER_OTHER_REPO" { + type = string +} + +variable "MASTER_SUMAFORM_TOOLS_REPO" { + type = string +} + +variable "UPDATE_REPO" { + type = string +} + +variable "ADDITIONAL_REPO_URL" { + type = string +} + +variable "TEST_PACKAGES_REPO" { + type = string +} + +// Repositories containing the client tools RPMs +variable "SLE_CLIENT_REPO" { + type = string +} + +variable "RHLIKE_CLIENT_REPO" { + type = string +} + +variable "DEBLIKE_CLIENT_REPO" { + type = string +} + +variable "OPENSUSE_CLIENT_REPO" { + type = string +} + +variable "IMAGE" { + type = string +} + +variable "GIT_PROFILES_REPO" { + type = string +} + +variable "IMAGES" { + type = list(string) +} + +variable "PRODUCT_VERSION" { + type = list(string) +} + +### Related to environent solution 2 #### + +variable "environment_configuration" { + type = map(string) + description = "Collection of value containing : mac addresses, hypervisor and additional network" +} + From 1c5558fa18552528038302f8cf07de4390b51ec4 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Mon, 19 Jun 2023 10:54:39 +1200 Subject: [PATCH 005/110] update tf name to solution 2 --- ...sts-template-solution-1.tf => PR-tests-template-solution-2.tf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename terracumber_config/tf_files/solution2/{PR-tests-template-solution-1.tf => PR-tests-template-solution-2.tf} (100%) diff --git a/terracumber_config/tf_files/solution2/PR-tests-template-solution-1.tf b/terracumber_config/tf_files/solution2/PR-tests-template-solution-2.tf similarity index 100% rename from terracumber_config/tf_files/solution2/PR-tests-template-solution-1.tf rename to terracumber_config/tf_files/solution2/PR-tests-template-solution-2.tf From 2e3b1ad4a72710a7c4713a81facbb035bd9fb2f8 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Mon, 19 Jun 2023 11:15:20 +1200 Subject: [PATCH 006/110] Change file name for default terraform.tfvars name --- .../solution2/{environnment.tfvars.json => terraform.tfvars.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename terracumber_config/tf_files/solution2/{environnment.tfvars.json => terraform.tfvars.json} (100%) diff --git a/terracumber_config/tf_files/solution2/environnment.tfvars.json b/terracumber_config/tf_files/solution2/terraform.tfvars.json similarity index 100% rename from terracumber_config/tf_files/solution2/environnment.tfvars.json rename to terracumber_config/tf_files/solution2/terraform.tfvars.json From 0899e77025a64f6e3598349c1901eee4e8b3d5b1 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Mon, 19 Jun 2023 12:17:02 +1200 Subject: [PATCH 007/110] REmove some default variable --- terracumber_config/tf_files/solution1/variable.tf | 2 -- terracumber_config/tf_files/solution2/variable.tf | 2 -- 2 files changed, 4 deletions(-) diff --git a/terracumber_config/tf_files/solution1/variable.tf b/terracumber_config/tf_files/solution1/variable.tf index 18c03250d..4c3b74424 100644 --- a/terracumber_config/tf_files/solution1/variable.tf +++ b/terracumber_config/tf_files/solution1/variable.tf @@ -40,12 +40,10 @@ variable "MAIL_TEMPLATE_ENV_FAIL" { variable "ENVIRONMENT" { type = string - default = "1" } variable "HYPER" { type = string - default = "romulus.mgr.prv.suse.net" } variable "MAIL_FROM" { diff --git a/terracumber_config/tf_files/solution2/variable.tf b/terracumber_config/tf_files/solution2/variable.tf index 02854abf0..c6f6685aa 100644 --- a/terracumber_config/tf_files/solution2/variable.tf +++ b/terracumber_config/tf_files/solution2/variable.tf @@ -40,12 +40,10 @@ variable "MAIL_TEMPLATE_ENV_FAIL" { variable "ENVIRONMENT" { type = string - default = "1" } variable "HYPER" { type = string - default = "romulus.mgr.prv.suse.net" } variable "MAIL_FROM" { From 8c1821115eca3fd1b8e0e11aba84a25a4d022036 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Mon, 19 Jun 2023 13:25:52 +1200 Subject: [PATCH 008/110] Add back spaces --- terracumber_config/tf_files/solution1/env1.tfvars.json | 2 +- terracumber_config/tf_files/solution1/env2.tfvars.json | 2 +- terracumber_config/tf_files/solution1/variable.tf | 2 -- terracumber_config/tf_files/solution2/terraform.tfvars.json | 2 +- terracumber_config/tf_files/solution2/variable.tf | 1 - 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/terracumber_config/tf_files/solution1/env1.tfvars.json b/terracumber_config/tf_files/solution1/env1.tfvars.json index cb8e5602e..0fdbb8acc 100644 --- a/terracumber_config/tf_files/solution1/env1.tfvars.json +++ b/terracumber_config/tf_files/solution1/env1.tfvars.json @@ -15,4 +15,4 @@ }, "hypervisor": "romulus.mgr.prv.suse.net", "additional_network": "192.168.101.0/24" -} \ No newline at end of file +} diff --git a/terracumber_config/tf_files/solution1/env2.tfvars.json b/terracumber_config/tf_files/solution1/env2.tfvars.json index cc5390c1b..10007d803 100644 --- a/terracumber_config/tf_files/solution1/env2.tfvars.json +++ b/terracumber_config/tf_files/solution1/env2.tfvars.json @@ -15,4 +15,4 @@ }, "hypervisor": "romulus.mgr.prv.suse.net", "additional_network": "192.168.102.0/24" -} \ No newline at end of file +} diff --git a/terracumber_config/tf_files/solution1/variable.tf b/terracumber_config/tf_files/solution1/variable.tf index 4c3b74424..39d1f8b0e 100644 --- a/terracumber_config/tf_files/solution1/variable.tf +++ b/terracumber_config/tf_files/solution1/variable.tf @@ -158,5 +158,3 @@ variable "additional_network" { type = string description = "Additional network depending on environment " } - - diff --git a/terracumber_config/tf_files/solution2/terraform.tfvars.json b/terracumber_config/tf_files/solution2/terraform.tfvars.json index 51a29efeb..44304d56c 100644 --- a/terracumber_config/tf_files/solution2/terraform.tfvars.json +++ b/terracumber_config/tf_files/solution2/terraform.tfvars.json @@ -35,4 +35,4 @@ "additional_network": "192.168.102.0/24" } } -} \ No newline at end of file +} diff --git a/terracumber_config/tf_files/solution2/variable.tf b/terracumber_config/tf_files/solution2/variable.tf index c6f6685aa..f124359cb 100644 --- a/terracumber_config/tf_files/solution2/variable.tf +++ b/terracumber_config/tf_files/solution2/variable.tf @@ -143,4 +143,3 @@ variable "environment_configuration" { type = map(string) description = "Collection of value containing : mac addresses, hypervisor and additional network" } - From 086fab61e264aa88bef7809e911f56d1ba700168 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Mon, 19 Jun 2023 13:52:51 +1200 Subject: [PATCH 009/110] convert json to tfvars --- .../tf_files/solution1/env1.tfvars | 18 +++++++++ .../tf_files/solution1/env1.tfvars.json | 18 --------- .../tf_files/solution2/terraform.tfvars | 36 ++++++++++++++++++ .../tf_files/solution2/terraform.tfvars.json | 38 ------------------- 4 files changed, 54 insertions(+), 56 deletions(-) create mode 100644 terracumber_config/tf_files/solution1/env1.tfvars delete mode 100644 terracumber_config/tf_files/solution1/env1.tfvars.json create mode 100644 terracumber_config/tf_files/solution2/terraform.tfvars delete mode 100644 terracumber_config/tf_files/solution2/terraform.tfvars.json diff --git a/terracumber_config/tf_files/solution1/env1.tfvars b/terracumber_config/tf_files/solution1/env1.tfvars new file mode 100644 index 000000000..2ca87b96a --- /dev/null +++ b/terracumber_config/tf_files/solution1/env1.tfvars @@ -0,0 +1,18 @@ +environment_number = "1" + +mac = { + controller = "aa:b2:92:04:00:00" + server = "aa:b2:92:04:00:01" + proxy = "aa:b2:92:04:00:02" + suse-minion = "aa:b2:92:04:00:04" + suse-sshminion = "aa:b2:92:04:00:05" + redhat-minion = "aa:b2:92:04:00:06" + debian-minion = "aa:b2:92:04:00:07" + build-host = "aa:b2:92:04:00:09" + pxeboot-minion = "?" + kvm-host = "aa:b2:92:04:00:0a" + nested-vm = "aa:b2:92:04:00:0b" +} + +hypervisor = "romulus.mgr.prv.suse.net" +additional_network = "192.168.101.0/24" \ No newline at end of file diff --git a/terracumber_config/tf_files/solution1/env1.tfvars.json b/terracumber_config/tf_files/solution1/env1.tfvars.json deleted file mode 100644 index 0fdbb8acc..000000000 --- a/terracumber_config/tf_files/solution1/env1.tfvars.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "environment_number": "1", - "mac": { - "controller": "aa:b2:92:04:00:00", - "server": "aa:b2:92:04:00:01", - "proxy": "aa:b2:92:04:00:02", - "suse-minion": "aa:b2:92:04:00:04", - "suse-sshminion": "aa:b2:92:04:00:05", - "redhat-minion": "aa:b2:92:04:00:06", - "debian-minion": "aa:b2:92:04:00:07", - "build-host": "aa:b2:92:04:00:09", - "pxeboot-minion": "?", - "kvm-host": "aa:b2:92:04:00:0a", - "nested-vm": "aa:b2:92:04:00:0b" - }, - "hypervisor": "romulus.mgr.prv.suse.net", - "additional_network": "192.168.101.0/24" -} diff --git a/terracumber_config/tf_files/solution2/terraform.tfvars b/terracumber_config/tf_files/solution2/terraform.tfvars new file mode 100644 index 000000000..6101b82b5 --- /dev/null +++ b/terracumber_config/tf_files/solution2/terraform.tfvars @@ -0,0 +1,36 @@ +environment_configuration = { + 1 = { + mac = { + controller = "aa:b2:92:04:00:00" + server = "aa:b2:92:04:00:01" + proxy = "aa:b2:92:04:00:02" + suse-minion = "aa:b2:92:04:00:04" + suse-sshminion = "aa:b2:92:04:00:05" + redhat-minion = "aa:b2:92:04:00:06" + debian-minion = "aa:b2:92:04:00:07" + build-host = "aa:b2:92:04:00:09" + pxeboot-minion = "?" + kvm-host = "aa:b2:92:04:00:0a" + nested-vm = "aa:b2:92:04:00:0b" + } + hypervisor = "romulus.mgr.prv.suse.net" + additional_network = "192.168.101.0/24" + }, + 2 = { + mac = { + controller = "aa:b2:92:04:00:10" + server = "aa:b2:92:04:00:11" + proxy = "aa:b2:92:04:00:12" + suse-minion = "aa:b2:92:04:00:14" + suse-sshminion = "aa:b2:92:04:00:15" + redhat-minion = "aa:b2:92:04:00:16" + debian-minion = "aa:b2:92:04:00:17" + build-host = "aa:b2:92:04:00:19" + pxeboot-minion = "?" + kvm-host = "aa:b2:92:04:00:1a" + nested-vm = "aa:b2:92:04:00:1b" + } + hypervisor = "romulus.mgr.prv.suse.net" + additional_network = "192.168.102.0/24" + } +} \ No newline at end of file diff --git a/terracumber_config/tf_files/solution2/terraform.tfvars.json b/terracumber_config/tf_files/solution2/terraform.tfvars.json deleted file mode 100644 index 44304d56c..000000000 --- a/terracumber_config/tf_files/solution2/terraform.tfvars.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "environment_configuration" : { - "1": { - "mac" : { - "controller": "aa:b2:92:04:00:00", - "server": "aa:b2:92:04:00:01", - "proxy": "aa:b2:92:04:00:02", - "suse-minion": "aa:b2:92:04:00:04", - "suse-sshminion": "aa:b2:92:04:00:05", - "redhat-minion": "aa:b2:92:04:00:06", - "debian-minion": "aa:b2:92:04:00:07", - "build-host": "aa:b2:92:04:00:09", - "pxeboot-minion": "?", - "kvm-host": "aa:b2:92:04:00:0a", - "nested-vm": "aa:b2:92:04:00:0b" - }, - "hypervisor": "romulus.mgr.prv.suse.net", - "additional_network": "192.168.101.0/24" - }, - "2" : { - "mac" : { - "controller": "aa:b2:92:04:00:10", - "server": "aa:b2:92:04:00:11", - "proxy": "aa:b2:92:04:00:12", - "suse-minion": "aa:b2:92:04:00:14", - "suse-sshminion": "aa:b2:92:04:00:15", - "redhat-minion": "aa:b2:92:04:00:16", - "debian-minion": "aa:b2:92:04:00:17", - "build-host": "aa:b2:92:04:00:19", - "pxeboot-minion": "?", - "kvm-host": "aa:b2:92:04:00:1a", - "nested-vm": "aa:b2:92:04:00:1b" - }, - "hypervisor": "romulus.mgr.prv.suse.net", - "additional_network": "192.168.102.0/24" - } - } -} From 068afc93c1e752ee3fdf232d5521028f2271c7d2 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Mon, 19 Jun 2023 13:59:41 +1200 Subject: [PATCH 010/110] Add back space --- terracumber_config/tf_files/solution1/env1.tfvars | 2 +- terracumber_config/tf_files/solution2/terraform.tfvars | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/terracumber_config/tf_files/solution1/env1.tfvars b/terracumber_config/tf_files/solution1/env1.tfvars index 2ca87b96a..6818dbf8e 100644 --- a/terracumber_config/tf_files/solution1/env1.tfvars +++ b/terracumber_config/tf_files/solution1/env1.tfvars @@ -15,4 +15,4 @@ mac = { } hypervisor = "romulus.mgr.prv.suse.net" -additional_network = "192.168.101.0/24" \ No newline at end of file +additional_network = "192.168.101.0/24" diff --git a/terracumber_config/tf_files/solution2/terraform.tfvars b/terracumber_config/tf_files/solution2/terraform.tfvars index 6101b82b5..85b5d32de 100644 --- a/terracumber_config/tf_files/solution2/terraform.tfvars +++ b/terracumber_config/tf_files/solution2/terraform.tfvars @@ -33,4 +33,4 @@ environment_configuration = { hypervisor = "romulus.mgr.prv.suse.net" additional_network = "192.168.102.0/24" } -} \ No newline at end of file +} From 0559f6906c4d7d60c65b1390231cb97b99fee311 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Mon, 19 Jun 2023 14:01:18 +1200 Subject: [PATCH 011/110] Update variable specific to uyuni or spacewalk --- .../tf_files/tfvars/manager43-pr.tfvars | 2 +- .../tf_files/tfvars/uyuni-pr.tfvars | 18 +----------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/terracumber_config/tf_files/tfvars/manager43-pr.tfvars b/terracumber_config/tf_files/tfvars/manager43-pr.tfvars index 5f69e734a..8fa8b5c26 100644 --- a/terracumber_config/tf_files/tfvars/manager43-pr.tfvars +++ b/terracumber_config/tf_files/tfvars/manager43-pr.tfvars @@ -1,4 +1,4 @@ -############ Unique to spacewalk ###########3 +############ Varaibles unique to spacewalk ########### IMAGE="sles15sp4o" GIT_PROFILES_REPO="https://github.com/SUSE/spacewalk.git#:testsuite/features/profiles/internal_prv" diff --git a/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars b/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars index 212b2422e..ac88633df 100644 --- a/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars +++ b/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars @@ -1,4 +1,4 @@ -############ Unique to uyuni ######################## +############ Variable unique to uyuni ######################## IMAGE="opensuse154-ci-pro" GIT_PROFILES_REPO="https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" @@ -11,19 +11,3 @@ CUCUMBER_BRANCH="master" CUCUMBER_GITREPO="https://github.com/uyuni-project/uyuni.git" CUCUMBER_COMMAND="export PRODUCT='Uyuni' && run-testsuite" URL_PREFIX="https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" - -############### GENERIC PART BETWEEN THE TWO PIPELINE ######################## -## This variables are not correctly describe -SLE_CLIENT_REPO=${SLE_CLIENT_REPO} -RHLIKE_CLIENT_REPO=${RHLIKE_CLIENT_REPO} -DEBLIKE_CLIENT_REPO=${DEBLIKE_CLIENT_REPO} -OPENSUSE_CLIENT_REPO=${OPENSUSE_CLIENT_REPO} -PULL_REQUEST_REPO=${PULL_REQUEST_REPO} -MASTER_OTHER_REPO=${MASTER_OTHER_REPO} -MASTER_SUMAFORM_TOOLS_REPO=${MASTER_SUMAFORM_TOOLS_REPO} -TEST_PACKAGES_REPO=${TEST_PACKAGES_REPO} -MASTER_REPO=${MASTER_REPO} -UPDATE_REPO=${UPDATE_REPO} -ADDITIONAL_REPO_URL=${ADDITIONAL_REPO_URL} -CUCUMBER_GITREPO=${cucumber_gitrepo} -CUCUMBER_BRANCH=${cucumber_ref} From 1ea5fe2676a3cea7d2a3384648a6a44d1fdb8c57 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Mon, 19 Jun 2023 14:58:22 +1200 Subject: [PATCH 012/110] Remove obsolete template --- .../tf_files/PR-tests-template.tf | 378 ------------------ 1 file changed, 378 deletions(-) delete mode 100644 terracumber_config/tf_files/PR-tests-template.tf diff --git a/terracumber_config/tf_files/PR-tests-template.tf b/terracumber_config/tf_files/PR-tests-template.tf deleted file mode 100644 index 17e91c087..000000000 --- a/terracumber_config/tf_files/PR-tests-template.tf +++ /dev/null @@ -1,378 +0,0 @@ -// Mandatory variables for terracumber -variable "URL_PREFIX" { - type = string -} - -// Not really used as this is for --runall parameter, and we run cucumber step by step -variable "CUCUMBER_COMMAND" { - type = string -} - -variable "CUCUMBER_GITREPO" { - type = string -} - -variable "CUCUMBER_BRANCH" { - type = string -} - -variable "CUCUMBER_RESULTS" { - type = string - default = "/root/spacewalk/testsuite" -} - -variable "MAIL_SUBJECT" { - type = string -} - -variable "MAIL_TEMPLATE" { - type = string -} - -variable "MAIL_SUBJECT_ENV_FAIL" { - type = string - default = "Failed acceptance tests on Pull Request: Environment setup failed" -} - -variable "MAIL_TEMPLATE_ENV_FAIL" { - type = string -} - -variable "ENVIRONMENT" { - type = string - default = "1" -} - -variable "HYPER" { - type = string - default = "romulus.mgr.prv.suse.net" -} - -variable "MAIL_FROM" { - type = string - default = "galaxy-ci@suse.de" -} - -variable "MAIL_TO" { - type = string - default = "galaxy-ci@suse.de" -} - -// sumaform specific variables -variable "SCC_USER" { - type = string -} - -variable "SCC_PASSWORD" { - type = string -} - -variable "GIT_USER" { - type = string - default = null // Not needed for master, as it is public -} - -variable "GIT_PASSWORD" { - type = string - default = null // Not needed for master, as it is public -} - -// Repository containing the build for the tested Uyuni Pull Request -variable "PULL_REQUEST_REPO" { - type = string -} - -variable "MASTER_REPO" { - type = string -} - -variable "MASTER_OTHER_REPO" { - type = string -} - -variable "MASTER_SUMAFORM_TOOLS_REPO" { - type = string -} - -variable "UPDATE_REPO" { - type = string -} - -variable "ADDITIONAL_REPO_URL" { - type = string -} - -variable "TEST_PACKAGES_REPO" { - type = string -} - -// Repositories containing the client tools RPMs -variable "SLE_CLIENT_REPO" { - type = string -} - -variable "RHLIKE_CLIENT_REPO" { - type = string -} - -variable "DEBLIKE_CLIENT_REPO" { - type = string -} - -variable "OPENSUSE_CLIENT_REPO" { - type = string -} - -variable "IMAGE" { - type = string -} - -variable "GIT_PROFILES_REPO" { - type = string -} - -variable "IMAGES" { - type = list(string) -} - -variable "PRODUCT_VERSION" { - type = list(string) -} - -terraform { - required_version = "1.0.10" - required_providers { - libvirt = { - source = "dmacvicar/libvirt" - version = "0.6.3" - } - } -} - - -provider "libvirt" { - uri = "qemu+tcp://${var.HYPER}/system" -} - -module "cucumber_testsuite" { - source = "./modules/cucumber_testsuite" - - product_version = var.PRODUCT_VERSION - - // Cucumber repository configuration for the controller - git_username = var.GIT_USER - git_password = var.GIT_PASSWORD - git_repo = var.CUCUMBER_GITREPO - branch = var.CUCUMBER_BRANCH - - cc_username = var.SCC_USER - cc_password = var.SCC_PASSWORD - mirror = "minima-mirror.mgr.prv.suse.net" - use_mirror_images = true - - images = var.IMAGES - - use_avahi = false - name_prefix = "suma-pr${var.ENVIRONMENT}-" - domain = "mgr.prv.suse.net" - from_email = "root@suse.de" - - no_auth_registry = "registry.mgr.prv.suse.net" - auth_registry = "registry.mgr.prv.suse.net:5000/cucutest" - auth_registry_username = "cucutest" - auth_registry_password = "cucusecret" - git_profiles_repo = var.GIT_PROFILES_REPO - - server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" - custom_download_endpoint = "ftp://minima-mirror.mgr.prv.suse.net:445" - - # when changing images, please also keep in mind to adjust the image matrix at the end of the README. - host_settings = { - controller = { - provider_settings = { - mac = "aa:b2:92:04:00:00" - } - } - server = { - provider_settings = { - mac = "aa:b2:92:04:00:01" - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - } - image = var.IMAGE - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - server_mounted_mirror = "minima-mirror.mgr.prv.suse.net" - } - proxy = { - provider_settings = { - mac = "aa:b2:92:04:00:02" - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - proxy_pool = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", - tools_update = var.OPENSUSE_CLIENT_REPO - } - image = var.IMAGE - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-minion = { - image = "sles15sp4o" - name = "min-sles15" - provider_settings = { - mac = "aa:b2:92:04:00:04" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-sshminion = { - image = "sles15sp4o" - name = "minssh-sles15" - provider_settings = { - mac = "aa:b2:92:04:00:05" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion", "iptables" ] - install_salt_bundle = true - } - redhat-minion = { - image = "rocky8o" - name = "min-rocky8" - provider_settings = { - mac = "aa:b2:92:04:00:06" - memory = 2048 - vcpu = 2 - } - additional_repos = { - client_repo = var.RHLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - debian-minion = { - image = "ubuntu2204o" - name = "min-ubuntu2204" - provider_settings = { - mac = "aa:b2:92:04:00:07" - } - additional_repos = { - client_repo = var.DEBLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - // FIXME: cloudl-init fails if venv-salt-minion is not avaiable - // We can set "install_salt_bundle = true" as soon as venv-salt-minion is available Uyuni:Stable - install_salt_bundle = false - } - build-host = { - image = "sles15sp4o" - name = "min-build" - provider_settings = { - mac = "aa:b2:92:04:00:09" - memory = 2048 - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - pxeboot-minion = { - image = "sles15sp4o" - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - kvm-host = { - image = var.IMAGE - name = "min-kvm" - additional_grains = { - hvm_disk_image = { - leap = { - hostname = "suma-pr1-min-nested" - image = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" - hash = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" - } - sles = { - hostname = "suma-pr1-min-nested" - image = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" - hash = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" - } - } - } - provider_settings = { - mac = "aa:b2:92:04:00:0a" - } - additional_repos_only = true - additional_repos = { - client_repo = var.OPENSUSE_CLIENT_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - } - nested_vm_host = "suma-pr1-min-nested" - nested_vm_mac = "aa:b2:92:04:00:0b" - provider_settings = { - pool = "ssd" - network_name = null - bridge = "br1" - additional_network = "192.168.101.0/24" - } -} - - -resource "null_resource" "add_test_information" { - triggers = { - always_run = "${timestamp()}" - } - provisioner "file" { - source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" - destination = "/tmp/set_custom_header.sh" - connection { - type = "ssh" - user = "root" - password = "linux" - host = "${module.cucumber_testsuite.configuration.server.hostname}" - } - } -} - - -output "configuration" { - value = module.cucumber_testsuite.configuration -} From 68976d909a52c34da8d8a371c01a03efa6d1f126 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 21 Jun 2023 13:54:33 +1200 Subject: [PATCH 013/110] Add NUE env description --- .../tf_files/tfvars/PR-NUE-ENVS.tfvars | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 terracumber_config/tf_files/tfvars/PR-NUE-ENVS.tfvars diff --git a/terracumber_config/tf_files/tfvars/PR-NUE-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-NUE-ENVS.tfvars new file mode 100644 index 000000000..d4269f481 --- /dev/null +++ b/terracumber_config/tf_files/tfvars/PR-NUE-ENVS.tfvars @@ -0,0 +1,98 @@ +environment_description = { + 1 = { + mac = { + controller = "aa:b2:93:01:03:00" + server = "aa:b2:93:01:03:01" + proxy = "aa:b2:93:01:03:02" + suse-minion = "aa:b2:93:01:03:04" + suse-sshminion = "aa:b2:93:01:03:05" + redhat-minion = "aa:b2:93:01:03:06" + debian-minion = "aa:b2:93:01:03:07" + build-host = "aa:b2:93:01:03:09" + kvm-host = "aa:b2:93:01:03:0a" + nested-vm = "aa:b2:93:01:03:0b" + } + hypervisor = "suma-05.mgr.suse.de" + additional_network = "192.168.111.0/24" + }, + 2 = { + mac = { + controller = "aa:b2:93:01:03:10" + server = "aa:b2:93:01:03:11" + proxy = "aa:b2:93:01:03:12" + suse-minion = "aa:b2:93:01:03:14" + suse-sshminion = "aa:b2:93:01:03:15" + redhat-minion = "aa:b2:93:01:03:16" + debian-minion = "aa:b2:93:01:03:17" + build-host = "aa:b2:93:01:03:19" + kvm-host = "aa:b2:93:01:03:1a" + nested-vm = "aa:b2:93:01:03:1b" + } + hypervisor = "suma-05.mgr.suse.de" + additional_network = "192.168.112.0/24" + }, + 3 = { + mac = { + controller = "aa:b2:93:01:03:20" + server = "aa:b2:93:01:03:21" + proxy = "aa:b2:93:01:03:22" + suse-minion = "aa:b2:93:01:03:24" + suse-sshminion = "aa:b2:93:01:03:25" + redhat-minion = "aa:b2:93:01:03:26" + debian-minion = "aa:b2:93:01:03:27" + build-host = "aa:b2:93:01:03:29" + kvm-host = "aa:b2:93:01:03:2a" + nested-vm = "aa:b2:93:01:03:2b" + } + hypervisor = "suma-05.mgr.suse.de" + additional_network = "192.168.113.0/24" + }, + 4 = { + mac = { + controller = "aa:b2:93:01:03:30" + server = "aa:b2:93:01:03:31" + proxy = "aa:b2:93:01:03:32" + suse-minion = "aa:b2:93:01:03:34" + suse-sshminion = "aa:b2:93:01:03:35" + redhat-minion = "aa:b2:93:01:03:36" + debian-minion = "aa:b2:93:01:03:37" + build-host = "aa:b2:93:01:03:39" + kvm-host = "aa:b2:93:01:03:3a" + nested-vm = "aa:b2:93:01:03:3b" + } + hypervisor = "suma-05.mgr.suse.de" + additional_network = "192.168.114.0/24" + }, + 5 = { + mac = { + controller = "aa:b2:93:01:03:40" + server = "aa:b2:93:01:03:41" + proxy = "aa:b2:93:01:03:42" + suse-minion = "aa:b2:93:01:03:44" + suse-sshminion = "aa:b2:93:01:03:45" + redhat-minion = "aa:b2:93:01:03:46" + debian-minion = "aa:b2:93:01:03:47" + build-host = "aa:b2:93:01:03:49" + kvm-host = "aa:b2:93:01:03:4a" + nested-vm = "aa:b2:93:01:03:4b" + } + hypervisor = "suma-05.mgr.suse.de" + additional_network = "192.168.115.0/24" + }, + 6 = { + mac = { + controller = "aa:b2:93:01:03:50" + server = "aa:b2:93:01:03:51" + proxy = "aa:b2:93:01:03:52" + suse-minion = "aa:b2:93:01:03:54" + suse-sshminion = "aa:b2:93:01:03:55" + redhat-minion = "aa:b2:93:01:03:56" + debian-minion = "aa:b2:93:01:03:57" + build-host = "aa:b2:93:01:03:59" + kvm-host = "aa:b2:93:01:03:5a" + nested-vm = "aa:b2:93:01:03:5b" + } + hypervisor = "suma-05.mgr.suse.de" + additional_network = "192.168.116.0/24" + } +} From debc48722f8221d6b88b8a9b5aaf313ff63d5f2f Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 21 Jun 2023 13:56:47 +1200 Subject: [PATCH 014/110] update uyuni tfvars --- .../tf_files/tfvars/uyuni-pr.tfvars | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars b/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars index ac88633df..1bc3b8226 100644 --- a/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars +++ b/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars @@ -1,13 +1,16 @@ ############ Variable unique to uyuni ######################## -IMAGE="opensuse154-ci-pro" -GIT_PROFILES_REPO="https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" -IMAGES=["rocky8o", "opensuse154o", "opensuse154-ci-pro", "sles15sp4o", "ubuntu2204o"] -PRODUCT_VERSION="uyuni-pr" -MAIL_TEMPLATE_ENV_FAIL="../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" -MAIL_TEMPLATE="../mail_templates/mail-template-jenkins-pull-request.txt" -MAIL_SUBJECT="$status acceptance tests on Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" -CUCUMBER_BRANCH="master" -CUCUMBER_GITREPO="https://github.com/uyuni-project/uyuni.git" -CUCUMBER_COMMAND="export PRODUCT='Uyuni' && run-testsuite" -URL_PREFIX="https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" +IMAGE = "opensuse154-ci-pro" +GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" +IMAGES = ["rocky8o", "opensuse154o", "opensuse154-ci-pro", "sles15sp4o", "ubuntu2204o"] +PRODUCT_VERSION = "uyuni-pr" +MAIL_TEMPLATE_ENV_FAIL = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" +MAIL_TEMPLATE = "../mail_templates/mail-template-jenkins-pull-request.txt" +MAIL_SUBJECT = "$status acceptance tests on Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" +CUCUMBER_BRANCH = "master" +CUCUMBER_GITREPO = "https://github.com/uyuni-project/uyuni.git" +CUCUMBER_COMMAND = "export PRODUCT='Uyuni' && run-testsuite" +URL_PREFIX = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" +MIRROR = "minima-mirror.mgr.prv.suse.net" +USE_MIRROR = true +DOMAIN = "mgr.prv.suse.net" From bba7d7ea0323c9fadbf4ab5b4219560894ff7678 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 21 Jun 2023 14:17:22 +1200 Subject: [PATCH 015/110] Add provo env variables --- .../tf_files/tfvars/PR-PRV-ENVS.tfvars | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 terracumber_config/tf_files/tfvars/PR-PRV-ENVS.tfvars diff --git a/terracumber_config/tf_files/tfvars/PR-PRV-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-PRV-ENVS.tfvars new file mode 100644 index 000000000..17009a4bc --- /dev/null +++ b/terracumber_config/tf_files/tfvars/PR-PRV-ENVS.tfvars @@ -0,0 +1,164 @@ +MIRROR = "minima-mirror.mgr.prv.suse.net" +DOMAIN = "mgr.prv.suse.net" +environment_description = { + 1 = { + mac = { + controller = "aa:b2:92:04:00:00" + server = "aa:b2:92:04:00:01" + proxy = "aa:b2:92:04:00:02" + suse-minion = "aa:b2:92:04:00:04" + suse-sshminion = "aa:b2:92:04:00:05" + redhat-minion = "aa:b2:92:04:00:06" + debian-minion = "aa:b2:92:04:00:07" + build-host = "aa:b2:92:04:00:09" + kvm-host = "aa:b2:92:04:00:0a" + nested-vm = "aa:b2:92:04:00:0b" + } + hypervisor = "romulus.mgr.prv.suse.net" + additional_network = "192.168.101.0/24" + }, + 2 = { + mac = { + controller = "aa:b2:92:04:00:10" + server = "aa:b2:92:04:00:11" + proxy = "aa:b2:92:04:00:12" + suse-minion = "aa:b2:92:04:00:14" + suse-sshminion = "aa:b2:92:04:00:15" + redhat-minion = "aa:b2:92:04:00:16" + debian-minion = "aa:b2:92:04:00:17" + build-host = "aa:b2:92:04:00:19" + kvm-host = "aa:b2:92:04:00:1a" + nested-vm = "aa:b2:92:04:00:1b" + } + hypervisor = "romulus.mgr.prv.suse.net" + additional_network = "192.168.102.0/24" + }, + 3 = { + mac = { + controller = "aa:b2:92:04:00:20" + server = "aa:b2:92:04:00:21" + proxy = "aa:b2:92:04:00:22" + suse-minion = "aa:b2:92:04:00:24" + suse-sshminion = "aa:b2:92:04:00:25" + redhat-minion = "aa:b2:92:04:00:26" + debian-minion = "aa:b2:92:04:00:27" + build-host = "aa:b2:92:04:00:29" + kvm-host = "aa:b2:92:04:00:2a" + nested-vm = "aa:b2:92:04:00:2b" + } + hypervisor = "vulcan.mgr.prv.suse.net" + additional_network = "192.168.103.0/24" + }, + 4 = { + mac = { + controller = "aa:b2:92:04:00:30" + server = "aa:b2:92:04:00:31" + proxy = "aa:b2:92:04:00:32" + suse-minion = "aa:b2:92:04:00:34" + suse-sshminion = "aa:b2:92:04:00:35" + redhat-minion = "aa:b2:92:04:00:36" + debian-minion = "aa:b2:92:04:00:37" + build-host = "aa:b2:92:04:00:39" + kvm-host = "aa:b2:92:04:00:3a" + nested-vm = "aa:b2:92:04:00:3b" + } + hypervisor = "vulcan.mgr.prv.suse.net" + additional_network = "192.168.104.0/24" + }, + 5 = { + mac = { + controller = "aa:b2:92:04:00:40" + server = "aa:b2:92:04:00:41" + proxy = "aa:b2:92:04:00:42" + suse-minion = "aa:b2:92:04:00:44" + suse-sshminion = "aa:b2:92:04:00:45" + redhat-minion = "aa:b2:92:04:00:46" + debian-minion = "aa:b2:92:04:00:47" + build-host = "aa:b2:92:04:00:49" + kvm-host = "aa:b2:92:04:00:4a" + nested-vm = "aa:b2:92:04:00:4b" + } + hypervisor = "hyperion.mgr.prv.suse.net" + additional_network = "192.168.105.0/24" + }, + 6 = { + mac = { + controller = "aa:b2:92:04:00:50" + server = "aa:b2:92:04:00:51" + proxy = "aa:b2:92:04:00:52" + suse-minion = "aa:b2:92:04:00:54" + suse-sshminion = "aa:b2:92:04:00:55" + redhat-minion = "aa:b2:92:04:00:56" + debian-minion = "aa:b2:92:04:00:57" + build-host = "aa:b2:92:04:00:59" + kvm-host = "aa:b2:92:04:00:5a" + nested-vm = "aa:b2:92:04:00:5b" + } + hypervisor = "hyperion.mgr.prv.suse.net" + additional_network = "192.168.106.0/24" + }, + 7 = { + mac = { + controller = "aa:b2:92:04:00:60" + server = "aa:b2:92:04:00:61" + proxy = "aa:b2:92:04:00:62" + suse-minion = "aa:b2:92:04:00:64" + suse-sshminion = "aa:b2:92:04:00:65" + redhat-minion = "aa:b2:92:04:00:66" + debian-minion = "aa:b2:92:04:00:67" + build-host = "aa:b2:92:04:00:69" + kvm-host = "aa:b2:92:04:00:6a" + nested-vm = "aa:b2:92:04:00:6b" + } + hypervisor = "daiquiri.mgr.prv.suse.net" + additional_network = "192.168.107.0/24" + }, + 8 = { + mac = { + controller = "aa:b2:92:04:00:70" + server = "aa:b2:92:04:00:71" + proxy = "aa:b2:92:04:00:72" + suse-minion = "aa:b2:92:04:00:74" + suse-sshminion = "aa:b2:92:04:00:75" + redhat-minion = "aa:b2:92:04:00:76" + debian-minion = "aa:b2:92:04:00:77" + build-host = "aa:b2:92:04:00:79" + kvm-host = "aa:b2:92:04:00:7a" + nested-vm = "aa:b2:92:04:00:7b" + } + hypervisor = "daiquiri.mgr.prv.suse.net" + additional_network = "192.168.108.0/24" + }, + 9 = { + mac = { + controller = "aa:b2:92:04:00:80" + server = "aa:b2:92:04:00:81" + proxy = "aa:b2:92:04:00:82" + suse-minion = "aa:b2:92:04:00:84" + suse-sshminion = "aa:b2:92:04:00:85" + redhat-minion = "aa:b2:92:04:00:86" + debian-minion = "aa:b2:92:04:00:87" + build-host = "aa:b2:92:04:00:89" + kvm-host = "aa:b2:92:04:00:8a" + nested-vm = "aa:b2:92:04:00:8b" + } + hypervisor = "mojito.mgr.prv.suse.net" + additional_network = "192.168.109.0/24" + }, + 10 = { + mac = { + controller = "aa:b2:92:04:00:90" + server = "aa:b2:92:04:00:91" + proxy = "aa:b2:92:04:00:92" + suse-minion = "aa:b2:92:04:00:94" + suse-sshminion = "aa:b2:92:04:00:95" + redhat-minion = "aa:b2:92:04:00:96" + debian-minion = "aa:b2:92:04:00:97" + build-host = "aa:b2:92:04:00:99" + kvm-host = "aa:b2:92:04:00:9a" + nested-vm = "aa:b2:92:04:00:9b" + } + hypervisor = "mojito.mgr.prv.suse.net" + additional_network = "192.168.110.0/24" + } +} From fc3dd239be8e69298e55a3863425a04e102bae42 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 21 Jun 2023 14:17:47 +1200 Subject: [PATCH 016/110] move mirror and domain at the file top --- terracumber_config/tf_files/tfvars/PR-NUE-ENVS.tfvars | 2 ++ 1 file changed, 2 insertions(+) diff --git a/terracumber_config/tf_files/tfvars/PR-NUE-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-NUE-ENVS.tfvars index d4269f481..4f76c293f 100644 --- a/terracumber_config/tf_files/tfvars/PR-NUE-ENVS.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-NUE-ENVS.tfvars @@ -1,3 +1,5 @@ +MIRROR = "minima-mirror.mgr.suse.de" +DOMAIN = "mgr.suse.de" environment_description = { 1 = { mac = { From f5d5e2bdb1804a2916109b67120088bec2e842c3 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 21 Jun 2023 14:18:36 +1200 Subject: [PATCH 017/110] Remove mirror and domain from product tfvars --- terracumber_config/tf_files/tfvars/uyuni-pr.tfvars | 2 -- 1 file changed, 2 deletions(-) diff --git a/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars b/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars index 1bc3b8226..5caca41c7 100644 --- a/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars +++ b/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars @@ -11,6 +11,4 @@ CUCUMBER_BRANCH = "master" CUCUMBER_GITREPO = "https://github.com/uyuni-project/uyuni.git" CUCUMBER_COMMAND = "export PRODUCT='Uyuni' && run-testsuite" URL_PREFIX = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" -MIRROR = "minima-mirror.mgr.prv.suse.net" USE_MIRROR = true -DOMAIN = "mgr.prv.suse.net" From 0865e4c31a6f688438ba7f00ee75abbb6e52b7cd Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 21 Jun 2023 14:18:55 +1200 Subject: [PATCH 018/110] Update manager 4.3 tfvars --- .../tf_files/tfvars/manager43-pr.tfvars | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/terracumber_config/tf_files/tfvars/manager43-pr.tfvars b/terracumber_config/tf_files/tfvars/manager43-pr.tfvars index 8fa8b5c26..609dd9dd0 100644 --- a/terracumber_config/tf_files/tfvars/manager43-pr.tfvars +++ b/terracumber_config/tf_files/tfvars/manager43-pr.tfvars @@ -1,13 +1,14 @@ ############ Varaibles unique to spacewalk ########### -IMAGE="sles15sp4o" -GIT_PROFILES_REPO="https://github.com/SUSE/spacewalk.git#:testsuite/features/profiles/internal_prv" -IMAGES=["rocky8o", "opensuse154o", "sles15sp4o", "ubuntu2204o"] -PRODUCT_VERSION="4.3-nightly" -MAIL_TEMPLATE_ENV_FAIL="../mail_templates/mail-template-jenkins-suma43-pull-request-env-fail.txt" -MAIL_TEMPLATE="../mail_templates/mail-template-jenkins-suma43-pull-request.txt" -MAIL_SUBJECT="$status acceptance tests on SUMA 4.3 Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" -CUCUMBER_BRANCH="Manager-4.3" -CUCUMBER_GITREPO="https://github.com/SUSE/spacewalk/spacewalk.git" -CUCUMBER_COMMAND="export PRODUCT='SUSE-Manager' && run-testsuite" -URL_PREFIX="https://ci.suse.de/view/Manager/view/Uyuni/job/suma43-prs-ci-tests" +IMAGE = "sles15sp4o" +GIT_PROFILES_REPO = "https://github.com/SUSE/spacewalk.git#:testsuite/features/profiles/internal_prv" +IMAGES = ["rocky8o", "opensuse154o", "sles15sp4o", "ubuntu2204o"] +PRODUCT_VERSION = "4.3-nightly" +MAIL_TEMPLATE_ENV_FAIL = "../mail_templates/mail-template-jenkins-suma43-pull-request-env-fail.txt" +MAIL_TEMPLATE = "../mail_templates/mail-template-jenkins-suma43-pull-request.txt" +MAIL_SUBJECT = "$status acceptance tests on SUMA 4.3 Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" +CUCUMBER_BRANCH = "Manager-4.3" +CUCUMBER_GITREPO = "https://github.com/SUSE/spacewalk/spacewalk.git" +CUCUMBER_COMMAND = "export PRODUCT='SUSE-Manager' && run-testsuite" +URL_PREFIX = "https://ci.suse.de/view/Manager/view/Uyuni/job/suma43-prs-ci-tests" +USE_MIRROR = true From 3bffb283e6f198cdad55141db9d490549c2d2cce Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 21 Jun 2023 14:19:19 +1200 Subject: [PATCH 019/110] Add general main.tf for PR testing --- terracumber_config/tf_files/PR-tests.tf | 237 ++++++++++++++++++++++++ 1 file changed, 237 insertions(+) create mode 100644 terracumber_config/tf_files/PR-tests.tf diff --git a/terracumber_config/tf_files/PR-tests.tf b/terracumber_config/tf_files/PR-tests.tf new file mode 100644 index 000000000..42336fe10 --- /dev/null +++ b/terracumber_config/tf_files/PR-tests.tf @@ -0,0 +1,237 @@ +terraform { + required_version = "1.0.10" + required_providers { + libvirt = { + source = "dmacvicar/libvirt" + version = "0.6.3" + } + } +} + + +provider "libvirt" { + uri = "qemu+tcp://${var.environment_configuration[var.ENVIRONMENT].hypervisor}/system" +} + +module "cucumber_testsuite" { + source = "./modules/cucumber_testsuite" + + product_version = var.PRODUCT_VERSION + + // Cucumber repository configuration for the controller + git_username = var.GIT_USER + git_password = var.GIT_PASSWORD + git_repo = var.CUCUMBER_GITREPO + branch = var.CUCUMBER_BRANCH + + cc_username = var.SCC_USER + cc_password = var.SCC_PASSWORD + mirror = var.MIRROR + use_mirror_images = var.USE_MIRROR + + images = var.IMAGES + + use_avahi = false + name_prefix = "suma-pr${var.ENVIRONMENT}-" + domain = var.DOMAIN + from_email = "root@suse.de" + + no_auth_registry = "registry.${var.DOMAIN}" + auth_registry = "registry.${var.DOMAIN}:5000/cucutest" + auth_registry_username = "cucutest" + auth_registry_password = "cucusecret" + git_profiles_repo = var.GIT_PROFILES_REPO + + server_http_proxy = "http-proxy.${var.DOMAIN}:3128" + custom_download_endpoint = "ftp://${var.MIRROR}:445" + + # when changing images, please also keep in mind to adjust the image matrix at the end of the README. + host_settings = { + controller = { + provider_settings = { + mac = var.environment_configuration[var.ENVIRONMENT].mac["controller"] + } + } + server = { + provider_settings = { + mac = var.environment_configuration[var.ENVIRONMENT].mac["server"] + } + additional_repos_only = true + additional_repos = { + pull_request_repo = var.PULL_REQUEST_REPO, + master_repo = var.MASTER_REPO, + master_repo_other = var.MASTER_OTHER_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + testing_overlay_devel = "http://${var.MIRROR}/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", + } + image = var.IMAGE + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + server_mounted_mirror = var.MIRROR + } + proxy = { + provider_settings = { + mac = var.environment_configuration[var.ENVIRONMENT].mac["proxy"] + } + additional_repos_only = true + additional_repos = { + pull_request_repo = var.PULL_REQUEST_REPO, + master_repo = var.MASTER_REPO, + master_repo_other = var.MASTER_OTHER_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + testing_overlay_devel = "http://${var.MIRROR}/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", + proxy_pool = "http://${var.MIRROR}/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", + tools_update = var.OPENSUSE_CLIENT_REPO + } + image = var.IMAGE + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + suse-minion = { + image = "sles15sp4o" + name = "min-sles15" + provider_settings = { + mac = var.environment_configuration[var.ENVIRONMENT].mac["suse-minion"] + } + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + suse-sshminion = { + image = "sles15sp4o" + name = "minssh-sles15" + provider_settings = { + mac = var.environment_configuration[var.ENVIRONMENT].mac["suse-sshminion"] + } + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion", "iptables" ] + install_salt_bundle = true + } + redhat-minion = { + image = "rocky8o" + name = "min-rocky8" + provider_settings = { + mac = var.environment_configuration[var.ENVIRONMENT].mac["redhat-minion"] + memory = 2048 + vcpu = 2 + } + additional_repos = { + client_repo = var.RHLIKE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + debian-minion = { + image = "ubuntu2204o" + name = "min-ubuntu2204" + provider_settings = { + mac = var.environment_configuration[var.ENVIRONMENT].mac["debian-minion"] + } + additional_repos = { + client_repo = var.DEBLIKE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + // FIXME: cloudl-init fails if venv-salt-minion is not avaiable + // We can set "install_salt_bundle = true" as soon as venv-salt-minion is available Uyuni:Stable + install_salt_bundle = false + } + build-host = { + image = "sles15sp4o" + name = "min-build" + provider_settings = { + mac = var.environment_configuration[var.ENVIRONMENT].mac["build-host"] + memory = 2048 + } + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + pxeboot-minion = { + image = "sles15sp4o" + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + kvm-host = { + image = var.IMAGE + name = "min-kvm" + additional_grains = { + hvm_disk_image = { + leap = { + hostname = "suma-pr${var.ENVIRONMENT}-min-nested" + image = "http://${var.MIRROR}/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" + hash = "http://${var.MIRROR}/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" + } + sles = { + hostname = "suma-pr${var.ENVIRONMENT}-min-nested" + image = "http://${var.MIRROR}/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" + hash = "http://${var.MIRROR}/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" + } + } + } + provider_settings = { + mac = var.environment_configuration[var.ENVIRONMENT].mac["kvm-host"] + } + additional_repos_only = true + additional_repos = { + client_repo = var.OPENSUSE_CLIENT_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + } + nested_vm_host = "suma-pr${var.ENVIRONMENT}-min-nested" + nested_vm_mac = var.environment_configuration[var.ENVIRONMENT].mac["nested-vm"] + provider_settings = { + pool = "ssd" + network_name = null + bridge = "br1" + additional_network = var.environment_configuration[var.ENVIRONMENT].additional_network + } +} + + +resource "null_resource" "add_test_information" { + triggers = { + always_run = "${timestamp()}" + } + provisioner "file" { + source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" + destination = "/tmp/set_custom_header.sh" + connection { + type = "ssh" + user = "root" + password = "linux" + host = "${module.cucumber_testsuite.configuration.server.hostname}" + } + } +} + + +output "configuration" { + value = module.cucumber_testsuite.configuration +} From 33b913ef724f7de04417b24a3b5adfd98c6c7e97 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 21 Jun 2023 14:22:18 +1200 Subject: [PATCH 020/110] Add variable file for PR testing --- .../tf_files/variables/PR-TEST-variable.tf | 157 ++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 terracumber_config/tf_files/variables/PR-TEST-variable.tf diff --git a/terracumber_config/tf_files/variables/PR-TEST-variable.tf b/terracumber_config/tf_files/variables/PR-TEST-variable.tf new file mode 100644 index 000000000..7148290e2 --- /dev/null +++ b/terracumber_config/tf_files/variables/PR-TEST-variable.tf @@ -0,0 +1,157 @@ +// Mandatory variables for terracumber +variable "URL_PREFIX" { + type = string +} + +// Not really used as this is for --runall parameter, and we run cucumber step by step +variable "CUCUMBER_COMMAND" { + type = string +} + +variable "CUCUMBER_GITREPO" { + type = string +} + +variable "CUCUMBER_BRANCH" { + type = string +} + +variable "CUCUMBER_RESULTS" { + type = string + default = "/root/spacewalk/testsuite" +} + +variable "MAIL_SUBJECT" { + type = string +} + +variable "MAIL_TEMPLATE" { + type = string +} + +variable "MAIL_SUBJECT_ENV_FAIL" { + type = string + default = "Failed acceptance tests on Pull Request: Environment setup failed" +} + +variable "MAIL_TEMPLATE_ENV_FAIL" { + type = string +} + +variable "ENVIRONMENT" { + type = string +} + +variable "HYPER" { + type = string +} + +variable "MAIL_FROM" { + type = string + default = "galaxy-ci@suse.de" +} + +variable "MAIL_TO" { + type = string + default = "galaxy-ci@suse.de" +} + +// sumaform specific variables +variable "SCC_USER" { + type = string +} + +variable "SCC_PASSWORD" { + type = string +} + +variable "GIT_USER" { + type = string + default = null // Not needed for master, as it is public +} + +variable "GIT_PASSWORD" { + type = string + default = null // Not needed for master, as it is public +} + +// Repository containing the build for the tested Uyuni Pull Request +variable "PULL_REQUEST_REPO" { + type = string +} + +variable "MASTER_REPO" { + type = string +} + +variable "MASTER_OTHER_REPO" { + type = string +} + +variable "MASTER_SUMAFORM_TOOLS_REPO" { + type = string +} + +variable "UPDATE_REPO" { + type = string +} + +variable "ADDITIONAL_REPO_URL" { + type = string +} + +variable "TEST_PACKAGES_REPO" { + type = string +} + +// Repositories containing the client tools RPMs +variable "SLE_CLIENT_REPO" { + type = string +} + +variable "RHLIKE_CLIENT_REPO" { + type = string +} + +variable "DEBLIKE_CLIENT_REPO" { + type = string +} + +variable "OPENSUSE_CLIENT_REPO" { + type = string +} + +variable "IMAGE" { + type = string +} + +variable "GIT_PROFILES_REPO" { + type = string +} + +variable "IMAGES" { + type = list(string) +} + +variable "PRODUCT_VERSION" { + type = list(string) +} + +variable "MIRROR" { + type = string +} + +variable "USE_MIRROR" { + type = boolean +} + +variable "DOMAIN" { + type = string +} + +### Related to environent solution 2 #### + +variable "environment_configuration" { + type = map(string) + description = "Collection of value containing : mac addresses, hypervisor and additional network" +} From 81c9dbe80723b653aaaa5e3a0ec9ef815c9c2a80 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 21 Jun 2023 14:22:53 +1200 Subject: [PATCH 021/110] Update all files use for PR testing with PR-TEST prefix --- terracumber_config/tf_files/{PR-tests.tf => PR-TEST-main.tf} | 0 .../tfvars/{PR-NUE-ENVS.tfvars => PR-TEST-NUE-ENVS.tfvars} | 0 .../tfvars/{PR-PRV-ENVS.tfvars => PR-TEST-PRV-ENVS.tfvars} | 0 .../tfvars/{manager43-pr.tfvars => PR-TEST-manager43.tfvars} | 0 .../tf_files/tfvars/{uyuni-pr.tfvars => PR-TEST-uyuni-pr.tfvars} | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename terracumber_config/tf_files/{PR-tests.tf => PR-TEST-main.tf} (100%) rename terracumber_config/tf_files/tfvars/{PR-NUE-ENVS.tfvars => PR-TEST-NUE-ENVS.tfvars} (100%) rename terracumber_config/tf_files/tfvars/{PR-PRV-ENVS.tfvars => PR-TEST-PRV-ENVS.tfvars} (100%) rename terracumber_config/tf_files/tfvars/{manager43-pr.tfvars => PR-TEST-manager43.tfvars} (100%) rename terracumber_config/tf_files/tfvars/{uyuni-pr.tfvars => PR-TEST-uyuni-pr.tfvars} (100%) diff --git a/terracumber_config/tf_files/PR-tests.tf b/terracumber_config/tf_files/PR-TEST-main.tf similarity index 100% rename from terracumber_config/tf_files/PR-tests.tf rename to terracumber_config/tf_files/PR-TEST-main.tf diff --git a/terracumber_config/tf_files/tfvars/PR-NUE-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars similarity index 100% rename from terracumber_config/tf_files/tfvars/PR-NUE-ENVS.tfvars rename to terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars diff --git a/terracumber_config/tf_files/tfvars/PR-PRV-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars similarity index 100% rename from terracumber_config/tf_files/tfvars/PR-PRV-ENVS.tfvars rename to terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars diff --git a/terracumber_config/tf_files/tfvars/manager43-pr.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars similarity index 100% rename from terracumber_config/tf_files/tfvars/manager43-pr.tfvars rename to terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars diff --git a/terracumber_config/tf_files/tfvars/uyuni-pr.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni-pr.tfvars similarity index 100% rename from terracumber_config/tf_files/tfvars/uyuni-pr.tfvars rename to terracumber_config/tf_files/tfvars/PR-TEST-uyuni-pr.tfvars From 4d879a15d0eaefee4d42e99aff23f5b1a754a8ab Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 21 Jun 2023 14:23:39 +1200 Subject: [PATCH 022/110] Delete solution example --- .../solution1/PR-tests-template-solution-1.tf | 237 ------------------ .../tf_files/solution1/env1.tfvars | 18 -- .../tf_files/solution1/env2.tfvars.json | 18 -- .../tf_files/solution1/variable.tf | 160 ------------ .../solution2/PR-tests-template-solution-2.tf | 237 ------------------ .../tf_files/solution2/terraform.tfvars | 36 --- .../tf_files/solution2/variable.tf | 145 ----------- 7 files changed, 851 deletions(-) delete mode 100644 terracumber_config/tf_files/solution1/PR-tests-template-solution-1.tf delete mode 100644 terracumber_config/tf_files/solution1/env1.tfvars delete mode 100644 terracumber_config/tf_files/solution1/env2.tfvars.json delete mode 100644 terracumber_config/tf_files/solution1/variable.tf delete mode 100644 terracumber_config/tf_files/solution2/PR-tests-template-solution-2.tf delete mode 100644 terracumber_config/tf_files/solution2/terraform.tfvars delete mode 100644 terracumber_config/tf_files/solution2/variable.tf diff --git a/terracumber_config/tf_files/solution1/PR-tests-template-solution-1.tf b/terracumber_config/tf_files/solution1/PR-tests-template-solution-1.tf deleted file mode 100644 index 0be8df31f..000000000 --- a/terracumber_config/tf_files/solution1/PR-tests-template-solution-1.tf +++ /dev/null @@ -1,237 +0,0 @@ -terraform { - required_version = "1.0.10" - required_providers { - libvirt = { - source = "dmacvicar/libvirt" - version = "0.6.3" - } - } -} - - -provider "libvirt" { - uri = "qemu+tcp://${var.hypervisor}/system" -} - -module "cucumber_testsuite" { - source = "./modules/cucumber_testsuite" - - product_version = var.PRODUCT_VERSION - - // Cucumber repository configuration for the controller - git_username = var.GIT_USER - git_password = var.GIT_PASSWORD - git_repo = var.CUCUMBER_GITREPO - branch = var.CUCUMBER_BRANCH - - cc_username = var.SCC_USER - cc_password = var.SCC_PASSWORD - mirror = "minima-mirror.mgr.prv.suse.net" - use_mirror_images = true - - images = var.IMAGES - - use_avahi = false - name_prefix = "suma-pr${var.environment_number}-" - domain = "mgr.prv.suse.net" - from_email = "root@suse.de" - - no_auth_registry = "registry.mgr.prv.suse.net" - auth_registry = "registry.mgr.prv.suse.net:5000/cucutest" - auth_registry_username = "cucutest" - auth_registry_password = "cucusecret" - git_profiles_repo = var.GIT_PROFILES_REPO - - server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" - custom_download_endpoint = "ftp://minima-mirror.mgr.prv.suse.net:445" - - # when changing images, please also keep in mind to adjust the image matrix at the end of the README. - host_settings = { - controller = { - provider_settings = { - mac = var.mac["controller"] - } - } - server = { - provider_settings = { - mac = var.mac["server"] - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - } - image = var.IMAGE - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - server_mounted_mirror = "minima-mirror.mgr.prv.suse.net" - } - proxy = { - provider_settings = { - mac = var.mac["proxy"] - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - proxy_pool = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", - tools_update = var.OPENSUSE_CLIENT_REPO - } - image = var.IMAGE - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-minion = { - image = "sles15sp4o" - name = "min-sles15" - provider_settings = { - mac = var.mac["suse-minion"] - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-sshminion = { - image = "sles15sp4o" - name = "minssh-sles15" - provider_settings = { - mac = var.mac["suse-sshminion"] - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion", "iptables" ] - install_salt_bundle = true - } - redhat-minion = { - image = "rocky8o" - name = "min-rocky8" - provider_settings = { - mac = var.mac["redhat-minion"] - memory = 2048 - vcpu = 2 - } - additional_repos = { - client_repo = var.RHLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - debian-minion = { - image = "ubuntu2204o" - name = "min-ubuntu2204" - provider_settings = { - mac = var.mac["debian-minion"] - } - additional_repos = { - client_repo = var.DEBLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - // FIXME: cloudl-init fails if venv-salt-minion is not avaiable - // We can set "install_salt_bundle = true" as soon as venv-salt-minion is available Uyuni:Stable - install_salt_bundle = false - } - build-host = { - image = "sles15sp4o" - name = "min-build" - provider_settings = { - mac = var.mac["build-host"] - memory = 2048 - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - pxeboot-minion = { - image = "sles15sp4o" - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - kvm-host = { - image = var.IMAGE - name = "min-kvm" - additional_grains = { - hvm_disk_image = { - leap = { - hostname = "suma-pr${var.environment_number}-min-nested" - image = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" - hash = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" - } - sles = { - hostname = "suma-pr${var.environment_number}-min-nested" - image = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" - hash = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" - } - } - } - provider_settings = { - mac = var.mac["kvm-host"] - } - additional_repos_only = true - additional_repos = { - client_repo = var.OPENSUSE_CLIENT_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - } - nested_vm_host = "suma-pr${var.environment_number}-min-nested" - nested_vm_mac = var.mac["nested-vm"] - provider_settings = { - pool = "ssd" - network_name = null - bridge = "br1" - additional_network = var.additional_network - } -} - - -resource "null_resource" "add_test_information" { - triggers = { - always_run = "${timestamp()}" - } - provisioner "file" { - source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" - destination = "/tmp/set_custom_header.sh" - connection { - type = "ssh" - user = "root" - password = "linux" - host = "${module.cucumber_testsuite.configuration.server.hostname}" - } - } -} - - -output "configuration" { - value = module.cucumber_testsuite.configuration -} diff --git a/terracumber_config/tf_files/solution1/env1.tfvars b/terracumber_config/tf_files/solution1/env1.tfvars deleted file mode 100644 index 6818dbf8e..000000000 --- a/terracumber_config/tf_files/solution1/env1.tfvars +++ /dev/null @@ -1,18 +0,0 @@ -environment_number = "1" - -mac = { - controller = "aa:b2:92:04:00:00" - server = "aa:b2:92:04:00:01" - proxy = "aa:b2:92:04:00:02" - suse-minion = "aa:b2:92:04:00:04" - suse-sshminion = "aa:b2:92:04:00:05" - redhat-minion = "aa:b2:92:04:00:06" - debian-minion = "aa:b2:92:04:00:07" - build-host = "aa:b2:92:04:00:09" - pxeboot-minion = "?" - kvm-host = "aa:b2:92:04:00:0a" - nested-vm = "aa:b2:92:04:00:0b" -} - -hypervisor = "romulus.mgr.prv.suse.net" -additional_network = "192.168.101.0/24" diff --git a/terracumber_config/tf_files/solution1/env2.tfvars.json b/terracumber_config/tf_files/solution1/env2.tfvars.json deleted file mode 100644 index 10007d803..000000000 --- a/terracumber_config/tf_files/solution1/env2.tfvars.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "environment_number": "2", - "mac": { - "controller": "aa:b2:92:04:00:10", - "server": "aa:b2:92:04:00:11", - "proxy": "aa:b2:92:04:00:12", - "suse-minion": "aa:b2:92:04:00:14", - "suse-sshminion": "aa:b2:92:04:00:15", - "redhat-minion": "aa:b2:92:04:00:16", - "debian-minion": "aa:b2:92:04:00:17", - "build-host": "aa:b2:92:04:00:19", - "pxeboot-minion": "?", - "kvm-host": "aa:b2:92:04:00:1a", - "nested-vm": "aa:b2:92:04:00:1b" - }, - "hypervisor": "romulus.mgr.prv.suse.net", - "additional_network": "192.168.102.0/24" -} diff --git a/terracumber_config/tf_files/solution1/variable.tf b/terracumber_config/tf_files/solution1/variable.tf deleted file mode 100644 index 39d1f8b0e..000000000 --- a/terracumber_config/tf_files/solution1/variable.tf +++ /dev/null @@ -1,160 +0,0 @@ -// Mandatory variables for terracumber -variable "URL_PREFIX" { - type = string -} - -// Not really used as this is for --runall parameter, and we run cucumber step by step -variable "CUCUMBER_COMMAND" { - type = string -} - -variable "CUCUMBER_GITREPO" { - type = string -} - -variable "CUCUMBER_BRANCH" { - type = string -} - -variable "CUCUMBER_RESULTS" { - type = string - default = "/root/spacewalk/testsuite" -} - -variable "MAIL_SUBJECT" { - type = string -} - -variable "MAIL_TEMPLATE" { - type = string -} - -variable "MAIL_SUBJECT_ENV_FAIL" { - type = string - default = "Failed acceptance tests on Pull Request: Environment setup failed" -} - -variable "MAIL_TEMPLATE_ENV_FAIL" { - type = string -} - -variable "ENVIRONMENT" { - type = string -} - -variable "HYPER" { - type = string -} - -variable "MAIL_FROM" { - type = string - default = "galaxy-ci@suse.de" -} - -variable "MAIL_TO" { - type = string - default = "galaxy-ci@suse.de" -} - -// sumaform specific variables -variable "SCC_USER" { - type = string -} - -variable "SCC_PASSWORD" { - type = string -} - -variable "GIT_USER" { - type = string - default = null // Not needed for master, as it is public -} - -variable "GIT_PASSWORD" { - type = string - default = null // Not needed for master, as it is public -} - -// Repository containing the build for the tested Uyuni Pull Request -variable "PULL_REQUEST_REPO" { - type = string -} - -variable "MASTER_REPO" { - type = string -} - -variable "MASTER_OTHER_REPO" { - type = string -} - -variable "MASTER_SUMAFORM_TOOLS_REPO" { - type = string -} - -variable "UPDATE_REPO" { - type = string -} - -variable "ADDITIONAL_REPO_URL" { - type = string -} - -variable "TEST_PACKAGES_REPO" { - type = string -} - -// Repositories containing the client tools RPMs -variable "SLE_CLIENT_REPO" { - type = string -} - -variable "RHLIKE_CLIENT_REPO" { - type = string -} - -variable "DEBLIKE_CLIENT_REPO" { - type = string -} - -variable "OPENSUSE_CLIENT_REPO" { - type = string -} - -variable "IMAGE" { - type = string -} - -variable "GIT_PROFILES_REPO" { - type = string -} - -variable "IMAGES" { - type = list(string) -} - -variable "PRODUCT_VERSION" { - type = list(string) -} - -### Related to environment solution 1 ### - -variable "mac" { - type = map(string) - description = "Mac to correctly update the mac address depending on environment" -} - -variable "environment_number" { - type = string - description = "Use to set name_prefix" -} - -variable "hypervisor" { - type = string - description = "Choose the correct hypervisor depending on environment number : 1/2 ( romulus.mgr.prv.suse.net ) 3/4 ( vulcan.mgr.prv.suse.net ) 5/6 ( hyperion.mgr.prv.suse.net ) 7/8 ( daiquiri.mgr.prv.suse.net ) 9/10 ( mojito.mgr.prv.suse.net )" -} - -variable "additional_network" { - type = string - description = "Additional network depending on environment " -} diff --git a/terracumber_config/tf_files/solution2/PR-tests-template-solution-2.tf b/terracumber_config/tf_files/solution2/PR-tests-template-solution-2.tf deleted file mode 100644 index 241da9cf5..000000000 --- a/terracumber_config/tf_files/solution2/PR-tests-template-solution-2.tf +++ /dev/null @@ -1,237 +0,0 @@ -terraform { - required_version = "1.0.10" - required_providers { - libvirt = { - source = "dmacvicar/libvirt" - version = "0.6.3" - } - } -} - - -provider "libvirt" { - uri = "qemu+tcp://${var.environment_configuration[var.ENVIRONMENT].hypervisor}/system" -} - -module "cucumber_testsuite" { - source = "./modules/cucumber_testsuite" - - product_version = var.PRODUCT_VERSION - - // Cucumber repository configuration for the controller - git_username = var.GIT_USER - git_password = var.GIT_PASSWORD - git_repo = var.CUCUMBER_GITREPO - branch = var.CUCUMBER_BRANCH - - cc_username = var.SCC_USER - cc_password = var.SCC_PASSWORD - mirror = "minima-mirror.mgr.prv.suse.net" - use_mirror_images = true - - images = var.IMAGES - - use_avahi = false - name_prefix = "suma-pr${var.ENVIRONMENT}-" - domain = "mgr.prv.suse.net" - from_email = "root@suse.de" - - no_auth_registry = "registry.mgr.prv.suse.net" - auth_registry = "registry.mgr.prv.suse.net:5000/cucutest" - auth_registry_username = "cucutest" - auth_registry_password = "cucusecret" - git_profiles_repo = var.GIT_PROFILES_REPO - - server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" - custom_download_endpoint = "ftp://minima-mirror.mgr.prv.suse.net:445" - - # when changing images, please also keep in mind to adjust the image matrix at the end of the README. - host_settings = { - controller = { - provider_settings = { - mac = var.environment_configuration[var.ENVIRONMENT].mac["controller"] - } - } - server = { - provider_settings = { - mac = var.environment_configuration[var.ENVIRONMENT].mac["server"] - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - } - image = var.IMAGE - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - server_mounted_mirror = "minima-mirror.mgr.prv.suse.net" - } - proxy = { - provider_settings = { - mac = var.environment_configuration[var.ENVIRONMENT].mac["proxy"] - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - proxy_pool = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", - tools_update = var.OPENSUSE_CLIENT_REPO - } - image = var.IMAGE - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-minion = { - image = "sles15sp4o" - name = "min-sles15" - provider_settings = { - mac = var.environment_configuration[var.ENVIRONMENT].mac["suse-minion"] - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-sshminion = { - image = "sles15sp4o" - name = "minssh-sles15" - provider_settings = { - mac = var.environment_configuration[var.ENVIRONMENT].mac["suse-sshminion"] - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion", "iptables" ] - install_salt_bundle = true - } - redhat-minion = { - image = "rocky8o" - name = "min-rocky8" - provider_settings = { - mac = var.environment_configuration[var.ENVIRONMENT].mac["redhat-minion"] - memory = 2048 - vcpu = 2 - } - additional_repos = { - client_repo = var.RHLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - debian-minion = { - image = "ubuntu2204o" - name = "min-ubuntu2204" - provider_settings = { - mac = var.environment_configuration[var.ENVIRONMENT].mac["debian-minion"] - } - additional_repos = { - client_repo = var.DEBLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - // FIXME: cloudl-init fails if venv-salt-minion is not avaiable - // We can set "install_salt_bundle = true" as soon as venv-salt-minion is available Uyuni:Stable - install_salt_bundle = false - } - build-host = { - image = "sles15sp4o" - name = "min-build" - provider_settings = { - mac = var.environment_configuration[var.ENVIRONMENT].mac["build-host"] - memory = 2048 - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - pxeboot-minion = { - image = "sles15sp4o" - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - kvm-host = { - image = var.IMAGE - name = "min-kvm" - additional_grains = { - hvm_disk_image = { - leap = { - hostname = "suma-pr${var.ENVIRONMENT}-min-nested" - image = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" - hash = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" - } - sles = { - hostname = "suma-pr${var.ENVIRONMENT}-min-nested" - image = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" - hash = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" - } - } - } - provider_settings = { - mac = var.environment_configuration[var.ENVIRONMENT].mac["kvm-host"] - } - additional_repos_only = true - additional_repos = { - client_repo = var.OPENSUSE_CLIENT_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - } - nested_vm_host = "suma-pr${var.ENVIRONMENT}-min-nested" - nested_vm_mac = var.environment_configuration[var.ENVIRONMENT].mac["nested-vm"] - provider_settings = { - pool = "ssd" - network_name = null - bridge = "br1" - additional_network = var.environment_configuration[var.ENVIRONMENT].additional_network - } -} - - -resource "null_resource" "add_test_information" { - triggers = { - always_run = "${timestamp()}" - } - provisioner "file" { - source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" - destination = "/tmp/set_custom_header.sh" - connection { - type = "ssh" - user = "root" - password = "linux" - host = "${module.cucumber_testsuite.configuration.server.hostname}" - } - } -} - - -output "configuration" { - value = module.cucumber_testsuite.configuration -} diff --git a/terracumber_config/tf_files/solution2/terraform.tfvars b/terracumber_config/tf_files/solution2/terraform.tfvars deleted file mode 100644 index 85b5d32de..000000000 --- a/terracumber_config/tf_files/solution2/terraform.tfvars +++ /dev/null @@ -1,36 +0,0 @@ -environment_configuration = { - 1 = { - mac = { - controller = "aa:b2:92:04:00:00" - server = "aa:b2:92:04:00:01" - proxy = "aa:b2:92:04:00:02" - suse-minion = "aa:b2:92:04:00:04" - suse-sshminion = "aa:b2:92:04:00:05" - redhat-minion = "aa:b2:92:04:00:06" - debian-minion = "aa:b2:92:04:00:07" - build-host = "aa:b2:92:04:00:09" - pxeboot-minion = "?" - kvm-host = "aa:b2:92:04:00:0a" - nested-vm = "aa:b2:92:04:00:0b" - } - hypervisor = "romulus.mgr.prv.suse.net" - additional_network = "192.168.101.0/24" - }, - 2 = { - mac = { - controller = "aa:b2:92:04:00:10" - server = "aa:b2:92:04:00:11" - proxy = "aa:b2:92:04:00:12" - suse-minion = "aa:b2:92:04:00:14" - suse-sshminion = "aa:b2:92:04:00:15" - redhat-minion = "aa:b2:92:04:00:16" - debian-minion = "aa:b2:92:04:00:17" - build-host = "aa:b2:92:04:00:19" - pxeboot-minion = "?" - kvm-host = "aa:b2:92:04:00:1a" - nested-vm = "aa:b2:92:04:00:1b" - } - hypervisor = "romulus.mgr.prv.suse.net" - additional_network = "192.168.102.0/24" - } -} diff --git a/terracumber_config/tf_files/solution2/variable.tf b/terracumber_config/tf_files/solution2/variable.tf deleted file mode 100644 index f124359cb..000000000 --- a/terracumber_config/tf_files/solution2/variable.tf +++ /dev/null @@ -1,145 +0,0 @@ -// Mandatory variables for terracumber -variable "URL_PREFIX" { - type = string -} - -// Not really used as this is for --runall parameter, and we run cucumber step by step -variable "CUCUMBER_COMMAND" { - type = string -} - -variable "CUCUMBER_GITREPO" { - type = string -} - -variable "CUCUMBER_BRANCH" { - type = string -} - -variable "CUCUMBER_RESULTS" { - type = string - default = "/root/spacewalk/testsuite" -} - -variable "MAIL_SUBJECT" { - type = string -} - -variable "MAIL_TEMPLATE" { - type = string -} - -variable "MAIL_SUBJECT_ENV_FAIL" { - type = string - default = "Failed acceptance tests on Pull Request: Environment setup failed" -} - -variable "MAIL_TEMPLATE_ENV_FAIL" { - type = string -} - -variable "ENVIRONMENT" { - type = string -} - -variable "HYPER" { - type = string -} - -variable "MAIL_FROM" { - type = string - default = "galaxy-ci@suse.de" -} - -variable "MAIL_TO" { - type = string - default = "galaxy-ci@suse.de" -} - -// sumaform specific variables -variable "SCC_USER" { - type = string -} - -variable "SCC_PASSWORD" { - type = string -} - -variable "GIT_USER" { - type = string - default = null // Not needed for master, as it is public -} - -variable "GIT_PASSWORD" { - type = string - default = null // Not needed for master, as it is public -} - -// Repository containing the build for the tested Uyuni Pull Request -variable "PULL_REQUEST_REPO" { - type = string -} - -variable "MASTER_REPO" { - type = string -} - -variable "MASTER_OTHER_REPO" { - type = string -} - -variable "MASTER_SUMAFORM_TOOLS_REPO" { - type = string -} - -variable "UPDATE_REPO" { - type = string -} - -variable "ADDITIONAL_REPO_URL" { - type = string -} - -variable "TEST_PACKAGES_REPO" { - type = string -} - -// Repositories containing the client tools RPMs -variable "SLE_CLIENT_REPO" { - type = string -} - -variable "RHLIKE_CLIENT_REPO" { - type = string -} - -variable "DEBLIKE_CLIENT_REPO" { - type = string -} - -variable "OPENSUSE_CLIENT_REPO" { - type = string -} - -variable "IMAGE" { - type = string -} - -variable "GIT_PROFILES_REPO" { - type = string -} - -variable "IMAGES" { - type = list(string) -} - -variable "PRODUCT_VERSION" { - type = list(string) -} - -### Related to environent solution 2 #### - -variable "environment_configuration" { - type = map(string) - description = "Collection of value containing : mac addresses, hypervisor and additional network" -} From ca62bfb23aeb58c98c3094bd1d1caba2f67189e6 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 21 Jun 2023 14:44:11 +1200 Subject: [PATCH 023/110] Change to correct file name --- .../tfvars/{PR-TEST-uyuni-pr.tfvars => PR-TEST-uyuni.tfvars} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename terracumber_config/tf_files/tfvars/{PR-TEST-uyuni-pr.tfvars => PR-TEST-uyuni.tfvars} (100%) diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni-pr.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars similarity index 100% rename from terracumber_config/tf_files/tfvars/PR-TEST-uyuni-pr.tfvars rename to terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars From e39cadfb95f0bbb3a629151930597e2270dd8f67 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 25 Jul 2023 10:36:33 +1200 Subject: [PATCH 024/110] Update git profiles repo, profiles are only available on uyuni and are different between NUE and PRV --- terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars | 1 + terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars | 1 + terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars | 1 - terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars | 1 - 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars index 4f76c293f..4506b8d7b 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars @@ -1,5 +1,6 @@ MIRROR = "minima-mirror.mgr.suse.de" DOMAIN = "mgr.suse.de" +GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_nue" environment_description = { 1 = { mac = { diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars index 17009a4bc..1d2263c5f 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars @@ -1,5 +1,6 @@ MIRROR = "minima-mirror.mgr.prv.suse.net" DOMAIN = "mgr.prv.suse.net" +GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" environment_description = { 1 = { mac = { diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars index 609dd9dd0..1803c0515 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars @@ -1,7 +1,6 @@ ############ Varaibles unique to spacewalk ########### IMAGE = "sles15sp4o" -GIT_PROFILES_REPO = "https://github.com/SUSE/spacewalk.git#:testsuite/features/profiles/internal_prv" IMAGES = ["rocky8o", "opensuse154o", "sles15sp4o", "ubuntu2204o"] PRODUCT_VERSION = "4.3-nightly" MAIL_TEMPLATE_ENV_FAIL = "../mail_templates/mail-template-jenkins-suma43-pull-request-env-fail.txt" diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars index 5caca41c7..d9c948d06 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars @@ -1,7 +1,6 @@ ############ Variable unique to uyuni ######################## IMAGE = "opensuse154-ci-pro" -GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" IMAGES = ["rocky8o", "opensuse154o", "opensuse154-ci-pro", "sles15sp4o", "ubuntu2204o"] PRODUCT_VERSION = "uyuni-pr" MAIL_TEMPLATE_ENV_FAIL = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" From 2910d269abac1926ce4ad7124baf60b45f822e2a Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 25 Jul 2023 11:54:04 +1200 Subject: [PATCH 025/110] fix issues from testing --- terracumber_config/tf_files/PR-TEST-main.tf | 24 +++++++++---------- .../tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars | 3 ++- .../tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars | 1 + .../tf_files/variables/PR-TEST-variable.tf | 14 ++++------- 4 files changed, 19 insertions(+), 23 deletions(-) diff --git a/terracumber_config/tf_files/PR-TEST-main.tf b/terracumber_config/tf_files/PR-TEST-main.tf index 42336fe10..418ecbc6e 100644 --- a/terracumber_config/tf_files/PR-TEST-main.tf +++ b/terracumber_config/tf_files/PR-TEST-main.tf @@ -10,7 +10,7 @@ terraform { provider "libvirt" { - uri = "qemu+tcp://${var.environment_configuration[var.ENVIRONMENT].hypervisor}/system" + uri = "qemu+tcp://${var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].hypervisor}/system" } module "cucumber_testsuite" { @@ -49,12 +49,12 @@ module "cucumber_testsuite" { host_settings = { controller = { provider_settings = { - mac = var.environment_configuration[var.ENVIRONMENT].mac["controller"] + mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["controller"] } } server = { provider_settings = { - mac = var.environment_configuration[var.ENVIRONMENT].mac["server"] + mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["server"] } additional_repos_only = true additional_repos = { @@ -76,7 +76,7 @@ module "cucumber_testsuite" { } proxy = { provider_settings = { - mac = var.environment_configuration[var.ENVIRONMENT].mac["proxy"] + mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["proxy"] } additional_repos_only = true additional_repos = { @@ -101,7 +101,7 @@ module "cucumber_testsuite" { image = "sles15sp4o" name = "min-sles15" provider_settings = { - mac = var.environment_configuration[var.ENVIRONMENT].mac["suse-minion"] + mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["suse-minion"] } additional_repos = { tools_update = var.SLE_CLIENT_REPO, @@ -113,7 +113,7 @@ module "cucumber_testsuite" { image = "sles15sp4o" name = "minssh-sles15" provider_settings = { - mac = var.environment_configuration[var.ENVIRONMENT].mac["suse-sshminion"] + mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["suse-sshminion"] } additional_repos = { tools_update = var.SLE_CLIENT_REPO, @@ -125,7 +125,7 @@ module "cucumber_testsuite" { image = "rocky8o" name = "min-rocky8" provider_settings = { - mac = var.environment_configuration[var.ENVIRONMENT].mac["redhat-minion"] + mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["redhat-minion"] memory = 2048 vcpu = 2 } @@ -139,7 +139,7 @@ module "cucumber_testsuite" { image = "ubuntu2204o" name = "min-ubuntu2204" provider_settings = { - mac = var.environment_configuration[var.ENVIRONMENT].mac["debian-minion"] + mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["debian-minion"] } additional_repos = { client_repo = var.DEBLIKE_CLIENT_REPO, @@ -153,7 +153,7 @@ module "cucumber_testsuite" { image = "sles15sp4o" name = "min-build" provider_settings = { - mac = var.environment_configuration[var.ENVIRONMENT].mac["build-host"] + mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["build-host"] memory = 2048 } additional_repos = { @@ -188,7 +188,7 @@ module "cucumber_testsuite" { } } provider_settings = { - mac = var.environment_configuration[var.ENVIRONMENT].mac["kvm-host"] + mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["kvm-host"] } additional_repos_only = true additional_repos = { @@ -205,12 +205,12 @@ module "cucumber_testsuite" { } } nested_vm_host = "suma-pr${var.ENVIRONMENT}-min-nested" - nested_vm_mac = var.environment_configuration[var.ENVIRONMENT].mac["nested-vm"] + nested_vm_mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["nested-vm"] provider_settings = { pool = "ssd" network_name = null bridge = "br1" - additional_network = var.environment_configuration[var.ENVIRONMENT].additional_network + additional_network = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].additional_network } } diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars index 4506b8d7b..9e99d4806 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars @@ -1,7 +1,8 @@ MIRROR = "minima-mirror.mgr.suse.de" DOMAIN = "mgr.suse.de" GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_nue" -environment_description = { +USE_MIRROR = true +ENVIRONMENT_CONFIGURATION = { 1 = { mac = { controller = "aa:b2:93:01:03:00" diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars index 1d2263c5f..2d48cf056 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars @@ -1,6 +1,7 @@ MIRROR = "minima-mirror.mgr.prv.suse.net" DOMAIN = "mgr.prv.suse.net" GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" +USE_MIRROR = true environment_description = { 1 = { mac = { diff --git a/terracumber_config/tf_files/variables/PR-TEST-variable.tf b/terracumber_config/tf_files/variables/PR-TEST-variable.tf index 7148290e2..324561260 100644 --- a/terracumber_config/tf_files/variables/PR-TEST-variable.tf +++ b/terracumber_config/tf_files/variables/PR-TEST-variable.tf @@ -42,10 +42,6 @@ variable "ENVIRONMENT" { type = string } -variable "HYPER" { - type = string -} - variable "MAIL_FROM" { type = string default = "galaxy-ci@suse.de" @@ -134,7 +130,7 @@ variable "IMAGES" { } variable "PRODUCT_VERSION" { - type = list(string) + type = string } variable "MIRROR" { @@ -142,16 +138,14 @@ variable "MIRROR" { } variable "USE_MIRROR" { - type = boolean + type = bool } variable "DOMAIN" { type = string } -### Related to environent solution 2 #### - -variable "environment_configuration" { - type = map(string) +variable "ENVIRONMENT_CONFIGURATION" { + type = map description = "Collection of value containing : mac addresses, hypervisor and additional network" } From eb5eee0a54a07c872ac7e36f16000ec4dcb9b2aa Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 25 Jul 2023 13:37:06 +1200 Subject: [PATCH 026/110] Add BRIDGE variable. Depending on NUE or PRV env --- terracumber_config/tf_files/PR-TEST-main.tf | 2 +- terracumber_config/tf_files/variables/PR-TEST-variable.tf | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/terracumber_config/tf_files/PR-TEST-main.tf b/terracumber_config/tf_files/PR-TEST-main.tf index 418ecbc6e..f903bbd79 100644 --- a/terracumber_config/tf_files/PR-TEST-main.tf +++ b/terracumber_config/tf_files/PR-TEST-main.tf @@ -209,7 +209,7 @@ module "cucumber_testsuite" { provider_settings = { pool = "ssd" network_name = null - bridge = "br1" + bridge = var.BRIDGE additional_network = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].additional_network } } diff --git a/terracumber_config/tf_files/variables/PR-TEST-variable.tf b/terracumber_config/tf_files/variables/PR-TEST-variable.tf index 324561260..083d4bede 100644 --- a/terracumber_config/tf_files/variables/PR-TEST-variable.tf +++ b/terracumber_config/tf_files/variables/PR-TEST-variable.tf @@ -145,6 +145,10 @@ variable "DOMAIN" { type = string } +variable "BRIDGE" { + type = string +} + variable "ENVIRONMENT_CONFIGURATION" { type = map description = "Collection of value containing : mac addresses, hypervisor and additional network" From 09e6275e1a49f825bbe6a04365d2e20ed484becb Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 25 Jul 2023 13:37:34 +1200 Subject: [PATCH 027/110] Add bridge and change the mac address for the correct one for NUE --- .../tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars | 133 +++++++++--------- 1 file changed, 67 insertions(+), 66 deletions(-) diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars index 9e99d4806..eb6d4e758 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars @@ -2,101 +2,102 @@ MIRROR = "minima-mirror.mgr.suse.de" DOMAIN = "mgr.suse.de" GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_nue" USE_MIRROR = true +BRIDGE = "br0" ENVIRONMENT_CONFIGURATION = { 1 = { mac = { - controller = "aa:b2:93:01:03:00" - server = "aa:b2:93:01:03:01" - proxy = "aa:b2:93:01:03:02" - suse-minion = "aa:b2:93:01:03:04" - suse-sshminion = "aa:b2:93:01:03:05" - redhat-minion = "aa:b2:93:01:03:06" - debian-minion = "aa:b2:93:01:03:07" - build-host = "aa:b2:93:01:03:09" - kvm-host = "aa:b2:93:01:03:0a" - nested-vm = "aa:b2:93:01:03:0b" + controller = "aa:b2:93:01:03:50" + server = "aa:b2:93:01:03:51" + proxy = "aa:b2:93:01:03:52" + suse-minion = "aa:b2:93:01:03:54" + suse-sshminion = "aa:b2:93:01:03:55" + redhat-minion = "aa:b2:93:01:03:56" + debian-minion = "aa:b2:93:01:03:57" + build-host = "aa:b2:93:01:03:59" + kvm-host = "aa:b2:93:01:03:5a" + nested-vm = "aa:b2:93:01:03:5b" } - hypervisor = "suma-05.mgr.suse.de" + hypervisor = "suma-08.mgr.suse.de" additional_network = "192.168.111.0/24" }, 2 = { mac = { - controller = "aa:b2:93:01:03:10" - server = "aa:b2:93:01:03:11" - proxy = "aa:b2:93:01:03:12" - suse-minion = "aa:b2:93:01:03:14" - suse-sshminion = "aa:b2:93:01:03:15" - redhat-minion = "aa:b2:93:01:03:16" - debian-minion = "aa:b2:93:01:03:17" - build-host = "aa:b2:93:01:03:19" - kvm-host = "aa:b2:93:01:03:1a" - nested-vm = "aa:b2:93:01:03:1b" + controller = "aa:b2:93:01:03:5c" + server = "aa:b2:93:01:03:5d" + proxy = "aa:b2:93:01:03:5e" + suse-minion = "aa:b2:93:01:03:60" + suse-sshminion = "aa:b2:93:01:03:61" + redhat-minion = "aa:b2:93:01:03:62" + debian-minion = "aa:b2:93:01:03:64" + build-host = "aa:b2:93:01:03:65" + kvm-host = "aa:b2:93:01:03:66" + nested-vm = "aa:b2:93:01:03:67" } - hypervisor = "suma-05.mgr.suse.de" + hypervisor = "suma-08.mgr.suse.de" additional_network = "192.168.112.0/24" }, 3 = { mac = { - controller = "aa:b2:93:01:03:20" - server = "aa:b2:93:01:03:21" - proxy = "aa:b2:93:01:03:22" - suse-minion = "aa:b2:93:01:03:24" - suse-sshminion = "aa:b2:93:01:03:25" - redhat-minion = "aa:b2:93:01:03:26" - debian-minion = "aa:b2:93:01:03:27" - build-host = "aa:b2:93:01:03:29" - kvm-host = "aa:b2:93:01:03:2a" - nested-vm = "aa:b2:93:01:03:2b" + controller = "aa:b2:93:01:03:68" + server = "aa:b2:93:01:03:69" + proxy = "aa:b2:93:01:03:6a" + suse-minion = "aa:b2:93:01:03:6c" + suse-sshminion = "aa:b2:93:01:03:6d" + redhat-minion = "aa:b2:93:01:03:6e" + debian-minion = "aa:b2:93:01:03:70" + build-host = "aa:b2:93:01:03:71" + kvm-host = "aa:b2:93:01:03:72" + nested-vm = "aa:b2:93:01:03:73" } - hypervisor = "suma-05.mgr.suse.de" + hypervisor = "suma-08.mgr.suse.de" additional_network = "192.168.113.0/24" }, 4 = { mac = { - controller = "aa:b2:93:01:03:30" - server = "aa:b2:93:01:03:31" - proxy = "aa:b2:93:01:03:32" - suse-minion = "aa:b2:93:01:03:34" - suse-sshminion = "aa:b2:93:01:03:35" - redhat-minion = "aa:b2:93:01:03:36" - debian-minion = "aa:b2:93:01:03:37" - build-host = "aa:b2:93:01:03:39" - kvm-host = "aa:b2:93:01:03:3a" - nested-vm = "aa:b2:93:01:03:3b" + controller = "aa:b2:93:01:03:74" + server = "aa:b2:93:01:03:75" + proxy = "aa:b2:93:01:03:76" + suse-minion = "aa:b2:93:01:03:78" + suse-sshminion = "aa:b2:93:01:03:79" + redhat-minion = "aa:b2:93:01:03:7a" + debian-minion = "aa:b2:93:01:03:7c" + build-host = "aa:b2:93:01:03:7d" + kvm-host = "aa:b2:93:01:03:7e" + nested-vm = "aa:b2:93:01:03:7f" } - hypervisor = "suma-05.mgr.suse.de" + hypervisor = "suma-08.mgr.suse.de" additional_network = "192.168.114.0/24" }, 5 = { mac = { - controller = "aa:b2:93:01:03:40" - server = "aa:b2:93:01:03:41" - proxy = "aa:b2:93:01:03:42" - suse-minion = "aa:b2:93:01:03:44" - suse-sshminion = "aa:b2:93:01:03:45" - redhat-minion = "aa:b2:93:01:03:46" - debian-minion = "aa:b2:93:01:03:47" - build-host = "aa:b2:93:01:03:49" - kvm-host = "aa:b2:93:01:03:4a" - nested-vm = "aa:b2:93:01:03:4b" + controller = "aa:b2:93:01:03:80" + server = "aa:b2:93:01:03:81" + proxy = "aa:b2:93:01:03:82" + suse-minion = "aa:b2:93:01:03:84" + suse-sshminion = "aa:b2:93:01:03:85" + redhat-minion = "aa:b2:93:01:03:86" + debian-minion = "aa:b2:93:01:03:88" + build-host = "aa:b2:93:01:03:89" + kvm-host = "aa:b2:93:01:03:8a" + nested-vm = "aa:b2:93:01:03:8b" } - hypervisor = "suma-05.mgr.suse.de" + hypervisor = "suma-08.mgr.suse.de" additional_network = "192.168.115.0/24" }, 6 = { mac = { - controller = "aa:b2:93:01:03:50" - server = "aa:b2:93:01:03:51" - proxy = "aa:b2:93:01:03:52" - suse-minion = "aa:b2:93:01:03:54" - suse-sshminion = "aa:b2:93:01:03:55" - redhat-minion = "aa:b2:93:01:03:56" - debian-minion = "aa:b2:93:01:03:57" - build-host = "aa:b2:93:01:03:59" - kvm-host = "aa:b2:93:01:03:5a" - nested-vm = "aa:b2:93:01:03:5b" + controller = "aa:b2:93:01:03:8c" + server = "aa:b2:93:01:03:8d" + proxy = "aa:b2:93:01:03:8e" + suse-minion = "aa:b2:93:01:03:90" + suse-sshminion = "aa:b2:93:01:03:91" + redhat-minion = "aa:b2:93:01:03:92" + debian-minion = "aa:b2:93:01:03:94" + build-host = "aa:b2:93:01:03:95" + kvm-host = "aa:b2:93:01:03:96" + nested-vm = "aa:b2:93:01:03:97" } - hypervisor = "suma-05.mgr.suse.de" + hypervisor = "suma-08.mgr.suse.de" additional_network = "192.168.116.0/24" } } From 753125210d73bdd61ed97da8c245668550925aca Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 25 Jul 2023 13:37:50 +1200 Subject: [PATCH 028/110] Add bridge --- terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars | 1 + 1 file changed, 1 insertion(+) diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars index 2d48cf056..6a8000d18 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars @@ -2,6 +2,7 @@ MIRROR = "minima-mirror.mgr.prv.suse.net" DOMAIN = "mgr.prv.suse.net" GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" USE_MIRROR = true +BRIDGE = "br1" environment_description = { 1 = { mac = { From b25382b75e9dfb087b02b3d334cfb7e9157402a7 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 25 Jul 2023 14:56:18 +1200 Subject: [PATCH 029/110] Move to light --- .../common/pipeline-pull-request-light.groovy | 207 ++++++++++++++++++ .../environments/uyuni-prs-ci-tests | 4 +- 2 files changed, 209 insertions(+), 2 deletions(-) create mode 100644 jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy new file mode 100644 index 000000000..884bb3f39 --- /dev/null +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy @@ -0,0 +1,207 @@ +def run(params) { + timestamps { + // Start pipeline with default values + arch= 'x86_64' + built = false + deployed = false + tests_passed = false + sumaform_backend = 'libvirt' + terraform_bin = '/usr/bin/terraform' + terraform_bin_plugins = '/usr/bin' + service_pack_migration = false +// terracumber_gitrepo = 'https://github.com/uyuni-project/terracumber.git' + terracumber_gitrepo = 'https://github.com/maximenoel8/terracumber.git' + terracumber_ref = 'support_tfvars' + terraform_init = true + rake_namespace = 'cucumber' + rake_parallel_namespace = 'parallel' + jenkins_workspace = '/home/jenkins/jenkins-build/workspace/' + pull_request_repo = 'https://github.com/uyuni-project/uyuni.git' + builder_api = 'https://api.opensuse.org' + build_url = 'https://build.opensuse.org' + builder_project = 'systemsmanagement:Uyuni:Master:PR' + source_project = 'systemsmanagement:Uyuni:Master' + sumaform_tools_project = 'systemsmanagement:sumaform:tools' + test_packages_project = 'systemsmanagement:Uyuni:Test-Packages:Pool' + build_repo = 'openSUSE_Leap_15.4' + environment_workspace = null + url_prefix="https://ci.suse.de/view/Manager/view/Uyuni/job/${env.JOB_NAME}" + env.common_params = '' + fqdn_jenkins_node = sh(script: "hostname -f", returnStdout: true).trim() + env_number = 2 + try { + stage('Checkout CI tools') { + ws(environment_workspace){ + if(must_test) { + git url: terracumber_gitrepo, branch: terracumber_ref + dir("susemanager-ci") { + checkout scm + } + + // Define test environment parameters + env.resultdir = "${WORKSPACE}/results" + env.resultdirbuild = "${resultdir}/${BUILD_NUMBER}" + env.tf_file = "susemanager-ci/terracumber_config/tf_files/PR-TEST-main.tf" + env.tfvariables_file = "susemanager-ci/terracumber_config/tf_files/variables/PR-TEST-variable.tf" + env.tftfvars_files = ["susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars","susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars"] + env.common_params = "--outputdir ${resultdir} --tf ${tf_file} --gitfolder ${resultdir}/sumaform" + + if (params.terraform_parallelism) { + env.common_params = "${env.common_params} --parallelism ${params.terraform_parallelism}" + } + + // Clean up old results + sh "if [ -d ${resultdir} ];then ./clean-old-results -r ${resultdir};fi" + + // Create a directory for to place the directory with the build results (if it does not exist) + sh "mkdir -p ${resultdir}" + + // Clone sumaform + sh "set +x; source /home/jenkins/.credentials set -x; ./terracumber-cli ${common_params} --gitrepo ${sumaform_gitrepo} --gitref ${sumaform_ref} --runstep gitsync" + } + } + } + stage('Deploy') { + ws(environment_workspace){ + if(must_test) { + // Passing the built repository by parameter using a environment variable to terraform file + // TODO: We will need to add a logic to replace the host, when we use IBS for spacewalk + env.PULL_REQUEST_REPO= "http://download.suse.de/ibs/SUSE:/Maintenance:/29643/SUSE_Updates_SLE-Product-SLES_15-SP1-LTSS_x86_64/" + env.MASTER_REPO = "http://download.suse.de/ibs/SUSE:/Maintenance:/29643/SUSE_Updates_SLE-Product-SLES_15-SP1-LTSS_x86_64/" + env.MASTER_OTHER_REPO = "http://download.suse.de/ibs/SUSE:/Maintenance:/29643/SUSE_Updates_SLE-Product-SLES_15-SP1-LTSS_x86_64/" + env.MASTER_SUMAFORM_TOOLS_REPO = "http://download.suse.de/ibs/SUSE:/Maintenance:/29643/SUSE_Updates_SLE-Product-SLES_15-SP1-LTSS_x86_64/" + env.TEST_PACKAGES_REPO = "http://download.suse.de/ibs/SUSE:/Maintenance:/29643/SUSE_Updates_SLE-Product-SLES_15-SP1-LTSS_x86_64/" + env.UPDATE_REPO = "http://minima-mirror.mgr.prv.suse.net/jordi/some-updates/" + if (additional_repo_url == '') { + echo "Adding dummy repo for update repo" + env.ADDITIONAL_REPO_URL = "http://minima-mirror.mgr.prv.suse.net/jordi/dummy/" + } else { + echo "Adding ${additional_repo_url}" + env.ADDITIONAL_REPO_URL = additional_repo_url + } + env.SLE_CLIENT_REPO = "http://download.suse.de/ibs/SUSE:/Maintenance:/29643/SUSE_Updates_SLE-Product-SLES_15-SP1-LTSS_x86_64/" + env.RHLIKE_CLIENT_REPO = "http://download.suse.de/ibs/SUSE:/Maintenance:/29643/SUSE_Updates_SLE-Product-SLES_15-SP1-LTSS_x86_64/" + env.DEBLIKE_CLIENT_REPO = "http://download.suse.de/ibs/SUSE:/Maintenance:/29643/SUSE_Updates_SLE-Product-SLES_15-SP1-LTSS_x86_64/" + env.OPENSUSE_CLIENT_REPO = "http://download.suse.de/ibs/SUSE:/Maintenance:/29643/SUSE_Updates_SLE-Product-SLES_15-SP1-LTSS_x86_64/" + + // Provision the environment + if (terraform_init) { + env.TERRAFORM_INIT = '--init' + } else { + env.TERRAFORM_INIT = '' + } + sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_ENVIRONMENT=${env_number}; export TF_VAR_SLE_CLIENT_REPO=${SLE_CLIENT_REPO};export TF_VAR_RHLIKE_CLIENT_REPO=${RHLIKE_CLIENT_REPO};export TF_VAR_DEBLIKE_CLIENT_REPO=${DEBLIKE_CLIENT_REPO};export TF_VAR_OPENSUSE_CLIENT_REPO=${OPENSUSE_CLIENT_REPO};export TF_VAR_PULL_REQUEST_REPO=${PULL_REQUEST_REPO}; export TF_VAR_MASTER_OTHER_REPO=${MASTER_OTHER_REPO};export TF_VAR_MASTER_SUMAFORM_TOOLS_REPO=${MASTER_SUMAFORM_TOOLS_REPO}; export TF_VAR_TEST_PACKAGES_REPO=${TEST_PACKAGES_REPO}; export TF_VAR_MASTER_REPO=${MASTER_REPO};export TF_VAR_UPDATE_REPO=${UPDATE_REPO};export TF_VAR_ADDITIONAL_REPO_URL=${ADDITIONAL_REPO_URL};export TF_VAR_CUCUMBER_GITREPO=${cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${cucumber_ref}; export TERRAFORM=${terraform_bin}; export TERRAFORM_PLUGINS=${terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log ${env.TERRAFORM_INIT} --taint '.*(domain|main_disk).*' --tfvariables_file=${env.tfvariables_file} --tfvars_files=${env.tfvars_files} --runstep provision" + deployed = true + } + } + } + stage('Sanity Check') { + ws(environment_workspace){ + if(must_test) { + sh "./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd 'cd /root/spacewalk/testsuite; rake cucumber:sanity_check'" + } + } + } + stage('Core - Setup') { + ws(environment_workspace){ + if(must_test) { + sh "./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd 'cd /root/spacewalk/testsuite; rake cucumber:core'" + sh "./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd 'cd /root/spacewalk/testsuite; rake cucumber:reposync'" + } + } + } + stage('Core - Initialize clients') { + ws(environment_workspace){ + if(must_test) { + namespace = rake_namespace + sh "./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd 'cd /root/spacewalk/testsuite; rake ${namespace}:init_clients'" + } + } + } + stage('Secondary features') { + ws(environment_workspace){ + if(must_test && ( params.functional_scopes || run_all_scopes) ) { + def statusCode1 = sh script:"./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd '${secondary_exports} cd /root/spacewalk/testsuite; rake cucumber:secondary'", returnStatus:true + def statusCode2 = sh script:"./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd '${secondary_exports} cd /root/spacewalk/testsuite; rake ${rake_namespace}:secondary_parallelizable'", returnStatus:true + sh "exit \$(( ${statusCode1}|${statusCode2} ))" + } + } + tests_passed = true + } + } + finally { + stage('Clean up lockfiles') { + if(running_same_pr == "no"){ + sh(script: "rm -f ${env.suma_pr_lockfile}") + } + if(environment_workspace){ + ws(environment_workspace){ + if (env.env_file) { + if (tests_passed || !deployed){ + println("Unlock environment") + sh "rm -f ${env_file}*" + } else { + println("Keep the environment locked for 24 hours so you can debug") + sh "echo \"rm -f ${env_file}*\" | at now +24 hour" + sh "echo keep:24h >> ${env_file}.info" + sh "python3 ${WORKSPACE}/product/susemanager-utils/testing/automation/run-command-in-server.py --command=\"chmod 755 /tmp/set_custom_header.sh;/tmp/set_custom_header.sh -e ${env_number} -m ${email_to} -t 24\" --username=\"root\" --password=\"linux\" -v -i suma-pr${env_number}-srv.mgr.prv.suse.net" + } + } + } + } + } + stage('Get test results') { + if(environment_workspace && common_params != ''){ + ws(environment_workspace){ + def error = 0 + if(must_test) { + if (deployed) { + try { + sh "./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd 'cd /root/spacewalk/testsuite; rake cucumber:finishing_pr'" + } catch(Exception ex) { + println("ERROR: rake cucumber:finishing_pr failed") + error = 1 + } + try { + sh "./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd 'cd /root/spacewalk/testsuite; rake utils:generate_test_report'" + } catch(Exception ex) { + println("ERROR: rake utils:generate_test_repor failed") + error = 1 + } + sh "./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep getresults" + publishHTML( target: [ + allowMissing: true, + alwaysLinkToLastBuild: false, + keepAll: true, + reportDir: "${resultdirbuild}/cucumber_report/", + reportFiles: 'cucumber_report.html', + reportName: "TestSuite Report for Pull Request ${builder_project}:${pull_request_number}"] + ) + junit allowEmptyResults: true, testResults: "results/${BUILD_NUMBER}/results_junit/*.xml" + } + if (fileExists("results/${BUILD_NUMBER}")) { + archiveArtifacts artifacts: "results/${BUILD_NUMBER}/**/*" + } + if (email_to != '') { + sh " export TF_VAR_MAIL_TO=${email_to};export TF_VAR_URL_PREFIX=${url_prefix}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/mail.log --runstep mail" + } + // Clean up old results + sh "./clean-old-results -r ${resultdir} -s 10" + sh "exit ${error}" + } + } + } + } + stage('Remove build project') { + if(environment_workspace){ + ws(environment_workspace){ + sh "rm -rf ${environment_workspace}/repos/${builder_project}:${pull_request_number}/${build_repo}/${arch}" + sh "rm -rf ${builder_project}:${pull_request_number}" + } + } + } + } + } +} + +return this diff --git a/jenkins_pipelines/environments/uyuni-prs-ci-tests b/jenkins_pipelines/environments/uyuni-prs-ci-tests index 7630a02be..c251bfb3e 100644 --- a/jenkins_pipelines/environments/uyuni-prs-ci-tests +++ b/jenkins_pipelines/environments/uyuni-prs-ci-tests @@ -1,6 +1,6 @@ #!/usr/bin/env groovy -node('pull-request-test') { +node('pull-request-test-NUE') { properties([ buildDiscarder(logRotator(numToKeepStr: '30', daysToKeepStr: '15')), parameters([ @@ -57,7 +57,7 @@ node('pull-request-test') { } } echo "DEBUG: Secondary test tags: ${secondary_exports}" - def pipeline = load "jenkins_pipelines/environments/common/pipeline-pull-request.groovy" + def pipeline = load "jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy" pipeline.run(params) } } From 7fd16cab3ddf917dd51ccfa9b50545443059bb6d Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 25 Jul 2023 15:21:29 +1200 Subject: [PATCH 030/110] Change gitsync --- .../environments/common/pipeline-pull-request-light.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy index 884bb3f39..1cc61b55e 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy @@ -57,7 +57,7 @@ def run(params) { sh "mkdir -p ${resultdir}" // Clone sumaform - sh "set +x; source /home/jenkins/.credentials set -x; ./terracumber-cli ${common_params} --gitrepo ${sumaform_gitrepo} --gitref ${sumaform_ref} --runstep gitsync" + sh "set +x; source /home/jenkins/.credentials set -x; ./terracumber-cli ${common_params} --gitrepo ${sumaform_gitrepo} --gitref ${sumaform_ref} --tfvariables_file=${env.tfvariables_file} --runstep gitsync" } } } From e62db4285049cc15fc54539ef457efcac23ac9fc Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 25 Jul 2023 15:28:22 +1200 Subject: [PATCH 031/110] Change --tfvariable declaration --- .../common/pipeline-pull-request-light.groovy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy index 1cc61b55e..c51b987a4 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy @@ -43,8 +43,8 @@ def run(params) { env.resultdirbuild = "${resultdir}/${BUILD_NUMBER}" env.tf_file = "susemanager-ci/terracumber_config/tf_files/PR-TEST-main.tf" env.tfvariables_file = "susemanager-ci/terracumber_config/tf_files/variables/PR-TEST-variable.tf" - env.tftfvars_files = ["susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars","susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars"] - env.common_params = "--outputdir ${resultdir} --tf ${tf_file} --gitfolder ${resultdir}/sumaform" + env.tfvars_files = ["susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars","susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars"] + env.common_params = "--outputdir ${resultdir} --tf ${tf_file} --gitfolder ${resultdir}/sumaform --tfvariables_file=${tfvariables_file} --tfvars_files=${tftfvars_files}" if (params.terraform_parallelism) { env.common_params = "${env.common_params} --parallelism ${params.terraform_parallelism}" @@ -57,7 +57,7 @@ def run(params) { sh "mkdir -p ${resultdir}" // Clone sumaform - sh "set +x; source /home/jenkins/.credentials set -x; ./terracumber-cli ${common_params} --gitrepo ${sumaform_gitrepo} --gitref ${sumaform_ref} --tfvariables_file=${env.tfvariables_file} --runstep gitsync" + sh "set +x; source /home/jenkins/.credentials set -x; ./terracumber-cli ${common_params} --gitrepo ${sumaform_gitrepo} --gitref ${sumaform_ref} --runstep gitsync" } } } @@ -90,7 +90,7 @@ def run(params) { } else { env.TERRAFORM_INIT = '' } - sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_ENVIRONMENT=${env_number}; export TF_VAR_SLE_CLIENT_REPO=${SLE_CLIENT_REPO};export TF_VAR_RHLIKE_CLIENT_REPO=${RHLIKE_CLIENT_REPO};export TF_VAR_DEBLIKE_CLIENT_REPO=${DEBLIKE_CLIENT_REPO};export TF_VAR_OPENSUSE_CLIENT_REPO=${OPENSUSE_CLIENT_REPO};export TF_VAR_PULL_REQUEST_REPO=${PULL_REQUEST_REPO}; export TF_VAR_MASTER_OTHER_REPO=${MASTER_OTHER_REPO};export TF_VAR_MASTER_SUMAFORM_TOOLS_REPO=${MASTER_SUMAFORM_TOOLS_REPO}; export TF_VAR_TEST_PACKAGES_REPO=${TEST_PACKAGES_REPO}; export TF_VAR_MASTER_REPO=${MASTER_REPO};export TF_VAR_UPDATE_REPO=${UPDATE_REPO};export TF_VAR_ADDITIONAL_REPO_URL=${ADDITIONAL_REPO_URL};export TF_VAR_CUCUMBER_GITREPO=${cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${cucumber_ref}; export TERRAFORM=${terraform_bin}; export TERRAFORM_PLUGINS=${terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log ${env.TERRAFORM_INIT} --taint '.*(domain|main_disk).*' --tfvariables_file=${env.tfvariables_file} --tfvars_files=${env.tfvars_files} --runstep provision" + sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_ENVIRONMENT=${env_number}; export TF_VAR_SLE_CLIENT_REPO=${SLE_CLIENT_REPO};export TF_VAR_RHLIKE_CLIENT_REPO=${RHLIKE_CLIENT_REPO};export TF_VAR_DEBLIKE_CLIENT_REPO=${DEBLIKE_CLIENT_REPO};export TF_VAR_OPENSUSE_CLIENT_REPO=${OPENSUSE_CLIENT_REPO};export TF_VAR_PULL_REQUEST_REPO=${PULL_REQUEST_REPO}; export TF_VAR_MASTER_OTHER_REPO=${MASTER_OTHER_REPO};export TF_VAR_MASTER_SUMAFORM_TOOLS_REPO=${MASTER_SUMAFORM_TOOLS_REPO}; export TF_VAR_TEST_PACKAGES_REPO=${TEST_PACKAGES_REPO}; export TF_VAR_MASTER_REPO=${MASTER_REPO};export TF_VAR_UPDATE_REPO=${UPDATE_REPO};export TF_VAR_ADDITIONAL_REPO_URL=${ADDITIONAL_REPO_URL};export TF_VAR_CUCUMBER_GITREPO=${cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${cucumber_ref}; export TERRAFORM=${terraform_bin}; export TERRAFORM_PLUGINS=${terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log ${env.TERRAFORM_INIT} --taint '.*(domain|main_disk).*' --runstep provision" deployed = true } } From 75b35611639fbd95d01c7da7b8074db1aa89a0ed Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 25 Jul 2023 15:29:35 +1200 Subject: [PATCH 032/110] Fix variable issue --- .../environments/common/pipeline-pull-request-light.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy index c51b987a4..89a1aaca6 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy @@ -44,7 +44,7 @@ def run(params) { env.tf_file = "susemanager-ci/terracumber_config/tf_files/PR-TEST-main.tf" env.tfvariables_file = "susemanager-ci/terracumber_config/tf_files/variables/PR-TEST-variable.tf" env.tfvars_files = ["susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars","susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars"] - env.common_params = "--outputdir ${resultdir} --tf ${tf_file} --gitfolder ${resultdir}/sumaform --tfvariables_file=${tfvariables_file} --tfvars_files=${tftfvars_files}" + env.common_params = "--outputdir ${resultdir} --tf ${tf_file} --gitfolder ${resultdir}/sumaform --tfvariables_file=${tfvariables_file} --tfvars_files=${tfvars_files}" if (params.terraform_parallelism) { env.common_params = "${env.common_params} --parallelism ${params.terraform_parallelism}" From a448877cdfea7d0497d19db1992ff5e30f1fbcb0 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 25 Jul 2023 15:39:43 +1200 Subject: [PATCH 033/110] change tfvars with append action --- .../environments/common/pipeline-pull-request-light.groovy | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy index 89a1aaca6..3e32abb61 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy @@ -42,9 +42,10 @@ def run(params) { env.resultdir = "${WORKSPACE}/results" env.resultdirbuild = "${resultdir}/${BUILD_NUMBER}" env.tf_file = "susemanager-ci/terracumber_config/tf_files/PR-TEST-main.tf" - env.tfvariables_file = "susemanager-ci/terracumber_config/tf_files/variables/PR-TEST-variable.tf" - env.tfvars_files = ["susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars","susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars"] - env.common_params = "--outputdir ${resultdir} --tf ${tf_file} --gitfolder ${resultdir}/sumaform --tfvariables_file=${tfvariables_file} --tfvars_files=${tfvars_files}" + tfvariables_file = 'susemanager-ci/terracumber_config/tf_files/variables/PR-TEST-variable.tf' + tfvars_manager43 = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars' + tfvars_nuremberg = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars' + env.common_params = "--outputdir ${resultdir} --tf ${tf_file} --gitfolder ${resultdir}/sumaform --tfvariables_file=${tfvariables_file} --tfvars_files=${tfvars_nuremberg} --tfvars_files=${tfvars_manager43}" if (params.terraform_parallelism) { env.common_params = "${env.common_params} --parallelism ${params.terraform_parallelism}" From 93bcef7890372e8268767c0c018cbf1f621924c7 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 25 Jul 2023 16:00:10 +1200 Subject: [PATCH 034/110] Add default value to mandatory variables --- terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars | 2 +- terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars | 2 +- terracumber_config/tf_files/variables/PR-TEST-variable.tf | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars index 1803c0515..b33367840 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars @@ -1,4 +1,4 @@ -############ Varaibles unique to spacewalk ########### +############ Spacewalk unique variables ########### IMAGE = "sles15sp4o" IMAGES = ["rocky8o", "opensuse154o", "sles15sp4o", "ubuntu2204o"] diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars index d9c948d06..fbdb4aabf 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars @@ -1,4 +1,4 @@ -############ Variable unique to uyuni ######################## +############ Uyuni unique variables ######################## IMAGE = "opensuse154-ci-pro" IMAGES = ["rocky8o", "opensuse154o", "opensuse154-ci-pro", "sles15sp4o", "ubuntu2204o"] diff --git a/terracumber_config/tf_files/variables/PR-TEST-variable.tf b/terracumber_config/tf_files/variables/PR-TEST-variable.tf index 083d4bede..054ea8bf0 100644 --- a/terracumber_config/tf_files/variables/PR-TEST-variable.tf +++ b/terracumber_config/tf_files/variables/PR-TEST-variable.tf @@ -6,14 +6,17 @@ variable "URL_PREFIX" { // Not really used as this is for --runall parameter, and we run cucumber step by step variable "CUCUMBER_COMMAND" { type = string + default = "Define in product tfvars" } variable "CUCUMBER_GITREPO" { type = string + default = "Define in product tfvars" } variable "CUCUMBER_BRANCH" { type = string + default = "Define in product tfvars" } variable "CUCUMBER_RESULTS" { From 13d9c7d065baa524635cd5679dcf114e141904d5 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 25 Jul 2023 16:00:39 +1200 Subject: [PATCH 035/110] Add default value to mandatory variables --- terracumber_config/tf_files/variables/PR-TEST-variable.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/terracumber_config/tf_files/variables/PR-TEST-variable.tf b/terracumber_config/tf_files/variables/PR-TEST-variable.tf index 054ea8bf0..a24c1e759 100644 --- a/terracumber_config/tf_files/variables/PR-TEST-variable.tf +++ b/terracumber_config/tf_files/variables/PR-TEST-variable.tf @@ -1,6 +1,7 @@ // Mandatory variables for terracumber variable "URL_PREFIX" { type = string + default = "Define in product tfvars" } // Not really used as this is for --runall parameter, and we run cucumber step by step From 27247523d3977a491d1123b1fda4f23245011c41 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 25 Jul 2023 16:02:55 +1200 Subject: [PATCH 036/110] Add default value to mandatory variables --- terracumber_config/tf_files/variables/PR-TEST-variable.tf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/terracumber_config/tf_files/variables/PR-TEST-variable.tf b/terracumber_config/tf_files/variables/PR-TEST-variable.tf index a24c1e759..5963099fe 100644 --- a/terracumber_config/tf_files/variables/PR-TEST-variable.tf +++ b/terracumber_config/tf_files/variables/PR-TEST-variable.tf @@ -27,10 +27,12 @@ variable "CUCUMBER_RESULTS" { variable "MAIL_SUBJECT" { type = string + default = "Define in product tfvars" } variable "MAIL_TEMPLATE" { type = string + default = "Define in product tfvars" } variable "MAIL_SUBJECT_ENV_FAIL" { @@ -40,6 +42,7 @@ variable "MAIL_SUBJECT_ENV_FAIL" { variable "MAIL_TEMPLATE_ENV_FAIL" { type = string + default = "Define in product tfvars" } variable "ENVIRONMENT" { From 6507dac6c8798a2671b3c02d6c98796d474a87f8 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 25 Jul 2023 17:06:02 +1200 Subject: [PATCH 037/110] Add variable for additionnal_repos_only --- terracumber_config/tf_files/PR-TEST-main.tf | 4 ++-- terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars | 1 + terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars | 1 + terracumber_config/tf_files/variables/PR-TEST-variable.tf | 4 ++++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/terracumber_config/tf_files/PR-TEST-main.tf b/terracumber_config/tf_files/PR-TEST-main.tf index f903bbd79..359ea00b0 100644 --- a/terracumber_config/tf_files/PR-TEST-main.tf +++ b/terracumber_config/tf_files/PR-TEST-main.tf @@ -56,7 +56,7 @@ module "cucumber_testsuite" { provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["server"] } - additional_repos_only = true + additional_repos_only = var.ADDITIONAL_REPOS_ONLY additional_repos = { pull_request_repo = var.PULL_REQUEST_REPO, master_repo = var.MASTER_REPO, @@ -78,7 +78,7 @@ module "cucumber_testsuite" { provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["proxy"] } - additional_repos_only = true + additional_repos_only = var.ADDITIONAL_REPOS_ONLY additional_repos = { pull_request_repo = var.PULL_REQUEST_REPO, master_repo = var.MASTER_REPO, diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars index b33367840..76f57947c 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars @@ -11,3 +11,4 @@ CUCUMBER_GITREPO = "https://github.com/SUSE/spacewalk/spacewalk.git" CUCUMBER_COMMAND = "export PRODUCT='SUSE-Manager' && run-testsuite" URL_PREFIX = "https://ci.suse.de/view/Manager/view/Uyuni/job/suma43-prs-ci-tests" USE_MIRROR = true +ADDITIONAL_REPOS_ONLY = false diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars index fbdb4aabf..d1812d686 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars @@ -11,3 +11,4 @@ CUCUMBER_GITREPO = "https://github.com/uyuni-project/uyuni.git" CUCUMBER_COMMAND = "export PRODUCT='Uyuni' && run-testsuite" URL_PREFIX = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" USE_MIRROR = true +ADDITIONAL_REPOS_ONLY = true diff --git a/terracumber_config/tf_files/variables/PR-TEST-variable.tf b/terracumber_config/tf_files/variables/PR-TEST-variable.tf index 5963099fe..9569a9f72 100644 --- a/terracumber_config/tf_files/variables/PR-TEST-variable.tf +++ b/terracumber_config/tf_files/variables/PR-TEST-variable.tf @@ -156,6 +156,10 @@ variable "BRIDGE" { type = string } +variable "ADDITIONAL_REPOS_ONLY" { + type = bool +} + variable "ENVIRONMENT_CONFIGURATION" { type = map description = "Collection of value containing : mac addresses, hypervisor and additional network" From efe5384758dc3d57fa9ce9b59f08e80dc96794af Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 26 Jul 2023 08:43:08 +1200 Subject: [PATCH 038/110] Fix with Oscar comments --- terracumber_config/tf_files/PR-TEST-main.tf | 31 ++++++++++++++----- .../tf_files/tfvars/PR-TEST-manager43.tfvars | 2 ++ .../tf_files/tfvars/PR-TEST-uyuni.tfvars | 6 ++-- .../tf_files/variables/PR-TEST-variable.tf | 12 +++++-- 4 files changed, 40 insertions(+), 11 deletions(-) diff --git a/terracumber_config/tf_files/PR-TEST-main.tf b/terracumber_config/tf_files/PR-TEST-main.tf index 359ea00b0..8801f3caa 100644 --- a/terracumber_config/tf_files/PR-TEST-main.tf +++ b/terracumber_config/tf_files/PR-TEST-main.tf @@ -8,7 +8,6 @@ terraform { } } - provider "libvirt" { uri = "qemu+tcp://${var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].hypervisor}/system" } @@ -50,11 +49,15 @@ module "cucumber_testsuite" { controller = { provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["controller"] + vcpu = 2 + memory = 2048 } } server = { provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["server"] + vcpu = 8 + memory = 32768 } additional_repos_only = var.ADDITIONAL_REPOS_ONLY additional_repos = { @@ -77,6 +80,8 @@ module "cucumber_testsuite" { proxy = { provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["proxy"] + vcpu = 2 + memory = 2048 } additional_repos_only = var.ADDITIONAL_REPOS_ONLY additional_repos = { @@ -98,10 +103,12 @@ module "cucumber_testsuite" { install_salt_bundle = true } suse-minion = { - image = "sles15sp4o" - name = "min-sles15" + image = var.SUSE_MINION_IMAGE + name = "min-${var.SUSE_MINION_NAME}" provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["suse-minion"] + vcpu = 2 + memory = 2048 } additional_repos = { tools_update = var.SLE_CLIENT_REPO, @@ -110,10 +117,12 @@ module "cucumber_testsuite" { install_salt_bundle = true } suse-sshminion = { - image = "sles15sp4o" - name = "minssh-sles15" + image = var.SUSE_MINION_IMAGE + name = "minssh-${var.SUSE_MINION_NAME}" provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["suse-sshminion"] + vcpu = 2 + memory = 2048 } additional_repos = { tools_update = var.SLE_CLIENT_REPO, @@ -140,6 +149,8 @@ module "cucumber_testsuite" { name = "min-ubuntu2204" provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["debian-minion"] + vcpu = 2 + memory = 2048 } additional_repos = { client_repo = var.DEBLIKE_CLIENT_REPO, @@ -154,7 +165,8 @@ module "cucumber_testsuite" { name = "min-build" provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["build-host"] - memory = 2048 + vcpu = 4 + memory = 8192 } additional_repos = { tools_update = var.SLE_CLIENT_REPO, @@ -164,6 +176,10 @@ module "cucumber_testsuite" { } pxeboot-minion = { image = "sles15sp4o" + provider_settings = { + vcpu = 2 + memory = 2048 + } additional_repos = { tools_update = var.SLE_CLIENT_REPO, } @@ -189,6 +205,8 @@ module "cucumber_testsuite" { } provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["kvm-host"] + vcpu = 4 + memory = 8192 } additional_repos_only = true additional_repos = { @@ -231,7 +249,6 @@ resource "null_resource" "add_test_information" { } } - output "configuration" { value = module.cucumber_testsuite.configuration } diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars index 76f57947c..2d3f48506 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars @@ -2,6 +2,8 @@ IMAGE = "sles15sp4o" IMAGES = ["rocky8o", "opensuse154o", "sles15sp4o", "ubuntu2204o"] +SUSE_MINION_IMAGE = "sles15sp4o" +SUSE_MINION_NAME = "sles15" PRODUCT_VERSION = "4.3-nightly" MAIL_TEMPLATE_ENV_FAIL = "../mail_templates/mail-template-jenkins-suma43-pull-request-env-fail.txt" MAIL_TEMPLATE = "../mail_templates/mail-template-jenkins-suma43-pull-request.txt" diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars index d1812d686..d9e9d2286 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars @@ -1,7 +1,9 @@ ############ Uyuni unique variables ######################## IMAGE = "opensuse154-ci-pro" -IMAGES = ["rocky8o", "opensuse154o", "opensuse154-ci-pro", "sles15sp4o", "ubuntu2204o"] +IMAGES = ["rocky8o", "opensuse154o", "opensuse154-ci-pro", "ubuntu2204o"] +SUSE_MINION_IMAGE = "opensuse154o" +SUSE_MINION_NAME = "leap15" PRODUCT_VERSION = "uyuni-pr" MAIL_TEMPLATE_ENV_FAIL = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" MAIL_TEMPLATE = "../mail_templates/mail-template-jenkins-pull-request.txt" @@ -11,4 +13,4 @@ CUCUMBER_GITREPO = "https://github.com/uyuni-project/uyuni.git" CUCUMBER_COMMAND = "export PRODUCT='Uyuni' && run-testsuite" URL_PREFIX = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" USE_MIRROR = true -ADDITIONAL_REPOS_ONLY = true +ADDITIONAL_REPOS_ONLY = true \ No newline at end of file diff --git a/terracumber_config/tf_files/variables/PR-TEST-variable.tf b/terracumber_config/tf_files/variables/PR-TEST-variable.tf index 9569a9f72..7de0ef02e 100644 --- a/terracumber_config/tf_files/variables/PR-TEST-variable.tf +++ b/terracumber_config/tf_files/variables/PR-TEST-variable.tf @@ -51,12 +51,12 @@ variable "ENVIRONMENT" { variable "MAIL_FROM" { type = string - default = "galaxy-ci@suse.de" + default = "galaxy-noise@suse.de" } variable "MAIL_TO" { type = string - default = "galaxy-ci@suse.de" + default = "galaxy-noise@suse.de" } // sumaform specific variables @@ -136,6 +136,14 @@ variable "IMAGES" { type = list(string) } +variable "SUSE_MINION_IMAGE" { + type = string +} + +variable "SUSE_MINION_NAME" { + type = string +} + variable "PRODUCT_VERSION" { type = string } From f0f609657bf39ae8181b3203dabf6c4f4c4b6c7e Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 26 Jul 2023 09:06:26 +1200 Subject: [PATCH 039/110] Move tfvars into terraform tfvars --- .../common/pipeline-pull-request-light.groovy | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy index 3e32abb61..5ca747905 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy @@ -29,6 +29,9 @@ def run(params) { env.common_params = '' fqdn_jenkins_node = sh(script: "hostname -f", returnStdout: true).trim() env_number = 2 + tfvariables_file = 'susemanager-ci/terracumber_config/tf_files/variables/PR-TEST-variable.tf' + tfvars_manager43 = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars' + tfvars_nuremberg = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars' try { stage('Checkout CI tools') { ws(environment_workspace){ @@ -42,10 +45,7 @@ def run(params) { env.resultdir = "${WORKSPACE}/results" env.resultdirbuild = "${resultdir}/${BUILD_NUMBER}" env.tf_file = "susemanager-ci/terracumber_config/tf_files/PR-TEST-main.tf" - tfvariables_file = 'susemanager-ci/terracumber_config/tf_files/variables/PR-TEST-variable.tf' - tfvars_manager43 = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars' - tfvars_nuremberg = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars' - env.common_params = "--outputdir ${resultdir} --tf ${tf_file} --gitfolder ${resultdir}/sumaform --tfvariables_file=${tfvariables_file} --tfvars_files=${tfvars_nuremberg} --tfvars_files=${tfvars_manager43}" + env.common_params = "--outputdir ${resultdir} --tf ${tf_file} --gitfolder ${resultdir}/sumaform --tf_variables_description_file=${tfvariables_file}" if (params.terraform_parallelism) { env.common_params = "${env.common_params} --parallelism ${params.terraform_parallelism}" @@ -91,6 +91,9 @@ def run(params) { } else { env.TERRAFORM_INIT = '' } + sh "rm ${env.resultdir}/sumaform/terraform.tfvars" + sh "cat ${tfvars_manager43} ${tfvars_nuremberg} >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo 'ENVIRONMENT = \'${env_number}\' >> ${env.resultdir}/sumaform/terraform.tfvars" sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_ENVIRONMENT=${env_number}; export TF_VAR_SLE_CLIENT_REPO=${SLE_CLIENT_REPO};export TF_VAR_RHLIKE_CLIENT_REPO=${RHLIKE_CLIENT_REPO};export TF_VAR_DEBLIKE_CLIENT_REPO=${DEBLIKE_CLIENT_REPO};export TF_VAR_OPENSUSE_CLIENT_REPO=${OPENSUSE_CLIENT_REPO};export TF_VAR_PULL_REQUEST_REPO=${PULL_REQUEST_REPO}; export TF_VAR_MASTER_OTHER_REPO=${MASTER_OTHER_REPO};export TF_VAR_MASTER_SUMAFORM_TOOLS_REPO=${MASTER_SUMAFORM_TOOLS_REPO}; export TF_VAR_TEST_PACKAGES_REPO=${TEST_PACKAGES_REPO}; export TF_VAR_MASTER_REPO=${MASTER_REPO};export TF_VAR_UPDATE_REPO=${UPDATE_REPO};export TF_VAR_ADDITIONAL_REPO_URL=${ADDITIONAL_REPO_URL};export TF_VAR_CUCUMBER_GITREPO=${cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${cucumber_ref}; export TERRAFORM=${terraform_bin}; export TERRAFORM_PLUGINS=${terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log ${env.TERRAFORM_INIT} --taint '.*(domain|main_disk).*' --runstep provision" deployed = true } From 66b1358599c703c4dea081e1f035877cee7cce1d Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 26 Jul 2023 09:11:06 +1200 Subject: [PATCH 040/110] Fix rm --- .../environments/common/pipeline-pull-request-light.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy index 5ca747905..484696442 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy @@ -91,7 +91,7 @@ def run(params) { } else { env.TERRAFORM_INIT = '' } - sh "rm ${env.resultdir}/sumaform/terraform.tfvars" + sh "rm -f ${env.resultdir}/sumaform/terraform.tfvars" sh "cat ${tfvars_manager43} ${tfvars_nuremberg} >> ${env.resultdir}/sumaform/terraform.tfvars" sh "echo 'ENVIRONMENT = \'${env_number}\' >> ${env.resultdir}/sumaform/terraform.tfvars" sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_ENVIRONMENT=${env_number}; export TF_VAR_SLE_CLIENT_REPO=${SLE_CLIENT_REPO};export TF_VAR_RHLIKE_CLIENT_REPO=${RHLIKE_CLIENT_REPO};export TF_VAR_DEBLIKE_CLIENT_REPO=${DEBLIKE_CLIENT_REPO};export TF_VAR_OPENSUSE_CLIENT_REPO=${OPENSUSE_CLIENT_REPO};export TF_VAR_PULL_REQUEST_REPO=${PULL_REQUEST_REPO}; export TF_VAR_MASTER_OTHER_REPO=${MASTER_OTHER_REPO};export TF_VAR_MASTER_SUMAFORM_TOOLS_REPO=${MASTER_SUMAFORM_TOOLS_REPO}; export TF_VAR_TEST_PACKAGES_REPO=${TEST_PACKAGES_REPO}; export TF_VAR_MASTER_REPO=${MASTER_REPO};export TF_VAR_UPDATE_REPO=${UPDATE_REPO};export TF_VAR_ADDITIONAL_REPO_URL=${ADDITIONAL_REPO_URL};export TF_VAR_CUCUMBER_GITREPO=${cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${cucumber_ref}; export TERRAFORM=${terraform_bin}; export TERRAFORM_PLUGINS=${terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log ${env.TERRAFORM_INIT} --taint '.*(domain|main_disk).*' --runstep provision" From d15163dac86d8851876f5368882602e7a64318e8 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 26 Jul 2023 09:43:24 +1200 Subject: [PATCH 041/110] fix echo --- .../environments/common/pipeline-pull-request-light.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy index 484696442..2c84a77d7 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy @@ -93,7 +93,7 @@ def run(params) { } sh "rm -f ${env.resultdir}/sumaform/terraform.tfvars" sh "cat ${tfvars_manager43} ${tfvars_nuremberg} >> ${env.resultdir}/sumaform/terraform.tfvars" - sh "echo 'ENVIRONMENT = \'${env_number}\' >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo 'ENVIRONMENT = \'${env_number}\' >> ${env.resultdir}/sumaform/terraform.tfvars'" sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_ENVIRONMENT=${env_number}; export TF_VAR_SLE_CLIENT_REPO=${SLE_CLIENT_REPO};export TF_VAR_RHLIKE_CLIENT_REPO=${RHLIKE_CLIENT_REPO};export TF_VAR_DEBLIKE_CLIENT_REPO=${DEBLIKE_CLIENT_REPO};export TF_VAR_OPENSUSE_CLIENT_REPO=${OPENSUSE_CLIENT_REPO};export TF_VAR_PULL_REQUEST_REPO=${PULL_REQUEST_REPO}; export TF_VAR_MASTER_OTHER_REPO=${MASTER_OTHER_REPO};export TF_VAR_MASTER_SUMAFORM_TOOLS_REPO=${MASTER_SUMAFORM_TOOLS_REPO}; export TF_VAR_TEST_PACKAGES_REPO=${TEST_PACKAGES_REPO}; export TF_VAR_MASTER_REPO=${MASTER_REPO};export TF_VAR_UPDATE_REPO=${UPDATE_REPO};export TF_VAR_ADDITIONAL_REPO_URL=${ADDITIONAL_REPO_URL};export TF_VAR_CUCUMBER_GITREPO=${cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${cucumber_ref}; export TERRAFORM=${terraform_bin}; export TERRAFORM_PLUGINS=${terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log ${env.TERRAFORM_INIT} --taint '.*(domain|main_disk).*' --runstep provision" deployed = true } From bffa97660787c9b83d574c67b67c964d77dc42bf Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 26 Jul 2023 09:46:46 +1200 Subject: [PATCH 042/110] Have variable in only one place --- terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars | 1 - terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars | 1 - 2 files changed, 2 deletions(-) diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars index 2d3f48506..06509b69b 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars @@ -12,5 +12,4 @@ CUCUMBER_BRANCH = "Manager-4.3" CUCUMBER_GITREPO = "https://github.com/SUSE/spacewalk/spacewalk.git" CUCUMBER_COMMAND = "export PRODUCT='SUSE-Manager' && run-testsuite" URL_PREFIX = "https://ci.suse.de/view/Manager/view/Uyuni/job/suma43-prs-ci-tests" -USE_MIRROR = true ADDITIONAL_REPOS_ONLY = false diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars index d9e9d2286..cca2511f6 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars @@ -12,5 +12,4 @@ CUCUMBER_BRANCH = "master" CUCUMBER_GITREPO = "https://github.com/uyuni-project/uyuni.git" CUCUMBER_COMMAND = "export PRODUCT='Uyuni' && run-testsuite" URL_PREFIX = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" -USE_MIRROR = true ADDITIONAL_REPOS_ONLY = true \ No newline at end of file From 8a65cfbe0f0134fc8cda23b984dd746c952847c4 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 26 Jul 2023 10:00:55 +1200 Subject: [PATCH 043/110] Add unique variable descirption --- terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars | 2 ++ terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars | 2 ++ 2 files changed, 4 insertions(+) diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars index eb6d4e758..bd65b2014 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars @@ -1,3 +1,5 @@ +############ Nuremberg unique variables ########### + MIRROR = "minima-mirror.mgr.suse.de" DOMAIN = "mgr.suse.de" GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_nue" diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars index 6a8000d18..476be7abc 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars @@ -1,3 +1,5 @@ +############ Provo unique variables ########### + MIRROR = "minima-mirror.mgr.prv.suse.net" DOMAIN = "mgr.prv.suse.net" GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" From 5e8db3cfb4a8e9059039ef594d4370773578b828 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 26 Jul 2023 10:05:27 +1200 Subject: [PATCH 044/110] Fix env copy command --- .../environments/common/pipeline-pull-request-light.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy index 2c84a77d7..e16df6e33 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy @@ -93,7 +93,7 @@ def run(params) { } sh "rm -f ${env.resultdir}/sumaform/terraform.tfvars" sh "cat ${tfvars_manager43} ${tfvars_nuremberg} >> ${env.resultdir}/sumaform/terraform.tfvars" - sh "echo 'ENVIRONMENT = \'${env_number}\' >> ${env.resultdir}/sumaform/terraform.tfvars'" + sh "echo 'ENVIRONMENT = '\''${env_number}'\'' >> ${env.resultdir}/sumaform/terraform.tfvars'" sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_ENVIRONMENT=${env_number}; export TF_VAR_SLE_CLIENT_REPO=${SLE_CLIENT_REPO};export TF_VAR_RHLIKE_CLIENT_REPO=${RHLIKE_CLIENT_REPO};export TF_VAR_DEBLIKE_CLIENT_REPO=${DEBLIKE_CLIENT_REPO};export TF_VAR_OPENSUSE_CLIENT_REPO=${OPENSUSE_CLIENT_REPO};export TF_VAR_PULL_REQUEST_REPO=${PULL_REQUEST_REPO}; export TF_VAR_MASTER_OTHER_REPO=${MASTER_OTHER_REPO};export TF_VAR_MASTER_SUMAFORM_TOOLS_REPO=${MASTER_SUMAFORM_TOOLS_REPO}; export TF_VAR_TEST_PACKAGES_REPO=${TEST_PACKAGES_REPO}; export TF_VAR_MASTER_REPO=${MASTER_REPO};export TF_VAR_UPDATE_REPO=${UPDATE_REPO};export TF_VAR_ADDITIONAL_REPO_URL=${ADDITIONAL_REPO_URL};export TF_VAR_CUCUMBER_GITREPO=${cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${cucumber_ref}; export TERRAFORM=${terraform_bin}; export TERRAFORM_PLUGINS=${terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log ${env.TERRAFORM_INIT} --taint '.*(domain|main_disk).*' --runstep provision" deployed = true } From 9b37d036995f0e3a5ee509c1c89afdbcd757e528 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 26 Jul 2023 10:46:49 +1200 Subject: [PATCH 045/110] Add lane --- terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars index cca2511f6..8f6b0051e 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars @@ -12,4 +12,4 @@ CUCUMBER_BRANCH = "master" CUCUMBER_GITREPO = "https://github.com/uyuni-project/uyuni.git" CUCUMBER_COMMAND = "export PRODUCT='Uyuni' && run-testsuite" URL_PREFIX = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" -ADDITIONAL_REPOS_ONLY = true \ No newline at end of file +ADDITIONAL_REPOS_ONLY = true From 2b547e72fabb9f1415f20dceee9d28fbcb60df55 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 26 Jul 2023 10:49:23 +1200 Subject: [PATCH 046/110] Try to fix echo --- .../environments/common/pipeline-pull-request-light.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy index e16df6e33..738795041 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy @@ -93,7 +93,7 @@ def run(params) { } sh "rm -f ${env.resultdir}/sumaform/terraform.tfvars" sh "cat ${tfvars_manager43} ${tfvars_nuremberg} >> ${env.resultdir}/sumaform/terraform.tfvars" - sh "echo 'ENVIRONMENT = '\''${env_number}'\'' >> ${env.resultdir}/sumaform/terraform.tfvars'" + sh "echo 'ENVIRONMENT = \'${env_number}\'' >> ${env.resultdir}/sumaform/terraform.tfvars" sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_ENVIRONMENT=${env_number}; export TF_VAR_SLE_CLIENT_REPO=${SLE_CLIENT_REPO};export TF_VAR_RHLIKE_CLIENT_REPO=${RHLIKE_CLIENT_REPO};export TF_VAR_DEBLIKE_CLIENT_REPO=${DEBLIKE_CLIENT_REPO};export TF_VAR_OPENSUSE_CLIENT_REPO=${OPENSUSE_CLIENT_REPO};export TF_VAR_PULL_REQUEST_REPO=${PULL_REQUEST_REPO}; export TF_VAR_MASTER_OTHER_REPO=${MASTER_OTHER_REPO};export TF_VAR_MASTER_SUMAFORM_TOOLS_REPO=${MASTER_SUMAFORM_TOOLS_REPO}; export TF_VAR_TEST_PACKAGES_REPO=${TEST_PACKAGES_REPO}; export TF_VAR_MASTER_REPO=${MASTER_REPO};export TF_VAR_UPDATE_REPO=${UPDATE_REPO};export TF_VAR_ADDITIONAL_REPO_URL=${ADDITIONAL_REPO_URL};export TF_VAR_CUCUMBER_GITREPO=${cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${cucumber_ref}; export TERRAFORM=${terraform_bin}; export TERRAFORM_PLUGINS=${terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log ${env.TERRAFORM_INIT} --taint '.*(domain|main_disk).*' --runstep provision" deployed = true } From 8b8739e998cd93559722c9e8caef9c9e2621a62f Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 26 Jul 2023 14:53:19 +1200 Subject: [PATCH 047/110] Add additionnal repository variable --- terracumber_config/tf_files/PR-TEST-main.tf | 56 ++++--------------- .../tf_files/tfvars/PR-TEST-manager43.tfvars | 18 +++++- .../tf_files/tfvars/PR-TEST-uyuni.tfvars | 43 ++++++++++++++ .../tf_files/variables/PR-TEST-variable.tf | 12 ++++ 4 files changed, 82 insertions(+), 47 deletions(-) diff --git a/terracumber_config/tf_files/PR-TEST-main.tf b/terracumber_config/tf_files/PR-TEST-main.tf index 8801f3caa..2c1ce2588 100644 --- a/terracumber_config/tf_files/PR-TEST-main.tf +++ b/terracumber_config/tf_files/PR-TEST-main.tf @@ -60,18 +60,7 @@ module "cucumber_testsuite" { memory = 32768 } additional_repos_only = var.ADDITIONAL_REPOS_ONLY - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://${var.MIRROR}/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - } + additional_repos = var.ADDITIONAL_REPOS["server"] image = var.IMAGE additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true @@ -84,20 +73,7 @@ module "cucumber_testsuite" { memory = 2048 } additional_repos_only = var.ADDITIONAL_REPOS_ONLY - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://${var.MIRROR}/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - proxy_pool = "http://${var.MIRROR}/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", - tools_update = var.OPENSUSE_CLIENT_REPO - } + additional_repos = var.ADDITIONAL_REPOS["proxy"] image = var.IMAGE additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true @@ -110,9 +86,7 @@ module "cucumber_testsuite" { vcpu = 2 memory = 2048 } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } + additional_repos = var.ADDITIONAL_REPOS["suse-minion"] additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true } @@ -124,15 +98,13 @@ module "cucumber_testsuite" { vcpu = 2 memory = 2048 } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } + additional_repos = var.ADDITIONAL_REPOS["suse-minion"] additional_packages = [ "venv-salt-minion", "iptables" ] install_salt_bundle = true } redhat-minion = { - image = "rocky8o" - name = "min-rocky8" + image = var.REDHAT_MINION_IMAGE + name = "min-${var.REDHAT_MINION_NAME}" provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["redhat-minion"] memory = 2048 @@ -169,7 +141,7 @@ module "cucumber_testsuite" { memory = 8192 } additional_repos = { - tools_update = var.SLE_CLIENT_REPO, + tools_update_pr = var.SLE_CLIENT_REPO } additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true @@ -181,7 +153,7 @@ module "cucumber_testsuite" { memory = 2048 } additional_repos = { - tools_update = var.SLE_CLIENT_REPO, + tools_update_pr = var.SLE_CLIENT_REPO } additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true @@ -209,16 +181,8 @@ module "cucumber_testsuite" { memory = 8192 } additional_repos_only = true - additional_repos = { - client_repo = var.OPENSUSE_CLIENT_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - } - additional_packages = [ "venv-salt-minion" ] + additional_repos = var.ADDITIONAL_REPOS["kvm-host"] + additional_packages = [ "venv-salt-minion", "mkisofs" ] install_salt_bundle = true } } diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars index 06509b69b..2aa0f220d 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars @@ -1,7 +1,7 @@ ############ Spacewalk unique variables ########### IMAGE = "sles15sp4o" -IMAGES = ["rocky8o", "opensuse154o", "sles15sp4o", "ubuntu2204o"] +IMAGES = ["rocky9o", "opensuse154o", "sles15sp4o", "ubuntu2204o"] SUSE_MINION_IMAGE = "sles15sp4o" SUSE_MINION_NAME = "sles15" PRODUCT_VERSION = "4.3-nightly" @@ -13,3 +13,19 @@ CUCUMBER_GITREPO = "https://github.com/SUSE/spacewalk/spacewalk.git" CUCUMBER_COMMAND = "export PRODUCT='SUSE-Manager' && run-testsuite" URL_PREFIX = "https://ci.suse.de/view/Manager/view/Uyuni/job/suma43-prs-ci-tests" ADDITIONAL_REPOS_ONLY = false +REDHAT_MINION_IMAGE = "rocky9o" +REDHAT_MINION_NAME = "rocky9" +ADDITIONAL_REPOS = { + server = { + pull_request_repo = "${var.PULL_REQUEST_REPO}" + } + proxy = { + pull_request_repo = "${var.PULL_REQUEST_REPO}" + } + suse-minion = { + tools_update_pr = "${var.SLE_CLIENT_REPO}" + } + kvm-host = { + tools_update_pr = "${var.SLE_CLIENT_REPO}" + } +} diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars index 8f6b0051e..06169f3a4 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars @@ -13,3 +13,46 @@ CUCUMBER_GITREPO = "https://github.com/uyuni-project/uyuni.git" CUCUMBER_COMMAND = "export PRODUCT='Uyuni' && run-testsuite" URL_PREFIX = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" ADDITIONAL_REPOS_ONLY = true +REDHAT_MINION_IMAGE = "rocky8o" +REDHAT_MINION_NAME = "rocky8" +ADDITIONAL_REPOS = { + server = { + pull_request_repo = "${var.PULL_REQUEST_REPO}" + master_repo = "${var.MASTER_REPO}" + master_repo_other = "${var.MASTER_OTHER_REPO}" + master_sumaform_tools_repo = "${var.MASTER_SUMAFORM_TOOLS_REPO}" + test_packages_repo = "${var.TEST_PACKAGES_REPO}" + non_os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/non-oss/" + os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/oss/" + os_update = "${var.UPDATE_REPO}" + os_additional_repo = "${var.ADDITIONAL_REPO_URL}" + testing_overlay_devel = "http://${var.MIRROR}/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/" + } + proxy = { + pull_request_repo = "${var.PULL_REQUEST_REPO}" + master_repo = "${var.MASTER_REPO}" + master_repo_other = "${var.MASTER_OTHER_REPO}" + master_sumaform_tools_repo = "${var.MASTER_SUMAFORM_TOOLS_REPO}" + test_packages_repo = "${var.TEST_PACKAGES_REPO}" + non_os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/non-oss/" + os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/oss/" + os_update = "${var.UPDATE_REPO}" + os_additional_repo = "${var.ADDITIONAL_REPO_URL}" + testing_overlay_devel = "http://${var.MIRROR}/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/" + proxy_pool = "http://${var.MIRROR}/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/" + tools_update_pr = "${var.OPENSUSE_CLIENT_REPO}" + } + suse-minion = { + tools_update_pr = "${var.OPENSUSE_CLIENT_REPO}" + } + kvm-host = { + client_repo = "${var.OPENSUSE_CLIENT_REPO}" + master_sumaform_tools_repo = "${var.MASTER_SUMAFORM_TOOLS_REPO}" + test_packages_repo = "${var.TEST_PACKAGES_REPO}" + non_os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/non-oss/" + os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/oss/" + os_update = "${var.UPDATE_REPO}" + os_additional_repo = "${var.ADDITIONAL_REPO_URL}" + tools_update_pr = "${var.SLE_CLIENT_REPO}" + } +} \ No newline at end of file diff --git a/terracumber_config/tf_files/variables/PR-TEST-variable.tf b/terracumber_config/tf_files/variables/PR-TEST-variable.tf index 7de0ef02e..465297c51 100644 --- a/terracumber_config/tf_files/variables/PR-TEST-variable.tf +++ b/terracumber_config/tf_files/variables/PR-TEST-variable.tf @@ -144,6 +144,14 @@ variable "SUSE_MINION_NAME" { type = string } +variable "REDHAT_MINION_IMAGE" { + type = string +} + +variable "REDHAT_MINION_NAME" { + type = string +} + variable "PRODUCT_VERSION" { type = string } @@ -168,6 +176,10 @@ variable "ADDITIONAL_REPOS_ONLY" { type = bool } +variable "ADDITIONAL_REPOS" { + type = map +} + variable "ENVIRONMENT_CONFIGURATION" { type = map description = "Collection of value containing : mac addresses, hypervisor and additional network" From 53bf7510c5b6d4485744d38abe38725adec6344d Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 26 Jul 2023 14:54:25 +1200 Subject: [PATCH 048/110] Update kvm host --- terracumber_config/tf_files/PR-TEST-main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terracumber_config/tf_files/PR-TEST-main.tf b/terracumber_config/tf_files/PR-TEST-main.tf index 2c1ce2588..65534558f 100644 --- a/terracumber_config/tf_files/PR-TEST-main.tf +++ b/terracumber_config/tf_files/PR-TEST-main.tf @@ -180,7 +180,7 @@ module "cucumber_testsuite" { vcpu = 4 memory = 8192 } - additional_repos_only = true + additional_repos_only = var.ADDITIONAL_REPOS_ONLY additional_repos = var.ADDITIONAL_REPOS["kvm-host"] additional_packages = [ "venv-salt-minion", "mkisofs" ] install_salt_bundle = true From bf33ff1838ac40fe055f30ff01ce873cd62d0ef7 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 26 Jul 2023 16:17:31 +1200 Subject: [PATCH 049/110] Add local mode variables to manage additionnal repos configuration --- terracumber_config/tf_files/PR-TEST-main.tf | 10 ++-- .../tfvars/PR-TEST-additionnal-repos.tf | 56 +++++++++++++++++++ .../tf_files/tfvars/PR-TEST-manager43.tfvars | 14 ----- .../tf_files/tfvars/PR-TEST-uyuni.tfvars | 41 -------------- 4 files changed, 61 insertions(+), 60 deletions(-) create mode 100644 terracumber_config/tf_files/tfvars/PR-TEST-additionnal-repos.tf diff --git a/terracumber_config/tf_files/PR-TEST-main.tf b/terracumber_config/tf_files/PR-TEST-main.tf index 65534558f..dc6b0ebcc 100644 --- a/terracumber_config/tf_files/PR-TEST-main.tf +++ b/terracumber_config/tf_files/PR-TEST-main.tf @@ -60,7 +60,7 @@ module "cucumber_testsuite" { memory = 32768 } additional_repos_only = var.ADDITIONAL_REPOS_ONLY - additional_repos = var.ADDITIONAL_REPOS["server"] + additional_repos = local.additional_repos["server"] image = var.IMAGE additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true @@ -73,7 +73,7 @@ module "cucumber_testsuite" { memory = 2048 } additional_repos_only = var.ADDITIONAL_REPOS_ONLY - additional_repos = var.ADDITIONAL_REPOS["proxy"] + additional_repos = local.additional_repos["proxy"] image = var.IMAGE additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true @@ -86,7 +86,7 @@ module "cucumber_testsuite" { vcpu = 2 memory = 2048 } - additional_repos = var.ADDITIONAL_REPOS["suse-minion"] + additional_repos = local.additional_repos["suse-minion"] additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true } @@ -98,7 +98,7 @@ module "cucumber_testsuite" { vcpu = 2 memory = 2048 } - additional_repos = var.ADDITIONAL_REPOS["suse-minion"] + additional_repos = local.additional_repos["suse-minion"] additional_packages = [ "venv-salt-minion", "iptables" ] install_salt_bundle = true } @@ -181,7 +181,7 @@ module "cucumber_testsuite" { memory = 8192 } additional_repos_only = var.ADDITIONAL_REPOS_ONLY - additional_repos = var.ADDITIONAL_REPOS["kvm-host"] + additional_repos = local.additional_repos["kvm-host"] additional_packages = [ "venv-salt-minion", "mkisofs" ] install_salt_bundle = true } diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-additionnal-repos.tf b/terracumber_config/tf_files/tfvars/PR-TEST-additionnal-repos.tf new file mode 100644 index 000000000..df381c2a8 --- /dev/null +++ b/terracumber_config/tf_files/tfvars/PR-TEST-additionnal-repos.tf @@ -0,0 +1,56 @@ +locals { + additional_repos = var.PRODUCT_VERSION == "uyuni-pr" ? { + server = { + pull_request_repo = "${var.PULL_REQUEST_REPO}" + master_repo = "${var.MASTER_REPO}" + master_repo_other = "${var.MASTER_OTHER_REPO}" + master_sumaform_tools_repo = "${var.MASTER_SUMAFORM_TOOLS_REPO}" + test_packages_repo = "${var.TEST_PACKAGES_REPO}" + non_os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/non-oss/" + os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/oss/" + os_update = "${var.UPDATE_REPO}" + os_additional_repo = "${var.ADDITIONAL_REPO_URL}" + testing_overlay_devel = "http://${var.MIRROR}/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/" + } + proxy = { + pull_request_repo = "${var.PULL_REQUEST_REPO}" + master_repo = "${var.MASTER_REPO}" + master_repo_other = "${var.MASTER_OTHER_REPO}" + master_sumaform_tools_repo = "${var.MASTER_SUMAFORM_TOOLS_REPO}" + test_packages_repo = "${var.TEST_PACKAGES_REPO}" + non_os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/non-oss/" + os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/oss/" + os_update = "${var.UPDATE_REPO}" + os_additional_repo = "${var.ADDITIONAL_REPO_URL}" + testing_overlay_devel = "http://${var.MIRROR}/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/" + proxy_pool = "http://${var.MIRROR}/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/" + tools_update_pr = "${var.OPENSUSE_CLIENT_REPO}" + } + suse-minion = { + tools_update_pr = "${var.OPENSUSE_CLIENT_REPO}" + } + kvm-host = { + client_repo = "${var.OPENSUSE_CLIENT_REPO}" + master_sumaform_tools_repo = "${var.MASTER_SUMAFORM_TOOLS_REPO}" + test_packages_repo = "${var.TEST_PACKAGES_REPO}" + non_os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/non-oss/" + os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/oss/" + os_update = "${var.UPDATE_REPO}" + os_additional_repo = "${var.ADDITIONAL_REPO_URL}" + tools_update_pr = "${var.SLE_CLIENT_REPO}" + } + } : { + server = { + pull_request_repo = "${var.PULL_REQUEST_REPO}" + } + proxy = { + pull_request_repo = "${var.PULL_REQUEST_REPO}" + } + suse-minion = { + tools_update_pr = "${var.SLE_CLIENT_REPO}" + } + kvm-host = { + tools_update_pr = "${var.SLE_CLIENT_REPO}" + } + } +} diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars index 2aa0f220d..8800bdb15 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars @@ -15,17 +15,3 @@ URL_PREFIX = "https://ci.suse.de/view/Manager/view/Uyuni/job/suma43- ADDITIONAL_REPOS_ONLY = false REDHAT_MINION_IMAGE = "rocky9o" REDHAT_MINION_NAME = "rocky9" -ADDITIONAL_REPOS = { - server = { - pull_request_repo = "${var.PULL_REQUEST_REPO}" - } - proxy = { - pull_request_repo = "${var.PULL_REQUEST_REPO}" - } - suse-minion = { - tools_update_pr = "${var.SLE_CLIENT_REPO}" - } - kvm-host = { - tools_update_pr = "${var.SLE_CLIENT_REPO}" - } -} diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars index 06169f3a4..d0340dc49 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars @@ -15,44 +15,3 @@ URL_PREFIX = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-p ADDITIONAL_REPOS_ONLY = true REDHAT_MINION_IMAGE = "rocky8o" REDHAT_MINION_NAME = "rocky8" -ADDITIONAL_REPOS = { - server = { - pull_request_repo = "${var.PULL_REQUEST_REPO}" - master_repo = "${var.MASTER_REPO}" - master_repo_other = "${var.MASTER_OTHER_REPO}" - master_sumaform_tools_repo = "${var.MASTER_SUMAFORM_TOOLS_REPO}" - test_packages_repo = "${var.TEST_PACKAGES_REPO}" - non_os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/non-oss/" - os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/oss/" - os_update = "${var.UPDATE_REPO}" - os_additional_repo = "${var.ADDITIONAL_REPO_URL}" - testing_overlay_devel = "http://${var.MIRROR}/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/" - } - proxy = { - pull_request_repo = "${var.PULL_REQUEST_REPO}" - master_repo = "${var.MASTER_REPO}" - master_repo_other = "${var.MASTER_OTHER_REPO}" - master_sumaform_tools_repo = "${var.MASTER_SUMAFORM_TOOLS_REPO}" - test_packages_repo = "${var.TEST_PACKAGES_REPO}" - non_os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/non-oss/" - os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/oss/" - os_update = "${var.UPDATE_REPO}" - os_additional_repo = "${var.ADDITIONAL_REPO_URL}" - testing_overlay_devel = "http://${var.MIRROR}/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/" - proxy_pool = "http://${var.MIRROR}/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/" - tools_update_pr = "${var.OPENSUSE_CLIENT_REPO}" - } - suse-minion = { - tools_update_pr = "${var.OPENSUSE_CLIENT_REPO}" - } - kvm-host = { - client_repo = "${var.OPENSUSE_CLIENT_REPO}" - master_sumaform_tools_repo = "${var.MASTER_SUMAFORM_TOOLS_REPO}" - test_packages_repo = "${var.TEST_PACKAGES_REPO}" - non_os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/non-oss/" - os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/oss/" - os_update = "${var.UPDATE_REPO}" - os_additional_repo = "${var.ADDITIONAL_REPO_URL}" - tools_update_pr = "${var.SLE_CLIENT_REPO}" - } -} \ No newline at end of file From 179fddd8952cfa2a127061a564aefe26465a7e26 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 26 Jul 2023 16:18:35 +1200 Subject: [PATCH 050/110] remove additionnal repo for variables.tf --- .../environments/common/pipeline-pull-request-light.groovy | 2 ++ terracumber_config/tf_files/variables/PR-TEST-variable.tf | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy index 738795041..733801a5e 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy @@ -32,6 +32,7 @@ def run(params) { tfvariables_file = 'susemanager-ci/terracumber_config/tf_files/variables/PR-TEST-variable.tf' tfvars_manager43 = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars' tfvars_nuremberg = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars' + tf_local_variables = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-additionnal-repos.tf' try { stage('Checkout CI tools') { ws(environment_workspace){ @@ -94,6 +95,7 @@ def run(params) { sh "rm -f ${env.resultdir}/sumaform/terraform.tfvars" sh "cat ${tfvars_manager43} ${tfvars_nuremberg} >> ${env.resultdir}/sumaform/terraform.tfvars" sh "echo 'ENVIRONMENT = \'${env_number}\'' >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "cp ${tf_local_variables} ${env.resultdir}/sumaform/terraform.tfvars" sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_ENVIRONMENT=${env_number}; export TF_VAR_SLE_CLIENT_REPO=${SLE_CLIENT_REPO};export TF_VAR_RHLIKE_CLIENT_REPO=${RHLIKE_CLIENT_REPO};export TF_VAR_DEBLIKE_CLIENT_REPO=${DEBLIKE_CLIENT_REPO};export TF_VAR_OPENSUSE_CLIENT_REPO=${OPENSUSE_CLIENT_REPO};export TF_VAR_PULL_REQUEST_REPO=${PULL_REQUEST_REPO}; export TF_VAR_MASTER_OTHER_REPO=${MASTER_OTHER_REPO};export TF_VAR_MASTER_SUMAFORM_TOOLS_REPO=${MASTER_SUMAFORM_TOOLS_REPO}; export TF_VAR_TEST_PACKAGES_REPO=${TEST_PACKAGES_REPO}; export TF_VAR_MASTER_REPO=${MASTER_REPO};export TF_VAR_UPDATE_REPO=${UPDATE_REPO};export TF_VAR_ADDITIONAL_REPO_URL=${ADDITIONAL_REPO_URL};export TF_VAR_CUCUMBER_GITREPO=${cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${cucumber_ref}; export TERRAFORM=${terraform_bin}; export TERRAFORM_PLUGINS=${terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log ${env.TERRAFORM_INIT} --taint '.*(domain|main_disk).*' --runstep provision" deployed = true } diff --git a/terracumber_config/tf_files/variables/PR-TEST-variable.tf b/terracumber_config/tf_files/variables/PR-TEST-variable.tf index 465297c51..8544e3e1c 100644 --- a/terracumber_config/tf_files/variables/PR-TEST-variable.tf +++ b/terracumber_config/tf_files/variables/PR-TEST-variable.tf @@ -176,10 +176,6 @@ variable "ADDITIONAL_REPOS_ONLY" { type = bool } -variable "ADDITIONAL_REPOS" { - type = map -} - variable "ENVIRONMENT_CONFIGURATION" { type = map description = "Collection of value containing : mac addresses, hypervisor and additional network" From 2f2303eb0404a336d36c124147c252d94b932127 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 26 Jul 2023 16:31:53 +1200 Subject: [PATCH 051/110] correct cp --- .../environments/common/pipeline-pull-request-light.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy index 733801a5e..27a722941 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy @@ -95,7 +95,7 @@ def run(params) { sh "rm -f ${env.resultdir}/sumaform/terraform.tfvars" sh "cat ${tfvars_manager43} ${tfvars_nuremberg} >> ${env.resultdir}/sumaform/terraform.tfvars" sh "echo 'ENVIRONMENT = \'${env_number}\'' >> ${env.resultdir}/sumaform/terraform.tfvars" - sh "cp ${tf_local_variables} ${env.resultdir}/sumaform/terraform.tfvars" + sh "cp ${tf_local_variables} ${env.resultdir}/sumaform/" sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_ENVIRONMENT=${env_number}; export TF_VAR_SLE_CLIENT_REPO=${SLE_CLIENT_REPO};export TF_VAR_RHLIKE_CLIENT_REPO=${RHLIKE_CLIENT_REPO};export TF_VAR_DEBLIKE_CLIENT_REPO=${DEBLIKE_CLIENT_REPO};export TF_VAR_OPENSUSE_CLIENT_REPO=${OPENSUSE_CLIENT_REPO};export TF_VAR_PULL_REQUEST_REPO=${PULL_REQUEST_REPO}; export TF_VAR_MASTER_OTHER_REPO=${MASTER_OTHER_REPO};export TF_VAR_MASTER_SUMAFORM_TOOLS_REPO=${MASTER_SUMAFORM_TOOLS_REPO}; export TF_VAR_TEST_PACKAGES_REPO=${TEST_PACKAGES_REPO}; export TF_VAR_MASTER_REPO=${MASTER_REPO};export TF_VAR_UPDATE_REPO=${UPDATE_REPO};export TF_VAR_ADDITIONAL_REPO_URL=${ADDITIONAL_REPO_URL};export TF_VAR_CUCUMBER_GITREPO=${cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${cucumber_ref}; export TERRAFORM=${terraform_bin}; export TERRAFORM_PLUGINS=${terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log ${env.TERRAFORM_INIT} --taint '.*(domain|main_disk).*' --runstep provision" deployed = true } From 769f78be42c0aee94c346c385b127e77bbec7a61 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 1 Aug 2023 10:43:28 +1200 Subject: [PATCH 052/110] Remove mirror from NUE env --- terracumber_config/tf_files/PR-TEST-main.tf | 12 ++++++------ .../tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars | 6 +++--- .../tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars | 4 ++-- .../tf_files/tfvars/PR-TEST-manager43.tfvars | 1 + .../tf_files/tfvars/PR-TEST-uyuni.tfvars | 1 + 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/terracumber_config/tf_files/PR-TEST-main.tf b/terracumber_config/tf_files/PR-TEST-main.tf index dc6b0ebcc..5b4d47d69 100644 --- a/terracumber_config/tf_files/PR-TEST-main.tf +++ b/terracumber_config/tf_files/PR-TEST-main.tf @@ -26,7 +26,7 @@ module "cucumber_testsuite" { cc_username = var.SCC_USER cc_password = var.SCC_PASSWORD mirror = var.MIRROR - use_mirror_images = var.USE_MIRROR + use_mirror_images = var.USE_MIRROR_IMAGES // TO DO : is it really set somewhere ? images = var.IMAGES @@ -42,7 +42,7 @@ module "cucumber_testsuite" { git_profiles_repo = var.GIT_PROFILES_REPO server_http_proxy = "http-proxy.${var.DOMAIN}:3128" - custom_download_endpoint = "ftp://${var.MIRROR}:445" + custom_download_endpoint = "ftp://${var.DOWNLOAD_ENDPOINT}:445" # when changing images, please also keep in mind to adjust the image matrix at the end of the README. host_settings = { @@ -165,13 +165,13 @@ module "cucumber_testsuite" { hvm_disk_image = { leap = { hostname = "suma-pr${var.ENVIRONMENT}-min-nested" - image = "http://${var.MIRROR}/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" - hash = "http://${var.MIRROR}/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" + image = "http://${var.DOWNLOAD_ENDPOINT}/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" + hash = "http://${var.DOWNLOAD_ENDPOINT}/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" } sles = { hostname = "suma-pr${var.ENVIRONMENT}-min-nested" - image = "http://${var.MIRROR}/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" - hash = "http://${var.MIRROR}/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" + image = "http://${var.DOWNLOAD_ENDPOINT}/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" + hash = "http://${var.DOWNLOAD_ENDPOINT}/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" } } } diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars index bd65b2014..d42f2c391 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars @@ -1,9 +1,9 @@ ############ Nuremberg unique variables ########### -MIRROR = "minima-mirror.mgr.suse.de" +MIRROR = null DOMAIN = "mgr.suse.de" -GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_nue" -USE_MIRROR = true +DOWNLOAD_ENDPOINT = "minima-mirror.mgr.suse.de" +USE_MIRROR_IMAGES = true BRIDGE = "br0" ENVIRONMENT_CONFIGURATION = { 1 = { diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars index 476be7abc..4bf7c7124 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars @@ -1,9 +1,9 @@ ############ Provo unique variables ########### MIRROR = "minima-mirror.mgr.prv.suse.net" +DOWNLOAD_ENDPOINT = "minima-mirror.mgr.prv.suse.net" DOMAIN = "mgr.prv.suse.net" -GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" -USE_MIRROR = true +USE_MIRROR_IMAGES = false BRIDGE = "br1" environment_description = { 1 = { diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars index 8800bdb15..672002ed2 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars @@ -5,6 +5,7 @@ IMAGES = ["rocky9o", "opensuse154o", "sles15sp4o", "ubuntu2204o" SUSE_MINION_IMAGE = "sles15sp4o" SUSE_MINION_NAME = "sles15" PRODUCT_VERSION = "4.3-nightly" +GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_nue" MAIL_TEMPLATE_ENV_FAIL = "../mail_templates/mail-template-jenkins-suma43-pull-request-env-fail.txt" MAIL_TEMPLATE = "../mail_templates/mail-template-jenkins-suma43-pull-request.txt" MAIL_SUBJECT = "$status acceptance tests on SUMA 4.3 Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars index d0340dc49..74baf449f 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars @@ -5,6 +5,7 @@ IMAGES = ["rocky8o", "opensuse154o", "opensuse154-ci-pro", "ubun SUSE_MINION_IMAGE = "opensuse154o" SUSE_MINION_NAME = "leap15" PRODUCT_VERSION = "uyuni-pr" +GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_nue" MAIL_TEMPLATE_ENV_FAIL = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" MAIL_TEMPLATE = "../mail_templates/mail-template-jenkins-pull-request.txt" MAIL_SUBJECT = "$status acceptance tests on Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" From c790a23fb1347de3d21c214a809b82058bbf39a1 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 1 Aug 2023 10:49:23 +1200 Subject: [PATCH 053/110] Remove mirror from NUE env --- terracumber_config/tf_files/variables/PR-TEST-variable.tf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/terracumber_config/tf_files/variables/PR-TEST-variable.tf b/terracumber_config/tf_files/variables/PR-TEST-variable.tf index 8544e3e1c..ef599ecf7 100644 --- a/terracumber_config/tf_files/variables/PR-TEST-variable.tf +++ b/terracumber_config/tf_files/variables/PR-TEST-variable.tf @@ -160,7 +160,8 @@ variable "MIRROR" { type = string } -variable "USE_MIRROR" { +variable "USE_MIRROR_IMAGES" { + description = "use true download images from a mirror host" type = bool } @@ -180,3 +181,8 @@ variable "ENVIRONMENT_CONFIGURATION" { type = map description = "Collection of value containing : mac addresses, hypervisor and additional network" } + +variable "DOWNLOAD_ENDPOINT" { + type = string + description = "Download enpoint to get build images and set custom_download_endpoint. This value is equal to platform mirror" +} From a7a359692e1c3767ddac30bdafda925e8028df41 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 1 Aug 2023 10:50:55 +1200 Subject: [PATCH 054/110] Disable mirror images --- terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars index d42f2c391..a1b87a8d8 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars @@ -3,7 +3,7 @@ MIRROR = null DOMAIN = "mgr.suse.de" DOWNLOAD_ENDPOINT = "minima-mirror.mgr.suse.de" -USE_MIRROR_IMAGES = true +USE_MIRROR_IMAGES = false BRIDGE = "br0" ENVIRONMENT_CONFIGURATION = { 1 = { From 3dcadbbcbbc63055d1f4b779a72f6cc54f10cb8b Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 1 Aug 2023 10:52:45 +1200 Subject: [PATCH 055/110] remove uselss comment --- terracumber_config/tf_files/PR-TEST-main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terracumber_config/tf_files/PR-TEST-main.tf b/terracumber_config/tf_files/PR-TEST-main.tf index 5b4d47d69..b43ab4b1d 100644 --- a/terracumber_config/tf_files/PR-TEST-main.tf +++ b/terracumber_config/tf_files/PR-TEST-main.tf @@ -26,7 +26,7 @@ module "cucumber_testsuite" { cc_username = var.SCC_USER cc_password = var.SCC_PASSWORD mirror = var.MIRROR - use_mirror_images = var.USE_MIRROR_IMAGES // TO DO : is it really set somewhere ? + use_mirror_images = var.USE_MIRROR_IMAGES images = var.IMAGES From f7c3fc311617a1f2e850242c1e0a5890c0b71c2d Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 1 Aug 2023 11:19:54 +1200 Subject: [PATCH 056/110] Change debian install_salt_bundle = true --- terracumber_config/tf_files/PR-TEST-main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terracumber_config/tf_files/PR-TEST-main.tf b/terracumber_config/tf_files/PR-TEST-main.tf index b43ab4b1d..838312c58 100644 --- a/terracumber_config/tf_files/PR-TEST-main.tf +++ b/terracumber_config/tf_files/PR-TEST-main.tf @@ -130,7 +130,7 @@ module "cucumber_testsuite" { additional_packages = [ "venv-salt-minion" ] // FIXME: cloudl-init fails if venv-salt-minion is not avaiable // We can set "install_salt_bundle = true" as soon as venv-salt-minion is available Uyuni:Stable - install_salt_bundle = false + install_salt_bundle = true } build-host = { image = "sles15sp4o" From 31e63ced7941cff31c064e63238f0fe71e8cb08f Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 1 Aug 2023 13:25:28 +1200 Subject: [PATCH 057/110] Add ENV specific extension --- terracumber_config/tf_files/PR-TEST-main.tf | 2 +- terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars | 2 +- terracumber_config/tf_files/variables/PR-TEST-variable.tf | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/terracumber_config/tf_files/PR-TEST-main.tf b/terracumber_config/tf_files/PR-TEST-main.tf index 838312c58..7f875474c 100644 --- a/terracumber_config/tf_files/PR-TEST-main.tf +++ b/terracumber_config/tf_files/PR-TEST-main.tf @@ -31,7 +31,7 @@ module "cucumber_testsuite" { images = var.IMAGES use_avahi = false - name_prefix = "suma-pr${var.ENVIRONMENT}-" + name_prefix = "suma-pr${var.ENVIRONMENT}${var.ENVIRONMENT_PREFIX}-" domain = var.DOMAIN from_email = "root@suse.de" diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars index a1b87a8d8..e062e02e7 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars @@ -1,7 +1,7 @@ ############ Nuremberg unique variables ########### -MIRROR = null DOMAIN = "mgr.suse.de" +ENVIRONMENT_PREFIX = "-nue" DOWNLOAD_ENDPOINT = "minima-mirror.mgr.suse.de" USE_MIRROR_IMAGES = false BRIDGE = "br0" diff --git a/terracumber_config/tf_files/variables/PR-TEST-variable.tf b/terracumber_config/tf_files/variables/PR-TEST-variable.tf index ef599ecf7..0e3b353bb 100644 --- a/terracumber_config/tf_files/variables/PR-TEST-variable.tf +++ b/terracumber_config/tf_files/variables/PR-TEST-variable.tf @@ -158,6 +158,7 @@ variable "PRODUCT_VERSION" { variable "MIRROR" { type = string + default = null } variable "USE_MIRROR_IMAGES" { @@ -186,3 +187,9 @@ variable "DOWNLOAD_ENDPOINT" { type = string description = "Download enpoint to get build images and set custom_download_endpoint. This value is equal to platform mirror" } + +variable "ENVIRONMENT_PREFIX" { + type = string + description = "NUE has prefix nue in hostname" + default = null +} From a1c612c3f789fd7bd10ee3303d4ea249f64bdbdd Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 1 Aug 2023 13:30:06 +1200 Subject: [PATCH 058/110] Rename variable --- terracumber_config/tf_files/PR-TEST-main.tf | 2 +- terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars | 2 +- terracumber_config/tf_files/variables/PR-TEST-variable.tf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/terracumber_config/tf_files/PR-TEST-main.tf b/terracumber_config/tf_files/PR-TEST-main.tf index 7f875474c..176bf14a4 100644 --- a/terracumber_config/tf_files/PR-TEST-main.tf +++ b/terracumber_config/tf_files/PR-TEST-main.tf @@ -31,7 +31,7 @@ module "cucumber_testsuite" { images = var.IMAGES use_avahi = false - name_prefix = "suma-pr${var.ENVIRONMENT}${var.ENVIRONMENT_PREFIX}-" + name_prefix = "suma-pr${var.ENVIRONMENT}${var.ENVIRONMENT_EXTENSION}-" domain = var.DOMAIN from_email = "root@suse.de" diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars index e062e02e7..a8238f22d 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars @@ -1,7 +1,7 @@ ############ Nuremberg unique variables ########### DOMAIN = "mgr.suse.de" -ENVIRONMENT_PREFIX = "-nue" +ENVIRONMENT_EXTENSION = "-nue" DOWNLOAD_ENDPOINT = "minima-mirror.mgr.suse.de" USE_MIRROR_IMAGES = false BRIDGE = "br0" diff --git a/terracumber_config/tf_files/variables/PR-TEST-variable.tf b/terracumber_config/tf_files/variables/PR-TEST-variable.tf index 0e3b353bb..1eebc4a7e 100644 --- a/terracumber_config/tf_files/variables/PR-TEST-variable.tf +++ b/terracumber_config/tf_files/variables/PR-TEST-variable.tf @@ -188,7 +188,7 @@ variable "DOWNLOAD_ENDPOINT" { description = "Download enpoint to get build images and set custom_download_endpoint. This value is equal to platform mirror" } -variable "ENVIRONMENT_PREFIX" { +variable "ENVIRONMENT_EXTENSION" { type = string description = "NUE has prefix nue in hostname" default = null From 66a5b80f8fdf06325fcbb79ef0fdf80791623bd2 Mon Sep 17 00:00:00 2001 From: Dominik Gedon Date: Tue, 16 May 2023 13:31:53 +0200 Subject: [PATCH 059/110] Uyuni: Switch from SLES to openSUSE Leap This will move all minions from SLES to openSUSE Leap 15.4 on Uyuni and the pull request tets. See: - https://github.com/SUSE/spacewalk/issues/20945 - https://github.com/SUSE/spacewalk/issues/10235 Signed-off-by: Dominik Gedon --- .../tf_files/Uyuni-PR-tests-env5.tf | 369 ++++++++++++++++++ .../tf_files/Uyuni-PR-tests-env6.tf | 369 ++++++++++++++++++ 2 files changed, 738 insertions(+) create mode 100644 terracumber_config/tf_files/Uyuni-PR-tests-env5.tf create mode 100644 terracumber_config/tf_files/Uyuni-PR-tests-env6.tf diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf new file mode 100644 index 000000000..410c0dd76 --- /dev/null +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf @@ -0,0 +1,369 @@ +// Mandatory variables for terracumber +variable "URL_PREFIX" { + type = string + default = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" +} + +// Not really used as this is for --runall parameter, and we run cucumber step by step +variable "CUCUMBER_COMMAND" { + type = string + default = "export PRODUCT='Uyuni' && run-testsuite" +} + +variable "CUCUMBER_GITREPO" { + type = string + default = "https://github.com/uyuni-project/uyuni.git" +} + +variable "CUCUMBER_BRANCH" { + type = string + default = "master" +} + +variable "CUCUMBER_RESULTS" { + type = string + default = "/root/spacewalk/testsuite" +} + +variable "MAIL_SUBJECT" { + type = string + default = "$status acceptance tests on Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" +} + +variable "MAIL_TEMPLATE" { + type = string + default = "../mail_templates/mail-template-jenkins-pull-request.txt" +} + +variable "MAIL_SUBJECT_ENV_FAIL" { + type = string + default = "Failed acceptance tests on Pull Request: Environment setup failed" +} + +variable "MAIL_TEMPLATE_ENV_FAIL" { + type = string + default = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" +} + +variable "ENVIRONMENT" { + type = string + default = "5" +} + +variable "HYPER" { + type = string + default = "hyperion.mgr.prv.suse.net" +} + +variable "MAIL_FROM" { + type = string + default = "galaxy-ci@suse.de" +} + +variable "MAIL_TO" { + type = string + default = "galaxy-ci@suse.de" +} + +// sumaform specific variables +variable "SCC_USER" { + type = string +} + +variable "SCC_PASSWORD" { + type = string +} + +variable "GIT_USER" { + type = string + default = null // Not needed for master, as it is public +} + +variable "GIT_PASSWORD" { + type = string + default = null // Not needed for master, as it is public +} + +// Repository containing the build for the tested Uyuni Pull Request +variable "PULL_REQUEST_REPO" { + type = string +} + +variable "MASTER_REPO" { + type = string +} + +variable "MASTER_OTHER_REPO" { + type = string +} + +variable "MASTER_SUMAFORM_TOOLS_REPO" { + type = string +} + +variable "UPDATE_REPO" { + type = string +} + +variable "ADDITIONAL_REPO_URL" { + type = string +} + +variable "TEST_PACKAGES_REPO" { + type = string +} + +// Repositories containing the client tools RPMs +variable "SLE_CLIENT_REPO" { + type = string +} + +variable "RHLIKE_CLIENT_REPO" { + type = string +} + +variable "DEBLIKE_CLIENT_REPO" { + type = string +} + +variable "OPENSUSE_CLIENT_REPO" { + type = string +} + +terraform { + required_version = "1.0.10" + required_providers { + libvirt = { + source = "dmacvicar/libvirt" + version = "0.6.3" + } + } +} + + +provider "libvirt" { + uri = "qemu+tcp://${var.HYPER}/system" +} + +module "cucumber_testsuite" { + source = "./modules/cucumber_testsuite" + + product_version = "uyuni-pr" + + // Cucumber repository configuration for the controller + git_username = var.GIT_USER + git_password = var.GIT_PASSWORD + git_repo = var.CUCUMBER_GITREPO + branch = var.CUCUMBER_BRANCH + + cc_username = var.SCC_USER + cc_password = var.SCC_PASSWORD + mirror = "minima-mirror.mgr.prv.suse.net" + use_mirror_images = true + + images = ["rocky8o", "opensuse154o", "opensuse154-ci-pro", "ubuntu2204o"] + + use_avahi = false + name_prefix = "suma-pr${var.ENVIRONMENT}-" + domain = "mgr.prv.suse.net" + from_email = "root@suse.de" + + no_auth_registry = "registry.mgr.prv.suse.net" + auth_registry = "registry.mgr.prv.suse.net:5000/cucutest" + auth_registry_username = "cucutest" + auth_registry_password = "cucusecret" + git_profiles_repo = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" + + server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" + custom_download_endpoint = "ftp://minima-mirror.mgr.prv.suse.net:445" + + # when changing images, please also keep in mind to adjust the image matrix at the end of the README. + host_settings = { + controller = { + provider_settings = { + mac = "aa:b2:92:04:00:40" + } + } + server = { + provider_settings = { + mac = "aa:b2:92:04:00:41" + } + additional_repos_only = true + additional_repos = { + pull_request_repo = var.PULL_REQUEST_REPO, + master_repo = var.MASTER_REPO, + master_repo_other = var.MASTER_OTHER_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", + } + image = "opensuse154-ci-pro" + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + server_mounted_mirror = "minima-mirror.mgr.prv.suse.net" + } + proxy = { + provider_settings = { + mac = "aa:b2:92:04:00:42" + } + additional_repos_only = true + additional_repos = { + pull_request_repo = var.PULL_REQUEST_REPO, + master_repo = var.MASTER_REPO, + master_repo_other = var.MASTER_OTHER_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", + proxy_pool = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", + tools_update = var.OPENSUSE_CLIENT_REPO + } + image = "opensuse154-ci-pro" + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + suse-minion = { + image = "opensuse154o" + name = "min-leap15" + provider_settings = { + mac = "aa:b2:92:04:00:44" + } + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + suse-sshminion = { + image = "opensuse154o" + name = "minssh-leap15" + provider_settings = { + mac = "aa:b2:92:04:00:45" + } + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion", "iptables" ] + install_salt_bundle = true + } + redhat-minion = { + image = "rocky8o" + name = "min-rocky8" + provider_settings = { + mac = "aa:b2:92:04:00:46" + memory = 2048 + vcpu = 2 + } + additional_repos = { + client_repo = var.RHLIKE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + debian-minion = { + image = "ubuntu2204o" + name = "min-ubuntu2204" + provider_settings = { + mac = "aa:b2:92:04:00:47" + } + additional_repos = { + client_repo = var.DEBLIKE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + // FIXME: cloudl-init fails if venv-salt-minion is not avaiable + // We can set "install_salt_bundle = true" as soon as venv-salt-minion is available Uyuni:Stable + install_salt_bundle = false + } + build-host = { + image = "opensuse154o" + name = "min-build" + provider_settings = { + mac = "aa:b2:92:04:00:49" + memory = 2048 + } + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + pxeboot-minion = { + image = "opensuse154o" + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + kvm-host = { + image = "opensuse154-ci-pro" + name = "min-kvm" + additional_grains = { + hvm_disk_image = { + leap = { + hostname = "suma-pr5-min-nested" + image = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" + hash = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" + } + sles = { + hostname = "suma-pr5-min-nested" + image = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" + hash = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" + } + } + } + provider_settings = { + mac = "aa:b2:92:04:00:4a" + } + additional_repos_only = true + additional_repos = { + client_repo = var.OPENSUSE_CLIENT_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + } + nested_vm_host = "suma-pr5-min-nested" + nested_vm_mac = "aa:b2:92:04:00:4b" + provider_settings = { + pool = "ssd" + network_name = null + bridge = "br1" + additional_network = "192.168.105.0/24" + } +} + + +resource "null_resource" "add_test_information" { + triggers = { + always_run = "${timestamp()}" + } + provisioner "file" { + source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" + destination = "/tmp/set_custom_header.sh" + connection { + type = "ssh" + user = "root" + password = "linux" + host = "${module.cucumber_testsuite.configuration.server.hostname}" + } + } +} + + +output "configuration" { + value = module.cucumber_testsuite.configuration +} diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf new file mode 100644 index 000000000..786154c09 --- /dev/null +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf @@ -0,0 +1,369 @@ +// Mandatory variables for terracumber +variable "URL_PREFIX" { + type = string + default = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" +} + +// Not really used as this is for --runall parameter, and we run cucumber step by step +variable "CUCUMBER_COMMAND" { + type = string + default = "export PRODUCT='Uyuni' && run-testsuite" +} + +variable "CUCUMBER_GITREPO" { + type = string + default = "https://github.com/uyuni-project/uyuni.git" +} + +variable "CUCUMBER_BRANCH" { + type = string + default = "master" +} + +variable "CUCUMBER_RESULTS" { + type = string + default = "/root/spacewalk/testsuite" +} + +variable "MAIL_SUBJECT" { + type = string + default = "$status acceptance tests on Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" +} + +variable "MAIL_TEMPLATE" { + type = string + default = "../mail_templates/mail-template-jenkins-pull-request.txt" +} + +variable "MAIL_SUBJECT_ENV_FAIL" { + type = string + default = "Failed acceptance tests on Pull Request: Environment setup failed" +} + +variable "MAIL_TEMPLATE_ENV_FAIL" { + type = string + default = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" +} + +variable "ENVIRONMENT" { + type = string + default = "6" +} + +variable "HYPER" { + type = string + default = "hyperion.mgr.prv.suse.net" +} + +variable "MAIL_FROM" { + type = string + default = "galaxy-ci@suse.de" +} + +variable "MAIL_TO" { + type = string + default = "galaxy-ci@suse.de" +} + +// sumaform specific variables +variable "SCC_USER" { + type = string +} + +variable "SCC_PASSWORD" { + type = string +} + +variable "GIT_USER" { + type = string + default = null // Not needed for master, as it is public +} + +variable "GIT_PASSWORD" { + type = string + default = null // Not needed for master, as it is public +} + +// Repository containing the build for the tested Uyuni Pull Request +variable "PULL_REQUEST_REPO" { + type = string +} + +variable "MASTER_REPO" { + type = string +} + +variable "MASTER_OTHER_REPO" { + type = string +} + +variable "MASTER_SUMAFORM_TOOLS_REPO" { + type = string +} + +variable "UPDATE_REPO" { + type = string +} + +variable "ADDITIONAL_REPO_URL" { + type = string +} + +variable "TEST_PACKAGES_REPO" { + type = string +} + +// Repositories containing the client tools RPMs +variable "SLE_CLIENT_REPO" { + type = string +} + +variable "RHLIKE_CLIENT_REPO" { + type = string +} + +variable "DEBLIKE_CLIENT_REPO" { + type = string +} + +variable "OPENSUSE_CLIENT_REPO" { + type = string +} + +terraform { + required_version = "1.0.10" + required_providers { + libvirt = { + source = "dmacvicar/libvirt" + version = "0.6.3" + } + } +} + + +provider "libvirt" { + uri = "qemu+tcp://${var.HYPER}/system" +} + +module "cucumber_testsuite" { + source = "./modules/cucumber_testsuite" + + product_version = "uyuni-pr" + + // Cucumber repository configuration for the controller + git_username = var.GIT_USER + git_password = var.GIT_PASSWORD + git_repo = var.CUCUMBER_GITREPO + branch = var.CUCUMBER_BRANCH + + cc_username = var.SCC_USER + cc_password = var.SCC_PASSWORD + mirror = "minima-mirror.mgr.prv.suse.net" + use_mirror_images = true + + images = ["rocky8o", "opensuse154o", "opensuse154-ci-pro", "ubuntu2204o"] + + use_avahi = false + name_prefix = "suma-pr${var.ENVIRONMENT}-" + domain = "mgr.prv.suse.net" + from_email = "root@suse.de" + + no_auth_registry = "registry.mgr.prv.suse.net" + auth_registry = "registry.mgr.prv.suse.net:5000/cucutest" + auth_registry_username = "cucutest" + auth_registry_password = "cucusecret" + git_profiles_repo = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" + + server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" + custom_download_endpoint = "ftp://minima-mirror.mgr.prv.suse.net:445" + + # when changing images, please also keep in mind to adjust the image matrix at the end of the README. + host_settings = { + controller = { + provider_settings = { + mac = "aa:b2:92:04:00:50" + } + } + server = { + provider_settings = { + mac = "aa:b2:92:04:00:51" + } + additional_repos_only = true + additional_repos = { + pull_request_repo = var.PULL_REQUEST_REPO, + master_repo = var.MASTER_REPO, + master_repo_other = var.MASTER_OTHER_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", + } + image = "opensuse154-ci-pro" + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + server_mounted_mirror = "minima-mirror.mgr.prv.suse.net" + } + proxy = { + provider_settings = { + mac = "aa:b2:92:04:00:52" + } + additional_repos_only = true + additional_repos = { + pull_request_repo = var.PULL_REQUEST_REPO, + master_repo = var.MASTER_REPO, + master_repo_other = var.MASTER_OTHER_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", + proxy_pool = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", + tools_update = var.OPENSUSE_CLIENT_REPO + } + image = "opensuse154-ci-pro" + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + suse-minion = { + image = "opensuse154o" + name = "min-leap15" + provider_settings = { + mac = "aa:b2:92:04:00:54" + } + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + suse-sshminion = { + image = "opensuse154o" + name = "minssh-leap15" + provider_settings = { + mac = "aa:b2:92:04:00:55" + } + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion", "iptables" ] + install_salt_bundle = true + } + redhat-minion = { + image = "rocky8o" + name = "min-rocky8" + provider_settings = { + mac = "aa:b2:92:04:00:56" + memory = 2048 + vcpu = 2 + } + additional_repos = { + client_repo = var.RHLIKE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + debian-minion = { + image = "ubuntu2204o" + name = "min-ubuntu2204" + provider_settings = { + mac = "aa:b2:92:04:00:57" + } + additional_repos = { + client_repo = var.DEBLIKE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + // FIXME: cloudl-init fails if venv-salt-minion is not avaiable + // We can set "install_salt_bundle = true" as soon as venv-salt-minion is available Uyuni:Stable + install_salt_bundle = false + } + build-host = { + image = "opensuse154o" + name = "min-build" + provider_settings = { + mac = "aa:b2:92:04:00:59" + memory = 2048 + } + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + pxeboot-minion = { + image = "opensuse154o" + additional_repos = { + tools_update = var.SLE_CLIENT_REPO, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + kvm-host = { + image = "opensuse154-ci-pro" + name = "min-kvm" + additional_grains = { + hvm_disk_image = { + leap = { + hostname = "suma-pr6-min-nested" + image = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" + hash = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" + } + sles = { + hostname = "suma-pr6-min-nested" + image = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" + hash = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" + } + } + } + provider_settings = { + mac = "aa:b2:92:04:00:5a" + } + additional_repos_only = true + additional_repos = { + client_repo = var.OPENSUSE_CLIENT_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + } + additional_packages = [ "venv-salt-minion" ] + install_salt_bundle = true + } + } + nested_vm_host = "suma-pr6-min-nested" + nested_vm_mac = "aa:b2:92:04:00:5b" + provider_settings = { + pool = "ssd" + network_name = null + bridge = "br1" + additional_network = "192.168.106.0/24" + } +} + + +resource "null_resource" "add_test_information" { + triggers = { + always_run = "${timestamp()}" + } + provisioner "file" { + source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" + destination = "/tmp/set_custom_header.sh" + connection { + type = "ssh" + user = "root" + password = "linux" + host = "${module.cucumber_testsuite.configuration.server.hostname}" + } + } +} + + +output "configuration" { + value = module.cucumber_testsuite.configuration +} From b6a9bf4fa4e8ea2ecb860ed11f4b75c92867bcdb Mon Sep 17 00:00:00 2001 From: Dominik Gedon Date: Thu, 3 Aug 2023 11:36:11 +0200 Subject: [PATCH 060/110] Use generic names for SUSE minions --- terracumber_config/tf_files/Uyuni-PR-tests-env5.tf | 4 ++-- terracumber_config/tf_files/Uyuni-PR-tests-env6.tf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf index 410c0dd76..cfe5fffe2 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf @@ -231,7 +231,7 @@ module "cucumber_testsuite" { } suse-minion = { image = "opensuse154o" - name = "min-leap15" + name = "min-suse" provider_settings = { mac = "aa:b2:92:04:00:44" } @@ -243,7 +243,7 @@ module "cucumber_testsuite" { } suse-sshminion = { image = "opensuse154o" - name = "minssh-leap15" + name = "minssh-suse" provider_settings = { mac = "aa:b2:92:04:00:45" } diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf index 786154c09..4785797ef 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf @@ -231,7 +231,7 @@ module "cucumber_testsuite" { } suse-minion = { image = "opensuse154o" - name = "min-leap15" + name = "min-suse" provider_settings = { mac = "aa:b2:92:04:00:54" } @@ -243,7 +243,7 @@ module "cucumber_testsuite" { } suse-sshminion = { image = "opensuse154o" - name = "minssh-leap15" + name = "minssh-suse" provider_settings = { mac = "aa:b2:92:04:00:55" } From 93d6b07e4d16640d50cd37b0e3eb06437105b865 Mon Sep 17 00:00:00 2001 From: Eric Bischoff Date: Fri, 18 Aug 2023 20:36:37 +0200 Subject: [PATCH 061/110] Merge CI and BV mirrors --- .../tf_files/Uyuni-PR-tests-env5.tf | 32 +++++++++---------- .../tf_files/Uyuni-PR-tests-env6.tf | 32 +++++++++---------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf index cfe5fffe2..3b6932d51 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf @@ -158,7 +158,7 @@ module "cucumber_testsuite" { cc_username = var.SCC_USER cc_password = var.SCC_PASSWORD - mirror = "minima-mirror.mgr.prv.suse.net" + mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" use_mirror_images = true images = ["rocky8o", "opensuse154o", "opensuse154-ci-pro", "ubuntu2204o"] @@ -175,7 +175,7 @@ module "cucumber_testsuite" { git_profiles_repo = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" - custom_download_endpoint = "ftp://minima-mirror.mgr.prv.suse.net:445" + custom_download_endpoint = "ftp://minima-mirror-ci-bv.mgr.prv.suse.net:445" # when changing images, please also keep in mind to adjust the image matrix at the end of the README. host_settings = { @@ -195,16 +195,16 @@ module "cucumber_testsuite" { master_repo_other = var.MASTER_OTHER_REPO, master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", os_update = var.UPDATE_REPO, os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", + testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", } image = "opensuse154-ci-pro" additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true - server_mounted_mirror = "minima-mirror.mgr.prv.suse.net" + server_mounted_mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" } proxy = { provider_settings = { @@ -217,12 +217,12 @@ module "cucumber_testsuite" { master_repo_other = var.MASTER_OTHER_REPO, master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", os_update = var.UPDATE_REPO, os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - proxy_pool = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", + testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", + proxy_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", tools_update = var.OPENSUSE_CLIENT_REPO } image = "opensuse154-ci-pro" @@ -309,13 +309,13 @@ module "cucumber_testsuite" { hvm_disk_image = { leap = { hostname = "suma-pr5-min-nested" - image = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" - hash = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" + image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" + hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" } sles = { hostname = "suma-pr5-min-nested" - image = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" - hash = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" + image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" + hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" } } } @@ -327,8 +327,8 @@ module "cucumber_testsuite" { client_repo = var.OPENSUSE_CLIENT_REPO, master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", os_update = var.UPDATE_REPO, os_additional_repo = var.ADDITIONAL_REPO_URL, } diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf index 4785797ef..32293e0f0 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf @@ -158,7 +158,7 @@ module "cucumber_testsuite" { cc_username = var.SCC_USER cc_password = var.SCC_PASSWORD - mirror = "minima-mirror.mgr.prv.suse.net" + mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" use_mirror_images = true images = ["rocky8o", "opensuse154o", "opensuse154-ci-pro", "ubuntu2204o"] @@ -175,7 +175,7 @@ module "cucumber_testsuite" { git_profiles_repo = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" - custom_download_endpoint = "ftp://minima-mirror.mgr.prv.suse.net:445" + custom_download_endpoint = "ftp://minima-mirror-ci-bv.mgr.prv.suse.net:445" # when changing images, please also keep in mind to adjust the image matrix at the end of the README. host_settings = { @@ -195,16 +195,16 @@ module "cucumber_testsuite" { master_repo_other = var.MASTER_OTHER_REPO, master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", os_update = var.UPDATE_REPO, os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", + testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", } image = "opensuse154-ci-pro" additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true - server_mounted_mirror = "minima-mirror.mgr.prv.suse.net" + server_mounted_mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" } proxy = { provider_settings = { @@ -217,12 +217,12 @@ module "cucumber_testsuite" { master_repo_other = var.MASTER_OTHER_REPO, master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", os_update = var.UPDATE_REPO, os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - proxy_pool = "http://minima-mirror.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", + testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", + proxy_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", tools_update = var.OPENSUSE_CLIENT_REPO } image = "opensuse154-ci-pro" @@ -309,13 +309,13 @@ module "cucumber_testsuite" { hvm_disk_image = { leap = { hostname = "suma-pr6-min-nested" - image = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" - hash = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" + image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" + hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" } sles = { hostname = "suma-pr6-min-nested" - image = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" - hash = "http://minima-mirror.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" + image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" + hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" } } } @@ -327,8 +327,8 @@ module "cucumber_testsuite" { client_repo = var.OPENSUSE_CLIENT_REPO, master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", os_update = var.UPDATE_REPO, os_additional_repo = var.ADDITIONAL_REPO_URL, } From 1633344bea720ed69ca301304690f04add383906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= Date: Tue, 29 Aug 2023 17:17:27 +0200 Subject: [PATCH 062/110] Fixup images in k3s tf file --- terracumber_config/tf_files/Uyuni-Master-K3S.tf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/terracumber_config/tf_files/Uyuni-Master-K3S.tf b/terracumber_config/tf_files/Uyuni-Master-K3S.tf index 85fd9895e..b1bf8364a 100644 --- a/terracumber_config/tf_files/Uyuni-Master-K3S.tf +++ b/terracumber_config/tf_files/Uyuni-Master-K3S.tf @@ -129,6 +129,7 @@ module "cucumber_testsuite" { provider_settings = { mac = "aa:b2:93:01:00:30" } + image = "opensuse155o" } server_containerized = { provider_settings = { @@ -146,6 +147,7 @@ module "cucumber_testsuite" { } additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true + image = "opensuse155o" } suse-minion = { image = "opensuse154o" From a2730a18ccf5ae4e474fe9fdd3641734350919f0 Mon Sep 17 00:00:00 2001 From: Dominik Gedon Date: Wed, 6 Sep 2023 16:11:52 +0200 Subject: [PATCH 063/110] Revert buildhost to use SLES instead of Leap (#946) --- terracumber_config/tf_files/Uyuni-PR-tests-env5.tf | 4 ++-- terracumber_config/tf_files/Uyuni-PR-tests-env6.tf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf index 3b6932d51..aa52eff7f 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf @@ -161,7 +161,7 @@ module "cucumber_testsuite" { mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" use_mirror_images = true - images = ["rocky8o", "opensuse154o", "opensuse154-ci-pro", "ubuntu2204o"] + images = ["rocky8o", "opensuse154o", "opensuse154-ci-pro", "ubuntu2204o", "sles15sp4o"] use_avahi = false name_prefix = "suma-pr${var.ENVIRONMENT}-" @@ -282,7 +282,7 @@ module "cucumber_testsuite" { install_salt_bundle = false } build-host = { - image = "opensuse154o" + image = "sles15sp4o" name = "min-build" provider_settings = { mac = "aa:b2:92:04:00:49" diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf index 32293e0f0..4348b07d3 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf @@ -161,7 +161,7 @@ module "cucumber_testsuite" { mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" use_mirror_images = true - images = ["rocky8o", "opensuse154o", "opensuse154-ci-pro", "ubuntu2204o"] + images = ["rocky8o", "opensuse154o", "opensuse154-ci-pro", "ubuntu2204o", "sles15sp4o"] use_avahi = false name_prefix = "suma-pr${var.ENVIRONMENT}-" @@ -282,7 +282,7 @@ module "cucumber_testsuite" { install_salt_bundle = false } build-host = { - image = "opensuse154o" + image = "sles15sp4o" name = "min-build" provider_settings = { mac = "aa:b2:92:04:00:59" From 7f486126511878adc884038c85e93eb696adbaaa Mon Sep 17 00:00:00 2001 From: Dominik Gedon Date: Fri, 8 Sep 2023 14:54:40 +0200 Subject: [PATCH 064/110] Revert pxeboot-minion from Leap to SLES15 SP4 (#947) --- terracumber_config/tf_files/Uyuni-PR-tests-env5.tf | 2 +- terracumber_config/tf_files/Uyuni-PR-tests-env6.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf index aa52eff7f..c60051ab7 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf @@ -295,7 +295,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } pxeboot-minion = { - image = "opensuse154o" + image = "sles15sp4o" additional_repos = { tools_update = var.SLE_CLIENT_REPO, } diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf index 4348b07d3..ab04d4a46 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf @@ -295,7 +295,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } pxeboot-minion = { - image = "opensuse154o" + image = "sles15sp4o" additional_repos = { tools_update = var.SLE_CLIENT_REPO, } From 6752b5a744fcd1adf8e9d7ba159984f71612d0d7 Mon Sep 17 00:00:00 2001 From: Jordi Massaguer Pla Date: Thu, 14 Sep 2023 10:09:41 +0200 Subject: [PATCH 065/110] Update PR testing to Leap 15.5 Signed-off-by: Jordi Massaguer Pla --- terracumber_config/tf_files/Uyuni-PR-tests-env5.tf | 12 ++++++------ terracumber_config/tf_files/Uyuni-PR-tests-env6.tf | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf index c60051ab7..b411760aa 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf @@ -161,7 +161,7 @@ module "cucumber_testsuite" { mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" use_mirror_images = true - images = ["rocky8o", "opensuse154o", "opensuse154-ci-pro", "ubuntu2204o", "sles15sp4o"] + images = ["rocky8o", "opensuse154o", "opensuse155o", "opensuse155-ci-pro", "ubuntu2204o", "sles15sp4o"] use_avahi = false name_prefix = "suma-pr${var.ENVIRONMENT}-" @@ -201,7 +201,7 @@ module "cucumber_testsuite" { os_additional_repo = var.ADDITIONAL_REPO_URL, testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", } - image = "opensuse154-ci-pro" + image = "opensuse155-ci-pro" additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true server_mounted_mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" @@ -225,12 +225,12 @@ module "cucumber_testsuite" { proxy_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", tools_update = var.OPENSUSE_CLIENT_REPO } - image = "opensuse154-ci-pro" + image = "opensuse155-ci-pro" additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true } suse-minion = { - image = "opensuse154o" + image = "opensuse155o" name = "min-suse" provider_settings = { mac = "aa:b2:92:04:00:44" @@ -242,7 +242,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } suse-sshminion = { - image = "opensuse154o" + image = "opensuse155o" name = "minssh-suse" provider_settings = { mac = "aa:b2:92:04:00:45" @@ -303,7 +303,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse154-ci-pro" + image = "opensuse155-ci-pro" name = "min-kvm" additional_grains = { hvm_disk_image = { diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf index ab04d4a46..0884f65ea 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf @@ -161,7 +161,7 @@ module "cucumber_testsuite" { mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" use_mirror_images = true - images = ["rocky8o", "opensuse154o", "opensuse154-ci-pro", "ubuntu2204o", "sles15sp4o"] + images = ["rocky8o", "opensuse154o", "opensuse155o", "opensuse155-ci-pro", "ubuntu2204o", "sles15sp4o"] use_avahi = false name_prefix = "suma-pr${var.ENVIRONMENT}-" @@ -201,7 +201,7 @@ module "cucumber_testsuite" { os_additional_repo = var.ADDITIONAL_REPO_URL, testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", } - image = "opensuse154-ci-pro" + image = "opensuse155-ci-pro" additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true server_mounted_mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" @@ -225,12 +225,12 @@ module "cucumber_testsuite" { proxy_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", tools_update = var.OPENSUSE_CLIENT_REPO } - image = "opensuse154-ci-pro" + image = "opensuse155-ci-pro" additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true } suse-minion = { - image = "opensuse154o" + image = "opensuse155o" name = "min-suse" provider_settings = { mac = "aa:b2:92:04:00:54" @@ -242,7 +242,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } suse-sshminion = { - image = "opensuse154o" + image = "opensuse155o" name = "minssh-suse" provider_settings = { mac = "aa:b2:92:04:00:55" @@ -303,7 +303,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse154-ci-pro" + image = "opensuse155-ci-pro" name = "min-kvm" additional_grains = { hvm_disk_image = { From 6ebc82e43793d73be167137a388f0b5847c30258 Mon Sep 17 00:00:00 2001 From: Michael Calmer Date: Thu, 14 Sep 2023 12:12:46 +0200 Subject: [PATCH 066/110] use update-AMIs sumaform branch --- .../environments/uyuni-master-dev-acceptance-tests-AWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins_pipelines/environments/uyuni-master-dev-acceptance-tests-AWS b/jenkins_pipelines/environments/uyuni-master-dev-acceptance-tests-AWS index 07665c8bb..8f17fcaaa 100644 --- a/jenkins_pipelines/environments/uyuni-master-dev-acceptance-tests-AWS +++ b/jenkins_pipelines/environments/uyuni-master-dev-acceptance-tests-AWS @@ -10,7 +10,7 @@ node('sumaform-cucumber-provo') { string(name: 'cucumber_ref', defaultValue: 'master', description: 'Testsuite Git reference (branch, tag...)'), string(name: 'tf_file', defaultValue: 'susemanager-ci/terracumber_config/tf_files/Uyuni-Master-AWS.tf', description: 'Path to the tf file to be used'), string(name: 'sumaform_gitrepo', defaultValue: 'https://github.com/uyuni-project/sumaform.git', description: 'Sumaform Git Repository'), - string(name: 'sumaform_ref', defaultValue: 'master', description: 'Sumaform Git reference (branch, tag...)'), + string(name: 'sumaform_ref', defaultValue: 'update-AMIs', description: 'Sumaform Git reference (branch, tag...)'), choice(name: 'sumaform_backend', choices: ['aws'], description: 'Sumaform backend to be used (see https://github.com/uyuni-project/sumaform#backend-choice)'), choice(name: 'terraform_bin', choices: ['/usr/bin/terraform'], description: 'Terraform binary path'), choice(name: 'terraform_bin_plugins', choices: ['/usr/bin'], description: 'Terraform plugins path'), From fcb6db37cf10671c449eeee8b07b7383accb88d2 Mon Sep 17 00:00:00 2001 From: Jordi Massaguer Pla Date: Thu, 14 Sep 2023 12:25:31 +0200 Subject: [PATCH 067/110] Use opensuse 15.5 official image for kvm-host If we use the one for CI PR (opensuse155-ci-pro), we have an issue installing the needed kvm packages, because we do not have the update repo available. Signed-off-by: Jordi Massaguer Pla --- terracumber_config/tf_files/Uyuni-PR-tests-env1.tf | 2 +- terracumber_config/tf_files/Uyuni-PR-tests-env10.tf | 2 +- terracumber_config/tf_files/Uyuni-PR-tests-env2.tf | 2 +- terracumber_config/tf_files/Uyuni-PR-tests-env3.tf | 2 +- terracumber_config/tf_files/Uyuni-PR-tests-env4.tf | 2 +- terracumber_config/tf_files/Uyuni-PR-tests-env5.tf | 2 +- terracumber_config/tf_files/Uyuni-PR-tests-env6.tf | 2 +- terracumber_config/tf_files/Uyuni-PR-tests-env7.tf | 2 +- terracumber_config/tf_files/Uyuni-PR-tests-env8.tf | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env1.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env1.tf index 59095d22d..d9a5fdac9 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env1.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env1.tf @@ -302,7 +302,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse155-ci-pro" + image = "opensuse155o" name = "min-kvm" additional_grains = { hvm_disk_image = { diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env10.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env10.tf index 8bf5293d6..851271a86 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env10.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env10.tf @@ -302,7 +302,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse155-ci-pro" + image = "opensuse155o" name = "min-kvm" additional_grains = { hvm_disk_image = { diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env2.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env2.tf index a9a4308a6..a678dbcf3 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env2.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env2.tf @@ -302,7 +302,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse155-ci-pro" + image = "opensuse155o" name = "min-kvm" additional_grains = { hvm_disk_image = { diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env3.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env3.tf index 4c3dcfd6b..26cf2e265 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env3.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env3.tf @@ -302,7 +302,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse155-ci-pro" + image = "opensuse155o" name = "min-kvm" additional_grains = { hvm_disk_image = { diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env4.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env4.tf index 10f8cda69..78067cd53 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env4.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env4.tf @@ -302,7 +302,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse155-ci-pro" + image = "opensuse155o" name = "min-kvm" additional_grains = { hvm_disk_image = { diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf index b411760aa..253e82bd3 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf @@ -303,7 +303,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse155-ci-pro" + image = "opensuse155o" name = "min-kvm" additional_grains = { hvm_disk_image = { diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf index 0884f65ea..987e4eaea 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf @@ -303,7 +303,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse155-ci-pro" + image = "opensuse155o" name = "min-kvm" additional_grains = { hvm_disk_image = { diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env7.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env7.tf index 89e147c53..a502e0830 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env7.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env7.tf @@ -302,7 +302,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse155-ci-pro" + image = "opensuse155o" name = "min-kvm" additional_grains = { hvm_disk_image = { diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env8.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env8.tf index 2e7022b50..4e3a2c27b 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env8.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env8.tf @@ -302,7 +302,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse155-ci-pro" + image = "opensuse155o" name = "min-kvm" additional_grains = { hvm_disk_image = { From ce39c58b839d8b323ac843994d8036be7a66c453 Mon Sep 17 00:00:00 2001 From: Michael Calmer Date: Mon, 18 Sep 2023 11:24:59 +0200 Subject: [PATCH 068/110] Revert "use update-AMIs sumaform branch" This reverts commit c0ab7f3486db59494b26781851768e97d9eae192. --- .../environments/uyuni-master-dev-acceptance-tests-AWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins_pipelines/environments/uyuni-master-dev-acceptance-tests-AWS b/jenkins_pipelines/environments/uyuni-master-dev-acceptance-tests-AWS index 8f17fcaaa..07665c8bb 100644 --- a/jenkins_pipelines/environments/uyuni-master-dev-acceptance-tests-AWS +++ b/jenkins_pipelines/environments/uyuni-master-dev-acceptance-tests-AWS @@ -10,7 +10,7 @@ node('sumaform-cucumber-provo') { string(name: 'cucumber_ref', defaultValue: 'master', description: 'Testsuite Git reference (branch, tag...)'), string(name: 'tf_file', defaultValue: 'susemanager-ci/terracumber_config/tf_files/Uyuni-Master-AWS.tf', description: 'Path to the tf file to be used'), string(name: 'sumaform_gitrepo', defaultValue: 'https://github.com/uyuni-project/sumaform.git', description: 'Sumaform Git Repository'), - string(name: 'sumaform_ref', defaultValue: 'update-AMIs', description: 'Sumaform Git reference (branch, tag...)'), + string(name: 'sumaform_ref', defaultValue: 'master', description: 'Sumaform Git reference (branch, tag...)'), choice(name: 'sumaform_backend', choices: ['aws'], description: 'Sumaform backend to be used (see https://github.com/uyuni-project/sumaform#backend-choice)'), choice(name: 'terraform_bin', choices: ['/usr/bin/terraform'], description: 'Terraform binary path'), choice(name: 'terraform_bin_plugins', choices: ['/usr/bin'], description: 'Terraform plugins path'), From d36f13dfef7f729859de8b752aec307adaa96917 Mon Sep 17 00:00:00 2001 From: Jordi Massaguer Pla Date: Wed, 20 Sep 2023 12:21:17 +0200 Subject: [PATCH 069/110] Fix kvm-host for PR testing Signed-off-by: Jordi Massaguer Pla --- terracumber_config/tf_files/Uyuni-PR-tests-env1.tf | 2 +- terracumber_config/tf_files/Uyuni-PR-tests-env10.tf | 2 +- terracumber_config/tf_files/Uyuni-PR-tests-env2.tf | 2 +- terracumber_config/tf_files/Uyuni-PR-tests-env3.tf | 2 +- terracumber_config/tf_files/Uyuni-PR-tests-env4.tf | 2 +- terracumber_config/tf_files/Uyuni-PR-tests-env5.tf | 4 ++-- terracumber_config/tf_files/Uyuni-PR-tests-env6.tf | 4 ++-- terracumber_config/tf_files/Uyuni-PR-tests-env7.tf | 2 +- terracumber_config/tf_files/Uyuni-PR-tests-env8.tf | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env1.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env1.tf index d9a5fdac9..59095d22d 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env1.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env1.tf @@ -302,7 +302,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse155o" + image = "opensuse155-ci-pro" name = "min-kvm" additional_grains = { hvm_disk_image = { diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env10.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env10.tf index 851271a86..8bf5293d6 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env10.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env10.tf @@ -302,7 +302,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse155o" + image = "opensuse155-ci-pro" name = "min-kvm" additional_grains = { hvm_disk_image = { diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env2.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env2.tf index a678dbcf3..a9a4308a6 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env2.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env2.tf @@ -302,7 +302,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse155o" + image = "opensuse155-ci-pro" name = "min-kvm" additional_grains = { hvm_disk_image = { diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env3.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env3.tf index 26cf2e265..4c3dcfd6b 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env3.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env3.tf @@ -302,7 +302,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse155o" + image = "opensuse155-ci-pro" name = "min-kvm" additional_grains = { hvm_disk_image = { diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env4.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env4.tf index 78067cd53..10f8cda69 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env4.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env4.tf @@ -302,7 +302,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse155o" + image = "opensuse155-ci-pro" name = "min-kvm" additional_grains = { hvm_disk_image = { diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf index 253e82bd3..9eb11b1e0 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf @@ -303,7 +303,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse155o" + image = "opensuse155-ci-pro" name = "min-kvm" additional_grains = { hvm_disk_image = { @@ -332,7 +332,7 @@ module "cucumber_testsuite" { os_update = var.UPDATE_REPO, os_additional_repo = var.ADDITIONAL_REPO_URL, } - additional_packages = [ "venv-salt-minion" ] + additional_packages = [ "venv-salt-minion", "mkisofs" ] install_salt_bundle = true } } diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf index 987e4eaea..72561a872 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf @@ -303,7 +303,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse155o" + image = "opensuse155-ci-pro" name = "min-kvm" additional_grains = { hvm_disk_image = { @@ -332,7 +332,7 @@ module "cucumber_testsuite" { os_update = var.UPDATE_REPO, os_additional_repo = var.ADDITIONAL_REPO_URL, } - additional_packages = [ "venv-salt-minion" ] + additional_packages = [ "venv-salt-minion", "mkisofs" ] install_salt_bundle = true } } diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env7.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env7.tf index a502e0830..89e147c53 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env7.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env7.tf @@ -302,7 +302,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse155o" + image = "opensuse155-ci-pro" name = "min-kvm" additional_grains = { hvm_disk_image = { diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env8.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env8.tf index 4e3a2c27b..2e7022b50 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env8.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env8.tf @@ -302,7 +302,7 @@ module "cucumber_testsuite" { install_salt_bundle = true } kvm-host = { - image = "opensuse155o" + image = "opensuse155-ci-pro" name = "min-kvm" additional_grains = { hvm_disk_image = { From 372276ea9ec8e1cbf248d12e6783879a368d6d27 Mon Sep 17 00:00:00 2001 From: Jordi Massaguer Pla Date: Thu, 21 Sep 2023 16:17:54 +0200 Subject: [PATCH 070/110] disable kvm host until it works Signed-off-by: Jordi Massaguer Pla --- .../tf_files/Uyuni-PR-tests-env5.tf | 33 ------------------- .../tf_files/Uyuni-PR-tests-env6.tf | 33 ------------------- 2 files changed, 66 deletions(-) diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf index 9eb11b1e0..e09dda46c 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf @@ -302,39 +302,6 @@ module "cucumber_testsuite" { additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true } - kvm-host = { - image = "opensuse155-ci-pro" - name = "min-kvm" - additional_grains = { - hvm_disk_image = { - leap = { - hostname = "suma-pr5-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" - } - sles = { - hostname = "suma-pr5-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" - } - } - } - provider_settings = { - mac = "aa:b2:92:04:00:4a" - } - additional_repos_only = true - additional_repos = { - client_repo = var.OPENSUSE_CLIENT_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - } - additional_packages = [ "venv-salt-minion", "mkisofs" ] - install_salt_bundle = true - } } nested_vm_host = "suma-pr5-min-nested" nested_vm_mac = "aa:b2:92:04:00:4b" diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf index 72561a872..a518a2739 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf @@ -302,39 +302,6 @@ module "cucumber_testsuite" { additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true } - kvm-host = { - image = "opensuse155-ci-pro" - name = "min-kvm" - additional_grains = { - hvm_disk_image = { - leap = { - hostname = "suma-pr6-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" - } - sles = { - hostname = "suma-pr6-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" - } - } - } - provider_settings = { - mac = "aa:b2:92:04:00:5a" - } - additional_repos_only = true - additional_repos = { - client_repo = var.OPENSUSE_CLIENT_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - } - additional_packages = [ "venv-salt-minion", "mkisofs" ] - install_salt_bundle = true - } } nested_vm_host = "suma-pr6-min-nested" nested_vm_mac = "aa:b2:92:04:00:5b" From e4225125ec0875bf678359acb77b11c5e76fae53 Mon Sep 17 00:00:00 2001 From: Jordi Massaguer Pla Date: Thu, 21 Sep 2023 16:50:16 +0200 Subject: [PATCH 071/110] fix mac address for min-kvm and enable it back-s --- .../tf_files/Uyuni-PR-tests-env5.tf | 33 +++++++++++++++++++ .../tf_files/Uyuni-PR-tests-env6.tf | 33 +++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf index e09dda46c..bb1d06d22 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf @@ -302,6 +302,39 @@ module "cucumber_testsuite" { additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true } + kvm-host = { + image = "opensuse155-ci-pro" + name = "min-kvm" + additional_grains = { + hvm_disk_image = { + leap = { + hostname = "suma-pr1-min-nested" + image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" + hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" + } + sles = { + hostname = "suma-pr1-min-nested" + image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" + hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" + } + } + } + provider_settings = { + mac = "aa:b2:92:04:00:4a" + } + additional_repos_only = true + additional_repos = { + client_repo = var.OPENSUSE_CLIENT_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + } + additional_packages = [ "venv-salt-minion", "mkisofs" ] + install_salt_bundle = true + } } nested_vm_host = "suma-pr5-min-nested" nested_vm_mac = "aa:b2:92:04:00:4b" diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf index a518a2739..4d893d472 100644 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf +++ b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf @@ -302,6 +302,39 @@ module "cucumber_testsuite" { additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true } + kvm-host = { + image = "opensuse155-ci-pro" + name = "min-kvm" + additional_grains = { + hvm_disk_image = { + leap = { + hostname = "suma-pr1-min-nested" + image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" + hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" + } + sles = { + hostname = "suma-pr1-min-nested" + image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" + hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" + } + } + } + provider_settings = { + mac = "aa:b2:92:04:00:5a" + } + additional_repos_only = true + additional_repos = { + client_repo = var.OPENSUSE_CLIENT_REPO, + master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, + test_packages_repo = var.TEST_PACKAGES_REPO, + non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", + os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", + os_update = var.UPDATE_REPO, + os_additional_repo = var.ADDITIONAL_REPO_URL, + } + additional_packages = [ "venv-salt-minion", "mkisofs" ] + install_salt_bundle = true + } } nested_vm_host = "suma-pr6-min-nested" nested_vm_mac = "aa:b2:92:04:00:5b" From 245d74d5524835d7728fd2de29d3c3fef1cb3b9c Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 21 Jun 2023 14:24:18 +1200 Subject: [PATCH 072/110] Delete Uyuni main tf description --- .../tf_files/Uyuni-PR-tests-env5.tf | 369 ------------------ .../tf_files/Uyuni-PR-tests-env6.tf | 369 ------------------ 2 files changed, 738 deletions(-) delete mode 100644 terracumber_config/tf_files/Uyuni-PR-tests-env5.tf delete mode 100644 terracumber_config/tf_files/Uyuni-PR-tests-env6.tf diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf deleted file mode 100644 index bb1d06d22..000000000 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env5.tf +++ /dev/null @@ -1,369 +0,0 @@ -// Mandatory variables for terracumber -variable "URL_PREFIX" { - type = string - default = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" -} - -// Not really used as this is for --runall parameter, and we run cucumber step by step -variable "CUCUMBER_COMMAND" { - type = string - default = "export PRODUCT='Uyuni' && run-testsuite" -} - -variable "CUCUMBER_GITREPO" { - type = string - default = "https://github.com/uyuni-project/uyuni.git" -} - -variable "CUCUMBER_BRANCH" { - type = string - default = "master" -} - -variable "CUCUMBER_RESULTS" { - type = string - default = "/root/spacewalk/testsuite" -} - -variable "MAIL_SUBJECT" { - type = string - default = "$status acceptance tests on Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" -} - -variable "MAIL_TEMPLATE" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request.txt" -} - -variable "MAIL_SUBJECT_ENV_FAIL" { - type = string - default = "Failed acceptance tests on Pull Request: Environment setup failed" -} - -variable "MAIL_TEMPLATE_ENV_FAIL" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" -} - -variable "ENVIRONMENT" { - type = string - default = "5" -} - -variable "HYPER" { - type = string - default = "hyperion.mgr.prv.suse.net" -} - -variable "MAIL_FROM" { - type = string - default = "galaxy-ci@suse.de" -} - -variable "MAIL_TO" { - type = string - default = "galaxy-ci@suse.de" -} - -// sumaform specific variables -variable "SCC_USER" { - type = string -} - -variable "SCC_PASSWORD" { - type = string -} - -variable "GIT_USER" { - type = string - default = null // Not needed for master, as it is public -} - -variable "GIT_PASSWORD" { - type = string - default = null // Not needed for master, as it is public -} - -// Repository containing the build for the tested Uyuni Pull Request -variable "PULL_REQUEST_REPO" { - type = string -} - -variable "MASTER_REPO" { - type = string -} - -variable "MASTER_OTHER_REPO" { - type = string -} - -variable "MASTER_SUMAFORM_TOOLS_REPO" { - type = string -} - -variable "UPDATE_REPO" { - type = string -} - -variable "ADDITIONAL_REPO_URL" { - type = string -} - -variable "TEST_PACKAGES_REPO" { - type = string -} - -// Repositories containing the client tools RPMs -variable "SLE_CLIENT_REPO" { - type = string -} - -variable "RHLIKE_CLIENT_REPO" { - type = string -} - -variable "DEBLIKE_CLIENT_REPO" { - type = string -} - -variable "OPENSUSE_CLIENT_REPO" { - type = string -} - -terraform { - required_version = "1.0.10" - required_providers { - libvirt = { - source = "dmacvicar/libvirt" - version = "0.6.3" - } - } -} - - -provider "libvirt" { - uri = "qemu+tcp://${var.HYPER}/system" -} - -module "cucumber_testsuite" { - source = "./modules/cucumber_testsuite" - - product_version = "uyuni-pr" - - // Cucumber repository configuration for the controller - git_username = var.GIT_USER - git_password = var.GIT_PASSWORD - git_repo = var.CUCUMBER_GITREPO - branch = var.CUCUMBER_BRANCH - - cc_username = var.SCC_USER - cc_password = var.SCC_PASSWORD - mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - use_mirror_images = true - - images = ["rocky8o", "opensuse154o", "opensuse155o", "opensuse155-ci-pro", "ubuntu2204o", "sles15sp4o"] - - use_avahi = false - name_prefix = "suma-pr${var.ENVIRONMENT}-" - domain = "mgr.prv.suse.net" - from_email = "root@suse.de" - - no_auth_registry = "registry.mgr.prv.suse.net" - auth_registry = "registry.mgr.prv.suse.net:5000/cucutest" - auth_registry_username = "cucutest" - auth_registry_password = "cucusecret" - git_profiles_repo = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" - - server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" - custom_download_endpoint = "ftp://minima-mirror-ci-bv.mgr.prv.suse.net:445" - - # when changing images, please also keep in mind to adjust the image matrix at the end of the README. - host_settings = { - controller = { - provider_settings = { - mac = "aa:b2:92:04:00:40" - } - } - server = { - provider_settings = { - mac = "aa:b2:92:04:00:41" - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - server_mounted_mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - } - proxy = { - provider_settings = { - mac = "aa:b2:92:04:00:42" - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - proxy_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", - tools_update = var.OPENSUSE_CLIENT_REPO - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-minion = { - image = "opensuse155o" - name = "min-suse" - provider_settings = { - mac = "aa:b2:92:04:00:44" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-sshminion = { - image = "opensuse155o" - name = "minssh-suse" - provider_settings = { - mac = "aa:b2:92:04:00:45" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion", "iptables" ] - install_salt_bundle = true - } - redhat-minion = { - image = "rocky8o" - name = "min-rocky8" - provider_settings = { - mac = "aa:b2:92:04:00:46" - memory = 2048 - vcpu = 2 - } - additional_repos = { - client_repo = var.RHLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - debian-minion = { - image = "ubuntu2204o" - name = "min-ubuntu2204" - provider_settings = { - mac = "aa:b2:92:04:00:47" - } - additional_repos = { - client_repo = var.DEBLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - // FIXME: cloudl-init fails if venv-salt-minion is not avaiable - // We can set "install_salt_bundle = true" as soon as venv-salt-minion is available Uyuni:Stable - install_salt_bundle = false - } - build-host = { - image = "sles15sp4o" - name = "min-build" - provider_settings = { - mac = "aa:b2:92:04:00:49" - memory = 2048 - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - pxeboot-minion = { - image = "sles15sp4o" - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - kvm-host = { - image = "opensuse155-ci-pro" - name = "min-kvm" - additional_grains = { - hvm_disk_image = { - leap = { - hostname = "suma-pr1-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" - } - sles = { - hostname = "suma-pr1-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" - } - } - } - provider_settings = { - mac = "aa:b2:92:04:00:4a" - } - additional_repos_only = true - additional_repos = { - client_repo = var.OPENSUSE_CLIENT_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - } - additional_packages = [ "venv-salt-minion", "mkisofs" ] - install_salt_bundle = true - } - } - nested_vm_host = "suma-pr5-min-nested" - nested_vm_mac = "aa:b2:92:04:00:4b" - provider_settings = { - pool = "ssd" - network_name = null - bridge = "br1" - additional_network = "192.168.105.0/24" - } -} - - -resource "null_resource" "add_test_information" { - triggers = { - always_run = "${timestamp()}" - } - provisioner "file" { - source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" - destination = "/tmp/set_custom_header.sh" - connection { - type = "ssh" - user = "root" - password = "linux" - host = "${module.cucumber_testsuite.configuration.server.hostname}" - } - } -} - - -output "configuration" { - value = module.cucumber_testsuite.configuration -} diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf deleted file mode 100644 index 4d893d472..000000000 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env6.tf +++ /dev/null @@ -1,369 +0,0 @@ -// Mandatory variables for terracumber -variable "URL_PREFIX" { - type = string - default = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" -} - -// Not really used as this is for --runall parameter, and we run cucumber step by step -variable "CUCUMBER_COMMAND" { - type = string - default = "export PRODUCT='Uyuni' && run-testsuite" -} - -variable "CUCUMBER_GITREPO" { - type = string - default = "https://github.com/uyuni-project/uyuni.git" -} - -variable "CUCUMBER_BRANCH" { - type = string - default = "master" -} - -variable "CUCUMBER_RESULTS" { - type = string - default = "/root/spacewalk/testsuite" -} - -variable "MAIL_SUBJECT" { - type = string - default = "$status acceptance tests on Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" -} - -variable "MAIL_TEMPLATE" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request.txt" -} - -variable "MAIL_SUBJECT_ENV_FAIL" { - type = string - default = "Failed acceptance tests on Pull Request: Environment setup failed" -} - -variable "MAIL_TEMPLATE_ENV_FAIL" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" -} - -variable "ENVIRONMENT" { - type = string - default = "6" -} - -variable "HYPER" { - type = string - default = "hyperion.mgr.prv.suse.net" -} - -variable "MAIL_FROM" { - type = string - default = "galaxy-ci@suse.de" -} - -variable "MAIL_TO" { - type = string - default = "galaxy-ci@suse.de" -} - -// sumaform specific variables -variable "SCC_USER" { - type = string -} - -variable "SCC_PASSWORD" { - type = string -} - -variable "GIT_USER" { - type = string - default = null // Not needed for master, as it is public -} - -variable "GIT_PASSWORD" { - type = string - default = null // Not needed for master, as it is public -} - -// Repository containing the build for the tested Uyuni Pull Request -variable "PULL_REQUEST_REPO" { - type = string -} - -variable "MASTER_REPO" { - type = string -} - -variable "MASTER_OTHER_REPO" { - type = string -} - -variable "MASTER_SUMAFORM_TOOLS_REPO" { - type = string -} - -variable "UPDATE_REPO" { - type = string -} - -variable "ADDITIONAL_REPO_URL" { - type = string -} - -variable "TEST_PACKAGES_REPO" { - type = string -} - -// Repositories containing the client tools RPMs -variable "SLE_CLIENT_REPO" { - type = string -} - -variable "RHLIKE_CLIENT_REPO" { - type = string -} - -variable "DEBLIKE_CLIENT_REPO" { - type = string -} - -variable "OPENSUSE_CLIENT_REPO" { - type = string -} - -terraform { - required_version = "1.0.10" - required_providers { - libvirt = { - source = "dmacvicar/libvirt" - version = "0.6.3" - } - } -} - - -provider "libvirt" { - uri = "qemu+tcp://${var.HYPER}/system" -} - -module "cucumber_testsuite" { - source = "./modules/cucumber_testsuite" - - product_version = "uyuni-pr" - - // Cucumber repository configuration for the controller - git_username = var.GIT_USER - git_password = var.GIT_PASSWORD - git_repo = var.CUCUMBER_GITREPO - branch = var.CUCUMBER_BRANCH - - cc_username = var.SCC_USER - cc_password = var.SCC_PASSWORD - mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - use_mirror_images = true - - images = ["rocky8o", "opensuse154o", "opensuse155o", "opensuse155-ci-pro", "ubuntu2204o", "sles15sp4o"] - - use_avahi = false - name_prefix = "suma-pr${var.ENVIRONMENT}-" - domain = "mgr.prv.suse.net" - from_email = "root@suse.de" - - no_auth_registry = "registry.mgr.prv.suse.net" - auth_registry = "registry.mgr.prv.suse.net:5000/cucutest" - auth_registry_username = "cucutest" - auth_registry_password = "cucusecret" - git_profiles_repo = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" - - server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" - custom_download_endpoint = "ftp://minima-mirror-ci-bv.mgr.prv.suse.net:445" - - # when changing images, please also keep in mind to adjust the image matrix at the end of the README. - host_settings = { - controller = { - provider_settings = { - mac = "aa:b2:92:04:00:50" - } - } - server = { - provider_settings = { - mac = "aa:b2:92:04:00:51" - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - server_mounted_mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - } - proxy = { - provider_settings = { - mac = "aa:b2:92:04:00:52" - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - proxy_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", - tools_update = var.OPENSUSE_CLIENT_REPO - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-minion = { - image = "opensuse155o" - name = "min-suse" - provider_settings = { - mac = "aa:b2:92:04:00:54" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-sshminion = { - image = "opensuse155o" - name = "minssh-suse" - provider_settings = { - mac = "aa:b2:92:04:00:55" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion", "iptables" ] - install_salt_bundle = true - } - redhat-minion = { - image = "rocky8o" - name = "min-rocky8" - provider_settings = { - mac = "aa:b2:92:04:00:56" - memory = 2048 - vcpu = 2 - } - additional_repos = { - client_repo = var.RHLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - debian-minion = { - image = "ubuntu2204o" - name = "min-ubuntu2204" - provider_settings = { - mac = "aa:b2:92:04:00:57" - } - additional_repos = { - client_repo = var.DEBLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - // FIXME: cloudl-init fails if venv-salt-minion is not avaiable - // We can set "install_salt_bundle = true" as soon as venv-salt-minion is available Uyuni:Stable - install_salt_bundle = false - } - build-host = { - image = "sles15sp4o" - name = "min-build" - provider_settings = { - mac = "aa:b2:92:04:00:59" - memory = 2048 - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - pxeboot-minion = { - image = "sles15sp4o" - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - kvm-host = { - image = "opensuse155-ci-pro" - name = "min-kvm" - additional_grains = { - hvm_disk_image = { - leap = { - hostname = "suma-pr1-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" - } - sles = { - hostname = "suma-pr1-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" - } - } - } - provider_settings = { - mac = "aa:b2:92:04:00:5a" - } - additional_repos_only = true - additional_repos = { - client_repo = var.OPENSUSE_CLIENT_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - } - additional_packages = [ "venv-salt-minion", "mkisofs" ] - install_salt_bundle = true - } - } - nested_vm_host = "suma-pr6-min-nested" - nested_vm_mac = "aa:b2:92:04:00:5b" - provider_settings = { - pool = "ssd" - network_name = null - bridge = "br1" - additional_network = "192.168.106.0/24" - } -} - - -resource "null_resource" "add_test_information" { - triggers = { - always_run = "${timestamp()}" - } - provisioner "file" { - source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" - destination = "/tmp/set_custom_header.sh" - connection { - type = "ssh" - user = "root" - password = "linux" - host = "${module.cucumber_testsuite.configuration.server.hostname}" - } - } -} - - -output "configuration" { - value = module.cucumber_testsuite.configuration -} From 1b101ba9bae739bc12de7525e2fdb7519ec4012f Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 4 Oct 2023 14:06:35 +1300 Subject: [PATCH 073/110] Update suse minion names --- terracumber_config/tf_files/PR-TEST-main.tf | 4 ++-- terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars | 1 - terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars | 1 - terracumber_config/tf_files/variables/PR-TEST-variable.tf | 4 ---- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/terracumber_config/tf_files/PR-TEST-main.tf b/terracumber_config/tf_files/PR-TEST-main.tf index 176bf14a4..a9a54f54d 100644 --- a/terracumber_config/tf_files/PR-TEST-main.tf +++ b/terracumber_config/tf_files/PR-TEST-main.tf @@ -80,7 +80,7 @@ module "cucumber_testsuite" { } suse-minion = { image = var.SUSE_MINION_IMAGE - name = "min-${var.SUSE_MINION_NAME}" + name = "min-suse" provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["suse-minion"] vcpu = 2 @@ -92,7 +92,7 @@ module "cucumber_testsuite" { } suse-sshminion = { image = var.SUSE_MINION_IMAGE - name = "minssh-${var.SUSE_MINION_NAME}" + name = "minssh-suse" provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["suse-sshminion"] vcpu = 2 diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars index 672002ed2..8254e80f6 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars @@ -3,7 +3,6 @@ IMAGE = "sles15sp4o" IMAGES = ["rocky9o", "opensuse154o", "sles15sp4o", "ubuntu2204o"] SUSE_MINION_IMAGE = "sles15sp4o" -SUSE_MINION_NAME = "sles15" PRODUCT_VERSION = "4.3-nightly" GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_nue" MAIL_TEMPLATE_ENV_FAIL = "../mail_templates/mail-template-jenkins-suma43-pull-request-env-fail.txt" diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars index 74baf449f..62bf9cdcb 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars @@ -3,7 +3,6 @@ IMAGE = "opensuse154-ci-pro" IMAGES = ["rocky8o", "opensuse154o", "opensuse154-ci-pro", "ubuntu2204o"] SUSE_MINION_IMAGE = "opensuse154o" -SUSE_MINION_NAME = "leap15" PRODUCT_VERSION = "uyuni-pr" GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_nue" MAIL_TEMPLATE_ENV_FAIL = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" diff --git a/terracumber_config/tf_files/variables/PR-TEST-variable.tf b/terracumber_config/tf_files/variables/PR-TEST-variable.tf index 1eebc4a7e..32d8029d1 100644 --- a/terracumber_config/tf_files/variables/PR-TEST-variable.tf +++ b/terracumber_config/tf_files/variables/PR-TEST-variable.tf @@ -140,10 +140,6 @@ variable "SUSE_MINION_IMAGE" { type = string } -variable "SUSE_MINION_NAME" { - type = string -} - variable "REDHAT_MINION_IMAGE" { type = string } From 69e3a1cc58f1c159248d2cb1c31a9ec3ef1325bf Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 12 Oct 2023 11:30:33 +1300 Subject: [PATCH 074/110] Update mirror Change rhel and debian names --- terracumber_config/tf_files/PR-TEST-main.tf | 10 ++-- .../tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars | 46 +++++++++---------- .../tf_files/tfvars/PR-TEST-manager43.tfvars | 8 ++-- .../tf_files/tfvars/PR-TEST-uyuni.tfvars | 12 +++-- .../tf_files/variables/PR-TEST-variable.tf | 12 ++++- 5 files changed, 51 insertions(+), 37 deletions(-) diff --git a/terracumber_config/tf_files/PR-TEST-main.tf b/terracumber_config/tf_files/PR-TEST-main.tf index a9a54f54d..05272a8dc 100644 --- a/terracumber_config/tf_files/PR-TEST-main.tf +++ b/terracumber_config/tf_files/PR-TEST-main.tf @@ -103,10 +103,10 @@ module "cucumber_testsuite" { install_salt_bundle = true } redhat-minion = { - image = var.REDHAT_MINION_IMAGE - name = "min-${var.REDHAT_MINION_NAME}" + image = var.RHLIKE_MINION_IMAGE + name = "min-${var.RHLIKE_MINION_NAME}" provider_settings = { - mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["redhat-minion"] + mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["rhlike-minion"] memory = 2048 vcpu = 2 } @@ -117,10 +117,12 @@ module "cucumber_testsuite" { install_salt_bundle = true } debian-minion = { + image = var.DEBLIKE_MINION_IMAGE + name = "min-${var.DEBLIKE_MINION_NAME}" image = "ubuntu2204o" name = "min-ubuntu2204" provider_settings = { - mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["debian-minion"] + mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["deblike-minion"] vcpu = 2 memory = 2048 } diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars index 4bf7c7124..bb2872b1f 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars @@ -1,9 +1,9 @@ ############ Provo unique variables ########### -MIRROR = "minima-mirror.mgr.prv.suse.net" -DOWNLOAD_ENDPOINT = "minima-mirror.mgr.prv.suse.net" +MIRROR = "minima-mirror-ci-bv.mgr.prv.suse.net" +DOWNLOAD_ENDPOINT = "minima-mirror-ci-bv.mgr.prv.suse.net" DOMAIN = "mgr.prv.suse.net" -USE_MIRROR_IMAGES = false +USE_MIRROR_IMAGES = true BRIDGE = "br1" environment_description = { 1 = { @@ -13,8 +13,8 @@ environment_description = { proxy = "aa:b2:92:04:00:02" suse-minion = "aa:b2:92:04:00:04" suse-sshminion = "aa:b2:92:04:00:05" - redhat-minion = "aa:b2:92:04:00:06" - debian-minion = "aa:b2:92:04:00:07" + rhlike-minion = "aa:b2:92:04:00:06" + deblike-minion = "aa:b2:92:04:00:07" build-host = "aa:b2:92:04:00:09" kvm-host = "aa:b2:92:04:00:0a" nested-vm = "aa:b2:92:04:00:0b" @@ -29,8 +29,8 @@ environment_description = { proxy = "aa:b2:92:04:00:12" suse-minion = "aa:b2:92:04:00:14" suse-sshminion = "aa:b2:92:04:00:15" - redhat-minion = "aa:b2:92:04:00:16" - debian-minion = "aa:b2:92:04:00:17" + rhlike-minion = "aa:b2:92:04:00:16" + deblike-minion = "aa:b2:92:04:00:17" build-host = "aa:b2:92:04:00:19" kvm-host = "aa:b2:92:04:00:1a" nested-vm = "aa:b2:92:04:00:1b" @@ -45,8 +45,8 @@ environment_description = { proxy = "aa:b2:92:04:00:22" suse-minion = "aa:b2:92:04:00:24" suse-sshminion = "aa:b2:92:04:00:25" - redhat-minion = "aa:b2:92:04:00:26" - debian-minion = "aa:b2:92:04:00:27" + rhlike-minion = "aa:b2:92:04:00:26" + deblike-minion = "aa:b2:92:04:00:27" build-host = "aa:b2:92:04:00:29" kvm-host = "aa:b2:92:04:00:2a" nested-vm = "aa:b2:92:04:00:2b" @@ -61,8 +61,8 @@ environment_description = { proxy = "aa:b2:92:04:00:32" suse-minion = "aa:b2:92:04:00:34" suse-sshminion = "aa:b2:92:04:00:35" - redhat-minion = "aa:b2:92:04:00:36" - debian-minion = "aa:b2:92:04:00:37" + rhlike-minion = "aa:b2:92:04:00:36" + deblike-minion = "aa:b2:92:04:00:37" build-host = "aa:b2:92:04:00:39" kvm-host = "aa:b2:92:04:00:3a" nested-vm = "aa:b2:92:04:00:3b" @@ -77,8 +77,8 @@ environment_description = { proxy = "aa:b2:92:04:00:42" suse-minion = "aa:b2:92:04:00:44" suse-sshminion = "aa:b2:92:04:00:45" - redhat-minion = "aa:b2:92:04:00:46" - debian-minion = "aa:b2:92:04:00:47" + rhlike-minion = "aa:b2:92:04:00:46" + deblike-minion = "aa:b2:92:04:00:47" build-host = "aa:b2:92:04:00:49" kvm-host = "aa:b2:92:04:00:4a" nested-vm = "aa:b2:92:04:00:4b" @@ -93,8 +93,8 @@ environment_description = { proxy = "aa:b2:92:04:00:52" suse-minion = "aa:b2:92:04:00:54" suse-sshminion = "aa:b2:92:04:00:55" - redhat-minion = "aa:b2:92:04:00:56" - debian-minion = "aa:b2:92:04:00:57" + rhlike-minion = "aa:b2:92:04:00:56" + deblike-minion = "aa:b2:92:04:00:57" build-host = "aa:b2:92:04:00:59" kvm-host = "aa:b2:92:04:00:5a" nested-vm = "aa:b2:92:04:00:5b" @@ -109,8 +109,8 @@ environment_description = { proxy = "aa:b2:92:04:00:62" suse-minion = "aa:b2:92:04:00:64" suse-sshminion = "aa:b2:92:04:00:65" - redhat-minion = "aa:b2:92:04:00:66" - debian-minion = "aa:b2:92:04:00:67" + rhlike-minion = "aa:b2:92:04:00:66" + deblike-minion = "aa:b2:92:04:00:67" build-host = "aa:b2:92:04:00:69" kvm-host = "aa:b2:92:04:00:6a" nested-vm = "aa:b2:92:04:00:6b" @@ -125,8 +125,8 @@ environment_description = { proxy = "aa:b2:92:04:00:72" suse-minion = "aa:b2:92:04:00:74" suse-sshminion = "aa:b2:92:04:00:75" - redhat-minion = "aa:b2:92:04:00:76" - debian-minion = "aa:b2:92:04:00:77" + rhlike-minion = "aa:b2:92:04:00:76" + deblike-minion = "aa:b2:92:04:00:77" build-host = "aa:b2:92:04:00:79" kvm-host = "aa:b2:92:04:00:7a" nested-vm = "aa:b2:92:04:00:7b" @@ -141,8 +141,8 @@ environment_description = { proxy = "aa:b2:92:04:00:82" suse-minion = "aa:b2:92:04:00:84" suse-sshminion = "aa:b2:92:04:00:85" - redhat-minion = "aa:b2:92:04:00:86" - debian-minion = "aa:b2:92:04:00:87" + rhlike-minion = "aa:b2:92:04:00:86" + deblike-minion = "aa:b2:92:04:00:87" build-host = "aa:b2:92:04:00:89" kvm-host = "aa:b2:92:04:00:8a" nested-vm = "aa:b2:92:04:00:8b" @@ -157,8 +157,8 @@ environment_description = { proxy = "aa:b2:92:04:00:92" suse-minion = "aa:b2:92:04:00:94" suse-sshminion = "aa:b2:92:04:00:95" - redhat-minion = "aa:b2:92:04:00:96" - debian-minion = "aa:b2:92:04:00:97" + rhlike-minion = "aa:b2:92:04:00:96" + deblike-minion = "aa:b2:92:04:00:97" build-host = "aa:b2:92:04:00:99" kvm-host = "aa:b2:92:04:00:9a" nested-vm = "aa:b2:92:04:00:9b" diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars index 8254e80f6..345e4cc23 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars @@ -1,7 +1,7 @@ ############ Spacewalk unique variables ########### IMAGE = "sles15sp4o" -IMAGES = ["rocky9o", "opensuse154o", "sles15sp4o", "ubuntu2204o"] +IMAGES = ["rocky9o", "opensuse155o", "sles15sp4o", "ubuntu2204o"] SUSE_MINION_IMAGE = "sles15sp4o" PRODUCT_VERSION = "4.3-nightly" GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_nue" @@ -13,5 +13,7 @@ CUCUMBER_GITREPO = "https://github.com/SUSE/spacewalk/spacewalk.git" CUCUMBER_COMMAND = "export PRODUCT='SUSE-Manager' && run-testsuite" URL_PREFIX = "https://ci.suse.de/view/Manager/view/Uyuni/job/suma43-prs-ci-tests" ADDITIONAL_REPOS_ONLY = false -REDHAT_MINION_IMAGE = "rocky9o" -REDHAT_MINION_NAME = "rocky9" +RHLIKE_MINION_IMAGE = "rocky9o" +RHLIKE_MINION_NAME = "rocky9" +DEBLIKE_MINION_IMAGE = "ubuntu2204o" +DEBLIKE_MINION_NAME = "ubuntu2204" \ No newline at end of file diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars index 62bf9cdcb..11e5fada1 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars @@ -1,8 +1,8 @@ ############ Uyuni unique variables ######################## -IMAGE = "opensuse154-ci-pro" -IMAGES = ["rocky8o", "opensuse154o", "opensuse154-ci-pro", "ubuntu2204o"] -SUSE_MINION_IMAGE = "opensuse154o" +IMAGE = "opensuse155-ci-pro" +IMAGES = ["rocky8o", "opensuse154o", "opensuse155o", "opensuse155-ci-pro", "ubuntu2204o", "sles15sp4o"] +SUSE_MINION_IMAGE = "opensuse155o" PRODUCT_VERSION = "uyuni-pr" GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_nue" MAIL_TEMPLATE_ENV_FAIL = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" @@ -13,5 +13,7 @@ CUCUMBER_GITREPO = "https://github.com/uyuni-project/uyuni.git" CUCUMBER_COMMAND = "export PRODUCT='Uyuni' && run-testsuite" URL_PREFIX = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" ADDITIONAL_REPOS_ONLY = true -REDHAT_MINION_IMAGE = "rocky8o" -REDHAT_MINION_NAME = "rocky8" +RHLIKE_MINION_IMAGE = "rocky8o" +RHLIKE_MINION_NAME = "rocky8" +DEBLIKE_MINION_IMAGE = "ubuntu2204o" +DEBLIKE_MINION_NAME = "ubuntu2204" diff --git a/terracumber_config/tf_files/variables/PR-TEST-variable.tf b/terracumber_config/tf_files/variables/PR-TEST-variable.tf index 32d8029d1..81cd22df7 100644 --- a/terracumber_config/tf_files/variables/PR-TEST-variable.tf +++ b/terracumber_config/tf_files/variables/PR-TEST-variable.tf @@ -140,11 +140,19 @@ variable "SUSE_MINION_IMAGE" { type = string } -variable "REDHAT_MINION_IMAGE" { +variable "RHLIKE_MINION_IMAGE" { type = string } -variable "REDHAT_MINION_NAME" { +variable "RHLIKE_MINION_NAME" { + type = string +} + +variable "DEBLIKE_MINION_IMAGE" { + type = string +} + +variable "DEBLIKE_MINION_NAME" { type = string } From 0d28d95d35018a54227b668e3a30318dee326776 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 12 Oct 2023 12:42:35 +1300 Subject: [PATCH 075/110] Add back opensuses154o for controller --- terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars index 345e4cc23..ae7b5ff0a 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars @@ -1,7 +1,7 @@ ############ Spacewalk unique variables ########### IMAGE = "sles15sp4o" -IMAGES = ["rocky9o", "opensuse155o", "sles15sp4o", "ubuntu2204o"] +IMAGES = ["rocky9o", "opensuse154o", "sles15sp4o", "ubuntu2204o"] SUSE_MINION_IMAGE = "sles15sp4o" PRODUCT_VERSION = "4.3-nightly" GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_nue" From 4f08832fc2af7ac7f1c9c19e30791fd52a9bc2db Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 12 Oct 2023 12:59:34 +1300 Subject: [PATCH 076/110] Change default repo for testing purpose --- .../common/pipeline-pull-request-light.groovy | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy index 27a722941..52f55e0ee 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy @@ -68,11 +68,11 @@ def run(params) { if(must_test) { // Passing the built repository by parameter using a environment variable to terraform file // TODO: We will need to add a logic to replace the host, when we use IBS for spacewalk - env.PULL_REQUEST_REPO= "http://download.suse.de/ibs/SUSE:/Maintenance:/29643/SUSE_Updates_SLE-Product-SLES_15-SP1-LTSS_x86_64/" - env.MASTER_REPO = "http://download.suse.de/ibs/SUSE:/Maintenance:/29643/SUSE_Updates_SLE-Product-SLES_15-SP1-LTSS_x86_64/" - env.MASTER_OTHER_REPO = "http://download.suse.de/ibs/SUSE:/Maintenance:/29643/SUSE_Updates_SLE-Product-SLES_15-SP1-LTSS_x86_64/" - env.MASTER_SUMAFORM_TOOLS_REPO = "http://download.suse.de/ibs/SUSE:/Maintenance:/29643/SUSE_Updates_SLE-Product-SLES_15-SP1-LTSS_x86_64/" - env.TEST_PACKAGES_REPO = "http://download.suse.de/ibs/SUSE:/Maintenance:/29643/SUSE_Updates_SLE-Product-SLES_15-SP1-LTSS_x86_64/" + env.PULL_REQUEST_REPO= "http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/" + env.MASTER_REPO = "http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/" + env.MASTER_OTHER_REPO = "http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/" + env.MASTER_SUMAFORM_TOOLS_REPO = "http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/" + env.TEST_PACKAGES_REPO = "http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/" env.UPDATE_REPO = "http://minima-mirror.mgr.prv.suse.net/jordi/some-updates/" if (additional_repo_url == '') { echo "Adding dummy repo for update repo" @@ -81,10 +81,10 @@ def run(params) { echo "Adding ${additional_repo_url}" env.ADDITIONAL_REPO_URL = additional_repo_url } - env.SLE_CLIENT_REPO = "http://download.suse.de/ibs/SUSE:/Maintenance:/29643/SUSE_Updates_SLE-Product-SLES_15-SP1-LTSS_x86_64/" - env.RHLIKE_CLIENT_REPO = "http://download.suse.de/ibs/SUSE:/Maintenance:/29643/SUSE_Updates_SLE-Product-SLES_15-SP1-LTSS_x86_64/" - env.DEBLIKE_CLIENT_REPO = "http://download.suse.de/ibs/SUSE:/Maintenance:/29643/SUSE_Updates_SLE-Product-SLES_15-SP1-LTSS_x86_64/" - env.OPENSUSE_CLIENT_REPO = "http://download.suse.de/ibs/SUSE:/Maintenance:/29643/SUSE_Updates_SLE-Product-SLES_15-SP1-LTSS_x86_64/" + env.SLE_CLIENT_REPO = "http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/" + env.RHLIKE_CLIENT_REPO = "http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/" + env.DEBLIKE_CLIENT_REPO = "http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/" + env.OPENSUSE_CLIENT_REPO = "http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/" // Provision the environment if (terraform_init) { From 6c89ed3d4dcc2cff9cb9cf74c3aa9d9660a241f0 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 12 Oct 2023 13:41:44 +1300 Subject: [PATCH 077/110] Use normalize name for rh and deb like minion --- terracumber_config/tf_files/PR-TEST-main.tf | 4 ++-- .../tf_files/tfvars/PR-TEST-manager43.tfvars | 2 -- terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars | 2 -- terracumber_config/tf_files/variables/PR-TEST-variable.tf | 8 -------- 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/terracumber_config/tf_files/PR-TEST-main.tf b/terracumber_config/tf_files/PR-TEST-main.tf index 05272a8dc..2d6e6b707 100644 --- a/terracumber_config/tf_files/PR-TEST-main.tf +++ b/terracumber_config/tf_files/PR-TEST-main.tf @@ -104,7 +104,7 @@ module "cucumber_testsuite" { } redhat-minion = { image = var.RHLIKE_MINION_IMAGE - name = "min-${var.RHLIKE_MINION_NAME}" + name = "min-rhlike" provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["rhlike-minion"] memory = 2048 @@ -118,7 +118,7 @@ module "cucumber_testsuite" { } debian-minion = { image = var.DEBLIKE_MINION_IMAGE - name = "min-${var.DEBLIKE_MINION_NAME}" + name = "min-deblike" image = "ubuntu2204o" name = "min-ubuntu2204" provider_settings = { diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars index ae7b5ff0a..32a948747 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars @@ -14,6 +14,4 @@ CUCUMBER_COMMAND = "export PRODUCT='SUSE-Manager' && run-testsuite" URL_PREFIX = "https://ci.suse.de/view/Manager/view/Uyuni/job/suma43-prs-ci-tests" ADDITIONAL_REPOS_ONLY = false RHLIKE_MINION_IMAGE = "rocky9o" -RHLIKE_MINION_NAME = "rocky9" DEBLIKE_MINION_IMAGE = "ubuntu2204o" -DEBLIKE_MINION_NAME = "ubuntu2204" \ No newline at end of file diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars index 11e5fada1..6359f05e6 100644 --- a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars @@ -14,6 +14,4 @@ CUCUMBER_COMMAND = "export PRODUCT='Uyuni' && run-testsuite" URL_PREFIX = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" ADDITIONAL_REPOS_ONLY = true RHLIKE_MINION_IMAGE = "rocky8o" -RHLIKE_MINION_NAME = "rocky8" DEBLIKE_MINION_IMAGE = "ubuntu2204o" -DEBLIKE_MINION_NAME = "ubuntu2204" diff --git a/terracumber_config/tf_files/variables/PR-TEST-variable.tf b/terracumber_config/tf_files/variables/PR-TEST-variable.tf index 81cd22df7..b588dcd96 100644 --- a/terracumber_config/tf_files/variables/PR-TEST-variable.tf +++ b/terracumber_config/tf_files/variables/PR-TEST-variable.tf @@ -144,18 +144,10 @@ variable "RHLIKE_MINION_IMAGE" { type = string } -variable "RHLIKE_MINION_NAME" { - type = string -} - variable "DEBLIKE_MINION_IMAGE" { type = string } -variable "DEBLIKE_MINION_NAME" { - type = string -} - variable "PRODUCT_VERSION" { type = string } From b7bb1ed9c498b9e14d7040a4a9673c2986a52183 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 12 Oct 2023 14:13:13 +1300 Subject: [PATCH 078/110] Rename testing pipeline --- ...y => TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy} | 0 jenkins_pipelines/environments/uyuni-prs-ci-tests | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename jenkins_pipelines/environments/common/{pipeline-pull-request-light.groovy => TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy} (100%) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy similarity index 100% rename from jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy rename to jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy diff --git a/jenkins_pipelines/environments/uyuni-prs-ci-tests b/jenkins_pipelines/environments/uyuni-prs-ci-tests index c251bfb3e..926f86a50 100644 --- a/jenkins_pipelines/environments/uyuni-prs-ci-tests +++ b/jenkins_pipelines/environments/uyuni-prs-ci-tests @@ -57,7 +57,7 @@ node('pull-request-test-NUE') { } } echo "DEBUG: Secondary test tags: ${secondary_exports}" - def pipeline = load "jenkins_pipelines/environments/common/pipeline-pull-request-light.groovy" + def pipeline = load "jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy" pipeline.run(params) } } From 6e298cbfba726f9044fb100be6ea74c4ba65c75d Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 12 Oct 2023 14:17:54 +1300 Subject: [PATCH 079/110] Rename template main tf file --- .../TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy | 2 +- .../tf_files/{PR-TEST-main.tf => PR-Testing-main.tf} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename terracumber_config/tf_files/{PR-TEST-main.tf => PR-Testing-main.tf} (100%) diff --git a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy index 52f55e0ee..c147510d3 100644 --- a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy @@ -45,7 +45,7 @@ def run(params) { // Define test environment parameters env.resultdir = "${WORKSPACE}/results" env.resultdirbuild = "${resultdir}/${BUILD_NUMBER}" - env.tf_file = "susemanager-ci/terracumber_config/tf_files/PR-TEST-main.tf" + env.tf_file = "susemanager-ci/terracumber_config/tf_files/PR-Testing-main.tf" env.common_params = "--outputdir ${resultdir} --tf ${tf_file} --gitfolder ${resultdir}/sumaform --tf_variables_description_file=${tfvariables_file}" if (params.terraform_parallelism) { diff --git a/terracumber_config/tf_files/PR-TEST-main.tf b/terracumber_config/tf_files/PR-Testing-main.tf similarity index 100% rename from terracumber_config/tf_files/PR-TEST-main.tf rename to terracumber_config/tf_files/PR-Testing-main.tf From 4a21f11c3395ef55d3260ac2ef117d3a1742b3d6 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 12 Oct 2023 14:19:05 +1300 Subject: [PATCH 080/110] Rename template main tf file --- .../tf_files/{PR-Testing-main.tf => PR-testing-template.tf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename terracumber_config/tf_files/{PR-Testing-main.tf => PR-testing-template.tf} (100%) diff --git a/terracumber_config/tf_files/PR-Testing-main.tf b/terracumber_config/tf_files/PR-testing-template.tf similarity index 100% rename from terracumber_config/tf_files/PR-Testing-main.tf rename to terracumber_config/tf_files/PR-testing-template.tf From 8e630c1e34cd68a3a24fd6f7508c6459ebc0fab6 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 12 Oct 2023 14:19:53 +1300 Subject: [PATCH 081/110] Rename template main tf file --- .../TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy index c147510d3..140038c9a 100644 --- a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy @@ -45,7 +45,7 @@ def run(params) { // Define test environment parameters env.resultdir = "${WORKSPACE}/results" env.resultdirbuild = "${resultdir}/${BUILD_NUMBER}" - env.tf_file = "susemanager-ci/terracumber_config/tf_files/PR-Testing-main.tf" + env.tf_file = "susemanager-ci/terracumber_config/tf_files/PR-testing-template.tf" env.common_params = "--outputdir ${resultdir} --tf ${tf_file} --gitfolder ${resultdir}/sumaform --tf_variables_description_file=${tfvariables_file}" if (params.terraform_parallelism) { From e3b0737746144ecf11fd29cef7e69ccb984ce080 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 12 Oct 2023 14:20:41 +1300 Subject: [PATCH 082/110] Remove name configuration duplication --- terracumber_config/tf_files/PR-testing-template.tf | 2 -- 1 file changed, 2 deletions(-) diff --git a/terracumber_config/tf_files/PR-testing-template.tf b/terracumber_config/tf_files/PR-testing-template.tf index 2d6e6b707..6eb6f0c38 100644 --- a/terracumber_config/tf_files/PR-testing-template.tf +++ b/terracumber_config/tf_files/PR-testing-template.tf @@ -119,8 +119,6 @@ module "cucumber_testsuite" { debian-minion = { image = var.DEBLIKE_MINION_IMAGE name = "min-deblike" - image = "ubuntu2204o" - name = "min-ubuntu2204" provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["deblike-minion"] vcpu = 2 From 8a12cb57e2db47ae2918fa912a45ba57f1510036 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 12 Oct 2023 14:25:47 +1300 Subject: [PATCH 083/110] Rename files --- ...TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy | 8 ++++---- ...NUE-ENVS.tfvars => PR-testing-NUE-environments.tfvars} | 0 ...PRV-ENVS.tfvars => PR-testing-PRV-environments.tfvars} | 0 ...onnal-repos.tf => PR-testing-additionnal-repos.tfvars} | 0 ...-TEST-manager43.tfvars => PR-testing-manager43.tfvars} | 0 .../{PR-TEST-uyuni.tfvars => PR-testing-uyuni.tfvars} | 0 .../{PR-TEST-variable.tf => PR-testing-variables.tf} | 0 7 files changed, 4 insertions(+), 4 deletions(-) rename terracumber_config/tf_files/tfvars/{PR-TEST-NUE-ENVS.tfvars => PR-testing-NUE-environments.tfvars} (100%) rename terracumber_config/tf_files/tfvars/{PR-TEST-PRV-ENVS.tfvars => PR-testing-PRV-environments.tfvars} (100%) rename terracumber_config/tf_files/tfvars/{PR-TEST-additionnal-repos.tf => PR-testing-additionnal-repos.tfvars} (100%) rename terracumber_config/tf_files/tfvars/{PR-TEST-manager43.tfvars => PR-testing-manager43.tfvars} (100%) rename terracumber_config/tf_files/tfvars/{PR-TEST-uyuni.tfvars => PR-testing-uyuni.tfvars} (100%) rename terracumber_config/tf_files/variables/{PR-TEST-variable.tf => PR-testing-variables.tf} (100%) diff --git a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy index 140038c9a..307eb034a 100644 --- a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy @@ -29,10 +29,10 @@ def run(params) { env.common_params = '' fqdn_jenkins_node = sh(script: "hostname -f", returnStdout: true).trim() env_number = 2 - tfvariables_file = 'susemanager-ci/terracumber_config/tf_files/variables/PR-TEST-variable.tf' - tfvars_manager43 = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars' - tfvars_nuremberg = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars' - tf_local_variables = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-TEST-additionnal-repos.tf' + tfvariables_file = 'susemanager-ci/terracumber_config/tf_files/variables/PR-testing-variables.tf' + tfvars_manager43 = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-manager43.tfvars' + tfvars_nuremberg = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars' + tf_local_variables = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tfvars' try { stage('Checkout CI tools') { ws(environment_workspace){ diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars similarity index 100% rename from terracumber_config/tf_files/tfvars/PR-TEST-NUE-ENVS.tfvars rename to terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars similarity index 100% rename from terracumber_config/tf_files/tfvars/PR-TEST-PRV-ENVS.tfvars rename to terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-additionnal-repos.tf b/terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tfvars similarity index 100% rename from terracumber_config/tf_files/tfvars/PR-TEST-additionnal-repos.tf rename to terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tfvars diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-manager43.tfvars similarity index 100% rename from terracumber_config/tf_files/tfvars/PR-TEST-manager43.tfvars rename to terracumber_config/tf_files/tfvars/PR-testing-manager43.tfvars diff --git a/terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-uyuni.tfvars similarity index 100% rename from terracumber_config/tf_files/tfvars/PR-TEST-uyuni.tfvars rename to terracumber_config/tf_files/tfvars/PR-testing-uyuni.tfvars diff --git a/terracumber_config/tf_files/variables/PR-TEST-variable.tf b/terracumber_config/tf_files/variables/PR-testing-variables.tf similarity index 100% rename from terracumber_config/tf_files/variables/PR-TEST-variable.tf rename to terracumber_config/tf_files/variables/PR-testing-variables.tf From 0d8612d89ef6d13c4dbe8fd30b0b46440d4f79f1 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 12 Oct 2023 14:30:15 +1300 Subject: [PATCH 084/110] Move git profiles from product description to environment description --- .../tf_files/tfvars/PR-testing-PRV-environments.tfvars | 7 ++++--- .../tf_files/tfvars/PR-testing-manager43.tfvars | 1 - terracumber_config/tf_files/tfvars/PR-testing-uyuni.tfvars | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars index bb2872b1f..4dee0abc7 100644 --- a/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars @@ -1,10 +1,11 @@ ############ Provo unique variables ########### -MIRROR = "minima-mirror-ci-bv.mgr.prv.suse.net" +MIRROR = "minima-mirror-ci-bv.mgr.prv.suse.net" DOWNLOAD_ENDPOINT = "minima-mirror-ci-bv.mgr.prv.suse.net" -DOMAIN = "mgr.prv.suse.net" +DOMAIN = "mgr.prv.suse.net" USE_MIRROR_IMAGES = true -BRIDGE = "br1" +GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" +BRIDGE = "br1" environment_description = { 1 = { mac = { diff --git a/terracumber_config/tf_files/tfvars/PR-testing-manager43.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-manager43.tfvars index 32a948747..be0c7c56c 100644 --- a/terracumber_config/tf_files/tfvars/PR-testing-manager43.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-testing-manager43.tfvars @@ -4,7 +4,6 @@ IMAGE = "sles15sp4o" IMAGES = ["rocky9o", "opensuse154o", "sles15sp4o", "ubuntu2204o"] SUSE_MINION_IMAGE = "sles15sp4o" PRODUCT_VERSION = "4.3-nightly" -GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_nue" MAIL_TEMPLATE_ENV_FAIL = "../mail_templates/mail-template-jenkins-suma43-pull-request-env-fail.txt" MAIL_TEMPLATE = "../mail_templates/mail-template-jenkins-suma43-pull-request.txt" MAIL_SUBJECT = "$status acceptance tests on SUMA 4.3 Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" diff --git a/terracumber_config/tf_files/tfvars/PR-testing-uyuni.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-uyuni.tfvars index 6359f05e6..39f20afd6 100644 --- a/terracumber_config/tf_files/tfvars/PR-testing-uyuni.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-testing-uyuni.tfvars @@ -4,7 +4,6 @@ IMAGE = "opensuse155-ci-pro" IMAGES = ["rocky8o", "opensuse154o", "opensuse155o", "opensuse155-ci-pro", "ubuntu2204o", "sles15sp4o"] SUSE_MINION_IMAGE = "opensuse155o" PRODUCT_VERSION = "uyuni-pr" -GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_nue" MAIL_TEMPLATE_ENV_FAIL = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" MAIL_TEMPLATE = "../mail_templates/mail-template-jenkins-pull-request.txt" MAIL_SUBJECT = "$status acceptance tests on Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" From 2d202e3081af178f97161268d0078e00bd25e65c Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 12 Oct 2023 14:53:10 +1300 Subject: [PATCH 085/110] Temporary change back rh and deb names --- terracumber_config/tf_files/PR-testing-template.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terracumber_config/tf_files/PR-testing-template.tf b/terracumber_config/tf_files/PR-testing-template.tf index 6eb6f0c38..aff0b6648 100644 --- a/terracumber_config/tf_files/PR-testing-template.tf +++ b/terracumber_config/tf_files/PR-testing-template.tf @@ -104,7 +104,7 @@ module "cucumber_testsuite" { } redhat-minion = { image = var.RHLIKE_MINION_IMAGE - name = "min-rhlike" + name = "min-rocky8" provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["rhlike-minion"] memory = 2048 @@ -118,7 +118,7 @@ module "cucumber_testsuite" { } debian-minion = { image = var.DEBLIKE_MINION_IMAGE - name = "min-deblike" + name = "min-ubuntu2204" provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["deblike-minion"] vcpu = 2 From 9651a81d318d08d2a17c1cb9fbb039ffb1c49890 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 12 Oct 2023 15:16:44 +1300 Subject: [PATCH 086/110] Update repositories --- terracumber_config/tf_files/PR-testing-template.tf | 4 ++-- .../tfvars/PR-testing-additionnal-repos.tfvars | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/terracumber_config/tf_files/PR-testing-template.tf b/terracumber_config/tf_files/PR-testing-template.tf index aff0b6648..251a92422 100644 --- a/terracumber_config/tf_files/PR-testing-template.tf +++ b/terracumber_config/tf_files/PR-testing-template.tf @@ -165,8 +165,8 @@ module "cucumber_testsuite" { hvm_disk_image = { leap = { hostname = "suma-pr${var.ENVIRONMENT}-min-nested" - image = "http://${var.DOWNLOAD_ENDPOINT}/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2" - hash = "http://${var.DOWNLOAD_ENDPOINT}/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" + image = "http://${var.DOWNLOAD_ENDPOINT}/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-JeOS.x86_64-OpenStack-Cloud.qcow2" + hash = "http://${var.DOWNLOAD_ENDPOINT}/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" } sles = { hostname = "suma-pr${var.ENVIRONMENT}-min-nested" diff --git a/terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tfvars index df381c2a8..b17bb4fb0 100644 --- a/terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tfvars @@ -6,8 +6,8 @@ locals { master_repo_other = "${var.MASTER_OTHER_REPO}" master_sumaform_tools_repo = "${var.MASTER_SUMAFORM_TOOLS_REPO}" test_packages_repo = "${var.TEST_PACKAGES_REPO}" - non_os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/non-oss/" - os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/oss/" + non_os_pool = "http://${var.MIRROR}/distribution/leap/15.5/repo/non-oss/" + os_pool = "http://${var.MIRROR}/distribution/leap/15.5/repo/oss/" os_update = "${var.UPDATE_REPO}" os_additional_repo = "${var.ADDITIONAL_REPO_URL}" testing_overlay_devel = "http://${var.MIRROR}/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/" @@ -18,8 +18,8 @@ locals { master_repo_other = "${var.MASTER_OTHER_REPO}" master_sumaform_tools_repo = "${var.MASTER_SUMAFORM_TOOLS_REPO}" test_packages_repo = "${var.TEST_PACKAGES_REPO}" - non_os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/non-oss/" - os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/oss/" + non_os_pool = "http://${var.MIRROR}/distribution/leap/15.5/repo/non-oss/" + os_pool = "http://${var.MIRROR}/distribution/leap/15.5/repo/oss/" os_update = "${var.UPDATE_REPO}" os_additional_repo = "${var.ADDITIONAL_REPO_URL}" testing_overlay_devel = "http://${var.MIRROR}/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/" @@ -33,8 +33,8 @@ locals { client_repo = "${var.OPENSUSE_CLIENT_REPO}" master_sumaform_tools_repo = "${var.MASTER_SUMAFORM_TOOLS_REPO}" test_packages_repo = "${var.TEST_PACKAGES_REPO}" - non_os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/non-oss/" - os_pool = "http://${var.MIRROR}/distribution/leap/15.4/repo/oss/" + non_os_pool = "http://${var.MIRROR}/distribution/leap/15.5/repo/non-oss/" + os_pool = "http://${var.MIRROR}/distribution/leap/15.5/repo/oss/" os_update = "${var.UPDATE_REPO}" os_additional_repo = "${var.ADDITIONAL_REPO_URL}" tools_update_pr = "${var.SLE_CLIENT_REPO}" From 7842e27e24dda978e28da968d90a141c90805653 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Fri, 13 Oct 2023 11:11:25 +1300 Subject: [PATCH 087/110] Switch back to pr pipeline --- jenkins_pipelines/environments/uyuni-prs-ci-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins_pipelines/environments/uyuni-prs-ci-tests b/jenkins_pipelines/environments/uyuni-prs-ci-tests index 926f86a50..830d6b4af 100644 --- a/jenkins_pipelines/environments/uyuni-prs-ci-tests +++ b/jenkins_pipelines/environments/uyuni-prs-ci-tests @@ -57,7 +57,7 @@ node('pull-request-test-NUE') { } } echo "DEBUG: Secondary test tags: ${secondary_exports}" - def pipeline = load "jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy" + def pipeline = load "jenkins_pipelines/environments/common/pipeline-pull-request.groovy" pipeline.run(params) } } From 402dd412dc73133956618474f9ade580a19b4562 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Fri, 13 Oct 2023 11:57:10 +1300 Subject: [PATCH 088/110] use provo --- jenkins_pipelines/environments/uyuni-prs-ci-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins_pipelines/environments/uyuni-prs-ci-tests b/jenkins_pipelines/environments/uyuni-prs-ci-tests index 830d6b4af..7630a02be 100644 --- a/jenkins_pipelines/environments/uyuni-prs-ci-tests +++ b/jenkins_pipelines/environments/uyuni-prs-ci-tests @@ -1,6 +1,6 @@ #!/usr/bin/env groovy -node('pull-request-test-NUE') { +node('pull-request-test') { properties([ buildDiscarder(logRotator(numToKeepStr: '30', daysToKeepStr: '15')), parameters([ From a0ac1e31c43f5a147ef26ca7a34298d9512cd1dd Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Fri, 13 Oct 2023 14:25:19 +1300 Subject: [PATCH 089/110] Correctly update variables in ENV files --- .../tf_files/tfvars/PR-testing-PRV-environments.tfvars | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars index 4dee0abc7..72f50aeab 100644 --- a/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars @@ -1,12 +1,12 @@ ############ Provo unique variables ########### +DOMAIN = "mgr.prv.suse.net" MIRROR = "minima-mirror-ci-bv.mgr.prv.suse.net" DOWNLOAD_ENDPOINT = "minima-mirror-ci-bv.mgr.prv.suse.net" -DOMAIN = "mgr.prv.suse.net" USE_MIRROR_IMAGES = true GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" BRIDGE = "br1" -environment_description = { +ENVIRONMENT_CONFIGURATION = { 1 = { mac = { controller = "aa:b2:92:04:00:00" From ac8ffffb34ecbf72161b61c0482c70107773ca0e Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Fri, 13 Oct 2023 16:28:30 +1300 Subject: [PATCH 090/110] Use correct extension for repositories --- .../TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy | 2 +- ...additionnal-repos.tfvars => PR-testing-additionnal-repos.tf} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename terracumber_config/tf_files/tfvars/{PR-testing-additionnal-repos.tfvars => PR-testing-additionnal-repos.tf} (100%) diff --git a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy index 307eb034a..215fc931f 100644 --- a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy @@ -32,7 +32,7 @@ def run(params) { tfvariables_file = 'susemanager-ci/terracumber_config/tf_files/variables/PR-testing-variables.tf' tfvars_manager43 = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-manager43.tfvars' tfvars_nuremberg = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars' - tf_local_variables = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tfvars' + tf_local_variables = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tf' try { stage('Checkout CI tools') { ws(environment_workspace){ diff --git a/terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tf similarity index 100% rename from terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tfvars rename to terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tf From ed4d18c1ab2f61dd1dcfc3ae0d170b102c2819ed Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 21 Dec 2023 09:53:47 +1300 Subject: [PATCH 091/110] Update the repository --- .../tf_files/tfvars/PR-testing-additionnal-repos.tf | 3 +-- terracumber_config/tf_files/variables/PR-testing-variables.tf | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tf b/terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tf index b17bb4fb0..6e71b3e55 100644 --- a/terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tf +++ b/terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tf @@ -27,7 +27,7 @@ locals { tools_update_pr = "${var.OPENSUSE_CLIENT_REPO}" } suse-minion = { - tools_update_pr = "${var.OPENSUSE_CLIENT_REPO}" + tools_update_pr = "${var.SLE_CLIENT_REPO}" } kvm-host = { client_repo = "${var.OPENSUSE_CLIENT_REPO}" @@ -37,7 +37,6 @@ locals { os_pool = "http://${var.MIRROR}/distribution/leap/15.5/repo/oss/" os_update = "${var.UPDATE_REPO}" os_additional_repo = "${var.ADDITIONAL_REPO_URL}" - tools_update_pr = "${var.SLE_CLIENT_REPO}" } } : { server = { diff --git a/terracumber_config/tf_files/variables/PR-testing-variables.tf b/terracumber_config/tf_files/variables/PR-testing-variables.tf index b588dcd96..44aabe1e9 100644 --- a/terracumber_config/tf_files/variables/PR-testing-variables.tf +++ b/terracumber_config/tf_files/variables/PR-testing-variables.tf @@ -124,6 +124,10 @@ variable "OPENSUSE_CLIENT_REPO" { type = string } +variable "SLE_CLIENT_REPO" { + type = string +} + variable "IMAGE" { type = string } From aeda32e0627d7dff538140fddbe9132ccbf26716 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 21 Dec 2023 09:57:34 +1300 Subject: [PATCH 092/110] update uyuni env --- ...TING-DONT-REVIEW-pipeline-pull-request-light.groovy | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy index 215fc931f..cbfbf7e0d 100644 --- a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy @@ -23,15 +23,15 @@ def run(params) { source_project = 'systemsmanagement:Uyuni:Master' sumaform_tools_project = 'systemsmanagement:sumaform:tools' test_packages_project = 'systemsmanagement:Uyuni:Test-Packages:Pool' - build_repo = 'openSUSE_Leap_15.4' + build_repo = 'openSUSE_Leap_15.5' environment_workspace = null url_prefix="https://ci.suse.de/view/Manager/view/Uyuni/job/${env.JOB_NAME}" env.common_params = '' fqdn_jenkins_node = sh(script: "hostname -f", returnStdout: true).trim() - env_number = 2 + env_number = 10 tfvariables_file = 'susemanager-ci/terracumber_config/tf_files/variables/PR-testing-variables.tf' - tfvars_manager43 = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-manager43.tfvars' - tfvars_nuremberg = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars' + tfvars_manager43 = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-uyuni.tfvars' + tfvars_nuremberg = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars' tf_local_variables = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tf' try { stage('Checkout CI tools') { @@ -132,7 +132,7 @@ def run(params) { sh "exit \$(( ${statusCode1}|${statusCode2} ))" } } - tests_passed = true + tests_passed = true } } finally { From e205bd3848c2ea4a7e4f86f4dde86ea94049658c Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 21 Dec 2023 10:36:17 +1300 Subject: [PATCH 093/110] REmove useless variable --- terracumber_config/tf_files/variables/PR-testing-variables.tf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/terracumber_config/tf_files/variables/PR-testing-variables.tf b/terracumber_config/tf_files/variables/PR-testing-variables.tf index 44aabe1e9..b588dcd96 100644 --- a/terracumber_config/tf_files/variables/PR-testing-variables.tf +++ b/terracumber_config/tf_files/variables/PR-testing-variables.tf @@ -124,10 +124,6 @@ variable "OPENSUSE_CLIENT_REPO" { type = string } -variable "SLE_CLIENT_REPO" { - type = string -} - variable "IMAGE" { type = string } From f753b515d2573f290324cf68d8b287bd0dd15858 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 21 Dec 2023 12:25:05 +1300 Subject: [PATCH 094/110] Change PR call --- jenkins_pipelines/environments/uyuni-prs-ci-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins_pipelines/environments/uyuni-prs-ci-tests b/jenkins_pipelines/environments/uyuni-prs-ci-tests index 7630a02be..6565a8e97 100644 --- a/jenkins_pipelines/environments/uyuni-prs-ci-tests +++ b/jenkins_pipelines/environments/uyuni-prs-ci-tests @@ -57,7 +57,7 @@ node('pull-request-test') { } } echo "DEBUG: Secondary test tags: ${secondary_exports}" - def pipeline = load "jenkins_pipelines/environments/common/pipeline-pull-request.groovy" + def pipeline = load "jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy" pipeline.run(params) } } From e1c1f451dfc255dca76f9cd833ef4f28ad938815 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 21 Dec 2023 12:45:50 +1300 Subject: [PATCH 095/110] add pool config --- terracumber_config/tf_files/PR-testing-template.tf | 2 +- .../tf_files/tfvars/PR-testing-NUE-environments.tfvars | 6 ++++++ .../tf_files/tfvars/PR-testing-PRV-environments.tfvars | 10 ++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/terracumber_config/tf_files/PR-testing-template.tf b/terracumber_config/tf_files/PR-testing-template.tf index 251a92422..cb2a0466c 100644 --- a/terracumber_config/tf_files/PR-testing-template.tf +++ b/terracumber_config/tf_files/PR-testing-template.tf @@ -189,7 +189,7 @@ module "cucumber_testsuite" { nested_vm_host = "suma-pr${var.ENVIRONMENT}-min-nested" nested_vm_mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["nested-vm"] provider_settings = { - pool = "ssd" + pool = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].pool network_name = null bridge = var.BRIDGE additional_network = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].additional_network diff --git a/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars index a8238f22d..fd40b7e41 100644 --- a/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars @@ -21,6 +21,7 @@ ENVIRONMENT_CONFIGURATION = { } hypervisor = "suma-08.mgr.suse.de" additional_network = "192.168.111.0/24" + pool = "ssd" }, 2 = { mac = { @@ -37,6 +38,7 @@ ENVIRONMENT_CONFIGURATION = { } hypervisor = "suma-08.mgr.suse.de" additional_network = "192.168.112.0/24" + pool = "ssd" }, 3 = { mac = { @@ -53,6 +55,7 @@ ENVIRONMENT_CONFIGURATION = { } hypervisor = "suma-08.mgr.suse.de" additional_network = "192.168.113.0/24" + pool = "ssd" }, 4 = { mac = { @@ -69,6 +72,7 @@ ENVIRONMENT_CONFIGURATION = { } hypervisor = "suma-08.mgr.suse.de" additional_network = "192.168.114.0/24" + pool = "ssd" }, 5 = { mac = { @@ -85,6 +89,7 @@ ENVIRONMENT_CONFIGURATION = { } hypervisor = "suma-08.mgr.suse.de" additional_network = "192.168.115.0/24" + pool = "ssd" }, 6 = { mac = { @@ -101,5 +106,6 @@ ENVIRONMENT_CONFIGURATION = { } hypervisor = "suma-08.mgr.suse.de" additional_network = "192.168.116.0/24" + pool = "ssd" } } diff --git a/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars index 72f50aeab..efe55c1db 100644 --- a/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars @@ -22,6 +22,7 @@ ENVIRONMENT_CONFIGURATION = { } hypervisor = "romulus.mgr.prv.suse.net" additional_network = "192.168.101.0/24" + pool = "ssd" }, 2 = { mac = { @@ -38,6 +39,7 @@ ENVIRONMENT_CONFIGURATION = { } hypervisor = "romulus.mgr.prv.suse.net" additional_network = "192.168.102.0/24" + pool = "ssd" }, 3 = { mac = { @@ -54,6 +56,7 @@ ENVIRONMENT_CONFIGURATION = { } hypervisor = "vulcan.mgr.prv.suse.net" additional_network = "192.168.103.0/24" + pool = "ssd" }, 4 = { mac = { @@ -70,6 +73,7 @@ ENVIRONMENT_CONFIGURATION = { } hypervisor = "vulcan.mgr.prv.suse.net" additional_network = "192.168.104.0/24" + pool = "ssd" }, 5 = { mac = { @@ -86,6 +90,7 @@ ENVIRONMENT_CONFIGURATION = { } hypervisor = "hyperion.mgr.prv.suse.net" additional_network = "192.168.105.0/24" + pool = "ssd" }, 6 = { mac = { @@ -102,6 +107,7 @@ ENVIRONMENT_CONFIGURATION = { } hypervisor = "hyperion.mgr.prv.suse.net" additional_network = "192.168.106.0/24" + pool = "ssd" }, 7 = { mac = { @@ -118,6 +124,7 @@ ENVIRONMENT_CONFIGURATION = { } hypervisor = "daiquiri.mgr.prv.suse.net" additional_network = "192.168.107.0/24" + pool = "default" }, 8 = { mac = { @@ -134,6 +141,7 @@ ENVIRONMENT_CONFIGURATION = { } hypervisor = "daiquiri.mgr.prv.suse.net" additional_network = "192.168.108.0/24" + pool = "default" }, 9 = { mac = { @@ -150,6 +158,7 @@ ENVIRONMENT_CONFIGURATION = { } hypervisor = "mojito.mgr.prv.suse.net" additional_network = "192.168.109.0/24" + pool = "default" }, 10 = { mac = { @@ -166,5 +175,6 @@ ENVIRONMENT_CONFIGURATION = { } hypervisor = "mojito.mgr.prv.suse.net" additional_network = "192.168.110.0/24" + pool = "default" } } From 37019b1c8e71db67b223846a5a91de556ce878e4 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 21 Dec 2023 12:56:38 +1300 Subject: [PATCH 096/110] add pool config --- .../TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy | 6 +++--- jenkins_pipelines/environments/uyuni-prs-ci-tests | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy index cbfbf7e0d..767060a80 100644 --- a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy @@ -30,8 +30,8 @@ def run(params) { fqdn_jenkins_node = sh(script: "hostname -f", returnStdout: true).trim() env_number = 10 tfvariables_file = 'susemanager-ci/terracumber_config/tf_files/variables/PR-testing-variables.tf' - tfvars_manager43 = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-uyuni.tfvars' - tfvars_nuremberg = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars' + tfvars_product_version = "susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-${product_version}.tfvars" + tfvars_platform_localisation = "susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-${platform_localisation}-environments.tfvars" tf_local_variables = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tf' try { stage('Checkout CI tools') { @@ -93,7 +93,7 @@ def run(params) { env.TERRAFORM_INIT = '' } sh "rm -f ${env.resultdir}/sumaform/terraform.tfvars" - sh "cat ${tfvars_manager43} ${tfvars_nuremberg} >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "cat ${tfvars_product_version} ${tfvars_platform_localisation} >> ${env.resultdir}/sumaform/terraform.tfvars" sh "echo 'ENVIRONMENT = \'${env_number}\'' >> ${env.resultdir}/sumaform/terraform.tfvars" sh "cp ${tf_local_variables} ${env.resultdir}/sumaform/" sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_ENVIRONMENT=${env_number}; export TF_VAR_SLE_CLIENT_REPO=${SLE_CLIENT_REPO};export TF_VAR_RHLIKE_CLIENT_REPO=${RHLIKE_CLIENT_REPO};export TF_VAR_DEBLIKE_CLIENT_REPO=${DEBLIKE_CLIENT_REPO};export TF_VAR_OPENSUSE_CLIENT_REPO=${OPENSUSE_CLIENT_REPO};export TF_VAR_PULL_REQUEST_REPO=${PULL_REQUEST_REPO}; export TF_VAR_MASTER_OTHER_REPO=${MASTER_OTHER_REPO};export TF_VAR_MASTER_SUMAFORM_TOOLS_REPO=${MASTER_SUMAFORM_TOOLS_REPO}; export TF_VAR_TEST_PACKAGES_REPO=${TEST_PACKAGES_REPO}; export TF_VAR_MASTER_REPO=${MASTER_REPO};export TF_VAR_UPDATE_REPO=${UPDATE_REPO};export TF_VAR_ADDITIONAL_REPO_URL=${ADDITIONAL_REPO_URL};export TF_VAR_CUCUMBER_GITREPO=${cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${cucumber_ref}; export TERRAFORM=${terraform_bin}; export TERRAFORM_PLUGINS=${terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log ${env.TERRAFORM_INIT} --taint '.*(domain|main_disk).*' --runstep provision" diff --git a/jenkins_pipelines/environments/uyuni-prs-ci-tests b/jenkins_pipelines/environments/uyuni-prs-ci-tests index 6565a8e97..66a435e55 100644 --- a/jenkins_pipelines/environments/uyuni-prs-ci-tests +++ b/jenkins_pipelines/environments/uyuni-prs-ci-tests @@ -4,6 +4,8 @@ node('pull-request-test') { properties([ buildDiscarder(logRotator(numToKeepStr: '30', daysToKeepStr: '15')), parameters([ + string(name: 'platform_localisation', defaultValue: 'NUE', description: 'Decide if it will be run in PRV or NUE'), + string(name: 'product_version', defaultValue: 'uyuni', description: 'Select if we are using uyuni project or Manager43 project'), string(name: 'pull_request_number', defaultValue: '', description: 'Required: Uyuni Pull Request Number'), string(name: 'email_to', defaultValue: '', description: 'Recommended: Receive a report to your e-mail when it finishes with links to the results, artifacts and logs'), booleanParam(name: 'run_all_scopes', defaultValue: false, description: 'Secondary tests: Check to run all functional scopes. List of secondary tests: https://github.com/uyuni-project/uyuni/blob/master/testsuite/features/secondary/ '), From b93a09dd596b7a55dca5d55c30ce52f253a01e59 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 21 Dec 2023 12:58:26 +1300 Subject: [PATCH 097/110] remove else step from envs groovy ( to be roll back ) --- .../environments/common/pipeline-pull-request-envs.groovy | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy index 94099cc6c..a52fc9641 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy @@ -114,7 +114,6 @@ if (env.JOB_NAME == "uyuni-prs-ci-tests-jordi") { rn_package = "release-notes-susemanager" rn_project = "Devel:Galaxy:Manager:4.3:ToSLE" } else { - echo "This job is not supported: ${env.JOB_NAME}" - sh "exit -1" + echo "Temporary disabled" } From a231f543f6338a89e70356f6ca1e0e2bb79df6b3 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 21 Dec 2023 12:58:57 +1300 Subject: [PATCH 098/110] Remove environment --- .../tf_files/Uyuni-PR-tests-env1.tf | 368 ----------------- .../tf_files/Uyuni-PR-tests-env10.tf | 368 ----------------- .../tf_files/Uyuni-PR-tests-env2.tf | 368 ----------------- .../tf_files/Uyuni-PR-tests-env3.tf | 368 ----------------- .../tf_files/Uyuni-PR-tests-env4.tf | 368 ----------------- .../tf_files/Uyuni-PR-tests-env7.tf | 368 ----------------- .../tf_files/Uyuni-PR-tests-env8.tf | 368 ----------------- .../tf_files/Uyuni-PR-tests-env9.tf | 369 ------------------ 8 files changed, 2945 deletions(-) delete mode 100644 terracumber_config/tf_files/Uyuni-PR-tests-env1.tf delete mode 100644 terracumber_config/tf_files/Uyuni-PR-tests-env10.tf delete mode 100644 terracumber_config/tf_files/Uyuni-PR-tests-env2.tf delete mode 100644 terracumber_config/tf_files/Uyuni-PR-tests-env3.tf delete mode 100644 terracumber_config/tf_files/Uyuni-PR-tests-env4.tf delete mode 100644 terracumber_config/tf_files/Uyuni-PR-tests-env7.tf delete mode 100644 terracumber_config/tf_files/Uyuni-PR-tests-env8.tf delete mode 100644 terracumber_config/tf_files/Uyuni-PR-tests-env9.tf diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env1.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env1.tf deleted file mode 100644 index 59095d22d..000000000 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env1.tf +++ /dev/null @@ -1,368 +0,0 @@ -// Mandatory variables for terracumber -variable "URL_PREFIX" { - type = string - default = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" -} - -// Not really used as this is for --runall parameter, and we run cucumber step by step -variable "CUCUMBER_COMMAND" { - type = string - default = "export PRODUCT='Uyuni' && run-testsuite" -} - -variable "CUCUMBER_GITREPO" { - type = string - default = "https://github.com/uyuni-project/uyuni.git" -} - -variable "CUCUMBER_BRANCH" { - type = string - default = "master" -} - -variable "CUCUMBER_RESULTS" { - type = string - default = "/root/spacewalk/testsuite" -} - -variable "MAIL_SUBJECT" { - type = string - default = "$status acceptance tests on Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" -} - -variable "MAIL_TEMPLATE" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request.txt" -} - -variable "MAIL_SUBJECT_ENV_FAIL" { - type = string - default = "Failed acceptance tests on Pull Request: Environment setup failed" -} - -variable "MAIL_TEMPLATE_ENV_FAIL" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" -} - -variable "ENVIRONMENT" { - type = string - default = "1" -} - -variable "HYPER" { - type = string - default = "romulus.mgr.prv.suse.net" -} - -variable "MAIL_FROM" { - type = string - default = "jenkins@suse.de" -} - -variable "MAIL_TO" { - type = string - default = "galaxy-ci@suse.de" -} - -// sumaform specific variables -variable "SCC_USER" { - type = string -} - -variable "SCC_PASSWORD" { - type = string -} - -variable "GIT_USER" { - type = string - default = null // Not needed for master, as it is public -} - -variable "GIT_PASSWORD" { - type = string - default = null // Not needed for master, as it is public -} - -// Repository containing the build for the tested Uyuni Pull Request -variable "PULL_REQUEST_REPO" { - type = string -} - -variable "MASTER_REPO" { - type = string -} - -variable "MASTER_OTHER_REPO" { - type = string -} - -variable "MASTER_SUMAFORM_TOOLS_REPO" { - type = string -} - -variable "UPDATE_REPO" { - type = string -} - -variable "ADDITIONAL_REPO_URL" { - type = string -} - -variable "TEST_PACKAGES_REPO" { - type = string -} - -// Repositories containing the client tools RPMs -variable "SLE_CLIENT_REPO" { - type = string -} - -variable "RHLIKE_CLIENT_REPO" { - type = string -} - -variable "DEBLIKE_CLIENT_REPO" { - type = string -} - -variable "OPENSUSE_CLIENT_REPO" { - type = string -} - -terraform { - required_version = "1.0.10" - required_providers { - libvirt = { - source = "dmacvicar/libvirt" - version = "0.6.3" - } - } -} - - -provider "libvirt" { - uri = "qemu+tcp://${var.HYPER}/system" -} - -module "cucumber_testsuite" { - source = "./modules/cucumber_testsuite" - - product_version = "uyuni-pr" - - // Cucumber repository configuration for the controller - git_username = var.GIT_USER - git_password = var.GIT_PASSWORD - git_repo = var.CUCUMBER_GITREPO - branch = var.CUCUMBER_BRANCH - - cc_username = var.SCC_USER - cc_password = var.SCC_PASSWORD - mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - use_mirror_images = true - - images = ["rocky8o", "opensuse154o", "opensuse155o", "opensuse155-ci-pro", "ubuntu2204o", "sles15sp4o"] - - use_avahi = false - name_prefix = "suma-pr${var.ENVIRONMENT}-" - domain = "mgr.prv.suse.net" - from_email = "root@suse.de" - - no_auth_registry = "registry.mgr.prv.suse.net" - auth_registry = "registry.mgr.prv.suse.net:5000/cucutest" - auth_registry_username = "cucutest" - auth_registry_password = "cucusecret" - git_profiles_repo = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" - - server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" - custom_download_endpoint = "ftp://minima-mirror-ci-bv.mgr.prv.suse.net:445" - - # when changing images, please also keep in mind to adjust the image matrix at the end of the README. - host_settings = { - controller = { - provider_settings = { - mac = "aa:b2:92:04:00:00" - } - } - server = { - provider_settings = { - mac = "aa:b2:92:04:00:01" - memory = 16384 - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - server_mounted_mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - } - proxy = { - provider_settings = { - mac = "aa:b2:92:04:00:02" - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - proxy_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", - tools_update = var.OPENSUSE_CLIENT_REPO - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-minion = { - image = "opensuse155o" - name = "min-suse" - provider_settings = { - mac = "aa:b2:92:04:00:04" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-sshminion = { - image = "opensuse155o" - name = "minssh-suse" - provider_settings = { - mac = "aa:b2:92:04:00:05" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion", "iptables" ] - install_salt_bundle = true - } - redhat-minion = { - image = "rocky8o" - name = "min-rhlike" - provider_settings = { - mac = "aa:b2:92:04:00:06" - memory = 2048 - vcpu = 2 - } - additional_repos = { - client_repo = var.RHLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - debian-minion = { - image = "ubuntu2204o" - name = "min-deblike" - provider_settings = { - mac = "aa:b2:92:04:00:07" - } - additional_repos = { - client_repo = var.DEBLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - build-host = { - image = "sles15sp4o" - name = "min-build" - provider_settings = { - mac = "aa:b2:92:04:00:09" - memory = 2048 - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - pxeboot-minion = { - image = "sles15sp4o" - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - kvm-host = { - image = "opensuse155-ci-pro" - name = "min-kvm" - additional_grains = { - hvm_disk_image = { - leap = { - hostname = "suma-pr1-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2.sha256" - } - sles = { - hostname = "suma-pr1-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" - } - } - } - provider_settings = { - mac = "aa:b2:92:04:00:0a" - } - additional_repos_only = true - additional_repos = { - client_repo = var.OPENSUSE_CLIENT_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - } - additional_packages = [ "venv-salt-minion", "mkisofs" ] - install_salt_bundle = true - } - } - nested_vm_host = "suma-pr1-min-nested" - nested_vm_mac = "aa:b2:92:04:00:0b" - provider_settings = { - pool = "ssd" - network_name = null - bridge = "br1" - additional_network = "192.168.101.0/24" - } -} - - -resource "null_resource" "add_test_information" { - triggers = { - always_run = "${timestamp()}" - } - provisioner "file" { - source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" - destination = "/tmp/set_custom_header.sh" - connection { - type = "ssh" - user = "root" - password = "linux" - host = "${module.cucumber_testsuite.configuration.server.hostname}" - } - } -} - - -output "configuration" { - value = module.cucumber_testsuite.configuration -} diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env10.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env10.tf deleted file mode 100644 index 8bf5293d6..000000000 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env10.tf +++ /dev/null @@ -1,368 +0,0 @@ -// Mandatory variables for terracumber -variable "URL_PREFIX" { - type = string - default = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" -} - -// Not really used as this is for --runall parameter, and we run cucumber step by step -variable "CUCUMBER_COMMAND" { - type = string - default = "export PRODUCT='Uyuni' && run-testsuite" -} - -variable "CUCUMBER_GITREPO" { - type = string - default = "https://github.com/uyuni-project/uyuni.git" -} - -variable "CUCUMBER_BRANCH" { - type = string - default = "master" -} - -variable "CUCUMBER_RESULTS" { - type = string - default = "/root/spacewalk/testsuite" -} - -variable "MAIL_SUBJECT" { - type = string - default = "$status acceptance tests on Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" -} - -variable "MAIL_TEMPLATE" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request.txt" -} - -variable "MAIL_SUBJECT_ENV_FAIL" { - type = string - default = "Failed acceptance tests on Pull Request: Environment setup failed" -} - -variable "MAIL_TEMPLATE_ENV_FAIL" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" -} - -variable "ENVIRONMENT" { - type = string - default = "10" -} - -variable "HYPER" { - type = string - default = "mojito.mgr.prv.suse.net" -} - -variable "MAIL_FROM" { - type = string - default = "jenkins@suse.de" -} - -variable "MAIL_TO" { - type = string - default = "galaxy-ci@suse.de" -} - -// sumaform specific variables -variable "SCC_USER" { - type = string -} - -variable "SCC_PASSWORD" { - type = string -} - -variable "GIT_USER" { - type = string - default = null // Not needed for master, as it is public -} - -variable "GIT_PASSWORD" { - type = string - default = null // Not needed for master, as it is public -} - -// Repository containing the build for the tested Uyuni Pull Request -variable "PULL_REQUEST_REPO" { - type = string -} - -variable "MASTER_REPO" { - type = string -} - -variable "MASTER_OTHER_REPO" { - type = string -} - -variable "MASTER_SUMAFORM_TOOLS_REPO" { - type = string -} - -variable "UPDATE_REPO" { - type = string -} - -variable "ADDITIONAL_REPO_URL" { - type = string -} - -variable "TEST_PACKAGES_REPO" { - type = string -} - -// Repositories containing the client tools RPMs -variable "SLE_CLIENT_REPO" { - type = string -} - -variable "RHLIKE_CLIENT_REPO" { - type = string -} - -variable "DEBLIKE_CLIENT_REPO" { - type = string -} - -variable "OPENSUSE_CLIENT_REPO" { - type = string -} - -terraform { - required_version = "1.0.10" - required_providers { - libvirt = { - source = "dmacvicar/libvirt" - version = "0.6.3" - } - } -} - - -provider "libvirt" { - uri = "qemu+tcp://${var.HYPER}/system" -} - -module "cucumber_testsuite" { - source = "./modules/cucumber_testsuite" - - product_version = "uyuni-pr" - - // Cucumber repository configuration for the controller - git_username = var.GIT_USER - git_password = var.GIT_PASSWORD - git_repo = var.CUCUMBER_GITREPO - branch = var.CUCUMBER_BRANCH - - cc_username = var.SCC_USER - cc_password = var.SCC_PASSWORD - mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - use_mirror_images = true - - images = ["rocky8o", "opensuse154o", "opensuse155o", "opensuse155-ci-pro", "ubuntu2204o", "sles15sp4o"] - - use_avahi = false - name_prefix = "suma-pr${var.ENVIRONMENT}-" - domain = "mgr.prv.suse.net" - from_email = "root@suse.de" - - no_auth_registry = "registry.mgr.prv.suse.net" - auth_registry = "registry.mgr.prv.suse.net:5000/cucutest" - auth_registry_username = "cucutest" - auth_registry_password = "cucusecret" - git_profiles_repo = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" - - server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" - custom_download_endpoint = "ftp://minima-mirror-ci-bv.mgr.prv.suse.net:445" - - # when changing images, please also keep in mind to adjust the image matrix at the end of the README. - host_settings = { - controller = { - provider_settings = { - mac = "aa:b2:92:04:00:90" - } - } - server = { - provider_settings = { - mac = "aa:b2:92:04:00:91" - memory = 16384 - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - server_mounted_mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - } - proxy = { - provider_settings = { - mac = "aa:b2:92:04:00:92" - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - proxy_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", - tools_update = var.OPENSUSE_CLIENT_REPO - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-minion = { - image = "opensuse155o" - name = "min-suse" - provider_settings = { - mac = "aa:b2:92:04:00:94" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-sshminion = { - image = "opensuse155o" - name = "minssh-suse" - provider_settings = { - mac = "aa:b2:92:04:00:95" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion", "iptables" ] - install_salt_bundle = true - } - redhat-minion = { - image = "rocky8o" - name = "min-rhlike" - provider_settings = { - mac = "aa:b2:92:04:00:96" - memory = 2048 - vcpu = 2 - } - additional_repos = { - client_repo = var.RHLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - debian-minion = { - image = "ubuntu2204o" - name = "min-deblike" - provider_settings = { - mac = "aa:b2:92:04:00:97" - } - additional_repos = { - client_repo = var.DEBLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - build-host = { - image = "sles15sp4o" - name = "min-build" - provider_settings = { - mac = "aa:b2:92:04:00:99" - memory = 2048 - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - pxeboot-minion = { - image = "sles15sp4o" - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - kvm-host = { - image = "opensuse155-ci-pro" - name = "min-kvm" - additional_grains = { - hvm_disk_image = { - leap = { - hostname = "suma-pr10-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2.sha256" - } - sles = { - hostname = "suma-pr10-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" - } - } - } - provider_settings = { - mac = "aa:b2:92:04:00:9a" - } - additional_repos_only = true - additional_repos = { - client_repo = var.OPENSUSE_CLIENT_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - } - additional_packages = [ "venv-salt-minion", "mkisofs" ] - install_salt_bundle = true - } - } - nested_vm_host = "suma-pr10-min-nested" - nested_vm_mac = "aa:b2:92:04:00:9b" - provider_settings = { - pool = "default" - network_name = null - bridge = "br0" - additional_network = "192.168.110.0/24" - } -} - - -resource "null_resource" "add_test_information" { - triggers = { - always_run = "${timestamp()}" - } - provisioner "file" { - source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" - destination = "/tmp/set_custom_header.sh" - connection { - type = "ssh" - user = "root" - password = "linux" - host = "${module.cucumber_testsuite.configuration.server.hostname}" - } - } -} - - -output "configuration" { - value = module.cucumber_testsuite.configuration -} diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env2.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env2.tf deleted file mode 100644 index a9a4308a6..000000000 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env2.tf +++ /dev/null @@ -1,368 +0,0 @@ -// Mandatory variables for terracumber -variable "URL_PREFIX" { - type = string - default = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" -} - -// Not really used as this is for --runall parameter, and we run cucumber step by step -variable "CUCUMBER_COMMAND" { - type = string - default = "export PRODUCT='Uyuni' && run-testsuite" -} - -variable "CUCUMBER_GITREPO" { - type = string - default = "https://github.com/uyuni-project/uyuni.git" -} - -variable "CUCUMBER_BRANCH" { - type = string - default = "master" -} - -variable "CUCUMBER_RESULTS" { - type = string - default = "/root/spacewalk/testsuite" -} - -variable "MAIL_SUBJECT" { - type = string - default = "$status acceptance tests on Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" -} - -variable "MAIL_TEMPLATE" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request.txt" -} - -variable "MAIL_SUBJECT_ENV_FAIL" { - type = string - default = "Failed acceptance tests on Pull Request: Environment setup failed" -} - -variable "MAIL_TEMPLATE_ENV_FAIL" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" -} - -variable "ENVIRONMENT" { - type = string - default="2" -} - -variable "HYPER" { - type = string - default = "romulus.mgr.prv.suse.net" -} - -variable "MAIL_FROM" { - type = string - default = "jenkins@suse.de" -} - -variable "MAIL_TO" { - type = string - default = "galaxy-ci@suse.de" -} - -// sumaform specific variables -variable "SCC_USER" { - type = string -} - -variable "SCC_PASSWORD" { - type = string -} - -variable "GIT_USER" { - type = string - default = null // Not needed for master, as it is public -} - -variable "GIT_PASSWORD" { - type = string - default = null // Not needed for master, as it is public -} - -// Repository containing the build for the tested Uyuni Pull Request -variable "PULL_REQUEST_REPO" { - type = string -} - -variable "MASTER_REPO" { - type = string -} - -variable "MASTER_OTHER_REPO" { - type = string -} - -variable "MASTER_SUMAFORM_TOOLS_REPO" { - type = string -} - -variable "UPDATE_REPO" { - type = string -} - -variable "ADDITIONAL_REPO_URL" { - type = string -} - -variable "TEST_PACKAGES_REPO" { - type = string -} - -// Repositories containing the client tools RPMs -variable "SLE_CLIENT_REPO" { - type = string -} - -variable "RHLIKE_CLIENT_REPO" { - type = string -} - -variable "DEBLIKE_CLIENT_REPO" { - type = string -} - -variable "OPENSUSE_CLIENT_REPO" { - type = string -} - -terraform { - required_version = "1.0.10" - required_providers { - libvirt = { - source = "dmacvicar/libvirt" - version = "0.6.3" - } - } -} - - -provider "libvirt" { - uri = "qemu+tcp://${var.HYPER}/system" -} - -module "cucumber_testsuite" { - source = "./modules/cucumber_testsuite" - - product_version = "uyuni-pr" - - // Cucumber repository configuration for the controller - git_username = var.GIT_USER - git_password = var.GIT_PASSWORD - git_repo = var.CUCUMBER_GITREPO - branch = var.CUCUMBER_BRANCH - - cc_username = var.SCC_USER - cc_password = var.SCC_PASSWORD - mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - use_mirror_images = true - - images = ["rocky8o", "opensuse154o", "opensuse155o", "opensuse155-ci-pro", "ubuntu2204o", "sles15sp4o"] - - use_avahi = false - name_prefix = "suma-pr${var.ENVIRONMENT}-" - domain = "mgr.prv.suse.net" - from_email = "root@suse.de" - - no_auth_registry = "registry.mgr.prv.suse.net" - auth_registry = "registry.mgr.prv.suse.net:5000/cucutest" - auth_registry_username = "cucutest" - auth_registry_password = "cucusecret" - git_profiles_repo = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" - - server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" - custom_download_endpoint = "ftp://minima-mirror-ci-bv.mgr.prv.suse.net:445" - - # when changing images, please also keep in mind to adjust the image matrix at the end of the README. - host_settings = { - controller = { - provider_settings = { - mac = "aa:b2:92:04:00:10" - } - } - server = { - provider_settings = { - mac = "aa:b2:92:04:00:11" - memory = 16384 - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - server_mounted_mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - } - proxy = { - provider_settings = { - mac = "aa:b2:92:04:00:12" - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - proxy_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", - tools_update = var.OPENSUSE_CLIENT_REPO - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-minion = { - image = "opensuse155o" - name = "min-suse" - provider_settings = { - mac = "aa:b2:92:04:00:14" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-sshminion = { - image = "opensuse155o" - name = "minssh-suse" - provider_settings = { - mac = "aa:b2:92:04:00:15" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion", "iptables" ] - install_salt_bundle = true - } - redhat-minion = { - image = "rocky8o" - name = "min-rhlike" - provider_settings = { - mac = "aa:b2:92:04:00:16" - memory = 2048 - vcpu = 2 - } - additional_repos = { - client_repo = var.RHLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - debian-minion = { - image = "ubuntu2204o" - name = "min-deblike" - provider_settings = { - mac = "aa:b2:92:04:00:17" - } - additional_repos = { - client_repo = var.DEBLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - build-host = { - image = "sles15sp4o" - name = "min-build" - provider_settings = { - mac = "aa:b2:92:04:00:19" - memory = 2048 - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - pxeboot-minion = { - image = "sles15sp4o" - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - kvm-host = { - image = "opensuse155-ci-pro" - name = "min-kvm" - additional_grains = { - hvm_disk_image = { - leap = { - hostname = "suma-pr2-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2.sha256" - } - sles = { - hostname = "suma-pr2-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" - } - } - } - provider_settings = { - mac = "aa:b2:92:04:00:1a" - } - additional_repos_only = true - additional_repos = { - client_repo = var.OPENSUSE_CLIENT_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - } - additional_packages = [ "venv-salt-minion", "mkisofs" ] - install_salt_bundle = true - } - } - nested_vm_host = "suma-pr2-min-nested" - nested_vm_mac = "aa:b2:92:04:00:1b" - provider_settings = { - pool = "ssd" - network_name = null - bridge = "br1" - additional_network = "192.168.102.0/24" - } -} - - -resource "null_resource" "add_test_information" { - triggers = { - always_run = "${timestamp()}" - } - provisioner "file" { - source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" - destination = "/tmp/set_custom_header.sh" - connection { - type = "ssh" - user = "root" - password = "linux" - host = "${module.cucumber_testsuite.configuration.server.hostname}" - } - } -} - - -output "configuration" { - value = module.cucumber_testsuite.configuration -} diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env3.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env3.tf deleted file mode 100644 index 4c3dcfd6b..000000000 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env3.tf +++ /dev/null @@ -1,368 +0,0 @@ -// Mandatory variables for terracumber -variable "URL_PREFIX" { - type = string - default = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" -} - -// Not really used as this is for --runall parameter, and we run cucumber step by step -variable "CUCUMBER_COMMAND" { - type = string - default = "export PRODUCT='Uyuni' && run-testsuite" -} - -variable "CUCUMBER_GITREPO" { - type = string - default = "https://github.com/uyuni-project/uyuni.git" -} - -variable "CUCUMBER_BRANCH" { - type = string - default = "master" -} - -variable "CUCUMBER_RESULTS" { - type = string - default = "/root/spacewalk/testsuite" -} - -variable "MAIL_SUBJECT" { - type = string - default = "$status acceptance tests on Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" -} - -variable "MAIL_TEMPLATE" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request.txt" -} - -variable "MAIL_SUBJECT_ENV_FAIL" { - type = string - default = "Failed acceptance tests on Pull Request: Environment setup failed" -} - -variable "MAIL_TEMPLATE_ENV_FAIL" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" -} - -variable "ENVIRONMENT" { - type = string - default = "3" -} - -variable "HYPER" { - type = string - default = "vulcan.mgr.prv.suse.net" -} - -variable "MAIL_FROM" { - type = string - default = "jenkins@suse.de" -} - -variable "MAIL_TO" { - type = string - default = "galaxy-ci@suse.de" -} - -// sumaform specific variables -variable "SCC_USER" { - type = string -} - -variable "SCC_PASSWORD" { - type = string -} - -variable "GIT_USER" { - type = string - default = null // Not needed for master, as it is public -} - -variable "GIT_PASSWORD" { - type = string - default = null // Not needed for master, as it is public -} - -// Repository containing the build for the tested Uyuni Pull Request -variable "PULL_REQUEST_REPO" { - type = string -} - -variable "MASTER_REPO" { - type = string -} - -variable "MASTER_OTHER_REPO" { - type = string -} - -variable "MASTER_SUMAFORM_TOOLS_REPO" { - type = string -} - -variable "UPDATE_REPO" { - type = string -} - -variable "ADDITIONAL_REPO_URL" { - type = string -} - -variable "TEST_PACKAGES_REPO" { - type = string -} - -// Repositories containing the client tools RPMs -variable "SLE_CLIENT_REPO" { - type = string -} - -variable "RHLIKE_CLIENT_REPO" { - type = string -} - -variable "DEBLIKE_CLIENT_REPO" { - type = string -} - -variable "OPENSUSE_CLIENT_REPO" { - type = string -} - -terraform { - required_version = "1.0.10" - required_providers { - libvirt = { - source = "dmacvicar/libvirt" - version = "0.6.3" - } - } -} - - -provider "libvirt" { - uri = "qemu+tcp://${var.HYPER}/system" -} - -module "cucumber_testsuite" { - source = "./modules/cucumber_testsuite" - - product_version = "uyuni-pr" - - // Cucumber repository configuration for the controller - git_username = var.GIT_USER - git_password = var.GIT_PASSWORD - git_repo = var.CUCUMBER_GITREPO - branch = var.CUCUMBER_BRANCH - - cc_username = var.SCC_USER - cc_password = var.SCC_PASSWORD - mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - use_mirror_images = true - - images = ["rocky8o", "opensuse154o", "opensuse155o", "opensuse155-ci-pro", "ubuntu2204o", "sles15sp4o"] - - use_avahi = false - name_prefix = "suma-pr${var.ENVIRONMENT}-" - domain = "mgr.prv.suse.net" - from_email = "root@suse.de" - - no_auth_registry = "registry.mgr.prv.suse.net" - auth_registry = "registry.mgr.prv.suse.net:5000/cucutest" - auth_registry_username = "cucutest" - auth_registry_password = "cucusecret" - git_profiles_repo = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" - - server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" - custom_download_endpoint = "ftp://minima-mirror-ci-bv.mgr.prv.suse.net:445" - - # when changing images, please also keep in mind to adjust the image matrix at the end of the README. - host_settings = { - controller = { - provider_settings = { - mac = "aa:b2:92:04:00:20" - } - } - server = { - provider_settings = { - mac = "aa:b2:92:04:00:21" - memory = 16384 - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - server_mounted_mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - } - proxy = { - provider_settings = { - mac = "aa:b2:92:04:00:22" - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - proxy_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", - tools_update = var.OPENSUSE_CLIENT_REPO - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-minion = { - image = "opensuse155o" - name = "min-suse" - provider_settings = { - mac = "aa:b2:92:04:00:24" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-sshminion = { - image = "opensuse155o" - name = "minssh-suse" - provider_settings = { - mac = "aa:b2:92:04:00:25" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion", "iptables" ] - install_salt_bundle = true - } - redhat-minion = { - image = "rocky8o" - name = "min-rhlike" - provider_settings = { - mac = "aa:b2:92:04:00:26" - memory = 2048 - vcpu = 2 - } - additional_repos = { - client_repo = var.RHLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - debian-minion = { - image = "ubuntu2204o" - name = "min-deblike" - provider_settings = { - mac = "aa:b2:92:04:00:27" - } - additional_repos = { - client_repo = var.DEBLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - build-host = { - image = "sles15sp4o" - name = "min-build" - provider_settings = { - mac = "aa:b2:92:04:00:29" - memory = 2048 - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - pxeboot-minion = { - image = "sles15sp4o" - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - kvm-host = { - image = "opensuse155-ci-pro" - name = "min-kvm" - additional_grains = { - hvm_disk_image = { - leap = { - hostname = "suma-pr3-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2.sha256" - } - sles = { - hostname = "suma-pr3-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" - } - } - } - provider_settings = { - mac = "aa:b2:92:04:00:2a" - } - additional_repos_only = true - additional_repos = { - client_repo = var.OPENSUSE_CLIENT_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - } - additional_packages = [ "venv-salt-minion", "mkisofs" ] - install_salt_bundle = true - } - } - nested_vm_host = "suma-pr3-min-nested" - nested_vm_mac = "aa:b2:92:04:00:2b" - provider_settings = { - pool = "ssd" - network_name = null - bridge = "br1" - additional_network = "192.168.103.0/24" - } -} - - -resource "null_resource" "add_test_information" { - triggers = { - always_run = "${timestamp()}" - } - provisioner "file" { - source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" - destination = "/tmp/set_custom_header.sh" - connection { - type = "ssh" - user = "root" - password = "linux" - host = "${module.cucumber_testsuite.configuration.server.hostname}" - } - } -} - - -output "configuration" { - value = module.cucumber_testsuite.configuration -} diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env4.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env4.tf deleted file mode 100644 index 10f8cda69..000000000 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env4.tf +++ /dev/null @@ -1,368 +0,0 @@ -// Mandatory variables for terracumber -variable "URL_PREFIX" { - type = string - default = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" -} - -// Not really used as this is for --runall parameter, and we run cucumber step by step -variable "CUCUMBER_COMMAND" { - type = string - default = "export PRODUCT='Uyuni' && run-testsuite" -} - -variable "CUCUMBER_GITREPO" { - type = string - default = "https://github.com/uyuni-project/uyuni.git" -} - -variable "CUCUMBER_BRANCH" { - type = string - default = "master" -} - -variable "CUCUMBER_RESULTS" { - type = string - default = "/root/spacewalk/testsuite" -} - -variable "MAIL_SUBJECT" { - type = string - default = "$status acceptance tests on Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" -} - -variable "MAIL_TEMPLATE" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request.txt" -} - -variable "MAIL_SUBJECT_ENV_FAIL" { - type = string - default = "Failed acceptance tests on Pull Request: Environment setup failed" -} - -variable "MAIL_TEMPLATE_ENV_FAIL" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" -} - -variable "ENVIRONMENT" { - type = string - default = "4" -} - -variable "HYPER" { - type = string - default = "vulcan.mgr.prv.suse.net" -} - -variable "MAIL_FROM" { - type = string - default = "jenkins@suse.de" -} - -variable "MAIL_TO" { - type = string - default = "galaxy-ci@suse.de" -} - -// sumaform specific variables -variable "SCC_USER" { - type = string -} - -variable "SCC_PASSWORD" { - type = string -} - -variable "GIT_USER" { - type = string - default = null // Not needed for master, as it is public -} - -variable "GIT_PASSWORD" { - type = string - default = null // Not needed for master, as it is public -} - -// Repository containing the build for the tested Uyuni Pull Request -variable "PULL_REQUEST_REPO" { - type = string -} - -variable "MASTER_REPO" { - type = string -} - -variable "MASTER_OTHER_REPO" { - type = string -} - -variable "MASTER_SUMAFORM_TOOLS_REPO" { - type = string -} - -variable "UPDATE_REPO" { - type = string -} - -variable "ADDITIONAL_REPO_URL" { - type = string -} - -variable "TEST_PACKAGES_REPO" { - type = string -} - -// Repositories containing the client tools RPMs -variable "SLE_CLIENT_REPO" { - type = string -} - -variable "RHLIKE_CLIENT_REPO" { - type = string -} - -variable "DEBLIKE_CLIENT_REPO" { - type = string -} - -variable "OPENSUSE_CLIENT_REPO" { - type = string -} - -terraform { - required_version = "1.0.10" - required_providers { - libvirt = { - source = "dmacvicar/libvirt" - version = "0.6.3" - } - } -} - - -provider "libvirt" { - uri = "qemu+tcp://${var.HYPER}/system" -} - -module "cucumber_testsuite" { - source = "./modules/cucumber_testsuite" - - product_version = "uyuni-pr" - - // Cucumber repository configuration for the controller - git_username = var.GIT_USER - git_password = var.GIT_PASSWORD - git_repo = var.CUCUMBER_GITREPO - branch = var.CUCUMBER_BRANCH - - cc_username = var.SCC_USER - cc_password = var.SCC_PASSWORD - mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - use_mirror_images = true - - images = ["rocky8o", "opensuse154o", "opensuse155o", "opensuse155-ci-pro", "ubuntu2204o", "sles15sp4o"] - - use_avahi = false - name_prefix = "suma-pr${var.ENVIRONMENT}-" - domain = "mgr.prv.suse.net" - from_email = "root@suse.de" - - no_auth_registry = "registry.mgr.prv.suse.net" - auth_registry = "registry.mgr.prv.suse.net:5000/cucutest" - auth_registry_username = "cucutest" - auth_registry_password = "cucusecret" - git_profiles_repo = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" - - server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" - custom_download_endpoint = "ftp://minima-mirror-ci-bv.mgr.prv.suse.net:445" - - # when changing images, please also keep in mind to adjust the image matrix at the end of the README. - host_settings = { - controller = { - provider_settings = { - mac = "aa:b2:92:04:00:30" - } - } - server = { - provider_settings = { - mac = "aa:b2:92:04:00:31" - memory = 16384 - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - server_mounted_mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - } - proxy = { - provider_settings = { - mac = "aa:b2:92:04:00:32" - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - proxy_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", - tools_update = var.OPENSUSE_CLIENT_REPO - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-minion = { - image = "opensuse155o" - name = "min-suse" - provider_settings = { - mac = "aa:b2:92:04:00:34" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-sshminion = { - image = "opensuse155o" - name = "minssh-suse" - provider_settings = { - mac = "aa:b2:92:04:00:35" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion", "iptables" ] - install_salt_bundle = true - } - redhat-minion = { - image = "rocky8o" - name = "min-rhlike" - provider_settings = { - mac = "aa:b2:92:04:00:36" - memory = 2048 - vcpu = 2 - } - additional_repos = { - client_repo = var.RHLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - debian-minion = { - image = "ubuntu2204o" - name = "min-deblike" - provider_settings = { - mac = "aa:b2:92:04:00:37" - } - additional_repos = { - client_repo = var.DEBLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - build-host = { - image = "sles15sp4o" - name = "min-build" - provider_settings = { - mac = "aa:b2:92:04:00:39" - memory = 2048 - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - pxeboot-minion = { - image = "sles15sp4o" - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - kvm-host = { - image = "opensuse155-ci-pro" - name = "min-kvm" - additional_grains = { - hvm_disk_image = { - leap = { - hostname = "suma-pr4-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2.sha256" - } - sles = { - hostname = "suma-pr4-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" - } - } - } - provider_settings = { - mac = "aa:b2:92:04:00:3a" - } - additional_repos_only = true - additional_repos = { - client_repo = var.OPENSUSE_CLIENT_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - } - additional_packages = [ "venv-salt-minion", "mkisofs" ] - install_salt_bundle = true - } - } - nested_vm_host = "suma-pr4-min-nested" - nested_vm_mac = "aa:b2:92:04:00:3b" - provider_settings = { - pool = "ssd" - network_name = null - bridge = "br1" - additional_network = "192.168.104.0/24" - } -} - - -resource "null_resource" "add_test_information" { - triggers = { - always_run = "${timestamp()}" - } - provisioner "file" { - source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" - destination = "/tmp/set_custom_header.sh" - connection { - type = "ssh" - user = "root" - password = "linux" - host = "${module.cucumber_testsuite.configuration.server.hostname}" - } - } -} - - -output "configuration" { - value = module.cucumber_testsuite.configuration -} diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env7.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env7.tf deleted file mode 100644 index 89e147c53..000000000 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env7.tf +++ /dev/null @@ -1,368 +0,0 @@ -// Mandatory variables for terracumber -variable "URL_PREFIX" { - type = string - default = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" -} - -// Not really used as this is for --runall parameter, and we run cucumber step by step -variable "CUCUMBER_COMMAND" { - type = string - default = "export PRODUCT='Uyuni' && run-testsuite" -} - -variable "CUCUMBER_GITREPO" { - type = string - default = "https://github.com/uyuni-project/uyuni.git" -} - -variable "CUCUMBER_BRANCH" { - type = string - default = "master" -} - -variable "CUCUMBER_RESULTS" { - type = string - default = "/root/spacewalk/testsuite" -} - -variable "MAIL_SUBJECT" { - type = string - default = "$status acceptance tests on Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" -} - -variable "MAIL_TEMPLATE" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request.txt" -} - -variable "MAIL_SUBJECT_ENV_FAIL" { - type = string - default = "Failed acceptance tests on Pull Request: Environment setup failed" -} - -variable "MAIL_TEMPLATE_ENV_FAIL" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" -} - -variable "ENVIRONMENT" { - type = string - default = "7" -} - -variable "HYPER" { - type = string - default = "daiquiri.mgr.prv.suse.net" -} - -variable "MAIL_FROM" { - type = string - default = "jenkins@suse.de" -} - -variable "MAIL_TO" { - type = string - default = "galaxy-ci@suse.de" -} - -// sumaform specific variables -variable "SCC_USER" { - type = string -} - -variable "SCC_PASSWORD" { - type = string -} - -variable "GIT_USER" { - type = string - default = null // Not needed for master, as it is public -} - -variable "GIT_PASSWORD" { - type = string - default = null // Not needed for master, as it is public -} - -// Repository containing the build for the tested Uyuni Pull Request -variable "PULL_REQUEST_REPO" { - type = string -} - -variable "MASTER_REPO" { - type = string -} - -variable "MASTER_OTHER_REPO" { - type = string -} - -variable "MASTER_SUMAFORM_TOOLS_REPO" { - type = string -} - -variable "UPDATE_REPO" { - type = string -} - -variable "ADDITIONAL_REPO_URL" { - type = string -} - -variable "TEST_PACKAGES_REPO" { - type = string -} - -// Repositories containing the client tools RPMs -variable "SLE_CLIENT_REPO" { - type = string -} - -variable "RHLIKE_CLIENT_REPO" { - type = string -} - -variable "DEBLIKE_CLIENT_REPO" { - type = string -} - -variable "OPENSUSE_CLIENT_REPO" { - type = string -} - -terraform { - required_version = "1.0.10" - required_providers { - libvirt = { - source = "dmacvicar/libvirt" - version = "0.6.3" - } - } -} - - -provider "libvirt" { - uri = "qemu+tcp://${var.HYPER}/system" -} - -module "cucumber_testsuite" { - source = "./modules/cucumber_testsuite" - - product_version = "uyuni-pr" - - // Cucumber repository configuration for the controller - git_username = var.GIT_USER - git_password = var.GIT_PASSWORD - git_repo = var.CUCUMBER_GITREPO - branch = var.CUCUMBER_BRANCH - - cc_username = var.SCC_USER - cc_password = var.SCC_PASSWORD - mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - use_mirror_images = true - - images = ["rocky8o", "opensuse154o", "opensuse155o", "opensuse155-ci-pro", "ubuntu2204o", "sles15sp4o"] - - use_avahi = false - name_prefix = "suma-pr${var.ENVIRONMENT}-" - domain = "mgr.prv.suse.net" - from_email = "root@suse.de" - - no_auth_registry = "registry.mgr.prv.suse.net" - auth_registry = "registry.mgr.prv.suse.net:5000/cucutest" - auth_registry_username = "cucutest" - auth_registry_password = "cucusecret" - git_profiles_repo = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" - - server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" - custom_download_endpoint = "ftp://minima-mirror-ci-bv.mgr.prv.suse.net:445" - - # when changing images, please also keep in mind to adjust the image matrix at the end of the README. - host_settings = { - controller = { - provider_settings = { - mac = "aa:b2:92:04:00:60" - } - } - server = { - provider_settings = { - mac = "aa:b2:92:04:00:61" - memory = 16384 - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - server_mounted_mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - } - proxy = { - provider_settings = { - mac = "aa:b2:92:04:00:62" - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - proxy_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", - tools_update = var.OPENSUSE_CLIENT_REPO - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-minion = { - image = "opensuse155o" - name = "min-suse" - provider_settings = { - mac = "aa:b2:92:04:00:64" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-sshminion = { - image = "opensuse155o" - name = "minssh-suse" - provider_settings = { - mac = "aa:b2:92:04:00:65" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion", "iptables" ] - install_salt_bundle = true - } - redhat-minion = { - image = "rocky8o" - name = "min-rhlike" - provider_settings = { - mac = "aa:b2:92:04:00:66" - memory = 2048 - vcpu = 2 - } - additional_repos = { - client_repo = var.RHLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - debian-minion = { - image = "ubuntu2204o" - name = "min-deblike" - provider_settings = { - mac = "aa:b2:92:04:00:67" - } - additional_repos = { - client_repo = var.DEBLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - build-host = { - image = "sles15sp4o" - name = "min-build" - provider_settings = { - mac = "aa:b2:92:04:00:69" - memory = 2048 - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - pxeboot-minion = { - image = "sles15sp4o" - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - kvm-host = { - image = "opensuse155-ci-pro" - name = "min-kvm" - additional_grains = { - hvm_disk_image = { - leap = { - hostname = "suma-pr7-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2.sha256" - } - sles = { - hostname = "suma-pr7-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" - } - } - } - provider_settings = { - mac = "aa:b2:92:04:00:6a" - } - additional_repos_only = true - additional_repos = { - client_repo = var.OPENSUSE_CLIENT_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - } - additional_packages = [ "venv-salt-minion", "mkisofs" ] - install_salt_bundle = true - } - } - nested_vm_host = "suma-pr7-min-nested" - nested_vm_mac = "aa:b2:92:04:00:6b" - provider_settings = { - pool = "default" - network_name = null - bridge = "br1" - additional_network = "192.168.107.0/24" - } -} - - -resource "null_resource" "add_test_information" { - triggers = { - always_run = "${timestamp()}" - } - provisioner "file" { - source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" - destination = "/tmp/set_custom_header.sh" - connection { - type = "ssh" - user = "root" - password = "linux" - host = "${module.cucumber_testsuite.configuration.server.hostname}" - } - } -} - - -output "configuration" { - value = module.cucumber_testsuite.configuration -} diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env8.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env8.tf deleted file mode 100644 index 2e7022b50..000000000 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env8.tf +++ /dev/null @@ -1,368 +0,0 @@ -// Mandatory variables for terracumber -variable "URL_PREFIX" { - type = string - default = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" -} - -// Not really used as this is for --runall parameter, and we run cucumber step by step -variable "CUCUMBER_COMMAND" { - type = string - default = "export PRODUCT='Uyuni' && run-testsuite" -} - -variable "CUCUMBER_GITREPO" { - type = string - default = "https://github.com/uyuni-project/uyuni.git" -} - -variable "CUCUMBER_BRANCH" { - type = string - default = "master" -} - -variable "CUCUMBER_RESULTS" { - type = string - default = "/root/spacewalk/testsuite" -} - -variable "MAIL_SUBJECT" { - type = string - default = "$status acceptance tests on Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" -} - -variable "MAIL_TEMPLATE" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request.txt" -} - -variable "MAIL_SUBJECT_ENV_FAIL" { - type = string - default = "Failed acceptance tests on Pull Request: Environment setup failed" -} - -variable "MAIL_TEMPLATE_ENV_FAIL" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" -} - -variable "ENVIRONMENT" { - type = string - default = "8" -} - -variable "HYPER" { - type = string - default = "daiquiri.mgr.prv.suse.net" -} - -variable "MAIL_FROM" { - type = string - default = "jenkins@suse.de" -} - -variable "MAIL_TO" { - type = string - default = "galaxy-ci@suse.de" -} - -// sumaform specific variables -variable "SCC_USER" { - type = string -} - -variable "SCC_PASSWORD" { - type = string -} - -variable "GIT_USER" { - type = string - default = null // Not needed for master, as it is public -} - -variable "GIT_PASSWORD" { - type = string - default = null // Not needed for master, as it is public -} - -// Repository containing the build for the tested Uyuni Pull Request -variable "PULL_REQUEST_REPO" { - type = string -} - -variable "MASTER_REPO" { - type = string -} - -variable "MASTER_OTHER_REPO" { - type = string -} - -variable "MASTER_SUMAFORM_TOOLS_REPO" { - type = string -} - -variable "UPDATE_REPO" { - type = string -} - -variable "ADDITIONAL_REPO_URL" { - type = string -} - -variable "TEST_PACKAGES_REPO" { - type = string -} - -// Repositories containing the client tools RPMs -variable "SLE_CLIENT_REPO" { - type = string -} - -variable "RHLIKE_CLIENT_REPO" { - type = string -} - -variable "DEBLIKE_CLIENT_REPO" { - type = string -} - -variable "OPENSUSE_CLIENT_REPO" { - type = string -} - -terraform { - required_version = "1.0.10" - required_providers { - libvirt = { - source = "dmacvicar/libvirt" - version = "0.6.3" - } - } -} - - -provider "libvirt" { - uri = "qemu+tcp://${var.HYPER}/system" -} - -module "cucumber_testsuite" { - source = "./modules/cucumber_testsuite" - - product_version = "uyuni-pr" - - // Cucumber repository configuration for the controller - git_username = var.GIT_USER - git_password = var.GIT_PASSWORD - git_repo = var.CUCUMBER_GITREPO - branch = var.CUCUMBER_BRANCH - - cc_username = var.SCC_USER - cc_password = var.SCC_PASSWORD - mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - use_mirror_images = true - - images = ["rocky8o", "opensuse154o", "opensuse155o", "opensuse155-ci-pro", "ubuntu2204o", "sles15sp4o"] - - use_avahi = false - name_prefix = "suma-pr${var.ENVIRONMENT}-" - domain = "mgr.prv.suse.net" - from_email = "root@suse.de" - - no_auth_registry = "registry.mgr.prv.suse.net" - auth_registry = "registry.mgr.prv.suse.net:5000/cucutest" - auth_registry_username = "cucutest" - auth_registry_password = "cucusecret" - git_profiles_repo = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" - - server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" - custom_download_endpoint = "ftp://minima-mirror-ci-bv.mgr.prv.suse.net:445" - - # when changing images, please also keep in mind to adjust the image matrix at the end of the README. - host_settings = { - controller = { - provider_settings = { - mac = "aa:b2:92:04:00:70" - } - } - server = { - provider_settings = { - mac = "aa:b2:92:04:00:71" - memory = 16384 - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - server_mounted_mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - } - proxy = { - provider_settings = { - mac = "aa:b2:92:04:00:72" - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - proxy_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", - tools_update = var.OPENSUSE_CLIENT_REPO - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-minion = { - image = "opensuse155o" - name = "min-suse" - provider_settings = { - mac = "aa:b2:92:04:00:74" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-sshminion = { - image = "opensuse155o" - name = "minssh-suse" - provider_settings = { - mac = "aa:b2:92:04:00:75" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion", "iptables" ] - install_salt_bundle = true - } - redhat-minion = { - image = "rocky8o" - name = "min-rhlike" - provider_settings = { - mac = "aa:b2:92:04:00:76" - memory = 2048 - vcpu = 2 - } - additional_repos = { - client_repo = var.RHLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - debian-minion = { - image = "ubuntu2204o" - name = "min-deblike" - provider_settings = { - mac = "aa:b2:92:04:00:77" - } - additional_repos = { - client_repo = var.DEBLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - build-host = { - image = "sles15sp4o" - name = "min-build" - provider_settings = { - mac = "aa:b2:92:04:00:79" - memory = 2048 - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - pxeboot-minion = { - image = "sles15sp4o" - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - kvm-host = { - image = "opensuse155-ci-pro" - name = "min-kvm" - additional_grains = { - hvm_disk_image = { - leap = { - hostname = "suma-pr8-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2.sha256" - } - sles = { - hostname = "suma-pr8-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" - } - } - } - provider_settings = { - mac = "aa:b2:92:04:00:7a" - } - additional_repos_only = true - additional_repos = { - client_repo = var.OPENSUSE_CLIENT_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - } - additional_packages = [ "venv-salt-minion", "mkisofs" ] - install_salt_bundle = true - } - } - nested_vm_host = "suma-pr8-min-nested" - nested_vm_mac = "aa:b2:92:04:00:7b" - provider_settings = { - pool = "default" - network_name = null - bridge = "br1" - additional_network = "192.168.108.0/24" - } -} - - -resource "null_resource" "add_test_information" { - triggers = { - always_run = "${timestamp()}" - } - provisioner "file" { - source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" - destination = "/tmp/set_custom_header.sh" - connection { - type = "ssh" - user = "root" - password = "linux" - host = "${module.cucumber_testsuite.configuration.server.hostname}" - } - } -} - - -output "configuration" { - value = module.cucumber_testsuite.configuration -} diff --git a/terracumber_config/tf_files/Uyuni-PR-tests-env9.tf b/terracumber_config/tf_files/Uyuni-PR-tests-env9.tf deleted file mode 100644 index bbf686c62..000000000 --- a/terracumber_config/tf_files/Uyuni-PR-tests-env9.tf +++ /dev/null @@ -1,369 +0,0 @@ -// Mandatory variables for terracumber -variable "URL_PREFIX" { - type = string - default = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-prs-ci-tests" -} - -// Not really used as this is for --runall parameter, and we run cucumber step by step -variable "CUCUMBER_COMMAND" { - type = string - default = "export PRODUCT='Uyuni' && run-testsuite" -} - -variable "CUCUMBER_GITREPO" { - type = string - default = "https://github.com/uyuni-project/uyuni.git" -} - -variable "CUCUMBER_BRANCH" { - type = string - default = "master" -} - -variable "CUCUMBER_RESULTS" { - type = string - default = "/root/spacewalk/testsuite" -} - -variable "MAIL_SUBJECT" { - type = string - default = "$status acceptance tests on Pull Request: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" -} - -variable "MAIL_TEMPLATE" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request.txt" -} - -variable "MAIL_SUBJECT_ENV_FAIL" { - type = string - default = "Failed acceptance tests on Pull Request: Environment setup failed" -} - -variable "MAIL_TEMPLATE_ENV_FAIL" { - type = string - default = "../mail_templates/mail-template-jenkins-pull-request-env-fail.txt" -} - -variable "ENVIRONMENT" { - type = string - default = "9" -} - -variable "HYPER" { - type = string - default = "mojito.mgr.prv.suse.net" -} - -variable "MAIL_FROM" { - type = string - default = "jenkins@suse.de" -} - -variable "MAIL_TO" { - type = string - default = "galaxy-ci@suse.de" -} - -// sumaform specific variables -variable "SCC_USER" { - type = string -} - -variable "SCC_PASSWORD" { - type = string -} - -variable "GIT_USER" { - type = string - default = null // Not needed for master, as it is public -} - -variable "GIT_PASSWORD" { - type = string - default = null // Not needed for master, as it is public -} - -// Repository containing the build for the tested Uyuni Pull Request -variable "PULL_REQUEST_REPO" { - type = string -} - -variable "MASTER_REPO" { - type = string -} - -variable "MASTER_OTHER_REPO" { - type = string -} - -variable "MASTER_SUMAFORM_TOOLS_REPO" { - type = string -} - -variable "UPDATE_REPO" { - type = string -} - -variable "ADDITIONAL_REPO_URL" { - type = string -} - -variable "TEST_PACKAGES_REPO" { - type = string -} - -// Repositories containing the client tools RPMs -variable "SLE_CLIENT_REPO" { - type = string -} - -variable "RHLIKE_CLIENT_REPO" { - type = string -} - -variable "DEBLIKE_CLIENT_REPO" { - type = string -} - -variable "OPENSUSE_CLIENT_REPO" { - type = string -} - -terraform { - required_version = "1.0.10" - required_providers { - libvirt = { - source = "dmacvicar/libvirt" - version = "0.6.3" - } - } -} - - -provider "libvirt" { - uri = "qemu+tcp://${var.HYPER}/system" -} - -module "cucumber_testsuite" { - source = "./modules/cucumber_testsuite" - - product_version = "uyuni-pr" - - // Cucumber repository configuration for the controller - git_username = var.GIT_USER - git_password = var.GIT_PASSWORD - git_repo = var.CUCUMBER_GITREPO - branch = var.CUCUMBER_BRANCH - - cc_username = var.SCC_USER - cc_password = var.SCC_PASSWORD - mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - use_mirror_images = true - - images = ["rocky8o", "opensuse154o", "opensuse155o", "opensuse155-ci-pro", "ubuntu2204o", "sles15sp4o"] - - use_avahi = false - name_prefix = "suma-pr${var.ENVIRONMENT}-" - domain = "mgr.prv.suse.net" - from_email = "root@suse.de" - - no_auth_registry = "registry.mgr.prv.suse.net" - auth_registry = "registry.mgr.prv.suse.net:5000/cucutest" - auth_registry_username = "cucutest" - auth_registry_password = "cucusecret" - git_profiles_repo = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" - - server_http_proxy = "http-proxy.mgr.prv.suse.net:3128" - custom_download_endpoint = "ftp://minima-mirror-ci-bv.mgr.prv.suse.net:445" - - # when changing images, please also keep in mind to adjust the image matrix at the end of the README. - host_settings = { - controller = { - provider_settings = { - mac = "aa:b2:92:04:00:80" - } - } - server = { - provider_settings = { - mac = "aa:b2:92:04:00:81" - memory = 16384 - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - server_mounted_mirror = "minima-mirror-ci-bv.mgr.prv.suse.net" - } - proxy = { - provider_settings = { - mac = "aa:b2:92:04:00:82" - } - additional_repos_only = true - additional_repos = { - pull_request_repo = var.PULL_REQUEST_REPO, - master_repo = var.MASTER_REPO, - master_repo_other = var.MASTER_OTHER_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - testing_overlay_devel = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Testing-Overlay-POOL-x86_64-Media1/", - proxy_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/", - tools_update = var.OPENSUSE_CLIENT_REPO - } - image = "opensuse155-ci-pro" - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-minion = { - image = "opensuse155o" - name = "min-suse" - provider_settings = { - mac = "aa:b2:92:04:00:84" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - suse-sshminion = { - image = "opensuse155o" - name = "minssh-suse" - provider_settings = { - mac = "aa:b2:92:04:00:85" - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion", "iptables" ] - install_salt_bundle = true - } - - /*redhat-minion = { - image = "rocky8o" - name = "min-rhlike" - provider_settings = { - mac = "aa:b2:92:04:00:86" - memory = 2048 - vcpu = 2 - } - additional_repos = { - client_repo = var.RHLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - }*/ - debian-minion = { - image = "ubuntu2204o" - name = "min-deblike" - provider_settings = { - mac = "aa:b2:92:04:00:87" - } - additional_repos = { - client_repo = var.DEBLIKE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - build-host = { - image = "sles15sp4o" - name = "min-build" - provider_settings = { - mac = "aa:b2:92:04:00:89" - memory = 2048 - } - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - pxeboot-minion = { - image = "sles15sp4o" - additional_repos = { - tools_update = var.SLE_CLIENT_REPO, - } - additional_packages = [ "venv-salt-minion" ] - install_salt_bundle = true - } - /*kvm-host = { - image = "opensuse155-ci-pro" - name = "min-kvm" - additional_grains = { - hvm_disk_image = { - leap = { - hostname = "suma-pr9-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2.sha256" - } - sles = { - hostname = "suma-pr9-min-nested" - image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2" - hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/install/SLE-15-SP4-Minimal-GM/SLES15-SP4-Minimal-VM.x86_64-OpenStack-Cloud-GM.qcow2.sha256" - } - } - } - provider_settings = { - mac = "aa:b2:92:04:00:8a" - } - additional_repos_only = true - additional_repos = { - client_repo = var.OPENSUSE_CLIENT_REPO, - master_sumaform_tools_repo = var.MASTER_SUMAFORM_TOOLS_REPO, - test_packages_repo = var.TEST_PACKAGES_REPO, - non_os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/non-oss/", - os_pool = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.5/repo/oss/", - os_update = var.UPDATE_REPO, - os_additional_repo = var.ADDITIONAL_REPO_URL, - } - additional_packages = [ "venv-salt-minion", "mkisofs" ] - install_salt_bundle = true - } */ - } - nested_vm_host = "suma-pr9-min-nested" - nested_vm_mac = "aa:b2:92:04:00:8b" - provider_settings = { - pool = "default" - network_name = null - bridge = "br0" - additional_network = "192.168.109.0/24" - } -} - - -resource "null_resource" "add_test_information" { - triggers = { - always_run = "${timestamp()}" - } - provisioner "file" { - source = "../../susemanager-ci/terracumber_config/scripts/set_custom_header.sh" - destination = "/tmp/set_custom_header.sh" - connection { - type = "ssh" - user = "root" - password = "linux" - host = "${module.cucumber_testsuite.configuration.server.hostname}" - } - } -} - - -output "configuration" { - value = module.cucumber_testsuite.configuration -} From db3c063698cc6280e8cc6beec53fcd63a5664cd6 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 21 Dec 2023 13:20:09 +1300 Subject: [PATCH 099/110] copy repo declaration in tfvars --- ...-REVIEW-pipeline-pull-request-light.groovy | 46 ++++++++++++------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy index 767060a80..a3b477298 100644 --- a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy @@ -66,25 +66,37 @@ def run(params) { stage('Deploy') { ws(environment_workspace){ if(must_test) { + // Delete old terraform.tfvars + sh "rm -f ${env.resultdir}/sumaform/terraform.tfvars" + // Merge product en platform variables into terraform.tfvars + sh "cat ${tfvars_product_version} ${tfvars_platform_localisation} >> ${env.resultdir}/sumaform/terraform.tfvars" + // Add environment to use in tfvars + sh "echo 'ENVIRONMENT = \'${env_number}\'' >> ${env.resultdir}/sumaform/terraform.tfvars" + // Copy the variable declaration file + sh "cp ${tf_local_variables} ${env.resultdir}/sumaform/" + + // Add all // Passing the built repository by parameter using a environment variable to terraform file // TODO: We will need to add a logic to replace the host, when we use IBS for spacewalk - env.PULL_REQUEST_REPO= "http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/" - env.MASTER_REPO = "http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/" - env.MASTER_OTHER_REPO = "http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/" - env.MASTER_SUMAFORM_TOOLS_REPO = "http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/" - env.TEST_PACKAGES_REPO = "http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/" - env.UPDATE_REPO = "http://minima-mirror.mgr.prv.suse.net/jordi/some-updates/" + sh "echo PULL_REQUEST_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo MASTER_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo MASTER_OTHER_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo MASTER_SUMAFORM_TOOLS_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo TEST_PACKAGES_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo UPDATE_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" + if (additional_repo_url == '') { echo "Adding dummy repo for update repo" - env.ADDITIONAL_REPO_URL = "http://minima-mirror.mgr.prv.suse.net/jordi/dummy/" + sh "echo ADDITIONAL_REPO_URL = \\\"${additional_repo}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" } else { echo "Adding ${additional_repo_url}" - env.ADDITIONAL_REPO_URL = additional_repo_url + sh "echo ADDITIONAL_REPO_URL = \\\"${additional_repo_url}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" } - env.SLE_CLIENT_REPO = "http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/" - env.RHLIKE_CLIENT_REPO = "http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/" - env.DEBLIKE_CLIENT_REPO = "http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/" - env.OPENSUSE_CLIENT_REPO = "http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/" + + sh "echo SLE_CLIENT_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo RHLIKE_CLIENT_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo DEBLIKE_CLIENT_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo OPENSUSE_CLIENT_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" // Provision the environment if (terraform_init) { @@ -92,12 +104,12 @@ def run(params) { } else { env.TERRAFORM_INIT = '' } - sh "rm -f ${env.resultdir}/sumaform/terraform.tfvars" - sh "cat ${tfvars_product_version} ${tfvars_platform_localisation} >> ${env.resultdir}/sumaform/terraform.tfvars" - sh "echo 'ENVIRONMENT = \'${env_number}\'' >> ${env.resultdir}/sumaform/terraform.tfvars" - sh "cp ${tf_local_variables} ${env.resultdir}/sumaform/" - sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_ENVIRONMENT=${env_number}; export TF_VAR_SLE_CLIENT_REPO=${SLE_CLIENT_REPO};export TF_VAR_RHLIKE_CLIENT_REPO=${RHLIKE_CLIENT_REPO};export TF_VAR_DEBLIKE_CLIENT_REPO=${DEBLIKE_CLIENT_REPO};export TF_VAR_OPENSUSE_CLIENT_REPO=${OPENSUSE_CLIENT_REPO};export TF_VAR_PULL_REQUEST_REPO=${PULL_REQUEST_REPO}; export TF_VAR_MASTER_OTHER_REPO=${MASTER_OTHER_REPO};export TF_VAR_MASTER_SUMAFORM_TOOLS_REPO=${MASTER_SUMAFORM_TOOLS_REPO}; export TF_VAR_TEST_PACKAGES_REPO=${TEST_PACKAGES_REPO}; export TF_VAR_MASTER_REPO=${MASTER_REPO};export TF_VAR_UPDATE_REPO=${UPDATE_REPO};export TF_VAR_ADDITIONAL_REPO_URL=${ADDITIONAL_REPO_URL};export TF_VAR_CUCUMBER_GITREPO=${cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${cucumber_ref}; export TERRAFORM=${terraform_bin}; export TERRAFORM_PLUGINS=${terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log ${env.TERRAFORM_INIT} --taint '.*(domain|main_disk).*' --runstep provision" + sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_CUCUMBER_GITREPO=${cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${cucumber_ref}; export TERRAFORM=${terraform_bin}; export TERRAFORM_PLUGINS=${terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log ${env.TERRAFORM_INIT} --taint '.*(domain|main_disk).*' --runstep provision" deployed = true + + // Collect and tag Flaky tests from the GitHub Board + def statusCode = sh script:"./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd 'cd /root/spacewalk/testsuite; export BUILD_NUMBER=${BUILD_NUMBER}; rake utils:collect_and_tag_flaky_tests'", returnStatus:true + sh "exit 0" } } } From b954578eb3d178324744148e61add664def5e1ee Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 21 Dec 2023 13:40:20 +1300 Subject: [PATCH 100/110] Remove useless environement and correctly manage git profile --- ...ING-DONT-REVIEW-pipeline-pull-request-light.groovy | 1 + jenkins_pipelines/environments/uyuni-prs-ci-tests | 2 +- terracumber_config/tf_files/PR-testing-template.tf | 2 +- .../tfvars/PR-testing-NUE-environments.tfvars | 11 ++++++----- .../tfvars/PR-testing-PRV-environments.tfvars | 2 +- .../tf_files/tfvars/PR-testing-manager43.tfvars | 2 +- .../tf_files/tfvars/PR-testing-uyuni.tfvars | 2 +- .../tf_files/variables/PR-testing-variables.tf | 6 ------ 8 files changed, 12 insertions(+), 16 deletions(-) diff --git a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy index a3b477298..9480b76dd 100644 --- a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy @@ -78,6 +78,7 @@ def run(params) { // Add all // Passing the built repository by parameter using a environment variable to terraform file // TODO: We will need to add a logic to replace the host, when we use IBS for spacewalk + sh "echo \\\n############ Repositories variables ############\\\n >> ${env.resultdir}/sumaform/terraform.tfvars" sh "echo PULL_REQUEST_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" sh "echo MASTER_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" sh "echo MASTER_OTHER_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" diff --git a/jenkins_pipelines/environments/uyuni-prs-ci-tests b/jenkins_pipelines/environments/uyuni-prs-ci-tests index 66a435e55..2356e613d 100644 --- a/jenkins_pipelines/environments/uyuni-prs-ci-tests +++ b/jenkins_pipelines/environments/uyuni-prs-ci-tests @@ -4,7 +4,7 @@ node('pull-request-test') { properties([ buildDiscarder(logRotator(numToKeepStr: '30', daysToKeepStr: '15')), parameters([ - string(name: 'platform_localisation', defaultValue: 'NUE', description: 'Decide if it will be run in PRV or NUE'), + string(name: 'platform_localisation', defaultValue: 'PRV', description: 'Decide if it will be run in PRV or NUE'), string(name: 'product_version', defaultValue: 'uyuni', description: 'Select if we are using uyuni project or Manager43 project'), string(name: 'pull_request_number', defaultValue: '', description: 'Required: Uyuni Pull Request Number'), string(name: 'email_to', defaultValue: '', description: 'Recommended: Receive a report to your e-mail when it finishes with links to the results, artifacts and logs'), diff --git a/terracumber_config/tf_files/PR-testing-template.tf b/terracumber_config/tf_files/PR-testing-template.tf index cb2a0466c..c036f39ca 100644 --- a/terracumber_config/tf_files/PR-testing-template.tf +++ b/terracumber_config/tf_files/PR-testing-template.tf @@ -31,7 +31,7 @@ module "cucumber_testsuite" { images = var.IMAGES use_avahi = false - name_prefix = "suma-pr${var.ENVIRONMENT}${var.ENVIRONMENT_EXTENSION}-" + name_prefix = "suma-pr${var.ENVIRONMENT}-" domain = var.DOMAIN from_email = "root@suse.de" diff --git a/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars index fd40b7e41..bf7e94da3 100644 --- a/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars @@ -1,10 +1,11 @@ -############ Nuremberg unique variables ########### +############ Nuremberg unique variables ############ -DOMAIN = "mgr.suse.de" -ENVIRONMENT_EXTENSION = "-nue" -DOWNLOAD_ENDPOINT = "minima-mirror.mgr.suse.de" +DOMAIN = "mgr.suse.de" +MIRROR = "minima-mirror-ci-bv.mgr.suse.de" +DOWNLOAD_ENDPOINT = "minima-mirror-ci-bv.mgr.suse.de" USE_MIRROR_IMAGES = false -BRIDGE = "br0" +GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_nue" +BRIDGE = "br0" ENVIRONMENT_CONFIGURATION = { 1 = { mac = { diff --git a/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars index efe55c1db..b27a3a63e 100644 --- a/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars @@ -1,4 +1,4 @@ -############ Provo unique variables ########### +############ Provo unique variables ############ DOMAIN = "mgr.prv.suse.net" MIRROR = "minima-mirror-ci-bv.mgr.prv.suse.net" diff --git a/terracumber_config/tf_files/tfvars/PR-testing-manager43.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-manager43.tfvars index be0c7c56c..90fc236c5 100644 --- a/terracumber_config/tf_files/tfvars/PR-testing-manager43.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-testing-manager43.tfvars @@ -1,4 +1,4 @@ -############ Spacewalk unique variables ########### +############ Spacewalk unique variables ############ IMAGE = "sles15sp4o" IMAGES = ["rocky9o", "opensuse154o", "sles15sp4o", "ubuntu2204o"] diff --git a/terracumber_config/tf_files/tfvars/PR-testing-uyuni.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-uyuni.tfvars index 39f20afd6..71fabb3f7 100644 --- a/terracumber_config/tf_files/tfvars/PR-testing-uyuni.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-testing-uyuni.tfvars @@ -1,4 +1,4 @@ -############ Uyuni unique variables ######################## +############ Uyuni unique variables ############ IMAGE = "opensuse155-ci-pro" IMAGES = ["rocky8o", "opensuse154o", "opensuse155o", "opensuse155-ci-pro", "ubuntu2204o", "sles15sp4o"] diff --git a/terracumber_config/tf_files/variables/PR-testing-variables.tf b/terracumber_config/tf_files/variables/PR-testing-variables.tf index b588dcd96..e4580c014 100644 --- a/terracumber_config/tf_files/variables/PR-testing-variables.tf +++ b/terracumber_config/tf_files/variables/PR-testing-variables.tf @@ -183,9 +183,3 @@ variable "DOWNLOAD_ENDPOINT" { type = string description = "Download enpoint to get build images and set custom_download_endpoint. This value is equal to platform mirror" } - -variable "ENVIRONMENT_EXTENSION" { - type = string - description = "NUE has prefix nue in hostname" - default = null -} From c3484df0d4dbc3a28c86e6b42fce3a033f9ba3a3 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 21 Dec 2023 13:43:42 +1300 Subject: [PATCH 101/110] Improve visibility --- .../TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy | 2 +- jenkins_pipelines/environments/uyuni-prs-ci-tests | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy index 9480b76dd..4ca8ed8db 100644 --- a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy +++ b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy @@ -78,7 +78,7 @@ def run(params) { // Add all // Passing the built repository by parameter using a environment variable to terraform file // TODO: We will need to add a logic to replace the host, when we use IBS for spacewalk - sh "echo \\\n############ Repositories variables ############\\\n >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo -e \\\n############ Repositories variables ############\\\n >> ${env.resultdir}/sumaform/terraform.tfvars" sh "echo PULL_REQUEST_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" sh "echo MASTER_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" sh "echo MASTER_OTHER_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" diff --git a/jenkins_pipelines/environments/uyuni-prs-ci-tests b/jenkins_pipelines/environments/uyuni-prs-ci-tests index 2356e613d..3753f3b37 100644 --- a/jenkins_pipelines/environments/uyuni-prs-ci-tests +++ b/jenkins_pipelines/environments/uyuni-prs-ci-tests @@ -4,8 +4,8 @@ node('pull-request-test') { properties([ buildDiscarder(logRotator(numToKeepStr: '30', daysToKeepStr: '15')), parameters([ - string(name: 'platform_localisation', defaultValue: 'PRV', description: 'Decide if it will be run in PRV or NUE'), - string(name: 'product_version', defaultValue: 'uyuni', description: 'Select if we are using uyuni project or Manager43 project'), + string(name: 'platform_localisation', defaultValue: 'PRV', description: 'Decide if it will be run in \'PRV\' or \'NUE\''), + string(name: 'product_version', defaultValue: 'uyuni', description: 'Select if we are using \'uyuni\' or \'manager43\' project'), string(name: 'pull_request_number', defaultValue: '', description: 'Required: Uyuni Pull Request Number'), string(name: 'email_to', defaultValue: '', description: 'Recommended: Receive a report to your e-mail when it finishes with links to the results, artifacts and logs'), booleanParam(name: 'run_all_scopes', defaultValue: false, description: 'Secondary tests: Check to run all functional scopes. List of secondary tests: https://github.com/uyuni-project/uyuni/blob/master/testsuite/features/secondary/ '), From a2c0a56d65c6fc6c5f32fca79a6051dec4af291c Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 21 Dec 2023 14:03:14 +1300 Subject: [PATCH 102/110] Make bridge related to environment because of env 9 and 10 from PR --- terracumber_config/tf_files/PR-testing-template.tf | 2 +- .../tf_files/tfvars/PR-testing-NUE-environments.tfvars | 7 ++++++- .../tf_files/tfvars/PR-testing-PRV-environments.tfvars | 10 ++++++++++ .../tf_files/variables/PR-testing-variables.tf | 4 ---- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/terracumber_config/tf_files/PR-testing-template.tf b/terracumber_config/tf_files/PR-testing-template.tf index c036f39ca..f22238c3c 100644 --- a/terracumber_config/tf_files/PR-testing-template.tf +++ b/terracumber_config/tf_files/PR-testing-template.tf @@ -191,7 +191,7 @@ module "cucumber_testsuite" { provider_settings = { pool = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].pool network_name = null - bridge = var.BRIDGE + bridge = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].bridge additional_network = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].additional_network } } diff --git a/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars index bf7e94da3..327ba1b17 100644 --- a/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars @@ -5,7 +5,6 @@ MIRROR = "minima-mirror-ci-bv.mgr.suse.de" DOWNLOAD_ENDPOINT = "minima-mirror-ci-bv.mgr.suse.de" USE_MIRROR_IMAGES = false GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_nue" -BRIDGE = "br0" ENVIRONMENT_CONFIGURATION = { 1 = { mac = { @@ -23,6 +22,7 @@ ENVIRONMENT_CONFIGURATION = { hypervisor = "suma-08.mgr.suse.de" additional_network = "192.168.111.0/24" pool = "ssd" + bridge = "br0" }, 2 = { mac = { @@ -40,6 +40,7 @@ ENVIRONMENT_CONFIGURATION = { hypervisor = "suma-08.mgr.suse.de" additional_network = "192.168.112.0/24" pool = "ssd" + bridge = "br0" }, 3 = { mac = { @@ -57,6 +58,7 @@ ENVIRONMENT_CONFIGURATION = { hypervisor = "suma-08.mgr.suse.de" additional_network = "192.168.113.0/24" pool = "ssd" + bridge = "br0" }, 4 = { mac = { @@ -74,6 +76,7 @@ ENVIRONMENT_CONFIGURATION = { hypervisor = "suma-08.mgr.suse.de" additional_network = "192.168.114.0/24" pool = "ssd" + bridge = "br0" }, 5 = { mac = { @@ -91,6 +94,7 @@ ENVIRONMENT_CONFIGURATION = { hypervisor = "suma-08.mgr.suse.de" additional_network = "192.168.115.0/24" pool = "ssd" + bridge = "br0" }, 6 = { mac = { @@ -108,5 +112,6 @@ ENVIRONMENT_CONFIGURATION = { hypervisor = "suma-08.mgr.suse.de" additional_network = "192.168.116.0/24" pool = "ssd" + bridge = "br0" } } diff --git a/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars index b27a3a63e..fee044b71 100644 --- a/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars @@ -23,6 +23,7 @@ ENVIRONMENT_CONFIGURATION = { hypervisor = "romulus.mgr.prv.suse.net" additional_network = "192.168.101.0/24" pool = "ssd" + bridge = "br1" }, 2 = { mac = { @@ -40,6 +41,7 @@ ENVIRONMENT_CONFIGURATION = { hypervisor = "romulus.mgr.prv.suse.net" additional_network = "192.168.102.0/24" pool = "ssd" + bridge = "br1" }, 3 = { mac = { @@ -57,6 +59,7 @@ ENVIRONMENT_CONFIGURATION = { hypervisor = "vulcan.mgr.prv.suse.net" additional_network = "192.168.103.0/24" pool = "ssd" + bridge = "br1" }, 4 = { mac = { @@ -74,6 +77,7 @@ ENVIRONMENT_CONFIGURATION = { hypervisor = "vulcan.mgr.prv.suse.net" additional_network = "192.168.104.0/24" pool = "ssd" + bridge = "br1" }, 5 = { mac = { @@ -91,6 +95,7 @@ ENVIRONMENT_CONFIGURATION = { hypervisor = "hyperion.mgr.prv.suse.net" additional_network = "192.168.105.0/24" pool = "ssd" + bridge = "br1" }, 6 = { mac = { @@ -108,6 +113,7 @@ ENVIRONMENT_CONFIGURATION = { hypervisor = "hyperion.mgr.prv.suse.net" additional_network = "192.168.106.0/24" pool = "ssd" + bridge = "br1" }, 7 = { mac = { @@ -125,6 +131,7 @@ ENVIRONMENT_CONFIGURATION = { hypervisor = "daiquiri.mgr.prv.suse.net" additional_network = "192.168.107.0/24" pool = "default" + bridge = "br1" }, 8 = { mac = { @@ -142,6 +149,7 @@ ENVIRONMENT_CONFIGURATION = { hypervisor = "daiquiri.mgr.prv.suse.net" additional_network = "192.168.108.0/24" pool = "default" + bridge = "br1" }, 9 = { mac = { @@ -159,6 +167,7 @@ ENVIRONMENT_CONFIGURATION = { hypervisor = "mojito.mgr.prv.suse.net" additional_network = "192.168.109.0/24" pool = "default" + bridge = "br0" }, 10 = { mac = { @@ -176,5 +185,6 @@ ENVIRONMENT_CONFIGURATION = { hypervisor = "mojito.mgr.prv.suse.net" additional_network = "192.168.110.0/24" pool = "default" + bridge = "br0" } } diff --git a/terracumber_config/tf_files/variables/PR-testing-variables.tf b/terracumber_config/tf_files/variables/PR-testing-variables.tf index e4580c014..57eaf5790 100644 --- a/terracumber_config/tf_files/variables/PR-testing-variables.tf +++ b/terracumber_config/tf_files/variables/PR-testing-variables.tf @@ -166,10 +166,6 @@ variable "DOMAIN" { type = string } -variable "BRIDGE" { - type = string -} - variable "ADDITIONAL_REPOS_ONLY" { type = bool } From c74e36199aee5f236959a1e23b9523a8e75c3fe3 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 21 Dec 2023 14:15:02 +1300 Subject: [PATCH 103/110] Remove BRIDGE from variables --- .../tf_files/tfvars/PR-testing-PRV-environments.tfvars | 1 - 1 file changed, 1 deletion(-) diff --git a/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars index fee044b71..266abcfdf 100644 --- a/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-testing-PRV-environments.tfvars @@ -5,7 +5,6 @@ MIRROR = "minima-mirror-ci-bv.mgr.prv.suse.net" DOWNLOAD_ENDPOINT = "minima-mirror-ci-bv.mgr.prv.suse.net" USE_MIRROR_IMAGES = true GIT_PROFILES_REPO = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/internal_prv" -BRIDGE = "br1" ENVIRONMENT_CONFIGURATION = { 1 = { mac = { From 9430b19683ac05150ee5aeebba9be702af7786c9 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 21 Dec 2023 14:35:30 +1300 Subject: [PATCH 104/110] update last changes to main pipeline --- .../common/pipeline-pull-request-envs.groovy | 3 +- .../common/pipeline-pull-request.groovy | 53 ++++++++++++------- .../environments/uyuni-prs-ci-tests | 2 +- 3 files changed, 36 insertions(+), 22 deletions(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy index a52fc9641..94099cc6c 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy @@ -114,6 +114,7 @@ if (env.JOB_NAME == "uyuni-prs-ci-tests-jordi") { rn_package = "release-notes-susemanager" rn_project = "Devel:Galaxy:Manager:4.3:ToSLE" } else { - echo "Temporary disabled" + echo "This job is not supported: ${env.JOB_NAME}" + sh "exit -1" } diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request.groovy index 8ca6cd0ce..61a761c79 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request.groovy @@ -9,14 +9,19 @@ def run(params) { terraform_bin = '/usr/bin/terraform' terraform_bin_plugins = '/usr/bin' service_pack_migration = false - terracumber_gitrepo = 'https://github.com/uyuni-project/terracumber.git' - terracumber_ref = 'master' +// terracumber_gitrepo = 'https://github.com/uyuni-project/terracumber.git' + terracumber_gitrepo = 'https://github.com/maximenoel8/terracumber.git' + terracumber_ref = 'support_tfvars' terraform_init = true rake_namespace = 'cucumber' rake_parallel_namespace = 'parallel' jenkins_workspace = '/home/jenkins/jenkins-build/workspace/' environment_workspace = null env.common_params = '' + tfvariables_file = 'susemanager-ci/terracumber_config/tf_files/variables/PR-testing-variables.tf' + tfvars_product_version = "susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-${product_version}.tfvars" + tfvars_platform_localisation = "susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-${platform_localisation}-environments.tfvars" + tf_local_variables = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tf' try { stage('Get environment') { echo "DEBUG: first environment: ${first_env}" @@ -205,8 +210,8 @@ def run(params) { // Define test environment parameters env.resultdir = "${WORKSPACE}/results" env.resultdirbuild = "${resultdir}/${BUILD_NUMBER}" - env.tf_file = "susemanager-ci/terracumber_config/tf_files/${product_name}-PR-tests-env${env_number}.tf" //TODO: Make it possible to use environments for SUMA - env.common_params = "--outputdir ${resultdir} --tf ${tf_file} --gitfolder ${resultdir}/sumaform" + env.tf_file = "susemanager-ci/terracumber_config/tf_files/PR-testing-template.tf" + env.common_params = "--outputdir ${resultdir} --tf ${tf_file} --gitfolder ${resultdir}/sumaform --tf_variables_description_file=${tfvariables_file}" if (params.terraform_parallelism) { env.common_params = "${env.common_params} --parallelism ${params.terraform_parallelism}" @@ -228,27 +233,38 @@ def run(params) { echo "DEBUG: Deploy 1" ws(environment_workspace){ if(must_test) { + // Delete old terraform.tfvars + sh "rm -f ${env.resultdir}/sumaform/terraform.tfvars" + // Merge product en platform variables into terraform.tfvars + sh "cat ${tfvars_product_version} ${tfvars_platform_localisation} >> ${env.resultdir}/sumaform/terraform.tfvars" + // Add environment to use in tfvars + sh "echo 'ENVIRONMENT = \'${env_number}\'' >> ${env.resultdir}/sumaform/terraform.tfvars" + // Copy the variable declaration file + sh "cp ${tf_local_variables} ${env.resultdir}/sumaform/" + + // Add all repositories variables // Passing the built repository by parameter using a environment variable to terraform file // TODO: We will need to add a logic to replace the host, when we use IBS for spacewalk - env.PULL_REQUEST_REPO= "http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${builder_project}:${pull_request_number}/${build_repo}/${arch}" - env.MASTER_REPO = "http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${source_project}/${build_repo}/${arch}" - env.MASTER_OTHER_REPO = "http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${other_project}/${other_build_repo}/${arch}" - env.MASTER_SUMAFORM_TOOLS_REPO = "http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${sumaform_tools_project}/${build_repo}/${arch}" - env.TEST_PACKAGES_REPO = "http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${test_packages_project}/rpm/${arch}" - env.UPDATE_REPO = update_repo + sh "echo ############ Repositories variables ############ >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo PULL_REQUEST_REPO = \\\"http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${builder_project}:${pull_request_number}/${build_repo}/${arch}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo MASTER_REPO = \\\"http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${source_project}/${build_repo}/${arch}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo MASTER_OTHER_REPO = \\\"http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${other_project}/${other_build_repo}/${arch}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo MASTER_SUMAFORM_TOOLS_REPO = \\\"http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${sumaform_tools_project}/${build_repo}/${arch}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo TEST_PACKAGES_REPO = \\\"http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${test_packages_project}/rpm/${arch}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo UPDATE_REPO = \\\"${update_repo}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" if (additional_repo_url == '') { echo "Adding dummy repo for update repo" - env.ADDITIONAL_REPO_URL = additional_repo + sh "echo ADDITIONAL_REPO_URL = \\\"${additional_repo}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" } else { echo "Adding ${additional_repo_url}" - env.ADDITIONAL_REPO_URL = additional_repo_url + sh "echo ADDITIONAL_REPO_URL = \\\"${additional_repo_url}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" } - env.SLE_CLIENT_REPO = "http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${sles_client_repo}/SLE_15/${arch}" - env.RHLIKE_CLIENT_REPO = "http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${el_client_repo}/${EL}/${arch}" - env.DEBLIKE_CLIENT_REPO = "http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${ubuntu_client_repo}/xUbuntu_22.04/${arch}" - env.OPENSUSE_CLIENT_REPO = "http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${openSUSE_client_repo}/openSUSE_Leap_15.0/${arch}" + sh "echo SLE_CLIENT_REPO = \\\"http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${sles_client_repo}/SLE_15/${arch}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo RHLIKE_CLIENT_REPO = \\\"http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${el_client_repo}/${EL}/${arch}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo DEBLIKE_CLIENT_REPO = \\\"http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${ubuntu_client_repo}/xUbuntu_22.04/${arch}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo OPENSUSE_CLIENT_REPO = \\\"http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${openSUSE_client_repo}/openSUSE_Leap_15.0/${arch}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" // Provision the environment if (terraform_init) { @@ -256,10 +272,7 @@ def run(params) { } else { env.TERRAFORM_INIT = '' } - - echo "DEBUG: Deploy 5" - sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_SLE_CLIENT_REPO=${SLE_CLIENT_REPO};export TF_VAR_RHLIKE_CLIENT_REPO=${RHLIKE_CLIENT_REPO};export TF_VAR_DEBLIKE_CLIENT_REPO=${DEBLIKE_CLIENT_REPO};export TF_VAR_OPENSUSE_CLIENT_REPO=${OPENSUSE_CLIENT_REPO};export TF_VAR_PULL_REQUEST_REPO=${PULL_REQUEST_REPO}; export TF_VAR_MASTER_OTHER_REPO=${MASTER_OTHER_REPO};export TF_VAR_MASTER_SUMAFORM_TOOLS_REPO=${MASTER_SUMAFORM_TOOLS_REPO}; export TF_VAR_TEST_PACKAGES_REPO=${TEST_PACKAGES_REPO}; export TF_VAR_MASTER_REPO=${MASTER_REPO};export TF_VAR_UPDATE_REPO=${UPDATE_REPO};export TF_VAR_ADDITIONAL_REPO_URL=${ADDITIONAL_REPO_URL};export TF_VAR_CUCUMBER_GITREPO=${cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${cucumber_ref}; export TERRAFORM=${terraform_bin}; export TERRAFORM_PLUGINS=${terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log ${env.TERRAFORM_INIT} --taint '.*(domain|main_disk).*' --runstep provision" - echo "DEBUG: Deploy 6" + sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_CUCUMBER_GITREPO=${cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${cucumber_ref}; export TERRAFORM=${terraform_bin}; export TERRAFORM_PLUGINS=${terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log ${env.TERRAFORM_INIT} --taint '.*(domain|main_disk).*' --runstep provision" deployed = true // Collect and tag Flaky tests from the GitHub Board diff --git a/jenkins_pipelines/environments/uyuni-prs-ci-tests b/jenkins_pipelines/environments/uyuni-prs-ci-tests index 3753f3b37..78b92595d 100644 --- a/jenkins_pipelines/environments/uyuni-prs-ci-tests +++ b/jenkins_pipelines/environments/uyuni-prs-ci-tests @@ -59,7 +59,7 @@ node('pull-request-test') { } } echo "DEBUG: Secondary test tags: ${secondary_exports}" - def pipeline = load "jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy" + def pipeline = load "jenkins_pipelines/environments/common/pipeline-pull-request.groovy" pipeline.run(params) } } From 9f72b6c0cede1127166117de6e01de50cb6a113a Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 21 Dec 2023 14:40:39 +1300 Subject: [PATCH 105/110] Use master for terracumber --- .../environments/common/pipeline-pull-request.groovy | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request.groovy index 61a761c79..2c1605df4 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request.groovy @@ -9,9 +9,8 @@ def run(params) { terraform_bin = '/usr/bin/terraform' terraform_bin_plugins = '/usr/bin' service_pack_migration = false -// terracumber_gitrepo = 'https://github.com/uyuni-project/terracumber.git' - terracumber_gitrepo = 'https://github.com/maximenoel8/terracumber.git' - terracumber_ref = 'support_tfvars' + terracumber_gitrepo = 'https://github.com/uyuni-project/terracumber.git' + terracumber_ref = 'master' terraform_init = true rake_namespace = 'cucumber' rake_parallel_namespace = 'parallel' From a1147ef8e753d1aafcb700f800a804afb7d983b3 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 21 Dec 2023 18:31:52 +1300 Subject: [PATCH 106/110] temporary change sumaform --- .../environments/common/pipeline-pull-request-envs.groovy | 7 +++++-- .../environments/common/pipeline-pull-request.groovy | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy index 94099cc6c..92e35179f 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy @@ -27,8 +27,11 @@ if (env.JOB_NAME == "uyuni-prs-ci-tests-jordi") { first_env = 10; last_env = 10; // if you change the sumaform repo or reference, you need to remove the sumaform directory from the results folder - sumaform_gitrepo = "https://github.com/witekest/sumaform.git"; - sumaform_ref = "server_monitoring"; + // /!\ Temporary change /!\ + //sumaform_gitrepo = "https://github.com/witekest/sumaform.git"; + //sumaform_ref = "server_monitoring"; + sumaform_gitrepo = "https://github.com/uyuni-project/sumaform.git"; + sumaform_ref = "master"; } else if (env.JOB_NAME == "uyuni-prs-ci-tests-ion") { first_env = 7; last_env = 7; diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request.groovy index 2c1605df4..3eb049d89 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request.groovy @@ -244,7 +244,7 @@ def run(params) { // Add all repositories variables // Passing the built repository by parameter using a environment variable to terraform file // TODO: We will need to add a logic to replace the host, when we use IBS for spacewalk - sh "echo ############ Repositories variables ############ >> ${env.resultdir}/sumaform/terraform.tfvars" + sh "echo \"############ Repositories variables ############\" >> ${env.resultdir}/sumaform/terraform.tfvars" sh "echo PULL_REQUEST_REPO = \\\"http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${builder_project}:${pull_request_number}/${build_repo}/${arch}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" sh "echo MASTER_REPO = \\\"http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${source_project}/${build_repo}/${arch}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" sh "echo MASTER_OTHER_REPO = \\\"http://${fqdn_jenkins_node}/workspace/${short_product_name}-pr${env_number}/repos/${other_project}/${other_build_repo}/${arch}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" From a45e58b99b24b9b68f4ec73fb8ac0b920514d849 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Fri, 22 Dec 2023 08:51:24 +1300 Subject: [PATCH 107/110] remove none related changes --- terracumber_config/tf_files/Uyuni-Master-K3S.tf | 2 -- 1 file changed, 2 deletions(-) diff --git a/terracumber_config/tf_files/Uyuni-Master-K3S.tf b/terracumber_config/tf_files/Uyuni-Master-K3S.tf index b1bf8364a..85fd9895e 100644 --- a/terracumber_config/tf_files/Uyuni-Master-K3S.tf +++ b/terracumber_config/tf_files/Uyuni-Master-K3S.tf @@ -129,7 +129,6 @@ module "cucumber_testsuite" { provider_settings = { mac = "aa:b2:93:01:00:30" } - image = "opensuse155o" } server_containerized = { provider_settings = { @@ -147,7 +146,6 @@ module "cucumber_testsuite" { } additional_packages = [ "venv-salt-minion" ] install_salt_bundle = true - image = "opensuse155o" } suse-minion = { image = "opensuse154o" From ed571a554be393ee0e4190a3744a0b1c9a92be53 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Fri, 22 Dec 2023 10:01:41 +1300 Subject: [PATCH 108/110] Fix leap image link for kvm --- terracumber_config/tf_files/PR-testing-template.tf | 13 +++---------- .../tf_files/variables/PR-testing-variables.tf | 14 +++++++------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/terracumber_config/tf_files/PR-testing-template.tf b/terracumber_config/tf_files/PR-testing-template.tf index f22238c3c..097cdb816 100644 --- a/terracumber_config/tf_files/PR-testing-template.tf +++ b/terracumber_config/tf_files/PR-testing-template.tf @@ -137,8 +137,7 @@ module "cucumber_testsuite" { name = "min-build" provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["build-host"] - vcpu = 4 - memory = 8192 + memory = 2048 } additional_repos = { tools_update_pr = var.SLE_CLIENT_REPO @@ -148,10 +147,6 @@ module "cucumber_testsuite" { } pxeboot-minion = { image = "sles15sp4o" - provider_settings = { - vcpu = 2 - memory = 2048 - } additional_repos = { tools_update_pr = var.SLE_CLIENT_REPO } @@ -165,8 +160,8 @@ module "cucumber_testsuite" { hvm_disk_image = { leap = { hostname = "suma-pr${var.ENVIRONMENT}-min-nested" - image = "http://${var.DOWNLOAD_ENDPOINT}/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-JeOS.x86_64-OpenStack-Cloud.qcow2" - hash = "http://${var.DOWNLOAD_ENDPOINT}/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256" + image = "http://${var.DOWNLOAD_ENDPOINT}/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2" + hash = "http://${var.DOWNLOAD_ENDPOINT}/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2.sha256" } sles = { hostname = "suma-pr${var.ENVIRONMENT}-min-nested" @@ -177,8 +172,6 @@ module "cucumber_testsuite" { } provider_settings = { mac = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].mac["kvm-host"] - vcpu = 4 - memory = 8192 } additional_repos_only = var.ADDITIONAL_REPOS_ONLY additional_repos = local.additional_repos["kvm-host"] diff --git a/terracumber_config/tf_files/variables/PR-testing-variables.tf b/terracumber_config/tf_files/variables/PR-testing-variables.tf index 57eaf5790..0b1193e63 100644 --- a/terracumber_config/tf_files/variables/PR-testing-variables.tf +++ b/terracumber_config/tf_files/variables/PR-testing-variables.tf @@ -1,23 +1,23 @@ // Mandatory variables for terracumber variable "URL_PREFIX" { type = string - default = "Define in product tfvars" + default = "This is defined in product tfvars" } // Not really used as this is for --runall parameter, and we run cucumber step by step variable "CUCUMBER_COMMAND" { type = string - default = "Define in product tfvars" + default = "This is defined in product tfvars" } variable "CUCUMBER_GITREPO" { type = string - default = "Define in product tfvars" + default = "This is defined in product tfvars" } variable "CUCUMBER_BRANCH" { type = string - default = "Define in product tfvars" + default = "This is defined in product tfvars" } variable "CUCUMBER_RESULTS" { @@ -27,12 +27,12 @@ variable "CUCUMBER_RESULTS" { variable "MAIL_SUBJECT" { type = string - default = "Define in product tfvars" + default = "This is defined in product tfvars" } variable "MAIL_TEMPLATE" { type = string - default = "Define in product tfvars" + default = "This is defined in product tfvars" } variable "MAIL_SUBJECT_ENV_FAIL" { @@ -42,7 +42,7 @@ variable "MAIL_SUBJECT_ENV_FAIL" { variable "MAIL_TEMPLATE_ENV_FAIL" { type = string - default = "Define in product tfvars" + default = "This is defined in product tfvars" } variable "ENVIRONMENT" { From 3973b11f606488e70e8cf3e4c9b17c939504ee64 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 4 Jan 2024 09:41:16 +1300 Subject: [PATCH 109/110] Remove changes for Jordi --- ...-REVIEW-pipeline-pull-request-light.groovy | 226 ------------------ .../common/pipeline-pull-request-envs.groovy | 8 +- 2 files changed, 2 insertions(+), 232 deletions(-) delete mode 100644 jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy diff --git a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy b/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy deleted file mode 100644 index 4ca8ed8db..000000000 --- a/jenkins_pipelines/environments/common/TESTING-DONT-REVIEW-pipeline-pull-request-light.groovy +++ /dev/null @@ -1,226 +0,0 @@ -def run(params) { - timestamps { - // Start pipeline with default values - arch= 'x86_64' - built = false - deployed = false - tests_passed = false - sumaform_backend = 'libvirt' - terraform_bin = '/usr/bin/terraform' - terraform_bin_plugins = '/usr/bin' - service_pack_migration = false -// terracumber_gitrepo = 'https://github.com/uyuni-project/terracumber.git' - terracumber_gitrepo = 'https://github.com/maximenoel8/terracumber.git' - terracumber_ref = 'support_tfvars' - terraform_init = true - rake_namespace = 'cucumber' - rake_parallel_namespace = 'parallel' - jenkins_workspace = '/home/jenkins/jenkins-build/workspace/' - pull_request_repo = 'https://github.com/uyuni-project/uyuni.git' - builder_api = 'https://api.opensuse.org' - build_url = 'https://build.opensuse.org' - builder_project = 'systemsmanagement:Uyuni:Master:PR' - source_project = 'systemsmanagement:Uyuni:Master' - sumaform_tools_project = 'systemsmanagement:sumaform:tools' - test_packages_project = 'systemsmanagement:Uyuni:Test-Packages:Pool' - build_repo = 'openSUSE_Leap_15.5' - environment_workspace = null - url_prefix="https://ci.suse.de/view/Manager/view/Uyuni/job/${env.JOB_NAME}" - env.common_params = '' - fqdn_jenkins_node = sh(script: "hostname -f", returnStdout: true).trim() - env_number = 10 - tfvariables_file = 'susemanager-ci/terracumber_config/tf_files/variables/PR-testing-variables.tf' - tfvars_product_version = "susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-${product_version}.tfvars" - tfvars_platform_localisation = "susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-${platform_localisation}-environments.tfvars" - tf_local_variables = 'susemanager-ci/terracumber_config/tf_files/tfvars/PR-testing-additionnal-repos.tf' - try { - stage('Checkout CI tools') { - ws(environment_workspace){ - if(must_test) { - git url: terracumber_gitrepo, branch: terracumber_ref - dir("susemanager-ci") { - checkout scm - } - - // Define test environment parameters - env.resultdir = "${WORKSPACE}/results" - env.resultdirbuild = "${resultdir}/${BUILD_NUMBER}" - env.tf_file = "susemanager-ci/terracumber_config/tf_files/PR-testing-template.tf" - env.common_params = "--outputdir ${resultdir} --tf ${tf_file} --gitfolder ${resultdir}/sumaform --tf_variables_description_file=${tfvariables_file}" - - if (params.terraform_parallelism) { - env.common_params = "${env.common_params} --parallelism ${params.terraform_parallelism}" - } - - // Clean up old results - sh "if [ -d ${resultdir} ];then ./clean-old-results -r ${resultdir};fi" - - // Create a directory for to place the directory with the build results (if it does not exist) - sh "mkdir -p ${resultdir}" - - // Clone sumaform - sh "set +x; source /home/jenkins/.credentials set -x; ./terracumber-cli ${common_params} --gitrepo ${sumaform_gitrepo} --gitref ${sumaform_ref} --runstep gitsync" - } - } - } - stage('Deploy') { - ws(environment_workspace){ - if(must_test) { - // Delete old terraform.tfvars - sh "rm -f ${env.resultdir}/sumaform/terraform.tfvars" - // Merge product en platform variables into terraform.tfvars - sh "cat ${tfvars_product_version} ${tfvars_platform_localisation} >> ${env.resultdir}/sumaform/terraform.tfvars" - // Add environment to use in tfvars - sh "echo 'ENVIRONMENT = \'${env_number}\'' >> ${env.resultdir}/sumaform/terraform.tfvars" - // Copy the variable declaration file - sh "cp ${tf_local_variables} ${env.resultdir}/sumaform/" - - // Add all - // Passing the built repository by parameter using a environment variable to terraform file - // TODO: We will need to add a logic to replace the host, when we use IBS for spacewalk - sh "echo -e \\\n############ Repositories variables ############\\\n >> ${env.resultdir}/sumaform/terraform.tfvars" - sh "echo PULL_REQUEST_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" - sh "echo MASTER_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" - sh "echo MASTER_OTHER_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" - sh "echo MASTER_SUMAFORM_TOOLS_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" - sh "echo TEST_PACKAGES_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" - sh "echo UPDATE_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" - - if (additional_repo_url == '') { - echo "Adding dummy repo for update repo" - sh "echo ADDITIONAL_REPO_URL = \\\"${additional_repo}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" - } else { - echo "Adding ${additional_repo_url}" - sh "echo ADDITIONAL_REPO_URL = \\\"${additional_repo_url}\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" - } - - sh "echo SLE_CLIENT_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" - sh "echo RHLIKE_CLIENT_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" - sh "echo DEBLIKE_CLIENT_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" - sh "echo OPENSUSE_CLIENT_REPO = \\\"http://download.suse.de/ibs/SUSE/Products/SLE-Module-Development-Tools/15-SP4/x86_64/product/\\\" >> ${env.resultdir}/sumaform/terraform.tfvars" - - // Provision the environment - if (terraform_init) { - env.TERRAFORM_INIT = '--init' - } else { - env.TERRAFORM_INIT = '' - } - sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_CUCUMBER_GITREPO=${cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${cucumber_ref}; export TERRAFORM=${terraform_bin}; export TERRAFORM_PLUGINS=${terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log ${env.TERRAFORM_INIT} --taint '.*(domain|main_disk).*' --runstep provision" - deployed = true - - // Collect and tag Flaky tests from the GitHub Board - def statusCode = sh script:"./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd 'cd /root/spacewalk/testsuite; export BUILD_NUMBER=${BUILD_NUMBER}; rake utils:collect_and_tag_flaky_tests'", returnStatus:true - sh "exit 0" - } - } - } - stage('Sanity Check') { - ws(environment_workspace){ - if(must_test) { - sh "./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd 'cd /root/spacewalk/testsuite; rake cucumber:sanity_check'" - } - } - } - stage('Core - Setup') { - ws(environment_workspace){ - if(must_test) { - sh "./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd 'cd /root/spacewalk/testsuite; rake cucumber:core'" - sh "./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd 'cd /root/spacewalk/testsuite; rake cucumber:reposync'" - } - } - } - stage('Core - Initialize clients') { - ws(environment_workspace){ - if(must_test) { - namespace = rake_namespace - sh "./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd 'cd /root/spacewalk/testsuite; rake ${namespace}:init_clients'" - } - } - } - stage('Secondary features') { - ws(environment_workspace){ - if(must_test && ( params.functional_scopes || run_all_scopes) ) { - def statusCode1 = sh script:"./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd '${secondary_exports} cd /root/spacewalk/testsuite; rake cucumber:secondary'", returnStatus:true - def statusCode2 = sh script:"./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd '${secondary_exports} cd /root/spacewalk/testsuite; rake ${rake_namespace}:secondary_parallelizable'", returnStatus:true - sh "exit \$(( ${statusCode1}|${statusCode2} ))" - } - } - tests_passed = true - } - } - finally { - stage('Clean up lockfiles') { - if(running_same_pr == "no"){ - sh(script: "rm -f ${env.suma_pr_lockfile}") - } - if(environment_workspace){ - ws(environment_workspace){ - if (env.env_file) { - if (tests_passed || !deployed){ - println("Unlock environment") - sh "rm -f ${env_file}*" - } else { - println("Keep the environment locked for 24 hours so you can debug") - sh "echo \"rm -f ${env_file}*\" | at now +24 hour" - sh "echo keep:24h >> ${env_file}.info" - sh "python3 ${WORKSPACE}/product/susemanager-utils/testing/automation/run-command-in-server.py --command=\"chmod 755 /tmp/set_custom_header.sh;/tmp/set_custom_header.sh -e ${env_number} -m ${email_to} -t 24\" --username=\"root\" --password=\"linux\" -v -i suma-pr${env_number}-srv.mgr.prv.suse.net" - } - } - } - } - } - stage('Get test results') { - if(environment_workspace && common_params != ''){ - ws(environment_workspace){ - def error = 0 - if(must_test) { - if (deployed) { - try { - sh "./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd 'cd /root/spacewalk/testsuite; rake cucumber:finishing_pr'" - } catch(Exception ex) { - println("ERROR: rake cucumber:finishing_pr failed") - error = 1 - } - try { - sh "./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd 'cd /root/spacewalk/testsuite; rake utils:generate_test_report'" - } catch(Exception ex) { - println("ERROR: rake utils:generate_test_repor failed") - error = 1 - } - sh "./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep getresults" - publishHTML( target: [ - allowMissing: true, - alwaysLinkToLastBuild: false, - keepAll: true, - reportDir: "${resultdirbuild}/cucumber_report/", - reportFiles: 'cucumber_report.html', - reportName: "TestSuite Report for Pull Request ${builder_project}:${pull_request_number}"] - ) - junit allowEmptyResults: true, testResults: "results/${BUILD_NUMBER}/results_junit/*.xml" - } - if (fileExists("results/${BUILD_NUMBER}")) { - archiveArtifacts artifacts: "results/${BUILD_NUMBER}/**/*" - } - if (email_to != '') { - sh " export TF_VAR_MAIL_TO=${email_to};export TF_VAR_URL_PREFIX=${url_prefix}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/mail.log --runstep mail" - } - // Clean up old results - sh "./clean-old-results -r ${resultdir} -s 10" - sh "exit ${error}" - } - } - } - } - stage('Remove build project') { - if(environment_workspace){ - ws(environment_workspace){ - sh "rm -rf ${environment_workspace}/repos/${builder_project}:${pull_request_number}/${build_repo}/${arch}" - sh "rm -rf ${builder_project}:${pull_request_number}" - } - } - } - } - } -} - -return this diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy index 92e35179f..b4376f7cc 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy @@ -26,12 +26,8 @@ build_packages = true if (env.JOB_NAME == "uyuni-prs-ci-tests-jordi") { first_env = 10; last_env = 10; - // if you change the sumaform repo or reference, you need to remove the sumaform directory from the results folder - // /!\ Temporary change /!\ - //sumaform_gitrepo = "https://github.com/witekest/sumaform.git"; - //sumaform_ref = "server_monitoring"; - sumaform_gitrepo = "https://github.com/uyuni-project/sumaform.git"; - sumaform_ref = "master"; + sumaform_gitrepo = "https://github.com/witekest/sumaform.git"; + sumaform_ref = "server_monitoring"; } else if (env.JOB_NAME == "uyuni-prs-ci-tests-ion") { first_env = 7; last_env = 7; From adb8d11fa579ffce072c5b2a2d0cc497b8be1d9a Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Thu, 4 Jan 2024 09:41:55 +1300 Subject: [PATCH 110/110] Revert changes --- .../environments/common/pipeline-pull-request-envs.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy index b4376f7cc..94099cc6c 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy @@ -26,6 +26,7 @@ build_packages = true if (env.JOB_NAME == "uyuni-prs-ci-tests-jordi") { first_env = 10; last_env = 10; + // if you change the sumaform repo or reference, you need to remove the sumaform directory from the results folder sumaform_gitrepo = "https://github.com/witekest/sumaform.git"; sumaform_ref = "server_monitoring"; } else if (env.JOB_NAME == "uyuni-prs-ci-tests-ion") {