Skip to content

Instantly share code, notes, and snippets.

@holtgrewe
Created November 16, 2021 08:31
Show Gist options
  • Save holtgrewe/36aa463961f9fe34a8020c4e8077b8be to your computer and use it in GitHub Desktop.
Save holtgrewe/36aa463961f9fe34a8020c4e8077b8be to your computer and use it in GitHub Desktop.
Required patches to kayobe, kolla-ansible (both branches stable/xena) and kolla-configuration to have the seed hypervisor, seed, and bare metal hosts configured with Rocky Linux.
diff --git a/etc/kayobe/bifrost.yml b/etc/kayobe/bifrost.yml
index 0bfcec7..00d4651 100644
--- a/etc/kayobe/bifrost.yml
+++ b/etc/kayobe/bifrost.yml
@@ -23,10 +23,10 @@
# Diskimage-builder configuration.
# DIB base OS element. Default is {{ os_distribution }}.
-#kolla_bifrost_dib_os_element:
+kolla_bifrost_dib_os_element: "centos"
# DIB image OS release. Default is {{ os_release }}.
-#kolla_bifrost_dib_os_release:
+kolla_bifrost_dib_os_release: "8-stream"
# List of default DIB elements. Default is ["disable-selinux",
# "enable-serial-console", "vm"] when os_distribution is "centos", or
@@ -132,6 +132,11 @@
# Algorithm of checksum of Ironic Python Agent (IPA) ramdisk image.
#kolla_bifrost_ipa_ramdisk_checksum_algorithm:
+# Configure bifrost to use cirros and specify an upstream URL.
+kolla_bifrost_extra_globals:
+ use_cirros: true
+ cirros_deploy_image_upstream_url: https://dl.rockylinux.org/pub/rocky/8.4/images/Rocky-8-GenericCloud-8.4-20210620.0.x86_64.qcow2
+
###############################################################################
# Inventory configuration.
diff --git a/etc/kayobe/globals.yml b/etc/kayobe/globals.yml
index a4150d8..234198f 100644
--- a/etc/kayobe/globals.yml
+++ b/etc/kayobe/globals.yml
@@ -47,11 +47,11 @@
# OS distribution name. Valid options are "centos", "ubuntu". Default is
# "centos".
-#os_distribution:
+os_distribution: rocky
# OS release. Valid options are "8-stream" when os_distribution is "centos", or
# "focal" when os_distribution is "ubuntu".
-#os_release:
+os_release: 8
###############################################################################
# Ansible configuration.
diff --git a/etc/kayobe/kolla.yml b/etc/kayobe/kolla.yml
index 3e62b22..f1965d8 100644
--- a/etc/kayobe/kolla.yml
+++ b/etc/kayobe/kolla.yml
@@ -63,7 +63,7 @@
# Kolla base container image distribution. Options are "centos", "debian",
# "ubuntu". Default is {{ os_distribution }}.
-#kolla_base_distro:
+kolla_base_distro: centos
# Kolla container image type: binary or source. Default is 'source'.
#kolla_install_type:
diff --git a/ansible/group_vars/all/infra-vms b/ansible/group_vars/all/infra-vms
index 71dec962..750b151c 100644
--- a/ansible/group_vars/all/infra-vms
+++ b/ansible/group_vars/all/infra-vms
@@ -48,6 +48,8 @@ infra_vm_root_format: qcow2
infra_vm_root_image: >-
{%- if os_distribution == 'ubuntu' %}
https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
+ {%- elif os_distribution == 'rocky' -%}
+ https://dl.rockylinux.org/pub/rocky/8.4/images/Rocky-8-GenericCloud-8.4-20210620.0.x86_64.qcow2
{%- else -%}
https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210210.0.x86_64.qcow2
{%- endif %}
diff --git a/ansible/group_vars/all/seed-vm b/ansible/group_vars/all/seed-vm
index 4dcda828..1463ebdb 100644
--- a/ansible/group_vars/all/seed-vm
+++ b/ansible/group_vars/all/seed-vm
@@ -48,6 +48,8 @@ seed_vm_root_format: qcow2
seed_vm_root_image: >-
{%- if os_distribution == 'ubuntu' %}
https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
+ {%- elif os_distribution == 'rocky' -%}
+ https://dl.rockylinux.org/pub/rocky/8.4/images/Rocky-8-GenericCloud-8.4-20210620.0.x86_64.qcow2
{%- else -%}
https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210210.0.x86_64.qcow2
{%- endif %}
diff --git a/ansible/roles/baremetal/defaults/main.yml b/ansible/roles/baremetal/defaults/main.yml
index bb19f40b7..f538ea695 100644
--- a/ansible/roles/baremetal/defaults/main.yml
+++ b/ansible/roles/baremetal/defaults/main.yml
@@ -10,7 +10,7 @@ docker_apt_key_id: "0EBFCD88"
docker_apt_package: "docker-ce"
# Docker Yum repository configuration.
-docker_yum_url: "https://download.docker.com/linux/{{ ansible_facts.distribution | lower }}"
+docker_yum_url: "https://download.docker.com/linux/{% if ansible_facts.distribution == 'Rocky' %}centos{% else %}{{ ansible_facts.distribution | lower }}{% endif %}"
docker_yum_baseurl: "{{ docker_yum_url }}/$releasever/$basearch/stable"
docker_yum_gpgkey: "{{ docker_yum_url }}/gpg"
docker_yum_gpgcheck: true
diff --git a/ansible/roles/prechecks/vars/main.yml b/ansible/roles/prechecks/vars/main.yml
index ea32bd291..e087faffc 100644
--- a/ansible/roles/prechecks/vars/main.yml
+++ b/ansible/roles/prechecks/vars/main.yml
@@ -15,5 +15,7 @@ host_os_distributions:
- "bullseye"
RHEL:
- "8"
+ Rocky:
+ - "8"
Ubuntu:
- "focal"
diff --git a/doc/source/user/support-matrix.rst b/doc/source/user/support-matrix.rst
index a57f95fa6..eeec537ba 100644
--- a/doc/source/user/support-matrix.rst
+++ b/doc/source/user/support-matrix.rst
@@ -24,6 +24,7 @@ Kolla Ansible supports the following host Operating Systems (OS):
* CentOS Stream 8
* Debian Bullseye (11)
* RHEL 8 (deprecated)
+* Rocky Linux 8
* Ubuntu Focal (20.04)
Supported container images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment