Merge "Add support for Rocky Linux 8"

This commit is contained in:
Zuul 2022-03-20 22:20:24 +00:00 committed by Gerrit Code Review
commit 4616c87010
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'.
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'
# Mirror directory for Yum CentOS repos. Default value is '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
# 'download.fedoraproject.org'.
dnf_epel_mirror_host: 'download.fedoraproject.org'

View File

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

View File

@ -43,11 +43,16 @@ infra_vm_root_format: qcow2
# Base image for the infra VM root volume. Default is
# "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img"
# 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"
# otherwise.
infra_vm_root_image: >-
{%- if os_distribution == 'ubuntu' %}
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 -%}
https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2
{%- endif %}

View File

@ -53,8 +53,9 @@ kolla_node_custom_config_path: "{{ kolla_config_path }}/config"
# Kolla configuration.
# Kolla base container image distribution. Options are "centos", "debian",
# "ubuntu". Default is {{ os_distribution }}.
kolla_base_distro: "{{ os_distribution }}"
# "ubuntu". Default is
# {{ '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_install_type: "source"

View File

@ -7,8 +7,8 @@
# 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
# be built with the `kayobe overcloud host image build` command. Default value
# is False. This will change in a future release.
overcloud_dib_build_host_images: False
# is {{ os_distribution == 'rocky' }}. This will change in a future release.
overcloud_dib_build_host_images: "{{ os_distribution == 'rocky' }}"
# 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
@ -22,20 +22,24 @@ overcloud_dib_host_images:
env: "{{ overcloud_dib_env_vars }}"
packages: "{{ overcloud_dib_packages }}"
# DIB base OS element. Default is {{ os_distribution }}.
overcloud_dib_os_element: "{{ os_distribution }}"
# DIB base OS element. Default is {{ 'rocky-container' if 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 }}.
overcloud_dib_os_release: "{{ os_release }}"
# List of default DIB elements. Default is ["centos", "cloud-init-datasources",
# "disable-selinux", "enable-serial-console", "vm"] when
# overcloud_dib_os_element is "centos", or ["ubuntu", "cloud-init-datasources",
# "enable-serial-console", "vm"] when overcloud_dib_os_element is "ubuntu".
# overcloud_dib_os_element is "centos", or ["rocky-container",
# "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_os_element }}"
- "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"
- "vm"
@ -48,11 +52,14 @@ overcloud_dib_elements: "{{ overcloud_dib_elements_default | select | list + ove
# DIB default environment variables. Default is
# {"DIB_BOOTLOADER_DEFAULT_CMDLINE": "nofb nomodeset gfxpayload=text
# net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive", "DIB_RELEASE":
# "{{ overcloud_dib_os_release }}"}.
# net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive",
# "DIB_CONTAINERFILE_RUNTIME": "docker", "DIB_CONTAINERFILE_NETWORK_DRIVER":
# "host", "DIB_RELEASE": "{{ overcloud_dib_os_release }}"}.
overcloud_dib_env_vars_default:
DIB_BOOTLOADER_DEFAULT_CMDLINE: "nofb nomodeset gfxpayload=text net.ifnames=1"
DIB_CLOUD_INIT_DATASOURCES: "ConfigDrive"
DIB_CONTAINERFILE_RUNTIME: "docker"
DIB_CONTAINERFILE_NETWORK_DRIVER: "host"
DIB_RELEASE: "{{ overcloud_dib_os_release }}"
# 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
# "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"
# otherwise.
seed_vm_root_image: >-
{%- if os_distribution == 'ubuntu' %}
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 -%}
https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2
{%- endif %}

View File

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

View File

@ -26,9 +26,9 @@ It is possible to update packages on the infrastructure VMs.
Package Repositories
--------------------
If using custom DNF package repositories on CentOS, it may be necessary to
update these prior to running a package update. To do this, update the
configuration in ``${KAYOBE_CONFIG_PATH}/dnf.yml`` and run the following
If using custom DNF package repositories on CentOS or Rocky, it may be
necessary to update these prior to running a package update. To do this, update
the configuration in ``${KAYOBE_CONFIG_PATH}/dnf.yml`` and run the following
command::
(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
--------------------
If using custom DNF package repositories on CentOS, it may be necessary to
update these prior to running a package update. To do this, update the
configuration in ``${KAYOBE_CONFIG_PATH}/dnf.yml`` and run the following
If using custom DNF package repositories on CentOS or Rocky, it may be
necessary to update these prior to running a package update. To do this, update
the configuration in ``${KAYOBE_CONFIG_PATH}/dnf.yml`` and run the following
command::
(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
--------------------
If using custom DNF package repositories on CentOS, it may be necessary to
update these prior to running a package update. To do this, update the
configuration in ``${KAYOBE_CONFIG_PATH}/dnf.yml`` and run the following
If using custom DNF package repositories on CentOS or Rocky, it may be
necessary to update these prior to running a package update. To do this, update
the configuration in ``${KAYOBE_CONFIG_PATH}/dnf.yml`` and run the following
command::
(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
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.
``centos`` or ``ubuntu``. This user defaults to the ``os_distribution``
variable, but may be set via the following variables:
``centos``, ``rocky`` or ``ubuntu``. This user defaults to the
``os_distribution`` variable, but may be set via the following variables:
* ``seed_hypervisor_bootstrap_user``
* ``seed_bootstrap_user``
@ -211,8 +211,8 @@ DNF Package Repositories
*tags:*
| ``dnf``
On CentOS, Kayobe supports configuration of package repositories via DNF, via
variables in ``${KAYOBE_CONFIG_PATH}/dnf.yml``.
On CentOS and Rocky, Kayobe supports configuration of package repositories via
DNF, via variables in ``${KAYOBE_CONFIG_PATH}/dnf.yml``.
Configuration of dnf.conf
-------------------------
@ -227,18 +227,25 @@ section of the file. For example, to configure DNF to use a proxy server:
dnf_config:
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
``true``. CentOS repository mirrors are configured via the following
variables:
CentOS/Rocky and EPEL mirrors can be enabled by setting
``dnf_use_local_mirror`` to ``true``. CentOS repository mirrors are configured
via the following variables:
* ``dnf_centos_mirror_host`` (default ``mirror.centos.org``) is the mirror
hostname.
* ``dnf_centos_mirror_directory`` (default ``centos``) is a directory on the
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:
* ``dnf_epel_mirror_host`` (default ``download.fedoraproject.org``) is the
@ -327,7 +334,7 @@ SELinux
*tags:*
| ``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
Kayobe. If necessary, Kayobe will reboot systems in order to apply a change to
@ -348,12 +355,12 @@ Firewalld
*tags:*
| ``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.
Firewalld can be used to provide a firewall on CentOS systems. Since the Xena
release, Kayobe provides support for enabling or disabling firewalld, as well
as defining zones and rules.
Firewalld can be used to provide a firewall on CentOS/Rocky systems. Since the
Xena release, Kayobe provides support for enabling or disabling firewalld, as
well as defining zones and rules.
The following variables can be used to set whether to enable firewalld:
@ -446,7 +453,7 @@ Tuned
*tags:*
| ``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
can be used to set a ``tuned`` profile to specific types of hosts:

View File

@ -69,8 +69,8 @@ supported:
``rules``
List of IP routing rules.
On CentOS, each item should be a string describing an ``iproute2`` IP
routing rule.
On CentOS or Rocky, each item should be a string describing an ``iproute2``
IP routing rule.
On Ubuntu, each item should be a dict containing optional items ``from``,
``to``, ``priority`` and ``table``. ``from`` is the source address prefix
@ -272,10 +272,10 @@ Configuring IP Routing Policy Rules
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
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
<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
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 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 ``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:
@ -34,3 +36,13 @@ In the following example, we set the OS distribution to ``ubuntu``:
:caption: ``globals.yml``
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
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 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
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
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
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": "{{
overcloud_dib_env_vars }}", "packages": "{{ overcloud_dib_packages }}"}``.
``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``
DIB image OS release. Default is ``{{ os_release }}``.
``overcloud_dib_elements_default``
List of default DIB elements. Default is ``["centos",
"cloud-init-datasources", "disable-selinux", "enable-serial-console",
"vm"]`` when ``overcloud_dib_os_element`` is ``centos``, or ``["ubuntu",
"cloud-init-datasources", "enable-serial-console", "vm"]`` 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.
"vm"]`` when ``overcloud_dib_os_element`` is ``centos``, or
``["rocky-container", "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``. The ``vm`` element is
poorly named, and causes DIB to build a whole disk image rather than a
single partition.
``overcloud_dib_elements_extra``
List of additional DIB elements. Default is none.
``overcloud_dib_elements``
@ -67,8 +71,9 @@ the configuration drive built by Bifrost during provisioning.
``overcloud_dib_env_vars_default``
DIB default environment variables. Default is
``{"DIB_BOOTLOADER_DEFAULT_CMDLINE": "nofb nomodeset gfxpayload=text
net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive", "DIB_RELEASE":
"{{ overcloud_dib_os_release }}"}``.
net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive",
"DIB_CONTAINERFILE_RUNTIME": "docker", "DIB_CONTAINERFILE_NETWORK_DRIVER":
"host", DIB_RELEASE": "{{ overcloud_dib_os_release }}"}``.
``overcloud_dib_env_vars_extra``
DIB additional environment variables. Default is none.
``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
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
user will be used to run Kayobe commands. It will also be used by Kayobe to
bootstrap other user accounts.
in a cloud image (e.g. ``centos`` or ``rocky`` or ``ubuntu``) is typically
sufficient. This user will be used to run Kayobe commands. It will also be used
by Kayobe to bootstrap other user accounts.
.. _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
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
:caption: ``etc/kayobe/globals.yml``
@ -218,9 +219,9 @@ the ``os_distribution`` variable in ``etc/kayobe/globals.yml`` to ``ubuntu``.
os_distribution: "ubuntu"
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
default user in the official cloud images. If you are using a different
bootstrap user, set the ``controller_bootstrap_user`` variable in
this user is ``centos`` on CentOS, ``rocky`` on Rocky and ``ubuntu`` on Ubuntu,
in line with the default user in the official cloud images. If you are using
a different bootstrap user, set the ``controller_bootstrap_user`` variable in
``etc/kayobe/controllers.yml``. For example, to set it to ``cloud-user`` (as
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
* Fedora or CentOS/RHEL 8::
* Fedora or CentOS/Rocky 8/RHEL 8::
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
skipped. Ensure that the Ansible inventory contains a host for the seed.
The seed hypervisor should have CentOS or Ubuntu with ``libvirt`` installed.
It should have ``libvirt`` networks configured for all networks that the seed
VM needs access to and a ``libvirt`` storage pool available for the seed VM's
volumes. To provision the seed VM::
The seed hypervisor should have CentOS or Rocky or Ubuntu with ``libvirt``
installed. It should have ``libvirt`` networks configured for all networks
that the seed VM needs access to and a ``libvirt`` storage pool available
for the seed VM's volumes. To provision the seed VM::
(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
``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::
(kayobe) $ kayobe seed service deploy
@ -224,7 +229,8 @@ Building Overcloud Host Disk Images
.. note::
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::

View File

@ -16,6 +16,7 @@ Currently Kayobe supports the following Operating Systems on the Ansible
control host:
- 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)
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
some of kayobe's python dependencies.
On CentOS::
On CentOS/Rocky::
$ 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
with the source code repository.
On CentOS::
On CentOS/Rocky::
$ dnf install -y git

View File

@ -10,6 +10,7 @@ Supported Operating Systems
Kayobe supports the following host Operating Systems (OS):
* 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)
.. note::

View File

@ -12,12 +12,18 @@
# Whether or not to use a local Yum mirror. Default value is 'false'.
#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:
# Mirror directory for Yum CentOS repos. Default value is 'centos'.
#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
# 'download.fedoraproject.org'.
#dnf_epel_mirror_host:

View File

@ -45,12 +45,13 @@
###############################################################################
# OS distribution.
# OS distribution name. Valid options are "centos", "ubuntu". Default is
# "centos".
# OS distribution name. Valid options are "centos", "rocky", "ubuntu". Default
# is "centos".
#os_distribution:
# 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:
###############################################################################

View File

@ -32,6 +32,9 @@
# Base image for the infra VM root volume. Default is
# "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img"
# 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"
# otherwise.
#infra_vm_root_image:

View File

@ -62,7 +62,8 @@
# Kolla configuration.
# 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 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
# 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
# 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:
# List of overcloud host disk images to build. Each element is a dict defining
@ -18,7 +18,8 @@
# "packages": "{{ overcloud_dib_packages }}"}.
#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:
# DIB image OS release. Default is {{ os_release }}.
@ -26,8 +27,11 @@
# List of default DIB elements. Default is ["centos", "cloud-init-datasources",
# "disable-selinux", "enable-serial-console", "vm"] when
# overcloud_dib_os_element is "centos", or ["ubuntu", "cloud-init-datasources",
# "enable-serial-console", "vm"] when overcloud_dib_os_element is "ubuntu".
# overcloud_dib_os_element is "centos", or ["rocky-container",
# "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:
# List of additional DIB elements. Default is none.
@ -39,8 +43,9 @@
# DIB default environment variables. Default is
# {"DIB_BOOTLOADER_DEFAULT_CMDLINE": "nofb nomodeset gfxpayload=text
# net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive", "DIB_RELEASE":
# "{{ overcloud_dib_os_release }}"}.
# net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive",
# "DIB_CONTAINERFILE_RUNTIME": "docker", "DIB_CONTAINERFILE_NETWORK_DRIVER":
# "host", "DIB_RELEASE": "{{ overcloud_dib_os_release }}"}.
#overcloud_dib_env_vars_default:
# DIB additional environment variables. Default is none.

View File

@ -25,7 +25,10 @@
# Base image for the seed VM root volume. Default is
# "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"
# otherwise.
#seed_vm_root_image:

View File

@ -36,7 +36,7 @@
selinux:
state: disabled
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
# precedence over the standard config files.

View File

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

View File

@ -12,14 +12,17 @@ import pytest
def _is_firewalld_supported():
info = distro.linux_distribution()
return info[0].startswith('CentOS')
info = distro.id()
return info in ['centos', 'rocky']
def _is_dnf():
info = distro.linux_distribution()
return info[0].startswith('CentOS')
info = distro.id()
return info in ['centos', 'rocky']
def _is_dnf_mirror():
info = distro.id()
return info == 'centos'
def test_network_ethernet(host):
interface = host.interface('dummy2')
@ -168,7 +171,8 @@ def test_ntp_running(host):
def test_ntp_non_default_time_server(host):
# Tests that the NTP pool has been changed from pool.ntp.org to
# 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")
else:
# Debian based distributions use the following path
@ -185,7 +189,7 @@ def test_ntp_clock_synchronized(host):
@pytest.mark.parametrize('repo', ["appstream", "baseos", "extras", "epel",
"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):
# Depends on SITE_MIRROR_FQDN environment variable.
assert os.getenv('SITE_MIRROR_FQDN')
@ -197,14 +201,14 @@ def test_dnf_local_package_mirrors(host, repo):
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):
with host.sudo():
host.check_output("dnf -y install td-agent")
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):
assert host.package("dnf-automatic").is_installed
assert host.service("dnf-automatic.timer").is_enabled
@ -212,14 +216,14 @@ def test_dnf_automatic(host):
@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):
tuned_output = host.check_output("tuned-adm active")
assert "throughput-performance" in tuned_output
@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):
assert host.package("firewalld").is_installed
assert host.service("firewalld.service").is_enabled
@ -227,7 +231,7 @@ def test_firewalld_running(host):
@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):
# Verify that interfaces are on correct zones.
expected_zones = {
@ -250,7 +254,7 @@ def test_firewalld_zones(host):
@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):
# Verify that expected rules are present.
expected_info = {

View File

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

View File

@ -36,7 +36,7 @@
selinux:
state: disabled
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
# 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
command: dnf config-manager --disable epel
when: ansible_os_family == 'RedHat'
when: ansible_os_family in ['RedHat', 'Rocky']
become: true

View File

@ -107,6 +107,11 @@
parent: kayobe-overcloud-base
nodeset: kayobe-centos8s
- job:
name: kayobe-overcloud-rocky8
parent: kayobe-overcloud-base
nodeset: kayobe-rocky8
- job:
name: kayobe-overcloud-ubuntu-focal
parent: kayobe-overcloud-base
@ -161,6 +166,11 @@
parent: kayobe-seed-base
nodeset: kayobe-centos8s
- job:
name: kayobe-seed-rocky8
parent: kayobe-seed-base
nodeset: kayobe-rocky8
- job:
name: kayobe-seed-ubuntu-focal
parent: kayobe-seed-base
@ -182,6 +192,11 @@
parent: kayobe-overcloud-host-configure-base
nodeset: kayobe-centos8s
- job:
name: kayobe-overcloud-host-configure-rocky8
parent: kayobe-overcloud-host-configure-base
nodeset: kayobe-rocky8
- job:
name: kayobe-overcloud-host-configure-ubuntu-focal
parent: kayobe-overcloud-host-configure-base
@ -226,6 +241,11 @@
parent: kayobe-seed-vm-base
nodeset: kayobe-centos8s
- job:
name: kayobe-seed-vm-rocky8
parent: kayobe-seed-vm-base
nodeset: kayobe-rocky8
- job:
name: kayobe-seed-vm-ubuntu-focal
parent: kayobe-seed-vm-base
@ -248,6 +268,11 @@
parent: kayobe-infra-vm-base
nodeset: kayobe-centos8s
- job:
name: kayobe-infra-vm-rocky8
parent: kayobe-infra-vm-base
nodeset: kayobe-rocky8
- job:
name: kayobe-infra-vm-ubuntu-focal
parent: kayobe-infra-vm-base

View File

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

View File

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