Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to paygo images on controller #1426

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions modules/controller/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,15 @@ 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
server_instance_id = var.server_instance_id
container_runtime = lookup(var.server_configuration, "runtime", null)

sle12_paygo_minion = length(var.sle12_paygo_minion_configuration["hostnames"]) > 0 ? var.sle12_paygo_minion_configuration["hostnames"][0] : null
sle15_paygo_minion = length(var.sle15_paygo_minion_configuration["hostnames"]) > 0 ? var.sle15_paygo_minion_configuration["hostnames"][0] : null
slesforsap15_paygo_minion = length(var.sleforsap15_paygo_minion_configuration["hostnames"]) > 0 ? var.sleforsap15_paygo_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
Expand Down
33 changes: 33 additions & 0 deletions modules/controller/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,28 @@ variable "monitoringserver_configuration" {
}
}

variable "sle12_paygo_minion_configuration" {
description = "use module.<SLE12_PAYGO_MINION>.configuration, see main.tf.libvirt-testsuite.example"
default = {
hostnames = []
}
}

variable "sle15_paygo_minion_configuration" {
description = "use module.<SLE15_PAYGO_MINION>.configuration, see main.tf.libvirt-testsuite.example"
default = {
hostnames = []
}
}

variable "sleforsap15_paygo_minion_configuration" {
description = "use module.<SLEFORSAP15_PAYGO_MINION>.configuration, see main.tf.libvirt-testsuite.example"
default = {
hostnames = []
}
}


variable "sle11sp4_minion_configuration" {
description = "use module.<SLE11SP4_MINION>.configuration, see main.tf.libvirt-testsuite.example"
default = {
Expand Down Expand Up @@ -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
Expand All @@ -722,6 +749,12 @@ variable "is_using_scc_repositories" {
default = false
}

variable "server_instance_id" {
description = "Server instance ID"
default = null
}


variable "nested_vm_host" {
description = "Hostname for a nested VM if it is used, see README_TESTING.md"
type = string
Expand Down
5 changes: 5 additions & 0 deletions salt/controller/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -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('sle12_paygo_minion') | default(false, true) %}export SLE12_PAYGO_MINION="{{ grains.get('sle12_paygo_minion') }}" {% else %}# no SLE12_PAYGO minion defined {% endif %}
{% if grains.get('sle15_paygo_minion') | default(false, true) %}export SLE15_PAYGO_MINION="{{ grains.get('sle15_paygo_minion') }}" {% else %}# no SLE15_PAYGO minion defined {% endif %}
{% if grains.get('sleforsap15_paygo_minion') | default(false, true) %}export SLEFORSAP15_PAYGO_MINION="{{ grains.get('sleforsap15_paygo_minion') }}" {% else %}# no SLEFORSAP15_PAYGO 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 %}
Expand Down Expand Up @@ -111,7 +114,9 @@ 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') }}"
export SERVER_INSTANCE_ID="{{ grains.get('server_instance_id') }}"

#### Generate certificates for Google Chrome
if [ ! -f /etc/pki/trust/anchors/$SERVER.cert ]; then
Expand Down
Loading