From fa99ee772c4cfd504a1867f11c0026af7c96c772 Mon Sep 17 00:00:00 2001 From: maximenoel8 <55169628+maximenoel8@users.noreply.github.com> Date: Thu, 10 Oct 2024 09:12:30 +1300 Subject: [PATCH] Create sle maintenance update pipeline nue (#1419) --- .../common/pipeline-build-validation.groovy | 4 +- .../manager-4.3-qe-sle-update-NUE | 50 ++++ ...e-update => manager-4.3-qe-sle-update-PRV} | 2 +- .../manager-5.0-qe-sle-update-NUE | 50 ++++ ...e-update => manager-5.0-qe-sle-update-PRV} | 2 +- .../SUSEManager-4.3-SLE-update-NUE.tf | 216 +++++++++++++++++ ...e.tf => SUSEManager-4.3-SLE-update-PRV.tf} | 8 +- .../SUSEManager-5.0-SLE-update-NUE.tf | 219 ++++++++++++++++++ ...e.tf => SUSEManager-5.0-SLE-update-PRV.tf} | 8 +- 9 files changed, 543 insertions(+), 16 deletions(-) create mode 100644 jenkins_pipelines/environments/manager-4.3-qe-sle-update-NUE rename jenkins_pipelines/environments/{manager-4.3-qe-sle-update => manager-4.3-qe-sle-update-PRV} (97%) create mode 100644 jenkins_pipelines/environments/manager-5.0-qe-sle-update-NUE rename jenkins_pipelines/environments/{manager-5.0-qe-sle-update => manager-5.0-qe-sle-update-PRV} (97%) create mode 100644 terracumber_config/tf_files/SUSEManager-4.3-SLE-update-NUE.tf rename terracumber_config/tf_files/{SUSEManager-4.3-SLE-update.tf => SUSEManager-4.3-SLE-update-PRV.tf} (96%) create mode 100644 terracumber_config/tf_files/SUSEManager-5.0-SLE-update-NUE.tf rename terracumber_config/tf_files/{SUSEManager-5.0-SLE-update.tf => SUSEManager-5.0-SLE-update-PRV.tf} (96%) diff --git a/jenkins_pipelines/environments/common/pipeline-build-validation.groovy b/jenkins_pipelines/environments/common/pipeline-build-validation.groovy index 257ad5cde..c2c78b397 100644 --- a/jenkins_pipelines/environments/common/pipeline-build-validation.groovy +++ b/jenkins_pipelines/environments/common/pipeline-build-validation.groovy @@ -351,7 +351,7 @@ def clientTestingStages() { tests["${node}"] = { // Generate a temporary list that comprises of all the minions except the one currently undergoing testing. // This list is utilized to establish an SSH session exclusively with the minion undergoing testing. - def temporaryList = nodesHandler.envVariableList.toList() - node.toUpperCase() + def temporaryList = nodesHandler.envVariableList.toList() - node.replaceAll('sles', 'sle').toUpperCase() def nodeTag = node.replace('sles1','sle1') stage("${node}") { echo "Testing ${node}" @@ -532,7 +532,7 @@ def getNodesHandler() { // This difference will be the nodes to disable def disabledNodes = nodeList.findAll { !nodesToRun.contains(it) } // Convert this list to cucumber compatible environment variable - def envVarDisabledNodes = disabledNodes.collect { it.toUpperCase() } + def envVarDisabledNodes = disabledNodes.collect { it.replaceAll('sles', 'sle').toUpperCase() } // Create a node list without the disabled nodes. ( use to configure the client stage ) def nodeListWithDisabledNodes = nodeList - disabledNodes // Create a map storing mu synchronization state for each minion. diff --git a/jenkins_pipelines/environments/manager-4.3-qe-sle-update-NUE b/jenkins_pipelines/environments/manager-4.3-qe-sle-update-NUE new file mode 100644 index 000000000..acddbee35 --- /dev/null +++ b/jenkins_pipelines/environments/manager-4.3-qe-sle-update-NUE @@ -0,0 +1,50 @@ +#!/usr/bin/env groovy + +node('sumaform-cucumber') { + def minionList = 'sles15sp4_minion' + properties([ + buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '3')), + disableConcurrentBuilds(), + parameters([ + string(name: 'cucumber_gitrepo', defaultValue: 'https://github.com/SUSE/spacewalk.git', description: 'Testsuite Git Repository'), + string(name: 'cucumber_ref', defaultValue: 'Manager-4.3', description: 'Branch prepared for the MU tested'), + string(name: 'tf_file', defaultValue: 'susemanager-ci/terracumber_config/tf_files/SUSEManager-4.3-SLE-update-NUE.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...)'), + choice(name: 'sumaform_backend', choices: ['libvirt'], 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'), + string(name: 'terraform_parallelism', defaultValue: '', description: 'Advanced: Define the number of parallel resource operations for terraform'), + // Temporary: should move to uyuni-project + string(name: 'terracumber_gitrepo', defaultValue: 'https://github.com/uyuni-project/terracumber.git', description: 'Terracumber Git Repository'), + string(name: 'terracumber_ref', defaultValue: 'master', description: 'Terracumber Git ref (branch, tag...)'), + extendedChoice(name: 'minions_to_run', multiSelectDelimiter: ', ', quoteValue: false, saveJSONParameterToFile: false, type: 'PT_CHECKBOX', visibleItemCount: 15, + value: minionList, + defaultValue: minionList, + description: 'Node list to run during BV'), + // This is different than other pipelines to make it work with the simple proxy_traditional without refactoring all feature files + booleanParam(name: 'use_previous_terraform_state', defaultValue: true, description: 'Use previous Terraform state'), + booleanParam(name: 'must_deploy', defaultValue: true, description: 'Deploy'), + booleanParam(name: 'must_run_core', defaultValue: true, description: 'Run Core features'), + booleanParam(name: 'must_sync', defaultValue: true, description: 'Sync. products and channels'), + booleanParam(name: 'enable_proxy_stages', defaultValue: true, description: 'Run Proxy stages'), + booleanParam(name: 'enable_client_stages', defaultValue: true, description: 'Run Client stages'), + booleanParam(name: 'must_add_MU_repositories', defaultValue: true, description: 'Add MU channels'), + booleanParam(name: 'must_add_non_MU_repositories', defaultValue: true, description: 'Add non MU channels'), + booleanParam(name: 'must_add_keys', defaultValue: true, description: 'Add Activation Keys'), + booleanParam(name: 'must_create_bootstrap_repos', defaultValue: true, description: 'Create bootstrap repositories'), + booleanParam(name: 'must_boot_node', defaultValue: true, description: 'Bootstrap Node'), + booleanParam(name: 'must_run_tests', defaultValue: true, description: 'Run Smoke Tests'), + booleanParam(name: 'must_run_containerization_tests', defaultValue: false, description: 'Run Containerization Tests'), + booleanParam(name: 'confirm_before_continue', defaultValue: false, description: 'Confirmation button between stages'), + text(name: 'custom_repositories', defaultValue: '{}', description: 'Salt & Client Tools SLE Update Repositories for each client, in json format') + ]) + ]) + + stage('Checkout pipeline') { + checkout scm + } + non_MU_channels_tasks_file = 'susemanager-ci/jenkins_pipelines/data/non_MU_channels_tasks_43.json' + def pipeline = load "jenkins_pipelines/environments/common/pipeline-build-validation.groovy" + pipeline.run(params) +} diff --git a/jenkins_pipelines/environments/manager-4.3-qe-sle-update b/jenkins_pipelines/environments/manager-4.3-qe-sle-update-PRV similarity index 97% rename from jenkins_pipelines/environments/manager-4.3-qe-sle-update rename to jenkins_pipelines/environments/manager-4.3-qe-sle-update-PRV index 0376be008..d64fdf837 100644 --- a/jenkins_pipelines/environments/manager-4.3-qe-sle-update +++ b/jenkins_pipelines/environments/manager-4.3-qe-sle-update-PRV @@ -8,7 +8,7 @@ node('sumaform-cucumber-provo') { parameters([ string(name: 'cucumber_gitrepo', defaultValue: 'https://github.com/SUSE/spacewalk.git', description: 'Testsuite Git Repository'), string(name: 'cucumber_ref', defaultValue: 'Manager-4.3', description: 'Branch prepared for the MU tested'), - string(name: 'tf_file', defaultValue: 'susemanager-ci/terracumber_config/tf_files/SUSEManager-4.3-SLE-update.tf', description: 'Path to the tf file to be used'), + string(name: 'tf_file', defaultValue: 'susemanager-ci/terracumber_config/tf_files/SUSEManager-4.3-SLE-update-PRV.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...)'), choice(name: 'sumaform_backend', choices: ['libvirt'], description: 'Sumaform backend to be used (see https://github.com/uyuni-project/sumaform#backend-choice)'), diff --git a/jenkins_pipelines/environments/manager-5.0-qe-sle-update-NUE b/jenkins_pipelines/environments/manager-5.0-qe-sle-update-NUE new file mode 100644 index 000000000..ea46cc0e1 --- /dev/null +++ b/jenkins_pipelines/environments/manager-5.0-qe-sle-update-NUE @@ -0,0 +1,50 @@ +#!/usr/bin/env groovy + +node('sumaform-cucumber') { + def minionList = 'sles15sp6_minion' + properties([ + buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '3')), + disableConcurrentBuilds(), + parameters([ + string(name: 'cucumber_gitrepo', defaultValue: 'https://github.com/SUSE/spacewalk.git', description: 'Testsuite Git Repository'), + string(name: 'cucumber_ref', defaultValue: 'Manager-5.0', description: 'Branch prepared for the MU tested'), + string(name: 'tf_file', defaultValue: 'susemanager-ci/terracumber_config/tf_files/SUSEManager-5.0-SLE-update-NUE.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...)'), + choice(name: 'sumaform_backend', choices: ['libvirt'], 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'), + string(name: 'terraform_parallelism', defaultValue: '', description: 'Advanced: Define the number of parallel resource operations for terraform'), + // Temporary: should move to uyuni-project + string(name: 'terracumber_gitrepo', defaultValue: 'https://github.com/uyuni-project/terracumber.git', description: 'Terracumber Git Repository'), + string(name: 'terracumber_ref', defaultValue: 'master', description: 'Terracumber Git ref (branch, tag...)'), + extendedChoice(name: 'minions_to_run', multiSelectDelimiter: ', ', quoteValue: false, saveJSONParameterToFile: false, type: 'PT_CHECKBOX', visibleItemCount: 15, + value: minionList, + defaultValue: minionList, + description: 'Node list to run during BV'), + // This is different than other pipelines to make it work with the simple proxy_traditional without refactoring all feature files + booleanParam(name: 'use_previous_terraform_state', defaultValue: true, description: 'Use previous Terraform state'), + booleanParam(name: 'must_deploy', defaultValue: true, description: 'Deploy'), + booleanParam(name: 'must_run_core', defaultValue: true, description: 'Run Core features'), + booleanParam(name: 'must_sync', defaultValue: true, description: 'Sync. products and channels'), + booleanParam(name: 'enable_proxy_stages', defaultValue: true, description: 'Run Proxy stages'), + booleanParam(name: 'enable_client_stages', defaultValue: true, description: 'Run Client stages'), + booleanParam(name: 'must_add_MU_repositories', defaultValue: true, description: 'Add MU channels'), + booleanParam(name: 'must_add_non_MU_repositories', defaultValue: true, description: 'Add non MU channels'), + booleanParam(name: 'must_add_keys', defaultValue: true, description: 'Add Activation Keys'), + booleanParam(name: 'must_create_bootstrap_repos', defaultValue: true, description: 'Create bootstrap repositories'), + booleanParam(name: 'must_boot_node', defaultValue: true, description: 'Bootstrap Node'), + booleanParam(name: 'must_run_tests', defaultValue: true, description: 'Run Smoke Tests'), + booleanParam(name: 'must_run_containerization_tests', defaultValue: false, description: 'Run Containerization Tests'), + booleanParam(name: 'confirm_before_continue', defaultValue: false, description: 'Confirmation button between stages'), + text(name: 'custom_repositories', defaultValue: '{}', description: 'Salt & Client Tools SLE Update Repositories for each client, in json format') + ]) + ]) + + stage('Checkout pipeline') { + checkout scm + } + non_MU_channels_tasks_file = 'susemanager-ci/jenkins_pipelines/data/non_MU_channels_tasks_50.json' + def pipeline = load "jenkins_pipelines/environments/common/pipeline-build-validation.groovy" + pipeline.run(params) +} diff --git a/jenkins_pipelines/environments/manager-5.0-qe-sle-update b/jenkins_pipelines/environments/manager-5.0-qe-sle-update-PRV similarity index 97% rename from jenkins_pipelines/environments/manager-5.0-qe-sle-update rename to jenkins_pipelines/environments/manager-5.0-qe-sle-update-PRV index 977f13205..e51202206 100644 --- a/jenkins_pipelines/environments/manager-5.0-qe-sle-update +++ b/jenkins_pipelines/environments/manager-5.0-qe-sle-update-PRV @@ -8,7 +8,7 @@ node('sumaform-cucumber-provo') { parameters([ string(name: 'cucumber_gitrepo', defaultValue: 'https://github.com/SUSE/spacewalk.git', description: 'Testsuite Git Repository'), string(name: 'cucumber_ref', defaultValue: 'Manager-5.0', description: 'Branch prepared for the MU tested'), - string(name: 'tf_file', defaultValue: 'susemanager-ci/terracumber_config/tf_files/SUSEManager-5.0-SLE-update.tf', description: 'Path to the tf file to be used'), + string(name: 'tf_file', defaultValue: 'susemanager-ci/terracumber_config/tf_files/SUSEManager-5.0-SLE-update-PRV.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...)'), choice(name: 'sumaform_backend', choices: ['libvirt'], description: 'Sumaform backend to be used (see https://github.com/uyuni-project/sumaform#backend-choice)'), diff --git a/terracumber_config/tf_files/SUSEManager-4.3-SLE-update-NUE.tf b/terracumber_config/tf_files/SUSEManager-4.3-SLE-update-NUE.tf new file mode 100644 index 000000000..db896c956 --- /dev/null +++ b/terracumber_config/tf_files/SUSEManager-4.3-SLE-update-NUE.tf @@ -0,0 +1,216 @@ +// Mandatory variables for terracumber +variable "URL_PREFIX" { + type = string + default = "https://ci.suse.de/view/Manager/view/Manager-4.3/job/manager-4.3-qe-sle-update-NUE" +} + +// Not really used as this is for --runall parameter, and we run cucumber step by step +variable "CUCUMBER_COMMAND" { + type = string + default = "export PRODUCT='SUSE-Manager' && run-testsuite" +} + +variable "CUCUMBER_GITREPO" { + type = string + default = "https://github.com/SUSE/spacewalk.git" +} + +variable "CUCUMBER_BRANCH" { + type = string + default = "Manager-4.3" +} + +variable "CUCUMBER_RESULTS" { + type = string + default = "/root/spacewalk/testsuite" +} + +variable "MAIL_SUBJECT" { + type = string + default = "Results 4.3 SLE Update $status: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" +} + +variable "MAIL_TEMPLATE" { + type = string + default = "../mail_templates/mail-template-jenkins.txt" +} + +variable "MAIL_SUBJECT_ENV_FAIL" { + type = string + default = "Results 4.3 SLE Update: Environment setup failed" +} + +variable "MAIL_TEMPLATE_ENV_FAIL" { + type = string + default = "../mail_templates/mail-template-jenkins-env-fail.txt" +} + +variable "MAIL_FROM" { + type = string + default = "galaxy-noise@suse.de" +} + +variable "MAIL_TO" { + type = string + default = "galaxy-noise@suse.de" +} + +// sumaform specific variables +variable "SCC_USER" { + type = string +} + +variable "SCC_PASSWORD" { + type = string +} + +variable "GIT_USER" { + type = string + default = null +} + +variable "GIT_PASSWORD" { + type = string + default = null +} + +terraform { + required_version = "1.0.10" + required_providers { + libvirt = { + source = "dmacvicar/libvirt" + version = "0.6.3" + } + } +} + +provider "libvirt" { + uri = "qemu+tcp://suma-08.mgr.suse.de/system" +} + +module "base" { + source = "./modules/base" + + cc_username = var.SCC_USER + cc_password = var.SCC_PASSWORD + product_version = "4.3-released" + name_prefix = "suma-su-43-" + use_avahi = false + domain = "mgr.suse.de" + images = [ "sles15sp4o", "opensuse155o" ] + + mirror = "minima-mirror-ci-bv.mgr.suse.de" + use_mirror_images = true + + testsuite = true + + provider_settings = { + pool = "ssd" + bridge = "br1" + } +} + +module "server" { + source = "./modules/server" + base_configuration = module.base.configuration + name = "server" + provider_settings = { + mac = "aa:b2:93:01:02:61" + memory = 16384 + vcpu = 4 + data_pool = "ssd" + } + + server_mounted_mirror = "minima-mirror-ci-bv.mgr.suse.de" + repository_disk_size = 1500 + + auto_accept = false + monitored = true + disable_firewall = false + allow_postgres_connections = false + skip_changelog_import = false + create_first_user = false + mgr_sync_autologin = false + create_sample_channel = false + create_sample_activation_key = false + create_sample_bootstrap_script = false + publish_private_ssl_key = false + use_os_released_updates = true + disable_download_tokens = false + ssh_key_path = "./salt/controller/id_rsa.pub" + from_email = "root@suse.de" + accept_all_ssl_protocols = true + + //server_additional_repos + +} + +module "proxy" { + source = "./modules/proxy" + base_configuration = module.base.configuration + name = "proxy" + provider_settings = { + mac = "aa:b2:93:01:02:62" + memory = 4096 + } + server_configuration = { + hostname = "suma-su-43-server.mgr.suse.de" + username = "admin" + password = "admin" + } + + auto_register = false + auto_connect_to_master = false + download_private_ssl_key = false + install_proxy_pattern = false + auto_configure = false + generate_bootstrap_script = false + publish_private_ssl_key = false + use_os_released_updates = true + ssh_key_path = "./salt/controller/id_rsa.pub" + +} + +module "sles15sp4_minion" { + source = "./modules/minion" + base_configuration = module.base.configuration + name = "sles15sp4-minion" + image = "sles15sp4o" + provider_settings = { + mac = "aa:b2:93:01:02:63" + vcpu = 2 + memory = 2048 + } + + auto_connect_to_master = false + use_os_released_updates = false + ssh_key_path = "./salt/controller/id_rsa.pub" +} + +module "controller" { + source = "./modules/controller" + base_configuration = module.base.configuration + name = "controller" + provider_settings = { + mac = "aa:b2:93:01:02:60" + memory = 16384 + vcpu = 8 + } + swap_file_size = null + + // 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 + + server_configuration = module.server.configuration + proxy_configuration = module.proxy.configuration + sle15sp4_minion_configuration = module.sles15sp4_minion.configuration +} + +output "configuration" { + value = { + controller = module.controller.configuration + } +} diff --git a/terracumber_config/tf_files/SUSEManager-4.3-SLE-update.tf b/terracumber_config/tf_files/SUSEManager-4.3-SLE-update-PRV.tf similarity index 96% rename from terracumber_config/tf_files/SUSEManager-4.3-SLE-update.tf rename to terracumber_config/tf_files/SUSEManager-4.3-SLE-update-PRV.tf index 54dfcc05f..1b0323240 100644 --- a/terracumber_config/tf_files/SUSEManager-4.3-SLE-update.tf +++ b/terracumber_config/tf_files/SUSEManager-4.3-SLE-update-PRV.tf @@ -66,12 +66,12 @@ variable "SCC_PASSWORD" { variable "GIT_USER" { type = string - default = null // Not needed for master, as it is public + default = null } variable "GIT_PASSWORD" { type = string - default = null // Not needed for master, as it is public + default = null } terraform { @@ -168,8 +168,6 @@ module "proxy" { use_os_released_updates = true ssh_key_path = "./salt/controller/id_rsa.pub" - //proxy_additional_repos - } module "sles15sp4_minion" { @@ -189,8 +187,6 @@ module "sles15sp4_minion" { use_os_released_updates = false ssh_key_path = "./salt/controller/id_rsa.pub" - //sle15sp4-minion_additional_repos - } module "controller" { diff --git a/terracumber_config/tf_files/SUSEManager-5.0-SLE-update-NUE.tf b/terracumber_config/tf_files/SUSEManager-5.0-SLE-update-NUE.tf new file mode 100644 index 000000000..cec0f3c67 --- /dev/null +++ b/terracumber_config/tf_files/SUSEManager-5.0-SLE-update-NUE.tf @@ -0,0 +1,219 @@ +// Mandatory variables for terracumber +variable "URL_PREFIX" { + type = string + default = "https://ci.suse.de/view/Manager/view/Manager-5.0/job/manager-5.0-qe-sle-update-NUE" +} + +// Not really used as this is for --runall parameter, and we run cucumber step by step +variable "CUCUMBER_COMMAND" { + type = string + default = "export PRODUCT='SUSE-Manager' && run-testsuite" +} + +variable "CUCUMBER_GITREPO" { + type = string + default = "https://github.com/SUSE/spacewalk.git" +} + +variable "CUCUMBER_BRANCH" { + type = string + default = "Manager-5.0" +} + +variable "CUCUMBER_RESULTS" { + type = string + default = "/root/spacewalk/testsuite" +} + +variable "MAIL_SUBJECT" { + type = string + default = "Results 5.0 SLE Update $status: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" +} + +variable "MAIL_TEMPLATE" { + type = string + default = "../mail_templates/mail-template-jenkins.txt" +} + +variable "MAIL_SUBJECT_ENV_FAIL" { + type = string + default = "Results 5.0 SLE Update: Environment setup failed" +} + +variable "MAIL_TEMPLATE_ENV_FAIL" { + type = string + default = "../mail_templates/mail-template-jenkins-env-fail.txt" +} + +variable "MAIL_FROM" { + type = string + default = "galaxy-noise@suse.de" +} + +variable "MAIL_TO" { + type = string + default = "galaxy-noise@suse.de" +} + +// sumaform specific variables +variable "SCC_USER" { + type = string +} + +variable "SCC_PASSWORD" { + type = string +} + +variable "GIT_USER" { + type = string + default = null +} + +variable "GIT_PASSWORD" { + type = string + default = null +} + +terraform { + required_version = "1.0.10" + required_providers { + libvirt = { + source = "dmacvicar/libvirt" + version = "0.6.3" + } + } +} + +provider "libvirt" { + uri = "qemu+tcp://suma-08.mgr.suse.de/system" +} + +module "base" { + source = "./modules/base" + + cc_username = var.SCC_USER + cc_password = var.SCC_PASSWORD + product_version = "5.0-released" + name_prefix = "suma-su-50-" + use_avahi = false + domain = "mgr.suse.de" + images = [ "sles15sp6o", "opensuse155o", "slemicro55o" ] + + mirror = "minima-mirror-ci-bv.mgr.suse.de" + use_mirror_images = true + + testsuite = true + + provider_settings = { + pool = "ssd" + bridge = "br1" + } +} + +module "server_containerized" { + source = "./modules/server_containerized" + base_configuration = module.base.configuration + name = "server" + image = "slemicro55o" + provider_settings = { + mac = "aa:b2:93:01:02:71" + memory = 16384 + vcpu = 4 + data_pool = "ssd" + } + + main_disk_size = 1500 + runtime = "podman" + // Temporary workaround to see if we pass proxy stage. Also needs to be updated on next MU + container_repository = "registry.suse.de/suse/maintenance/347951/suse_sle-15-sp6_update_products_manager50_update_containerfile" + container_tag = "latest" + server_mounted_mirror = "minima-mirror-ci-bv.mgr.suse.de" + + auto_accept = false + monitored = true + disable_firewall = false + allow_postgres_connections = false + skip_changelog_import = false + mgr_sync_autologin = false + create_sample_channel = false + create_sample_activation_key = false + create_sample_bootstrap_script = false + publish_private_ssl_key = false + use_os_released_updates = true + disable_download_tokens = false + ssh_key_path = "./salt/controller/id_rsa.pub" + from_email = "root@suse.de" + + //server_additional_repos + +} + +module "proxy_containerized" { + source = "./modules/proxy_containerized" + base_configuration = module.base.configuration + name = "proxy" + image = "slemicro55o" + provider_settings = { + mac = "aa:b2:93:01:02:72" + memory = 4096 + } + server_configuration = { + hostname = "suma-su-50-server.mgr.suse.de" + username = "admin" + password = "admin" + } + + runtime = "podman" + // Temporary workaround to see if we pass proxy stage. Also needs to be updated on next MU + container_repository = "registry.suse.de/suse/maintenance/347951/suse_sle-15-sp6_update_products_manager50_update_containerfile" + container_tag = "latest" + + auto_configure = false + ssh_key_path = "./salt/controller/id_rsa.pub" + +} + +module "sles15sp6_minion" { + source = "./modules/minion" + base_configuration = module.base.configuration + name = "sles15sp6-minion" + image = "sles15sp6o" + provider_settings = { + mac = "aa:b2:93:01:02:73" + vcpu = 2 + memory = 2048 + } + + auto_connect_to_master = false + use_os_released_updates = false + ssh_key_path = "./salt/controller/id_rsa.pub" + +} + +module "controller" { + source = "./modules/controller" + base_configuration = module.base.configuration + name = "controller" + provider_settings = { + mac = "aa:b2:93:01:02:70" + memory = 16384 + vcpu = 8 + } + swap_file_size = null + + // 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 + + server_configuration = module.server_containerized.configuration + proxy_configuration = module.proxy_containerized.configuration + sle15sp6_minion_configuration = module.sles15sp6_minion.configuration +} + +output "configuration" { + value = { + controller = module.controller.configuration + } +} diff --git a/terracumber_config/tf_files/SUSEManager-5.0-SLE-update.tf b/terracumber_config/tf_files/SUSEManager-5.0-SLE-update-PRV.tf similarity index 96% rename from terracumber_config/tf_files/SUSEManager-5.0-SLE-update.tf rename to terracumber_config/tf_files/SUSEManager-5.0-SLE-update-PRV.tf index 6e68f67b5..8c674515b 100644 --- a/terracumber_config/tf_files/SUSEManager-5.0-SLE-update.tf +++ b/terracumber_config/tf_files/SUSEManager-5.0-SLE-update-PRV.tf @@ -66,12 +66,12 @@ variable "SCC_PASSWORD" { variable "GIT_USER" { type = string - default = null // Not needed for master, as it is public + default = null } variable "GIT_PASSWORD" { type = string - default = null // Not needed for master, as it is public + default = null } terraform { @@ -171,8 +171,6 @@ module "proxy_containerized" { auto_configure = false ssh_key_path = "./salt/controller/id_rsa.pub" - //proxy_additional_repos - } module "sles15sp6_minion" { @@ -192,8 +190,6 @@ module "sles15sp6_minion" { use_os_released_updates = false ssh_key_path = "./salt/controller/id_rsa.pub" - //sle15sp6-minion_additional_repos - } module "controller" {