diff --git a/backend_modules/aws/base/ami.tf b/backend_modules/aws/base/ami.tf index f9bc62cf6..b9b1767e3 100644 --- a/backend_modules/aws/base/ami.tf +++ b/backend_modules/aws/base/ami.tf @@ -250,6 +250,27 @@ data "aws_ami" "sles12sp5" { } } +data "aws_ami" "sles12sp5-paygo" { + most_recent = true + name_regex = "^suse-sles-12-sp5-v" + owners = ["013907871322"] // aws marketplace + + filter { + name = "architecture" + values = ["x86_64"] + } + + filter { + name = "virtualization-type" + values = ["hvm"] + } + + filter { + name = "root-device-type" + values = ["ebs"] + } +} + data "aws_ami" "rocky8" { most_recent = true name_regex = "^Rocky-8-ec2-8" @@ -375,3 +396,24 @@ data "aws_ami" "rhel9" { values = ["ebs"] } } + +data "aws_ami" "sap15sp5-paygo" { + most_recent = true + name_regex = "^suse-sles-sap-15-sp5-v" + owners = ["679593333241"] + + filter { + name = "architecture" + values = ["x86_64"] + } + + filter { + name = "virtualization-type" + values = ["hvm"] + } + + filter { + name = "root-device-type" + values = ["ebs"] + } +} diff --git a/backend_modules/aws/base/main.tf b/backend_modules/aws/base/main.tf index 8816ccc4f..4877ec56c 100644 --- a/backend_modules/aws/base/main.tf +++ b/backend_modules/aws/base/main.tf @@ -74,10 +74,12 @@ locals { sles15sp4o = { ami = data.aws_ami.sles15sp4o.image_id }, sles15sp5o = { ami = data.aws_ami.sles15sp4o.image_id }, sles15sp5-paygo = { ami = data.aws_ami.sles15sp5-paygo.image_id }, + sap15sp5-paygo = { ami = data.aws_ami.sap15sp5-paygo.image_id }, suma-server-43-byos = { ami = data.aws_ami.suma-server-43-byos.image_id }, suma-server-43-paygo = { ami = data.aws_ami.suma-server-43-paygo.image_id }, suma-proxy-43-byos = { ami = data.aws_ami.suma-proxy-43-byos.image_id }, sles12sp5 = { ami = data.aws_ami.sles12sp5.image_id }, + sles12sp5-paygo = { ami = data.aws_ami.sles12sp5-paygo.image_id }, rocky8 = { ami = data.aws_ami.rocky8.image_id, ssh_user = "rocky" }, debian11 = { ami = data.aws_ami.debian11.image_id, ssh_user= "admin" }, ubuntu2204 = { ami = data.aws_ami.ubuntu2204.image_id, ssh_user = "ubuntu" }, diff --git a/modules/controller/main.tf b/modules/controller/main.tf index a674a5a42..4bd1aa299 100644 --- a/modules/controller/main.tf +++ b/modules/controller/main.tf @@ -60,10 +60,14 @@ module "controller" { server_http_proxy = var.server_http_proxy custom_download_endpoint = var.custom_download_endpoint pxeboot_image = var.pxeboot_configuration["image"] + is_using_paygo_server = var.is_using_paygo_server is_using_build_image = var.is_using_build_image is_using_scc_repositories = var.is_using_scc_repositories container_runtime = lookup(var.server_configuration, "runtime", null) + sle12paygo_minion = length(var.sle12paygo_minion_configuration["hostnames"]) > 0 ? var.sle12paygo_minion_configuration["hostnames"][0] : null + sle15paygo_minion = length(var.sle15paygo_minion_configuration["hostnames"]) > 0 ? var.sle15paygo_minion_configuration["hostnames"][0] : null + sappaygo_minion = length(var.sappaygo_minion_configuration["hostnames"]) > 0 ? var.sappaygo_minion_configuration["hostnames"][0] : null sle11sp4_minion = length(var.sle11sp4_minion_configuration["hostnames"]) > 0 ? var.sle11sp4_minion_configuration["hostnames"][0] : null sle11sp4_sshminion = length(var.sle11sp4_sshminion_configuration["hostnames"]) > 0 ? var.sle11sp4_sshminion_configuration["hostnames"][0] : null sle11sp4_client = length(var.sle11sp4_client_configuration["hostnames"]) > 0 ? var.sle11sp4_client_configuration["hostnames"][0] : null diff --git a/modules/controller/variables.tf b/modules/controller/variables.tf index f8135c324..10b8878a1 100644 --- a/modules/controller/variables.tf +++ b/modules/controller/variables.tf @@ -112,6 +112,28 @@ variable "monitoringserver_configuration" { } } +variable "sle12paygo_minion_configuration" { + description = "use module..configuration, see main.tf.libvirt-testsuite.example" + default = { + hostnames = [] + } +} + +variable "sle15paygo_minion_configuration" { + description = "use module..configuration, see main.tf.libvirt-testsuite.example" + default = { + hostnames = [] + } +} + +variable "sappaygo_minion_configuration" { + description = "use module..configuration, see main.tf.libvirt-testsuite.example" + default = { + hostnames = [] + } +} + + variable "sle11sp4_minion_configuration" { description = "use module..configuration, see main.tf.libvirt-testsuite.example" default = { @@ -712,6 +734,11 @@ variable "no_mirror" { default = false } +variable "is_using_paygo_server" { + description = "Specify to controller that server image is a paygo image" + default = false +} + variable "is_using_build_image" { description = "Specify to controller that server image is a build image" default = false @@ -726,7 +753,7 @@ variable "nested_vm_host" { description = "Hostname for a nested VM if it is used, see README_TESTING.md" type = string default = "min-nested" -} +}is_using_build_image variable "nested_vm_mac" { description = "MAC address for a nested VM if it is used, see README_TESTING.md" diff --git a/salt/controller/bashrc b/salt/controller/bashrc index f134cd40f..11f299202 100644 --- a/salt/controller/bashrc +++ b/salt/controller/bashrc @@ -24,6 +24,9 @@ export VIRTHOST_KVM_PASSWORD="linux" {% else %}# no KVM host defined {% endif %} {% if grains.get('mirror') | default(false, true) %}export MIRROR="yes" {% else %}# no mirror used {% endif %} # QAM clients +{% if grains.get('sle12paygo_minion') | default(false, true) %}export SLE12PAYGO_MINION="{{ grains.get('sle12paygo_minion') }}" {% else %}# no SLE12PAYGO minion defined {% endif %} +{% if grains.get('sle15paygo_minion') | default(false, true) %}export SLE15PAYGO_MINION="{{ grains.get('sle15paygo_minion') }}" {% else %}# no SLE15PAYGO minion defined {% endif %} +{% if grains.get('sap15paygo_minion') | default(false, true) %}export SAP15PAYGO_MINION="{{ grains.get('sap15paygo_minion') }}" {% else %}# no SAP15PAYGO minion defined {% endif %} {% if grains.get('sle11sp4_minion') | default(false, true) %}export SLE11SP4_MINION="{{ grains.get('sle11sp4_minion') }}" {% else %}# no SLE11SP4 minion defined {% endif %} {% if grains.get('sle11sp4_sshminion') | default(false, true) %}export SLE11SP4_SSHMINION="{{ grains.get('sle11sp4_sshminion') }}" {% else %}# no SLE11SP4 ssh minion defined {% endif %} {% if grains.get('sle11sp4_client') | default(false, true) %}export SLE11SP4_CLIENT="{{ grains.get('sle11sp4_client') }}" {% else %}# no SLE11SP4 client defined {% endif %} @@ -111,6 +114,7 @@ export AUTH_REGISTRY_CREDENTIALS="{{ grains.get('auth_registry_username') }}|{{ export PROVIDER="{{ grains.get('provider') }}" {% if grains.get('container_runtime') | default(false, true) %}export CONTAINER_RUNTIME="{{ grains.get('container_runtime') }}" {% else %}# no CONTAINER_RUNTIME used {% endif %} {% if 'build_image' not in grains.get('product_version') | default('', true) %}export IS_USING_BUILD_IMAGE="{{ grains.get('is_using_build_image') }}" {% endif %} +export IS_USING_PAYGO_SERVER="{{ grains.get('is_using_paygo_server') }}" export IS_USING_SCC_REPOSITORIES="{{ grains.get('is_using_scc_repositories') }}" #### Generate certificates for Google Chrome