Add support for Rocky Linux 8

Change-Id: If7d6e58b19f98ccb7cc4c209e458cb6f4f4765ad
This commit is contained in:
Michal Nasiadka 2022-03-03 11:27:11 +01:00
parent b2b013c1cf
commit 8e55ea08a4
40 changed files with 291 additions and 106 deletions

View File

@ -7,12 +7,18 @@ dnf_config: {}
# Whether or not to use a local Yum mirror. Default value is 'false'. # Whether or not to use a local Yum mirror. Default value is 'false'.
dnf_use_local_mirror: false dnf_use_local_mirror: false
# Mirror FQDN for Yum repos. Default value is 'mirror.centos.org'. # Mirror FQDN for Yum CentOS repos. Default value is 'mirror.centos.org'.
dnf_centos_mirror_host: 'mirror.centos.org' dnf_centos_mirror_host: 'mirror.centos.org'
# Mirror directory for Yum CentOS repos. Default value is 'centos'. # Mirror directory for Yum CentOS repos. Default value is 'centos'.
dnf_centos_mirror_directory: 'centos' dnf_centos_mirror_directory: 'centos'
# Mirror FQDN for Yum Rocky repos. Default value is 'dl.rockylinux.org'.
dnf_rocky_mirror_host: 'dl.rockylinux.org'
# Mirror directory for Yum Rocky repos. Default value is 'pub/rocky'.
dnf_rocky_mirror_directory: 'pub/rocky'
# Mirror FQDN for Yum EPEL repos. Default value is # Mirror FQDN for Yum EPEL repos. Default value is
# 'download.fedoraproject.org'. # 'download.fedoraproject.org'.
dnf_epel_mirror_host: 'download.fedoraproject.org' dnf_epel_mirror_host: 'download.fedoraproject.org'

View File

@ -44,13 +44,17 @@ kayobe_ansible_user: "stack"
############################################################################### ###############################################################################
# OS distribution. # OS distribution.
# OS distribution name. Valid options are "centos", "ubuntu". Default is # OS distribution name. Valid options are "centos", "rocky", "ubuntu". Default
# "centos". # is "centos".
os_distribution: "centos" os_distribution: "centos"
# OS release. Valid options are "8-stream" when os_distribution is "centos", or # OS release. Valid options are "8-stream" when os_distribution is "centos", or
# "focal" when os_distribution is "ubuntu". # "8" when os_distribution is "rocky", or "focal" when os_distribution is
os_release: "{{ '8-stream' if os_distribution == 'centos' else 'focal' }}" # "ubuntu".
os_release: >-
{{ '8-stream' if os_distribution == 'centos'
else '8' if os_distribution == 'rocky'
else 'focal' }}
############################################################################### ###############################################################################
# Ansible configuration. # Ansible configuration.

View File

@ -43,11 +43,16 @@ infra_vm_root_format: qcow2
# Base image for the infra VM root volume. Default is # Base image for the infra VM root volume. Default is
# "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img" # "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img"
# when os_distribution is "ubuntu", or # when os_distribution is "ubuntu", or
# http://dl.rockylinux.org/pub/rocky/8.5/images/Rocky-8-GenericCloud-8.5-20211114.2.x86_64.qcow2
# when os_distribution is "rocky",
# or
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2" # "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2"
# otherwise. # otherwise.
infra_vm_root_image: >- infra_vm_root_image: >-
{%- if os_distribution == 'ubuntu' %} {%- if os_distribution == 'ubuntu' %}
https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
{%- elif os_distribution == 'rocky' %}
http://dl.rockylinux.org/pub/rocky/8.5/images/Rocky-8-GenericCloud-8.5-20211114.2.x86_64.qcow2
{%- else -%} {%- else -%}
https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2 https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2
{%- endif %} {%- endif %}

View File

@ -53,8 +53,9 @@ kolla_node_custom_config_path: "{{ kolla_config_path }}/config"
# Kolla configuration. # Kolla configuration.
# Kolla base container image distribution. Options are "centos", "debian", # Kolla base container image distribution. Options are "centos", "debian",
# "ubuntu". Default is {{ os_distribution }}. # "ubuntu". Default is
kolla_base_distro: "{{ os_distribution }}" # {{ 'centos' if os_distribution == 'rocky' else os_distribution }}.
kolla_base_distro: "{{ 'centos' if os_distribution == 'rocky' else os_distribution }}"
# Kolla container image type: binary or source. # Kolla container image type: binary or source.
kolla_install_type: "source" kolla_install_type: "source"

View File

@ -7,8 +7,8 @@
# Whether to build host disk images with DIB directly instead of through # Whether to build host disk images with DIB directly instead of through
# Bifrost. Setting it to true disables Bifrost image build and allows images to # Bifrost. Setting it to true disables Bifrost image build and allows images to
# be built with the `kayobe overcloud host image build` command. Default value # be built with the `kayobe overcloud host image build` command. Default value
# is False. This will change in a future release. # is {{ os_distribution == 'rocky' }}. This will change in a future release.
overcloud_dib_build_host_images: False overcloud_dib_build_host_images: "{{ os_distribution == 'rocky' }}"
# List of overcloud host disk images to build. Each element is a dict defining # List of overcloud host disk images to build. Each element is a dict defining
# an image in a format accepted by the stackhpc.os-images role. Default is to # an image in a format accepted by the stackhpc.os-images role. Default is to
@ -22,20 +22,24 @@ overcloud_dib_host_images:
env: "{{ overcloud_dib_env_vars }}" env: "{{ overcloud_dib_env_vars }}"
packages: "{{ overcloud_dib_packages }}" packages: "{{ overcloud_dib_packages }}"
# DIB base OS element. Default is {{ os_distribution }}. # DIB base OS element. Default is {{ 'rocky-container' if os_distribution ==
overcloud_dib_os_element: "{{ os_distribution }}" # 'rocky' else os_distribution }}.
overcloud_dib_os_element: "{{ 'rocky-container' if os_distribution == 'rocky' else os_distribution }}"
# DIB image OS release. Default is {{ os_release }}. # DIB image OS release. Default is {{ os_release }}.
overcloud_dib_os_release: "{{ os_release }}" overcloud_dib_os_release: "{{ os_release }}"
# List of default DIB elements. Default is ["centos", "cloud-init-datasources", # List of default DIB elements. Default is ["centos", "cloud-init-datasources",
# "disable-selinux", "enable-serial-console", "vm"] when # "disable-selinux", "enable-serial-console", "vm"] when
# overcloud_dib_os_element is "centos", or ["ubuntu", "cloud-init-datasources", # overcloud_dib_os_element is "centos", or ["rocky-container",
# "enable-serial-console", "vm"] when overcloud_dib_os_element is "ubuntu". # "cloud-init-datasources", "disable-selinux", "enable-serial-console", "vm"]
# when overcloud_dib_os_element is "rocky" or
# ["ubuntu", "cloud-init-datasources", "enable-serial-console", "vm"]
# when overcloud_dib_os_element is "ubuntu".
overcloud_dib_elements_default: overcloud_dib_elements_default:
- "{{ overcloud_dib_os_element }}" - "{{ overcloud_dib_os_element }}"
- "cloud-init-datasources" - "cloud-init-datasources"
- "{% if overcloud_dib_os_element == 'centos' %}disable-selinux{% endif %}" - "{% if overcloud_dib_os_element in ['centos', 'rocky'] %}disable-selinux{% endif %}"
- "enable-serial-console" - "enable-serial-console"
- "vm" - "vm"
@ -48,11 +52,14 @@ overcloud_dib_elements: "{{ overcloud_dib_elements_default | select | list + ove
# DIB default environment variables. Default is # DIB default environment variables. Default is
# {"DIB_BOOTLOADER_DEFAULT_CMDLINE": "nofb nomodeset gfxpayload=text # {"DIB_BOOTLOADER_DEFAULT_CMDLINE": "nofb nomodeset gfxpayload=text
# net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive", "DIB_RELEASE": # net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive",
# "{{ overcloud_dib_os_release }}"}. # "DIB_CONTAINERFILE_RUNTIME": "docker", "DIB_CONTAINERFILE_NETWORK_DRIVER":
# "host", "DIB_RELEASE": "{{ overcloud_dib_os_release }}"}.
overcloud_dib_env_vars_default: overcloud_dib_env_vars_default:
DIB_BOOTLOADER_DEFAULT_CMDLINE: "nofb nomodeset gfxpayload=text net.ifnames=1" DIB_BOOTLOADER_DEFAULT_CMDLINE: "nofb nomodeset gfxpayload=text net.ifnames=1"
DIB_CLOUD_INIT_DATASOURCES: "ConfigDrive" DIB_CLOUD_INIT_DATASOURCES: "ConfigDrive"
DIB_CONTAINERFILE_RUNTIME: "docker"
DIB_CONTAINERFILE_NETWORK_DRIVER: "host"
DIB_RELEASE: "{{ overcloud_dib_os_release }}" DIB_RELEASE: "{{ overcloud_dib_os_release }}"
# DIB additional environment variables. Default is none. # DIB additional environment variables. Default is none.

View File

@ -42,12 +42,17 @@ seed_vm_root_format: qcow2
# Base image for the seed VM root volume. Default is # Base image for the seed VM root volume. Default is
# "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img" # "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img"
# when os_distribution is "ubuntu", or # when os_distribution is "ubuntu",
# http://dl.rockylinux.org/pub/rocky/8.5/images/Rocky-8-GenericCloud-8.5-20211114.2.x86_64.qcow2
# when os_distribution is "rocky",
# or
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2" # "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2"
# otherwise. # otherwise.
seed_vm_root_image: >- seed_vm_root_image: >-
{%- if os_distribution == 'ubuntu' %} {%- if os_distribution == 'ubuntu' %}
https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
{%- elif os_distribution == 'rocky' %}
http://dl.rockylinux.org/pub/rocky/8.5/images/Rocky-8-GenericCloud-8.5-20211114.2.x86_64.qcow2
{%- else -%} {%- else -%}
https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2 https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2
{%- endif %} {%- endif %}

View File

@ -1,5 +1,7 @@
--- ---
- name: Copy CentOS repo templates - name: Copy CentOS repo templates
vars:
repo_file_prefix: "{{ 'CentOS-Stream' if ansible_facts.distribution == 'CentOS' else 'Rocky' }}"
template: template:
src: "{{ item }}.j2" src: "{{ item }}.j2"
dest: /etc/yum.repos.d/{{ item }} dest: /etc/yum.repos.d/{{ item }}
@ -8,9 +10,9 @@
mode: 0664 mode: 0664
become: True become: True
loop: loop:
- CentOS-Stream-AppStream.repo - "{{ repo_file_prefix }}-AppStream.repo"
- CentOS-Stream-BaseOS.repo - "{{ repo_file_prefix }}-BaseOS.repo"
- CentOS-Stream-Extras.repo - "{{ repo_file_prefix }}-Extras.repo"
- name: Remove old (pre CentOS 8.3) repo files - name: Remove old (pre CentOS 8.3) repo files
file: file:
@ -21,6 +23,7 @@
- CentOS-AppStream.repo - CentOS-AppStream.repo
- CentOS-Base.repo - CentOS-Base.repo
- CentOS-Extras.repo - CentOS-Extras.repo
when: ansible_facts.distribution == 'CentOS'
- name: Update cache - name: Update cache
dnf: dnf:

View File

@ -0,0 +1,16 @@
# Rocky-AppStream.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are geographically
# close to the client. You should use this for Rocky updates unless you are
# manually picking other mirrors.
#
# If the mirrorlist does not work for you, you can try the commented out
# baseurl line instead.
[appstream]
name=Rocky Linux $releasever - AppStream
baseurl=http://{{ dnf_rocky_mirror_host }}/{{ dnf_rocky_mirror_directory }}/$releasever/AppStream/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial

View File

@ -0,0 +1,16 @@
# Rocky-BaseOS.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are geographically
# close to the client. You should use this for Rocky updates unless you are
# manually picking other mirrors.
#
# If the mirrorlist does not work for you, you can try the commented out
# baseurl line instead.
[baseos]
name=Rocky Linux $releasever - BaseOS
baseurl=http://{{ dnf_rocky_mirror_host }}/{{ dnf_rocky_mirror_directory }}/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial

View File

@ -0,0 +1,16 @@
# Rocky-Extras.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are geographically
# close to the client. You should use this for Rocky updates unless you are
# manually picking other mirrors.
#
# If the mirrorlist does not work for you, you can try the commented out
# baseurl line instead.
[extras]
name=Rocky Linux $releasever - Extras
baseurl=http://{{ dnf_rocky_mirror_host }}/{{ dnf_rocky_mirror_directory }}/$releasever/extras/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial

View File

@ -130,7 +130,7 @@ function config_init {
# Installation # Installation
function is_dnf { function is_dnf {
if [[ -e /etc/centos-release ]]; then if [[ -e /etc/centos-release || -e /etc/rocky-release ]]; then
/usr/bin/which dnf >/dev/null 2>&1 /usr/bin/which dnf >/dev/null 2>&1
else else
return 1 return 1
@ -138,7 +138,7 @@ function is_dnf {
} }
function is_yum { function is_yum {
if [[ -e /etc/centos-release ]]; then if [[ -e /etc/centos-release || -e /etc/rocky-release ]]; then
/usr/bin/which yum >/dev/null 2>&1 /usr/bin/which yum >/dev/null 2>&1
else else
return 1 return 1

View File

@ -26,9 +26,9 @@ It is possible to update packages on the infrastructure VMs.
Package Repositories Package Repositories
-------------------- --------------------
If using custom DNF package repositories on CentOS, it may be necessary to If using custom DNF package repositories on CentOS or Rocky, it may be
update these prior to running a package update. To do this, update the necessary to update these prior to running a package update. To do this, update
configuration in ``${KAYOBE_CONFIG_PATH}/dnf.yml`` and run the following the configuration in ``${KAYOBE_CONFIG_PATH}/dnf.yml`` and run the following
command:: command::
(kayobe) $ kayobe infra vm host configure --tags dnf (kayobe) $ kayobe infra vm host configure --tags dnf

View File

@ -10,9 +10,9 @@ It is possible to update packages on the overcloud hosts.
Package Repositories Package Repositories
-------------------- --------------------
If using custom DNF package repositories on CentOS, it may be necessary to If using custom DNF package repositories on CentOS or Rocky, it may be
update these prior to running a package update. To do this, update the necessary to update these prior to running a package update. To do this, update
configuration in ``${KAYOBE_CONFIG_PATH}/dnf.yml`` and run the following the configuration in ``${KAYOBE_CONFIG_PATH}/dnf.yml`` and run the following
command:: command::
(kayobe) $ kayobe overcloud host configure --tags dnf --kolla-tags none (kayobe) $ kayobe overcloud host configure --tags dnf --kolla-tags none

View File

@ -21,9 +21,9 @@ It is possible to update packages on the seed host.
Package Repositories Package Repositories
-------------------- --------------------
If using custom DNF package repositories on CentOS, it may be necessary to If using custom DNF package repositories on CentOS or Rocky, it may be
update these prior to running a package update. To do this, update the necessary to update these prior to running a package update. To do this, update
configuration in ``${KAYOBE_CONFIG_PATH}/dnf.yml`` and run the following the configuration in ``${KAYOBE_CONFIG_PATH}/dnf.yml`` and run the following
command:: command::
(kayobe) $ kayobe seed host configure --tags dnf --kolla-tags none (kayobe) $ kayobe seed host configure --tags dnf --kolla-tags none

View File

@ -79,8 +79,8 @@ is ``stack``.
Typically, the image used to provision these hosts will not include this user Typically, the image used to provision these hosts will not include this user
account, so Kayobe performs a bootstrapping step to create it, as a different account, so Kayobe performs a bootstrapping step to create it, as a different
user. In cloud images, there is often a user named after the OS distro, e.g. user. In cloud images, there is often a user named after the OS distro, e.g.
``centos`` or ``ubuntu``. This user defaults to the ``os_distribution`` ``centos``, ``rocky`` or ``ubuntu``. This user defaults to the
variable, but may be set via the following variables: ``os_distribution`` variable, but may be set via the following variables:
* ``seed_hypervisor_bootstrap_user`` * ``seed_hypervisor_bootstrap_user``
* ``seed_bootstrap_user`` * ``seed_bootstrap_user``
@ -211,8 +211,8 @@ DNF Package Repositories
*tags:* *tags:*
| ``dnf`` | ``dnf``
On CentOS, Kayobe supports configuration of package repositories via DNF, via On CentOS and Rocky, Kayobe supports configuration of package repositories via
variables in ``${KAYOBE_CONFIG_PATH}/dnf.yml``. DNF, via variables in ``${KAYOBE_CONFIG_PATH}/dnf.yml``.
Configuration of dnf.conf Configuration of dnf.conf
------------------------- -------------------------
@ -227,18 +227,25 @@ section of the file. For example, to configure DNF to use a proxy server:
dnf_config: dnf_config:
proxy: https://proxy.example.com proxy: https://proxy.example.com
CentOS and EPEL Mirrors CentOS/Rocky and EPEL Mirrors
----------------------- -----------------------------
CentOS and EPEL mirrors can be enabled by setting ``dnf_use_local_mirror`` to CentOS/Rocky and EPEL mirrors can be enabled by setting
``true``. CentOS repository mirrors are configured via the following ``dnf_use_local_mirror`` to ``true``. CentOS repository mirrors are configured
variables: via the following variables:
* ``dnf_centos_mirror_host`` (default ``mirror.centos.org``) is the mirror * ``dnf_centos_mirror_host`` (default ``mirror.centos.org``) is the mirror
hostname. hostname.
* ``dnf_centos_mirror_directory`` (default ``centos``) is a directory on the * ``dnf_centos_mirror_directory`` (default ``centos``) is a directory on the
mirror in which repositories may be accessed. mirror in which repositories may be accessed.
Rocky repository mirrors are configured via the following variables:
* ``dnf_rocky_mirror_host`` (default ``dl.rockylinux.org``) is the mirror
hostname
* ``dnf_rocky_mirror_directory`` (default ``pub/rocky``) is a directory on the
mirror in which repositories may be accessed.
EPEL repository mirrors are configured via the following variables: EPEL repository mirrors are configured via the following variables:
* ``dnf_epel_mirror_host`` (default ``download.fedoraproject.org``) is the * ``dnf_epel_mirror_host`` (default ``download.fedoraproject.org``) is the
@ -327,7 +334,7 @@ SELinux
*tags:* *tags:*
| ``disable-selinux`` | ``disable-selinux``
.. note:: SELinux applies to CentOS systems only. .. note:: SELinux applies to CentOS and Rocky systems only.
SELinux is not supported by Kolla Ansible currently, so it is disabled by SELinux is not supported by Kolla Ansible currently, so it is disabled by
Kayobe. If necessary, Kayobe will reboot systems in order to apply a change to Kayobe. If necessary, Kayobe will reboot systems in order to apply a change to
@ -348,12 +355,12 @@ Firewalld
*tags:* *tags:*
| ``firewall`` | ``firewall``
.. note:: Firewalld is supported on CentOS systems only. Currently no .. note:: Firewalld is supported on CentOS and Rocky systems only. Currently no
firewall is supported on Ubuntu. firewall is supported on Ubuntu.
Firewalld can be used to provide a firewall on CentOS systems. Since the Xena Firewalld can be used to provide a firewall on CentOS/Rocky systems. Since the
release, Kayobe provides support for enabling or disabling firewalld, as well Xena release, Kayobe provides support for enabling or disabling firewalld, as
as defining zones and rules. well as defining zones and rules.
The following variables can be used to set whether to enable firewalld: The following variables can be used to set whether to enable firewalld:
@ -446,7 +453,7 @@ Tuned
*tags:* *tags:*
| ``tuned`` | ``tuned``
.. note:: Tuned configuration only supports CentOS systems for now. .. note:: Tuned configuration only supports CentOS/Rocky systems for now.
Built-in ``tuned`` profiles can be applied to hosts. The following variables Built-in ``tuned`` profiles can be applied to hosts. The following variables
can be used to set a ``tuned`` profile to specific types of hosts: can be used to set a ``tuned`` profile to specific types of hosts:

View File

@ -69,8 +69,8 @@ supported:
``rules`` ``rules``
List of IP routing rules. List of IP routing rules.
On CentOS, each item should be a string describing an ``iproute2`` IP On CentOS or Rocky, each item should be a string describing an ``iproute2``
routing rule. IP routing rule.
On Ubuntu, each item should be a dict containing optional items ``from``, On Ubuntu, each item should be a dict containing optional items ``from``,
``to``, ``priority`` and ``table``. ``from`` is the source address prefix ``to``, ``priority`` and ``table``. ``from`` is the source address prefix
@ -269,10 +269,10 @@ Configuring IP Routing Policy Rules
IP routing policy rules may be configured by setting the ``rules`` attribute IP routing policy rules may be configured by setting the ``rules`` attribute
for a network to a list of rules. The format of each rule currently differs for a network to a list of rules. The format of each rule currently differs
between CentOS and Ubuntu. between CentOS/Rocky and Ubuntu.
CentOS CentOS/Rocky
"""""" """"""""""""
The format of a rule is the string which would be appended to ``ip rule The format of a rule is the string which would be appended to ``ip rule
<add|del>`` to create or delete the rule. <add|del>`` to create or delete the rule.

View File

@ -11,12 +11,14 @@ used throughout the system.
The ``os_distribution`` variable in ``etc/kayobe/globals.yml`` can be used to The ``os_distribution`` variable in ``etc/kayobe/globals.yml`` can be used to
set the OS distribution to use. It may be set to either ``centos`` or set the OS distribution to use. It may be set to either ``centos`` or
``ubuntu``, and defaults to ``centos``. or ``rocky`` or ``ubuntu``, and defaults to ``centos``.
The ``os_release`` variable in ``etc/kayobe/globals.yml`` can be used to set The ``os_release`` variable in ``etc/kayobe/globals.yml`` can be used to set
the release of the OS. When ``os_distribution`` is set to ``centos`` it may be the release of the OS. When ``os_distribution`` is set to ``centos`` it may be
set to ``8-stream``, and this is its default value. When ``os_distribution`` is set to ``8-stream``, and this is its default value. When ``os_distribution`` is
set to ``ubuntu`` it may be set to ``focal``, and this is its default value. set to ``ubuntu`` it may be set to ``focal``, and this is its default value.
When ``os_distribution`` is set to ``rocky`` it may be set to ``8``, and this
is its default value.
These variables are used to set various defaults, including: These variables are used to set various defaults, including:
@ -34,3 +36,13 @@ In the following example, we set the OS distribution to ``ubuntu``:
:caption: ``globals.yml`` :caption: ``globals.yml``
os_distribution: "ubuntu" os_distribution: "ubuntu"
Example: using Rocky
====================
In the following example, we set the OS distribution to ``rocky``:
.. code-block:: yaml
:caption: ``globals.yml``
os_distribution: "rocky"

View File

@ -19,7 +19,8 @@ following option:
Whether to build host disk images with DIB directly instead of through Whether to build host disk images with DIB directly instead of through
Bifrost. Setting it to true disables Bifrost image build and allows images Bifrost. Setting it to true disables Bifrost image build and allows images
to be built with the ``kayobe overcloud host image build`` command. Default to be built with the ``kayobe overcloud host image build`` command. Default
value is false. This will change in a future release. value is false, except on Rocky where it is true. This will change in a
future release.
With this option enabled, Bifrost will be configured to stop building a root With this option enabled, Bifrost will be configured to stop building a root
disk image. This will become the default behaviour in a future release. disk image. This will become the default behaviour in a future release.
@ -35,7 +36,8 @@ information on building disk images.
The default configuration builds a whole disk (partitioned) image using the The default configuration builds a whole disk (partitioned) image using the
selected :ref:`OS distribution <os-distribution>` (CentOS Stream 8 by default) selected :ref:`OS distribution <os-distribution>` (CentOS Stream 8 by default)
with serial console enabled, and SELinux disabled if CentOS Stream is used. with serial console enabled, and SELinux disabled if CentOS Stream or Rocky
Linux is used.
`Cloud-init <https://cloudinit.readthedocs.io/en/latest/>`__ is used to process `Cloud-init <https://cloudinit.readthedocs.io/en/latest/>`__ is used to process
the configuration drive built by Bifrost during provisioning. the configuration drive built by Bifrost during provisioning.
@ -48,17 +50,19 @@ the configuration drive built by Bifrost during provisioning.
"elements": "{{ overcloud_dib_elements }}", "env": "{{ "elements": "{{ overcloud_dib_elements }}", "env": "{{
overcloud_dib_env_vars }}", "packages": "{{ overcloud_dib_packages }}"}``. overcloud_dib_env_vars }}", "packages": "{{ overcloud_dib_packages }}"}``.
``overcloud_dib_os_element`` ``overcloud_dib_os_element``
DIB base OS element. Default is ``{{ os_distribution }}``. DIB base OS element. Default is ``{{ 'rocky-container' if os_distribution == 'rocky' else os_distribution }}``.
``overcloud_dib_os_release`` ``overcloud_dib_os_release``
DIB image OS release. Default is ``{{ os_release }}``. DIB image OS release. Default is ``{{ os_release }}``.
``overcloud_dib_elements_default`` ``overcloud_dib_elements_default``
List of default DIB elements. Default is ``["centos", List of default DIB elements. Default is ``["centos",
"cloud-init-datasources", "disable-selinux", "enable-serial-console", "cloud-init-datasources", "disable-selinux", "enable-serial-console",
"vm"]`` when ``overcloud_dib_os_element`` is ``centos``, or ``["ubuntu", "vm"]`` when ``overcloud_dib_os_element`` is ``centos``, or
"cloud-init-datasources", "enable-serial-console", "vm"]`` when ``["rocky-container", "cloud-init-datasources", "disable-selinux",
``overcloud_dib_os_element`` is ``ubuntu``. The ``vm`` element is poorly "enable-serial-console", "vm"]`` when overcloud_dib_os_element is ``rocky``
named, and causes DIB to build a whole disk image rather than a single or ``["ubuntu", "cloud-init-datasources", "enable-serial-console", "vm"]``
partition. when ``overcloud_dib_os_element`` is ``ubuntu``. The ``vm`` element is
poorly named, and causes DIB to build a whole disk image rather than a
single partition.
``overcloud_dib_elements_extra`` ``overcloud_dib_elements_extra``
List of additional DIB elements. Default is none. List of additional DIB elements. Default is none.
``overcloud_dib_elements`` ``overcloud_dib_elements``
@ -67,8 +71,9 @@ the configuration drive built by Bifrost during provisioning.
``overcloud_dib_env_vars_default`` ``overcloud_dib_env_vars_default``
DIB default environment variables. Default is DIB default environment variables. Default is
``{"DIB_BOOTLOADER_DEFAULT_CMDLINE": "nofb nomodeset gfxpayload=text ``{"DIB_BOOTLOADER_DEFAULT_CMDLINE": "nofb nomodeset gfxpayload=text
net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive", "DIB_RELEASE": net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive",
"{{ overcloud_dib_os_release }}"}``. "DIB_CONTAINERFILE_RUNTIME": "docker", "DIB_CONTAINERFILE_NETWORK_DRIVER":
"host", DIB_RELEASE": "{{ overcloud_dib_os_release }}"}``.
``overcloud_dib_env_vars_extra`` ``overcloud_dib_env_vars_extra``
DIB additional environment variables. Default is none. DIB additional environment variables. Default is none.
``overcloud_dib_env_vars`` ``overcloud_dib_env_vars``

View File

@ -30,9 +30,9 @@ It also requires a single host running a :ref:`supported operating system
* at least one network interface that has Internet access * at least one network interface that has Internet access
You will need access to a user account with passwordless sudo. The default user You will need access to a user account with passwordless sudo. The default user
in a cloud image (e.g. ``centos`` or ``ubuntu``) is typically sufficient. This in a cloud image (e.g. ``centos`` or ``rocky`` or ``ubuntu``) is typically
user will be used to run Kayobe commands. It will also be used by Kayobe to sufficient. This user will be used to run Kayobe commands. It will also be used
bootstrap other user accounts. by Kayobe to bootstrap other user accounts.
.. _configuration-scenario-aio-overview: .. _configuration-scenario-aio-overview:

View File

@ -210,7 +210,8 @@ Use the correct hostname and IP address for your environment.
controller0: 192.168.33.3 controller0: 192.168.33.3
The default OS distribution in Kayobe is CentOS. If using an Ubuntu host, set The default OS distribution in Kayobe is CentOS. If using an Ubuntu host, set
the ``os_distribution`` variable in ``etc/kayobe/globals.yml`` to ``ubuntu``. the ``os_distribution`` variable in ``etc/kayobe/globals.yml`` to ``ubuntu``
or ``rocky`` if using Rocky Linux..
.. code-block:: yaml .. code-block:: yaml
:caption: ``etc/kayobe/globals.yml`` :caption: ``etc/kayobe/globals.yml``
@ -218,9 +219,9 @@ the ``os_distribution`` variable in ``etc/kayobe/globals.yml`` to ``ubuntu``.
os_distribution: "ubuntu" os_distribution: "ubuntu"
Kayobe uses a bootstrap user to create a ``stack`` user account. By default, Kayobe uses a bootstrap user to create a ``stack`` user account. By default,
this user is ``centos`` on CentOS, and ``ubuntu`` on Ubuntu, in line with the this user is ``centos`` on CentOS, ``rocky`` on Rocky and ``ubuntu`` on Ubuntu,
default user in the official cloud images. If you are using a different in line with the default user in the official cloud images. If you are using
bootstrap user, set the ``controller_bootstrap_user`` variable in a different bootstrap user, set the ``controller_bootstrap_user`` variable in
``etc/kayobe/controllers.yml``. For example, to set it to ``cloud-user`` (as ``etc/kayobe/controllers.yml``. For example, to set it to ``cloud-user`` (as
seen in MAAS): seen in MAAS):

View File

@ -18,7 +18,7 @@ running kayobe's tests.
sudo apt-get install build-essential python3-dev libssl-dev python3-pip git sudo apt-get install build-essential python3-dev libssl-dev python3-pip git
* Fedora or CentOS/RHEL 8:: * Fedora or CentOS/Rocky 8/RHEL 8::
sudo dnf install python3-devel openssl-devel python3-pip git gcc sudo dnf install python3-devel openssl-devel python3-pip git gcc

View File

@ -102,10 +102,10 @@ VM Provisioning
bare metal host or a VM provisioned outside of Kayobe, this step may be bare metal host or a VM provisioned outside of Kayobe, this step may be
skipped. Ensure that the Ansible inventory contains a host for the seed. skipped. Ensure that the Ansible inventory contains a host for the seed.
The seed hypervisor should have CentOS or Ubuntu with ``libvirt`` installed. The seed hypervisor should have CentOS or Rocky or Ubuntu with ``libvirt``
It should have ``libvirt`` networks configured for all networks that the seed installed. It should have ``libvirt`` networks configured for all networks
VM needs access to and a ``libvirt`` storage pool available for the seed VM's that the seed VM needs access to and a ``libvirt`` storage pool available
volumes. To provision the seed VM:: for the seed VM's volumes. To provision the seed VM::
(kayobe) $ kayobe seed vm provision (kayobe) $ kayobe seed vm provision
@ -175,6 +175,11 @@ This command will also build the Operating System image that will be used to
deploy the overcloud nodes using Disk Image Builder (DIB), unless deploy the overcloud nodes using Disk Image Builder (DIB), unless
``overcloud_dib_build_host_images`` is set to ``True``. ``overcloud_dib_build_host_images`` is set to ``True``.
.. note::
If you are using Rocky Linux - building of the Operating System image
needs to be done using ``kayobe overcloud host image build``.
To deploy the seed services in containers:: To deploy the seed services in containers::
(kayobe) $ kayobe seed service deploy (kayobe) $ kayobe seed service deploy
@ -224,7 +229,8 @@ Building Overcloud Host Disk Images
.. note:: .. note::
This step is only relevant if ``overcloud_dib_build_host_images`` is set to This step is only relevant if ``overcloud_dib_build_host_images`` is set to
``True``. By default, a host disk image is automatically built by Bifrost. ``True``. By default, a host disk image is automatically built by Bifrost
unless you're running Rocky Linux - which requires this step.
Host disk images are deployed on overcloud hosts during provisioning. To build Host disk images are deployed on overcloud hosts during provisioning. To build
host disk images:: host disk images::

View File

@ -16,6 +16,7 @@ Currently Kayobe supports the following Operating Systems on the Ansible
control host: control host:
- CentOS Stream 8 (since Wallaby 10.0.0 release) - CentOS Stream 8 (since Wallaby 10.0.0 release)
- Rocky Linux 8 (since Yoga 12.0.0 release)
- Ubuntu Focal 20.04 (since Wallaby 10.0.0 release) - Ubuntu Focal 20.04 (since Wallaby 10.0.0 release)
See the :doc:`support matrix <support-matrix>` for details of supported See the :doc:`support matrix <support-matrix>` for details of supported
@ -27,7 +28,7 @@ it is recommended to install Kayobe in a virtualenv. Ensure that the
necessary to install the GCC compiler chain in order to build the extensions of necessary to install the GCC compiler chain in order to build the extensions of
some of kayobe's python dependencies. some of kayobe's python dependencies.
On CentOS:: On CentOS/Rocky::
$ dnf install -y python3-devel python3-virtualenv gcc libffi-devel $ dnf install -y python3-devel python3-virtualenv gcc libffi-devel
@ -38,7 +39,7 @@ On Ubuntu::
If installing Kayobe from source, then Git is required for cloning and working If installing Kayobe from source, then Git is required for cloning and working
with the source code repository. with the source code repository.
On CentOS:: On CentOS/Rocky::
$ dnf install -y git $ dnf install -y git

View File

@ -10,6 +10,7 @@ Supported Operating Systems
Kayobe supports the following host Operating Systems (OS): Kayobe supports the following host Operating Systems (OS):
* CentOS Stream 8 (since Wallaby 10.0.0 release) * CentOS Stream 8 (since Wallaby 10.0.0 release)
* Rocky Linux 8 (since Yoga 12.0.0 release)
* Ubuntu Focal 20.04 (since Wallaby 10.0.0 release) * Ubuntu Focal 20.04 (since Wallaby 10.0.0 release)
.. note:: .. note::

View File

@ -12,12 +12,18 @@
# Whether or not to use a local Yum mirror. Default value is 'false'. # Whether or not to use a local Yum mirror. Default value is 'false'.
#dnf_use_local_mirror: #dnf_use_local_mirror:
# Mirror FQDN for Yum repos. Default value is 'mirror.centos.org'. # Mirror FQDN for Yum CentOS repos. Default value is 'mirror.centos.org'.
#dnf_centos_mirror_host: #dnf_centos_mirror_host:
# Mirror directory for Yum CentOS repos. Default value is 'centos'. # Mirror directory for Yum CentOS repos. Default value is 'centos'.
#dnf_centos_mirror_directory: #dnf_centos_mirror_directory:
# Mirror FQDN for Yum Rocky repos. Default value is 'dl.rockylinux.org'.
#dnf_rocky_mirror_host:
# Mirror directory for Yum Rocky repos. Default value is 'pub/rocky'.
#dnf_rocky_mirror_directory:
# Mirror FQDN for Yum EPEL repos. Default value is # Mirror FQDN for Yum EPEL repos. Default value is
# 'download.fedoraproject.org'. # 'download.fedoraproject.org'.
#dnf_epel_mirror_host: #dnf_epel_mirror_host:

View File

@ -45,12 +45,13 @@
############################################################################### ###############################################################################
# OS distribution. # OS distribution.
# OS distribution name. Valid options are "centos", "ubuntu". Default is # OS distribution name. Valid options are "centos", "rocky", "ubuntu". Default
# "centos". # is "centos".
#os_distribution: #os_distribution:
# OS release. Valid options are "8-stream" when os_distribution is "centos", or # OS release. Valid options are "8-stream" when os_distribution is "centos", or
# "focal" when os_distribution is "ubuntu". # "8" when os_distribution is "rocky", or "focal" when os_distribution is
# "ubuntu".
#os_release: #os_release:
############################################################################### ###############################################################################

View File

@ -32,6 +32,9 @@
# Base image for the infra VM root volume. Default is # Base image for the infra VM root volume. Default is
# "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img" # "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img"
# when os_distribution is "ubuntu", or # when os_distribution is "ubuntu", or
# http://dl.rockylinux.org/pub/rocky/8.5/images/Rocky-8-GenericCloud-8.5-20211114.2.x86_64.qcow2
# when os_distribution is "rocky",
# or
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2" # "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2"
# otherwise. # otherwise.
#infra_vm_root_image: #infra_vm_root_image:

View File

@ -62,7 +62,8 @@
# Kolla configuration. # Kolla configuration.
# Kolla base container image distribution. Options are "centos", "debian", # Kolla base container image distribution. Options are "centos", "debian",
# "ubuntu". Default is {{ os_distribution }}. # "ubuntu". Default is
# {{ 'centos' if os_distribution == 'rocky' else os_distribution }}.
#kolla_base_distro: #kolla_base_distro:
# Kolla container image type: binary or source. Default is 'source'. # Kolla container image type: binary or source. Default is 'source'.

View File

@ -7,7 +7,7 @@
# Whether to build host disk images with DIB directly instead of through # Whether to build host disk images with DIB directly instead of through
# Bifrost. Setting it to true disables Bifrost image build and allows images to # Bifrost. Setting it to true disables Bifrost image build and allows images to
# be built with the `kayobe overcloud host image build` command. Default value # be built with the `kayobe overcloud host image build` command. Default value
# is False. This will change in a future release. # is {{ os_distribution == 'rocky' }}. This will change in a future release.
#overcloud_dib_build_host_images: #overcloud_dib_build_host_images:
# List of overcloud host disk images to build. Each element is a dict defining # List of overcloud host disk images to build. Each element is a dict defining
@ -18,7 +18,8 @@
# "packages": "{{ overcloud_dib_packages }}"}. # "packages": "{{ overcloud_dib_packages }}"}.
#overcloud_dib_host_images: #overcloud_dib_host_images:
# DIB base OS element. Default is {{ os_distribution }}. # DIB base OS element. Default is {{ 'rocky-container' if os_distribution ==
# 'rocky' else os_distribution }}.
#overcloud_dib_os_element: #overcloud_dib_os_element:
# DIB image OS release. Default is {{ os_release }}. # DIB image OS release. Default is {{ os_release }}.
@ -26,8 +27,11 @@
# List of default DIB elements. Default is ["centos", "cloud-init-datasources", # List of default DIB elements. Default is ["centos", "cloud-init-datasources",
# "disable-selinux", "enable-serial-console", "vm"] when # "disable-selinux", "enable-serial-console", "vm"] when
# overcloud_dib_os_element is "centos", or ["ubuntu", "cloud-init-datasources", # overcloud_dib_os_element is "centos", or ["rocky-container",
# "enable-serial-console", "vm"] when overcloud_dib_os_element is "ubuntu". # "cloud-init-datasources", "disable-selinux", "enable-serial-console", "vm"]
# when overcloud_dib_os_element is "rocky" or
# ["ubuntu", "cloud-init-datasources", "enable-serial-console", "vm"]
# when overcloud_dib_os_element is "ubuntu".
#overcloud_dib_elements_default: #overcloud_dib_elements_default:
# List of additional DIB elements. Default is none. # List of additional DIB elements. Default is none.
@ -39,8 +43,9 @@
# DIB default environment variables. Default is # DIB default environment variables. Default is
# {"DIB_BOOTLOADER_DEFAULT_CMDLINE": "nofb nomodeset gfxpayload=text # {"DIB_BOOTLOADER_DEFAULT_CMDLINE": "nofb nomodeset gfxpayload=text
# net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive", "DIB_RELEASE": # net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive",
# "{{ overcloud_dib_os_release }}"}. # "DIB_CONTAINERFILE_RUNTIME": "docker", "DIB_CONTAINERFILE_NETWORK_DRIVER":
# "host", "DIB_RELEASE": "{{ overcloud_dib_os_release }}"}.
#overcloud_dib_env_vars_default: #overcloud_dib_env_vars_default:
# DIB additional environment variables. Default is none. # DIB additional environment variables. Default is none.

View File

@ -25,7 +25,10 @@
# Base image for the seed VM root volume. Default is # Base image for the seed VM root volume. Default is
# "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img" # "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img"
# when os_distribution is "ubuntu", or # when os_distribution is "ubuntu",
# http://dl.rockylinux.org/pub/rocky/8.5/images/Rocky-8-GenericCloud-8.5-20211114.2.x86_64.qcow2
# when os_distribution is "rocky",
# or
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2" # "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2"
# otherwise. # otherwise.
#seed_vm_root_image: #seed_vm_root_image:

View File

@ -36,7 +36,7 @@
selinux: selinux:
state: disabled state: disabled
become: True become: True
when: ansible_os_family == 'RedHat' when: ansible_os_family in ['RedHat', 'Rocky']
# NOTE(mgoddard): Use the name zz-overrides.yml to ensure this takes # NOTE(mgoddard): Use the name zz-overrides.yml to ensure this takes
# precedence over the standard config files. # precedence over the standard config files.

View File

@ -40,7 +40,7 @@ test_net_eth_vlan_routes:
gateway: 192.168.35.254 gateway: 192.168.35.254
table: kayobe-test-route-table table: kayobe-test-route-table
test_net_eth_vlan_rules: test_net_eth_vlan_rules:
{% if ansible_os_family == 'RedHat' %} {% if ansible_os_family in ['RedHat', 'Rocky'] %}
- from 192.168.35.0/24 table kayobe-test-route-table - from 192.168.35.0/24 table kayobe-test-route-table
{% else %} {% else %}
- from: 192.168.35.0/24 - from: 192.168.35.0/24
@ -107,13 +107,15 @@ docker_storage_driver: devicemapper
# Set Honolulu time. # Set Honolulu time.
timezone: Pacific/Honolulu timezone: Pacific/Honolulu
{% if ansible_os_family == 'RedHat' %} {% if ansible_os_family in ['RedHat', 'Rocky'] %}
# Use a local DNF mirror. # Use a local DNF mirror.
dnf_use_local_mirror: true dnf_use_local_mirror: true
{% if ansible_distribution == 'CentOS' %}
# Mirror FQDN for DNF repos. # Mirror FQDN for DNF repos.
dnf_centos_mirror_host: "{{ zuul_site_mirror_fqdn }}" dnf_centos_mirror_host: "{{ zuul_site_mirror_fqdn }}"
# Mirror directory for DNF CentOS repos. # Mirror directory for DNF CentOS repos.
dnf_centos_mirror_directory: 'centos' dnf_centos_mirror_directory: 'centos'
{% endif %}
# Mirror FQDN for DNF EPEL repos. # Mirror FQDN for DNF EPEL repos.
dnf_epel_mirror_host: "{{ zuul_site_mirror_fqdn }}" dnf_epel_mirror_host: "{{ zuul_site_mirror_fqdn }}"
# Mirror directory for DNF EPEL repos. # Mirror directory for DNF EPEL repos.

View File

@ -12,14 +12,17 @@ import pytest
def _is_firewalld_supported(): def _is_firewalld_supported():
info = distro.linux_distribution() info = distro.id()
return info[0].startswith('CentOS') return info in ['centos', 'rocky']
def _is_dnf(): def _is_dnf():
info = distro.linux_distribution() info = distro.id()
return info[0].startswith('CentOS') return info in ['centos', 'rocky']
def _is_dnf_mirror():
info = distro.id()
return info == 'centos'
def test_network_ethernet(host): def test_network_ethernet(host):
interface = host.interface('dummy2') interface = host.interface('dummy2')
@ -162,7 +165,8 @@ def test_ntp_running(host):
def test_ntp_non_default_time_server(host): def test_ntp_non_default_time_server(host):
# Tests that the NTP pool has been changed from pool.ntp.org to # Tests that the NTP pool has been changed from pool.ntp.org to
# time.cloudflare.com # time.cloudflare.com
if 'centos' in host.system_info.distribution.lower(): if ('centos' in host.system_info.distribution.lower() or
'rocky' in host.system_info.distribution.lower()):
chrony_config = host.file("/etc/chrony.conf") chrony_config = host.file("/etc/chrony.conf")
else: else:
# Debian based distributions use the following path # Debian based distributions use the following path
@ -179,7 +183,7 @@ def test_ntp_clock_synchronized(host):
@pytest.mark.parametrize('repo', ["appstream", "baseos", "extras", "epel", @pytest.mark.parametrize('repo', ["appstream", "baseos", "extras", "epel",
"epel-modular"]) "epel-modular"])
@pytest.mark.skipif(not _is_dnf(), reason="DNF only supported on CentOS 8") @pytest.mark.skipif(not _is_dnf_mirror(), reason="DNF OpenDev mirror only for CentOS 8")
def test_dnf_local_package_mirrors(host, repo): def test_dnf_local_package_mirrors(host, repo):
# Depends on SITE_MIRROR_FQDN environment variable. # Depends on SITE_MIRROR_FQDN environment variable.
assert os.getenv('SITE_MIRROR_FQDN') assert os.getenv('SITE_MIRROR_FQDN')
@ -191,14 +195,14 @@ def test_dnf_local_package_mirrors(host, repo):
assert os.getenv('SITE_MIRROR_FQDN') in info assert os.getenv('SITE_MIRROR_FQDN') in info
@pytest.mark.skipif(not _is_dnf(), reason="DNF only supported on CentOS 8") @pytest.mark.skipif(not _is_dnf(), reason="DNF only supported on CentOS 8/Rocky 8")
def test_dnf_custom_package_repository_is_available(host): def test_dnf_custom_package_repository_is_available(host):
with host.sudo(): with host.sudo():
host.check_output("dnf -y install td-agent") host.check_output("dnf -y install td-agent")
assert host.package("td-agent").is_installed assert host.package("td-agent").is_installed
@pytest.mark.skipif(not _is_dnf(), reason="DNF only supported on CentOS 8") @pytest.mark.skipif(not _is_dnf(), reason="DNF only supported on CentOS 8/Rocky 8")
def test_dnf_automatic(host): def test_dnf_automatic(host):
assert host.package("dnf-automatic").is_installed assert host.package("dnf-automatic").is_installed
assert host.service("dnf-automatic.timer").is_enabled assert host.service("dnf-automatic.timer").is_enabled
@ -206,14 +210,14 @@ def test_dnf_automatic(host):
@pytest.mark.skipif(not _is_dnf(), @pytest.mark.skipif(not _is_dnf(),
reason="tuned profile setting only supported on CentOS 8") reason="tuned profile setting only supported on CentOS 8/Rocky 8")
def test_tuned_profile_is_active(host): def test_tuned_profile_is_active(host):
tuned_output = host.check_output("tuned-adm active") tuned_output = host.check_output("tuned-adm active")
assert "throughput-performance" in tuned_output assert "throughput-performance" in tuned_output
@pytest.mark.skipif(not _is_firewalld_supported(), @pytest.mark.skipif(not _is_firewalld_supported(),
reason="Firewalld only supported on CentOS") reason="Firewalld only supported on CentOS and Rocky")
def test_firewalld_running(host): def test_firewalld_running(host):
assert host.package("firewalld").is_installed assert host.package("firewalld").is_installed
assert host.service("firewalld.service").is_enabled assert host.service("firewalld.service").is_enabled
@ -221,7 +225,7 @@ def test_firewalld_running(host):
@pytest.mark.skipif(not _is_firewalld_supported(), @pytest.mark.skipif(not _is_firewalld_supported(),
reason="Firewalld only supported on CentOS") reason="Firewalld only supported on CentOS and Rocky")
def test_firewalld_zones(host): def test_firewalld_zones(host):
# Verify that interfaces are on correct zones. # Verify that interfaces are on correct zones.
expected_zones = { expected_zones = {
@ -244,7 +248,7 @@ def test_firewalld_zones(host):
@pytest.mark.skipif(not _is_firewalld_supported(), @pytest.mark.skipif(not _is_firewalld_supported(),
reason="Firewalld only supported on CentOS") reason="Firewalld only supported on CentOS and Rocky")
def test_firewalld_rules(host): def test_firewalld_rules(host):
# Verify that expected rules are present. # Verify that expected rules are present.
expected_info = { expected_info = {

View File

@ -54,3 +54,5 @@ configdrive_debian_network_interfaces_supports_glob: false
# are using for SSH to be removed. Use a dummy interface. # are using for SSH to be removed. Use a dummy interface.
aio_bridge_ports: aio_bridge_ports:
- dummy1 - dummy1
overcloud_dib_build_host_images: False

View File

@ -36,7 +36,7 @@
selinux: selinux:
state: disabled state: disabled
become: True become: True
when: ansible_os_family == 'RedHat' when: ansible_os_family in ['RedHat', 'Rocky']
# NOTE(mgoddard): Use the name zz-overrides.yml to ensure this takes # NOTE(mgoddard): Use the name zz-overrides.yml to ensure this takes
# precedence over the standard config files. # precedence over the standard config files.

View File

@ -0,0 +1,4 @@
---
features:
- |
Adds support for Rocky Linux 8 as Host OS.

View File

@ -17,5 +17,5 @@
- name: Enable the EPEL repository - name: Enable the EPEL repository
command: dnf config-manager --disable epel command: dnf config-manager --disable epel
when: ansible_os_family == 'RedHat' when: ansible_os_family in ['RedHat', 'Rocky']
become: true become: true

View File

@ -104,6 +104,11 @@
parent: kayobe-overcloud-base parent: kayobe-overcloud-base
nodeset: kayobe-centos8s nodeset: kayobe-centos8s
- job:
name: kayobe-overcloud-rocky8
parent: kayobe-overcloud-base
nodeset: kayobe-rocky8
- job: - job:
name: kayobe-overcloud-ubuntu-focal name: kayobe-overcloud-ubuntu-focal
parent: kayobe-overcloud-base parent: kayobe-overcloud-base
@ -158,6 +163,11 @@
parent: kayobe-seed-base parent: kayobe-seed-base
nodeset: kayobe-centos8s nodeset: kayobe-centos8s
- job:
name: kayobe-seed-rocky8
parent: kayobe-seed-base
nodeset: kayobe-rocky8
- job: - job:
name: kayobe-seed-ubuntu-focal name: kayobe-seed-ubuntu-focal
parent: kayobe-seed-base parent: kayobe-seed-base
@ -179,6 +189,11 @@
parent: kayobe-overcloud-host-configure-base parent: kayobe-overcloud-host-configure-base
nodeset: kayobe-centos8s nodeset: kayobe-centos8s
- job:
name: kayobe-overcloud-host-configure-rocky8
parent: kayobe-overcloud-host-configure-base
nodeset: kayobe-rocky8
- job: - job:
name: kayobe-overcloud-host-configure-ubuntu-focal name: kayobe-overcloud-host-configure-ubuntu-focal
parent: kayobe-overcloud-host-configure-base parent: kayobe-overcloud-host-configure-base
@ -223,6 +238,11 @@
parent: kayobe-seed-vm-base parent: kayobe-seed-vm-base
nodeset: kayobe-centos8s nodeset: kayobe-centos8s
- job:
name: kayobe-seed-vm-rocky8
parent: kayobe-seed-vm-base
nodeset: kayobe-rocky8
- job: - job:
name: kayobe-seed-vm-ubuntu-focal name: kayobe-seed-vm-ubuntu-focal
parent: kayobe-seed-vm-base parent: kayobe-seed-vm-base
@ -245,6 +265,11 @@
parent: kayobe-infra-vm-base parent: kayobe-infra-vm-base
nodeset: kayobe-centos8s nodeset: kayobe-centos8s
- job:
name: kayobe-infra-vm-rocky8
parent: kayobe-infra-vm-base
nodeset: kayobe-rocky8
- job: - job:
name: kayobe-infra-vm-ubuntu-focal name: kayobe-infra-vm-ubuntu-focal
parent: kayobe-infra-vm-base parent: kayobe-infra-vm-base

View File

@ -5,6 +5,13 @@
- name: primary - name: primary
label: centos-8-stream label: centos-8-stream
- nodeset:
name: kayobe-rocky8
nodes:
- name: primary
label: rockylinux-8
- nodeset: - nodeset:
name: kayobe-ubuntu-focal name: kayobe-ubuntu-focal
nodes: nodes:

View File

@ -11,19 +11,24 @@
- kayobe-tox-ansible - kayobe-tox-ansible
- kayobe-tox-molecule - kayobe-tox-molecule
- kayobe-overcloud-centos8s - kayobe-overcloud-centos8s
- kayobe-overcloud-rocky8
- kayobe-overcloud-ubuntu-focal - kayobe-overcloud-ubuntu-focal
- kayobe-overcloud-tls-centos8s - kayobe-overcloud-tls-centos8s
- kayobe-overcloud-host-configure-centos8s - kayobe-overcloud-host-configure-centos8s
- kayobe-overcloud-host-configure-rocky8
- kayobe-overcloud-host-configure-ubuntu-focal - kayobe-overcloud-host-configure-ubuntu-focal
- kayobe-overcloud-upgrade-centos8s - kayobe-overcloud-upgrade-centos8s
- kayobe-overcloud-upgrade-ubuntu-focal - kayobe-overcloud-upgrade-ubuntu-focal
- kayobe-seed-centos8s - kayobe-seed-centos8s
- kayobe-seed-rocky8
- kayobe-seed-ubuntu-focal - kayobe-seed-ubuntu-focal
- kayobe-seed-upgrade-centos8s - kayobe-seed-upgrade-centos8s
- kayobe-seed-upgrade-ubuntu-focal - kayobe-seed-upgrade-ubuntu-focal
- kayobe-seed-vm-centos8s - kayobe-seed-vm-centos8s
- kayobe-seed-vm-rocky8
- kayobe-seed-vm-ubuntu-focal - kayobe-seed-vm-ubuntu-focal
- kayobe-infra-vm-centos8s - kayobe-infra-vm-centos8s
- kayobe-infra-vm-rocky8
- kayobe-infra-vm-ubuntu-focal - kayobe-infra-vm-ubuntu-focal
gate: gate:
@ -33,17 +38,22 @@
- kayobe-tox-ansible - kayobe-tox-ansible
- kayobe-tox-molecule - kayobe-tox-molecule
- kayobe-overcloud-centos8s - kayobe-overcloud-centos8s
- kayobe-overcloud-rocky8
- kayobe-overcloud-ubuntu-focal - kayobe-overcloud-ubuntu-focal
- kayobe-overcloud-tls-centos8s - kayobe-overcloud-tls-centos8s
- kayobe-overcloud-host-configure-centos8s - kayobe-overcloud-host-configure-centos8s
- kayobe-overcloud-host-configure-rocky8
- kayobe-overcloud-host-configure-ubuntu-focal - kayobe-overcloud-host-configure-ubuntu-focal
- kayobe-overcloud-upgrade-centos8s - kayobe-overcloud-upgrade-centos8s
- kayobe-overcloud-upgrade-ubuntu-focal - kayobe-overcloud-upgrade-ubuntu-focal
- kayobe-seed-centos8s - kayobe-seed-centos8s
- kayobe-seed-rocky8
- kayobe-seed-ubuntu-focal - kayobe-seed-ubuntu-focal
- kayobe-seed-upgrade-centos8s - kayobe-seed-upgrade-centos8s
- kayobe-seed-upgrade-ubuntu-focal - kayobe-seed-upgrade-ubuntu-focal
- kayobe-seed-vm-centos8s - kayobe-seed-vm-centos8s
- kayobe-seed-vm-rocky8
- kayobe-seed-vm-ubuntu-focal - kayobe-seed-vm-ubuntu-focal
- kayobe-infra-vm-centos8s - kayobe-infra-vm-centos8s
- kayobe-infra-vm-rocky8
- kayobe-infra-vm-ubuntu-focal - kayobe-infra-vm-ubuntu-focal