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 for Ubuntu 24.04 #1707

Merged
merged 3 commits into from
Sep 27, 2024
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
1 change: 1 addition & 0 deletions backend_modules/libvirt/base/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ locals {
sles12sp5o = "${var.use_mirror_images ? "http://${var.mirror}" : "http://download.suse.de"}/install/SLE-12-SP5-JeOS-GM/SLES12-SP5-JeOS.x86_64-12.5-OpenStack-Cloud-GM.qcow2"
ubuntu2004o = "${var.use_mirror_images ? "http://${var.mirror}" : "http://cloud-images.ubuntu.com"}/focal/current/focal-server-cloudimg-amd64.img"
ubuntu2204o = "${var.use_mirror_images ? "http://${var.mirror}" : "http://cloud-images.ubuntu.com"}/jammy/current/jammy-server-cloudimg-amd64.img"
ubuntu2404o = "${var.use_mirror_images ? "http://${var.mirror}" : "http://cloud-images.ubuntu.com"}/noble/current/noble-server-cloudimg-amd64.img"
debian11o = "${var.use_mirror_images ? "http://${var.mirror}" : "http://cloud.debian.org"}/images/cloud/bullseye/latest/debian-11-genericcloud-amd64.qcow2"
debian12o = "${var.use_mirror_images ? "http://${var.mirror}" : "http://cloud.debian.org"}/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2"
opensuse155-ci-pro = "${var.use_mirror_images ? "http://${var.mirror}" : "http://download.opensuse.org"}/repositories/systemsmanagement:/sumaform:/images:/libvirt/images/opensuse155-ci-pr.x86_64.qcow2"
Expand Down
51 changes: 51 additions & 0 deletions backend_modules/libvirt/host/user_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,57 @@ packages: ["venv-salt-minion", "avahi-daemon", "qemu-guest-agent"]
packages: ["salt-minion", "avahi-daemon", "qemu-guest-agent"]
%{ endif }
%{ endif }

%{ if image == "ubuntu2404o" }

apt:
sources:
tools_pool_repo:
# TODO: change to Stable: when the tools are published
source: deb http://${ use_mirror_images ? mirror : "download.opensuse.org"}/repositories/systemsmanagement:/Uyuni:/Master:/Ubuntu2404-Uyuni-Client-Tools/xUbuntu_24.04/ /
key: |
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.5 (GNU/Linux)

mQENBFsnulUBCADNjL4hvhVtSzqVDlMtFFFP28Acq+UNF8WKKMhbBirfOpXwwI1C
NR3i0CXPOce5eKShuuWAjD2E36e2XAp3rUAo/aCA7UgtJkMNKzzlTOcqHHxKTx6H
gvp0Fb6xTKywZ7VttGhwUynl+CsDuOst3ROXTNdb8XMfm4joH2FW5D3ACN2qNiv0
MVcFNKxQ98w8M9xJxdI8DuyngnSeZwAosNzEio3JhTPiTv9ngY2Z3AuYUcwTEt7o
feEN+ivAgYnn+a6DBKFBeCW7VUD3V+tH8/fKnkvI4gf2o3N7Ok+/uE+DPUBb+14f
+9dhBjd+7+pR3ayEZFjQns5XFShoYu2+CQspABEBAAG0UHN5c3RlbXNtYW5hZ2Vt
ZW50OlV5dW5pIE9CUyBQcm9qZWN0IDxzeXN0ZW1zbWFuYWdlbWVudDpVeXVuaUBi
dWlsZC5vcGVuc3VzZS5vcmc+iQE+BBMBCAAoBQJjQDEEAhsDBQkMNyavBgsJCAcD
AgYVCAIJCgsEFgIDAQIeAQIXgAAKCRCXLl1sDSCDPjsSCAC1v9YHwuP0kRt8VPlq
/RLgADb5TsUPOaDcZ/maKVxhL5EgY2mX1ViCO4Bm+VFL2ZSJEXth8/Zp/dZe80e9
tlZgag5uPQe9FV0IAHXYt91DYJlE7VuxvdhADIt9RcDmS4OrSAfQoroyh5OW3ZRW
Kqa68L6RBhiyuvBTaRCUdIhqDBjVCgMlLJxC5soOIVCEvMRzOxHqO0+gvKomvM1P
iK4cio2OcIqZb8vCyMIXtYniHqA0rUZD4U+EB9enmYcj9ZhWO9oQXZ0qCQN6ve/K
1Q7NjImT5oEHWGFeLmwWZMe2+djFcHiCQM1bFN1gC+2ASz5XPC7OKdrIi+E85gMo
cYu+iEYEExECAAYFAlsnulUACgkQOzARt2udZSO/4QCcDf+j/XRbJn2PudsSoyjw
3B2boakAnA9A9b8UoEYgmLTRpwXYuhsxOCDE
=8MsV
-----END PGP PUBLIC KEY BLOCK-----

runcmd:
# WORKAROUND: wrong interface name in noble's netplan configuration
- sed -i 's/eth0:/ens3:/' /etc/netplan/50-cloud-init.yaml
- netplan apply
- systemctl restart systemd-networkd
# WORKAROUND: cloud-init in Ubuntu 24.04 does not take care of the following
- echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
# WORKAROUND: disable IPv6 until we have it in Provo
- echo 'Acquire::ForceIPv4 "true";' > /etc/apt/apt.conf.d/99force-ipv4
- systemctl restart sshd
%{ if install_salt_bundle }
- apt-get update
- "DEBIAN_FRONTEND=noninteractive apt-get -yq install venv-salt-minion avahi-daemon qemu-guest-agent"
%{ else }
- apt-get update
- "DEBIAN_FRONTEND=noninteractive apt-get -yq install salt-minion avahi-daemon qemu-guest-agent"
%{ endif }
- systemctl start qemu-guest-agent
%{ endif } # end Ubuntu 24.04

%{ if image == "debian12o" }
apt:
sources:
Expand Down
2 changes: 2 additions & 0 deletions modules/controller/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ module "controller" {
ubuntu2004_sshminion = length(var.ubuntu2004_sshminion_configuration["hostnames"]) > 0 ? var.ubuntu2004_sshminion_configuration["hostnames"][0] : null
ubuntu2204_minion = length(var.ubuntu2204_minion_configuration["hostnames"]) > 0 ? var.ubuntu2204_minion_configuration["hostnames"][0] : null
ubuntu2204_sshminion = length(var.ubuntu2204_sshminion_configuration["hostnames"]) > 0 ? var.ubuntu2204_sshminion_configuration["hostnames"][0] : null
ubuntu2404_minion = length(var.ubuntu2404_minion_configuration["hostnames"]) > 0 ? var.ubuntu2404_minion_configuration["hostnames"][0] : null
ubuntu2404_sshminion = length(var.ubuntu2404_sshminion_configuration["hostnames"]) > 0 ? var.ubuntu2404_sshminion_configuration["hostnames"][0] : null
debian11_minion = length(var.debian11_minion_configuration["hostnames"]) > 0 ? var.debian11_minion_configuration["hostnames"][0] : null
debian11_sshminion = length(var.debian11_sshminion_configuration["hostnames"]) > 0 ? var.debian11_sshminion_configuration["hostnames"][0] : null
debian12_minion = length(var.debian12_minion_configuration["hostnames"]) > 0 ? var.debian12_minion_configuration["hostnames"][0] : null
Expand Down
14 changes: 14 additions & 0 deletions modules/controller/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,20 @@ variable "ubuntu2204_sshminion_configuration" {
}
}

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

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

variable "debian11_minion_configuration" {
description = "use module.<DEBIAN11_MINION>.configuration, see main.tf.libvirt-testsuite.example"
default = {
Expand Down
2 changes: 2 additions & 0 deletions salt/controller/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ export VIRTHOST_KVM_PASSWORD="linux" {% else %}# no KVM host defined {% endif %}
{% if grains.get('ubuntu2004_sshminion') | default(false, true) %}export UBUNTU2004_SSHMINION="{{ grains.get('ubuntu2004_sshminion') }}" {% else %}# no UBUNTU2004 ssh minion defined {% endif %}
{% if grains.get('ubuntu2204_minion') | default(false, true) %}export UBUNTU2204_MINION="{{ grains.get('ubuntu2204_minion') }}" {% else %}# no UBUNTU2204 minion defined {% endif %}
Bischoff marked this conversation as resolved.
Show resolved Hide resolved
{% if grains.get('ubuntu2204_sshminion') | default(false, true) %}export UBUNTU2204_SSHMINION="{{ grains.get('ubuntu2204_sshminion') }}" {% else %}# no UBUNTU2204 ssh minion defined {% endif %}
{% if grains.get('ubuntu2404_minion') | default(false, true) %}export UBUNTU2404_MINION="{{ grains.get('ubuntu2404_minion') }}" {% else %}# no UBUNTU2404 minion defined {% endif %}
{% if grains.get('ubuntu2404_sshminion') | default(false, true) %}export UBUNTU2404_SSHMINION="{{ grains.get('ubuntu2404_sshminion') }}" {% else %}# no UBUNTU2404 ssh minion defined {% endif %}
{% if grains.get('debian11_minion') | default(false, true) %}export DEBIAN11_MINION="{{ grains.get('debian11_minion') }}" {% else %}# no DEBIAN11 minion defined {% endif %}
{% if grains.get('debian11_sshminion') | default(false, true) %}export DEBIAN11_SSHMINION="{{ grains.get('debian11_sshminion') }}" {% else %}# no DEBIAN11 ssh minion defined {% endif %}
{% if grains.get('debian12_minion') | default(false, true) %}export DEBIAN12_MINION="{{ grains.get('debian12_minion') }}" {% else %}# no DEBIAN12 minion defined {% endif %}
Expand Down
8 changes: 8 additions & 0 deletions salt/mirror/etc/minima.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ http:
- url: http://download.suse.de/ibs/Devel:/Galaxy:/Manager:/Head:/Ubuntu22.04-SUSE-Manager-Tools/xUbuntu_22.04
archs: [amd64]

# Ubuntu 24.04 Manager Tools Head devel
- url: http://download.suse.de/ibs/Devel:/Galaxy:/Manager:/Head:/Ubuntu24.04-SUSE-Manager-Tools/xUbuntu_24.04
archs: [amd64]

# openSUSE Leap
- url: http://download.opensuse.org/distribution/leap/15.2/repo/oss
archs: [x86_64]
Expand Down Expand Up @@ -369,6 +373,8 @@ http:
archs: [amd64]
- url: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Master:/Ubuntu2204-Uyuni-Client-Tools/xUbuntu_22.04/
archs: [amd64]
- url: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Master:/Ubuntu2404-Uyuni-Client-Tools/xUbuntu_24.04/
archs: [amd64]
- url: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Master:/Debian11-Uyuni-Client-Tools/Debian_11/
archs: [amd64]
- url: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Master:/Debian12-Uyuni-Client-Tools/Debian_12/
Expand Down Expand Up @@ -399,6 +405,8 @@ http:
archs: [amd64]
- url: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/Ubuntu2204-Uyuni-Client-Tools/xUbuntu_22.04/
archs: [amd64]
- url: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/Ubuntu2404-Uyuni-Client-Tools/xUbuntu_24.04/
archs: [amd64]
- url: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/Debian11-Uyuni-Client-Tools/Debian_11/
archs: [amd64]
- url: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/Debian12-Uyuni-Client-Tools/Debian_12/
Expand Down
22 changes: 18 additions & 4 deletions salt/repos/clienttools.sls
Original file line number Diff line number Diff line change
Expand Up @@ -402,16 +402,20 @@ tools_update_repo:
- humanname: tools_update_repo
- file: /etc/apt/sources.list.d/tools_update_repo.list
# We only have one shared Client Tools repository
{% if 'nightly' in grains.get('product_version') | default('', true) %}
{% set tools_repo_url = 'http://' + grains.get("mirror") | default("download.suse.de", true) + '/ibs/Devel:/Galaxy:/Manager:/4.3:/Ubuntu' + release + '-SUSE-Manager-Tools/xUbuntu_' + release %}
{% elif 'head' in grains.get('product_version') | default('', true) %}
{% if 'head' in grains.get('product_version') | default('', true) %}
{% set tools_repo_url = 'http://' + grains.get("mirror") | default("download.suse.de", true) + '/ibs/Devel:/Galaxy:/Manager:/Head:/Ubuntu' + release + '-SUSE-Manager-Tools/xUbuntu_' + release %}
{% elif 'beta' in grains.get('product_version') | default('', true) %}
{% set tools_repo_url = 'http://' + grains.get("mirror") | default("download.suse.de/ibs", true) + '/SUSE/Updates/Ubuntu/' + release + '-CLIENT-TOOLS-BETA/x86_64/update/' %}
{% elif '4.3-nightly' in grains.get('product_version') | default('', true) %}
{% set tools_repo_url = 'http://' + grains.get("mirror") | default("download.suse.de", true) + '/ibs/Devel:/Galaxy:/Manager:/4.3:/Ubuntu' + release + '-SUSE-Manager-Tools/xUbuntu_' + release %}
{% elif '4.3-released' in grains.get('product_version') | default('', true) %}
{% set tools_repo_url = 'http://' + grains.get("mirror") | default("download.suse.de/ibs", true) + '/SUSE/Updates/Ubuntu/' + release + '-CLIENT-TOOLS/x86_64/update/' %}
{% elif '4.3-VM-released' in grains.get('product_version') | default('', true) %}
{% set tools_repo_url = 'http://' + grains.get("mirror") | default("download.suse.de/ibs", true) + '/SUSE/Updates/Ubuntu/' + release + '-CLIENT-TOOLS/x86_64/update/' %}
{% elif '5.0-nightly' in grains.get('product_version') | default('', true) %}
{% set tools_repo_url = 'http://' + grains.get("mirror") | default("download.suse.de", true) + '/ibs/Devel:/Galaxy:/Manager:/5.0:/Ubuntu' + release + '-SUSE-Manager-Tools/xUbuntu_' + release %}
{% elif '5.0-released' in grains.get('product_version') | default('', true) %}
{% set tools_repo_url = 'http://' + grains.get("mirror") | default("download.suse.de/ibs", true) + '/SUSE/Updates/Ubuntu/' + release + '-CLIENT-TOOLS/x86_64/update/' %}
{% elif 'uyuni-master' in grains.get('product_version') | default('', true) %}
{% set tools_repo_url = 'http://' + grains.get("mirror") | default("download.opensuse.org", true) + '/repositories/systemsmanagement:/Uyuni:/Master:/Ubuntu' + short_release + '-Uyuni-Client-Tools/xUbuntu_' + release %}
{% else %}
Expand All @@ -429,7 +433,7 @@ tools_update_repo_raised_priority:
Package: *
Pin: release l=Devel:Galaxy:Manager:Head:Ubuntu{{ release }}-SUSE-Manager-Tools
Pin-Priority: 800
{% elif 'nightly' in grains.get('product_version') | default('', true) %}
{% elif '4.3-nightly' in grains.get('product_version') | default('', true) %}
- contents: |
Package: *
Pin: release l=Devel:Galaxy:Manager:4.3:Ubuntu{{ release }}-SUSE-Manager-Tools
Expand All @@ -444,6 +448,16 @@ tools_update_repo_raised_priority:
Package: *
Pin: release l=SUSE:Updates:Ubuntu:{{ release }}-CLIENT-TOOLS:x86_64:update
Pin-Priority: 800
{% elif '5.0-nightly' in grains.get('product_version') | default('', true) %}
- contents: |
Package: *
Pin: release l=Devel:Galaxy:Manager:5.0:Ubuntu{{ release }}-SUSE-Manager-Tools
Pin-Priority: 800
{% elif '5.0-released' in grains.get('product_version') | default('', true) %}
- contents: |
Package: *
Pin: release l=SUSE:Updates:Ubuntu:{{ release }}-CLIENT-TOOLS:x86_64:update
Pin-Priority: 800
{% elif 'uyuni-master' in grains.get('product_version') | default('', true) %}
- contents: |
Package: *
Expand Down
Loading