Move to Rocky Linux 9

CentOS Stream 8 support has been dropped. Migration path will be present
in Yoga release - as a followup change.

MichaelRigart.interfaces does not support custom routes for
NetworkManager yet. It has been disabled in CI for Rocky Linux 9
temporarily.

Non-voting CentOS Stream 9 CI overcloud job is using RL9 container
images (as kolla CI is not building CS9 images anymore).

Change-Id: Idf5ee822b03ba40179803c981500a6bad37594bf
This commit is contained in:
Bartosz Bezak 2022-09-02 14:40:33 +02:00 committed by Pierre Riteau
parent ba38d7d6ce
commit 2f447f6545
51 changed files with 378 additions and 249 deletions

View File

@ -29,10 +29,10 @@ kolla_bifrost_dib_os_element: "{{ os_distribution }}"
kolla_bifrost_dib_os_release: "{{ os_release }}" kolla_bifrost_dib_os_release: "{{ os_release }}"
# List of default DIB elements. Default is ["disable-selinux", # List of default DIB elements. Default is ["disable-selinux",
# "enable-serial-console", "vm"] when os_distribution is "centos", or # "enable-serial-console", "vm"] when os_distribution is "centos" or "rocky",
# ["enable-serial-console", "vm"] otherwise. # ["enable-serial-console", "vm"] otherwise.
kolla_bifrost_dib_elements_default: kolla_bifrost_dib_elements_default:
- "{% if os_distribution == 'centos' %}disable-selinux{% endif %}" - "{% if os_distribution in ['centos', 'rocky'] %}disable-selinux{% endif %}"
- "enable-serial-console" - "enable-serial-console"
- "vm" - "vm"

View File

@ -7,23 +7,23 @@ 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 CentOS repos. Default value is 'mirror.centos.org'. # Mirror FQDN for DNF CentOS repos. Default value is 'mirror.stream.centos.org'.
dnf_centos_mirror_host: 'mirror.centos.org' dnf_centos_mirror_host: 'mirror.stream.centos.org'
# Mirror directory for Yum CentOS repos. Default value is 'centos'. # Mirror directory for DNF CentOS repos. Default value is ''.
dnf_centos_mirror_directory: 'centos' dnf_centos_mirror_directory: ''
# Mirror FQDN for Yum Rocky repos. Default value is 'dl.rockylinux.org'. # Mirror FQDN for DNF Rocky repos. Default value is 'dl.rockylinux.org'.
dnf_rocky_mirror_host: 'dl.rockylinux.org' dnf_rocky_mirror_host: 'dl.rockylinux.org'
# Mirror directory for Yum Rocky repos. Default value is 'pub/rocky'. # Mirror directory for DNF Rocky repos. Default value is 'pub/rocky'.
dnf_rocky_mirror_directory: 'pub/rocky' dnf_rocky_mirror_directory: 'pub/rocky'
# Mirror FQDN for Yum EPEL repos. Default value is # Mirror FQDN for DNF 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'
# Mirror directory for Yum EPEL repos. Default value is 'pub/epel'. # Mirror directory for DNF EPEL repos. Default value is 'pub/epel'.
dnf_epel_mirror_directory: 'pub/epel' dnf_epel_mirror_directory: 'pub/epel'
# A dict of custom repositories. # A dict of custom repositories.

View File

@ -45,15 +45,15 @@ kayobe_ansible_user: "stack"
# OS distribution. # OS distribution.
# OS distribution name. Valid options are "centos", "rocky", "ubuntu". Default # OS distribution name. Valid options are "centos", "rocky", "ubuntu". Default
# is "centos". # is "rocky".
os_distribution: "centos" os_distribution: "rocky"
# OS release. Valid options are "8-stream" when os_distribution is "centos", or # OS release. Valid options are "9-stream" when os_distribution is "centos", or
# "8" when os_distribution is "rocky", or "jammy" when os_distribution is # "9" when os_distribution is "rocky", or "jammy" when os_distribution is
# "ubuntu". # "ubuntu".
os_release: >- os_release: >-
{{ '8-stream' if os_distribution == 'centos' {{ '9-stream' if os_distribution == 'centos'
else '8' if os_distribution == 'rocky' else '9' if os_distribution == 'rocky'
else 'jammy' }} else 'jammy' }}
############################################################################### ###############################################################################

View File

@ -43,18 +43,18 @@ 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/jammy/current/jammy-server-cloudimg-amd64.img" # "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img"
# when os_distribution is "ubuntu", or # when os_distribution is "ubuntu", or
# https://dl.rockylinux.org/pub/rocky/8/images/Rocky-8-GenericCloud.latest.x86_64.qcow2 # https://dl.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud.latest.x86_64.qcow2
# when os_distribution is "rocky", # when os_distribution is "rocky",
# or # or
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20220913.0.x86_64.qcow2" # "https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-20221206.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/jammy/current/jammy-server-cloudimg-amd64.img https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
{%- elif os_distribution == 'rocky' %} {%- elif os_distribution == 'rocky' %}
https://dl.rockylinux.org/pub/rocky/8/images/Rocky-8-GenericCloud.latest.x86_64.qcow2 https://dl.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud.latest.x86_64.qcow2
{%- else -%} {%- else -%}
https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20220913.0.x86_64.qcow2 https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-20221206.0.x86_64.qcow2
{%- endif %} {%- endif %}
# Capacity of the infra VM data volume. # Capacity of the infra VM data volume.
@ -74,7 +74,7 @@ infra_vm_hypervisor: "{{ groups['seed-hypervisor'] | first }}"
infra_vm_wait_connection_ssh_extra_args: '-o StrictHostKeyChecking=no' infra_vm_wait_connection_ssh_extra_args: '-o StrictHostKeyChecking=no'
# OS family. Needed for config drive generation. # OS family. Needed for config drive generation.
infra_vm_os_family: "{{ 'RedHat' if os_distribution == 'centos' else 'Debian' }}" infra_vm_os_family: "{{ 'RedHat' if os_distribution in ['centos', 'rocky'] else 'Debian' }}"
############################################################################### ###############################################################################
# Infrastructure VM node configuration. # Infrastructure VM node configuration.

View File

@ -47,11 +47,9 @@ ipa_build_dib_elements: >
ipa_build_dib_env_default: ipa_build_dib_env_default:
# TODO(mgoddard): Use {{ os_release }} here when we use os_distribution # TODO(mgoddard): Use {{ os_release }} here when we use os_distribution
# above. # above.
DIB_RELEASE: "8-stream" DIB_RELEASE: "9-stream"
DIB_REPOLOCATION_ironic_python_agent: "{{ ipa_build_source_url }}" DIB_REPOLOCATION_ironic_python_agent: "{{ ipa_build_source_url }}"
DIB_REPOREF_ironic_python_agent: "{{ ipa_build_source_version }}" DIB_REPOREF_ironic_python_agent: "{{ ipa_build_source_version }}"
# TODO(priteau): Revert once we use c9s.
DIB_REPOREF_requirements: "stable/yoga"
# Dictionary of additional environment variables to provide to Diskimage # Dictionary of additional environment variables to provide to Diskimage
# Builder (DIB) during IPA image build. # Builder (DIB) during IPA image build.
@ -103,7 +101,7 @@ ipa_images_upstream_url_suffix: "-{{ openstack_branch | replace('/', '-') }}"
ipa_images_kernel_name: "ipa.kernel" ipa_images_kernel_name: "ipa.kernel"
# URL of Ironic deployment kernel image to download. # URL of Ironic deployment kernel image to download.
ipa_kernel_upstream_url: "https://tarballs.openstack.org/ironic-python-agent/dib/files/ipa-centos8{{ ipa_images_upstream_url_suffix }}.kernel" ipa_kernel_upstream_url: "https://tarballs.openstack.org/ironic-python-agent/dib/files/ipa-centos9{{ ipa_images_upstream_url_suffix }}.kernel"
# URL of checksum of Ironic deployment kernel image. # URL of checksum of Ironic deployment kernel image.
ipa_kernel_checksum_url: "{{ ipa_kernel_upstream_url }}.{{ ipa_kernel_checksum_algorithm }}" ipa_kernel_checksum_url: "{{ ipa_kernel_upstream_url }}.{{ ipa_kernel_checksum_algorithm }}"
@ -115,7 +113,7 @@ ipa_kernel_checksum_algorithm: "sha256"
ipa_images_ramdisk_name: "ipa.initramfs" ipa_images_ramdisk_name: "ipa.initramfs"
# URL of Ironic deployment ramdisk image to download. # URL of Ironic deployment ramdisk image to download.
ipa_ramdisk_upstream_url: "https://tarballs.openstack.org/ironic-python-agent/dib/files/ipa-centos8{{ ipa_images_upstream_url_suffix }}.initramfs" ipa_ramdisk_upstream_url: "https://tarballs.openstack.org/ironic-python-agent/dib/files/ipa-centos9{{ ipa_images_upstream_url_suffix }}.initramfs"
# URL of checksum of Ironic deployment ramdisk image. # URL of checksum of Ironic deployment ramdisk image.
ipa_ramdisk_checksum_url: "{{ ipa_ramdisk_upstream_url }}.{{ ipa_ramdisk_checksum_algorithm }}" ipa_ramdisk_checksum_url: "{{ ipa_ramdisk_upstream_url }}.{{ ipa_ramdisk_checksum_algorithm }}"

View File

@ -53,9 +53,8 @@ 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",
# "rocky", "ubuntu". Default is # "rocky", "ubuntu". Default is {{ os_distribution }}.
# {{ 'centos' if os_distribution == 'rocky' else os_distribution }}. kolla_base_distro: "{{ os_distribution }}"
kolla_base_distro: "{{ 'centos' if os_distribution == 'rocky' else os_distribution }}"
# Kolla base container image distribution version default map. # Kolla base container image distribution version default map.
# Defines default versions for each distribution. # Defines default versions for each distribution.

View File

@ -43,18 +43,18 @@ 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/jammy/current/jammy-server-cloudimg-amd64.img" # "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img"
# when os_distribution is "ubuntu", # when os_distribution is "ubuntu",
# https://dl.rockylinux.org/pub/rocky/8/images/Rocky-8-GenericCloud.latest.x86_64.qcow2 # https://dl.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud.latest.x86_64.qcow2
# when os_distribution is "rocky", # when os_distribution is "rocky",
# or # or
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20220913.0.x86_64.qcow2" # "https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-20221206.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/jammy/current/jammy-server-cloudimg-amd64.img https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
{%- elif os_distribution == 'rocky' %} {%- elif os_distribution == 'rocky' %}
https://dl.rockylinux.org/pub/rocky/8/images/Rocky-8-GenericCloud.latest.x86_64.qcow2 https://dl.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud.latest.x86_64.qcow2
{%- else -%} {%- else -%}
https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20220913.0.x86_64.qcow2 https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-20221206.0.x86_64.qcow2
{%- endif %} {%- endif %}
# Capacity of the seed VM data volume. # Capacity of the seed VM data volume.

View File

@ -24,13 +24,14 @@
when: not ansible_facts when: not ansible_facts
register: gather_facts register: gather_facts
- name: Ensure the Python virtualenv package is installed - name: Ensure the Python venv package is installed on Debian family systems
package: package:
name: python3-virtualenv name: python3-venv
state: present state: present
cache_valid_time: "{{ apt_cache_valid_time if ansible_facts.os_family == 'Debian' else omit }}" cache_valid_time: "{{ apt_cache_valid_time }}"
update_cache: "{{ True if ansible_facts.os_family == 'Debian' else omit }}" update_cache: "True"
become: True become: True
when: ansible_facts.os_family == 'Debian'
- name: Ensure global virtualenv directory exists - name: Ensure global virtualenv directory exists
file: file:
@ -61,7 +62,7 @@
# Site packages are required for using the dnf module, which is not # Site packages are required for using the dnf module, which is not
# available via PyPI. # available via PyPI.
virtualenv_site_packages: True virtualenv_site_packages: True
virtualenv_python: "python3.{{ ansible_facts.python.version.minor }}" virtualenv_command: "python3.{{ ansible_facts.python.version.minor }} -m venv"
- name: Ensure kayobe virtualenv has SELinux bindings installed - name: Ensure kayobe virtualenv has SELinux bindings installed
pip: pip:

View File

@ -25,13 +25,14 @@
gather_subset: "{{ kayobe_ansible_setup_gather_subset }}" gather_subset: "{{ kayobe_ansible_setup_gather_subset }}"
when: not ansible_facts when: not ansible_facts
- name: Ensure the Python virtualenv package is installed - name: Ensure the Python venv package is installed on Debian family systems
package: package:
name: python3-virtualenv name: python3-venv
state: present state: present
cache_valid_time: "{{ apt_cache_valid_time if ansible_facts.os_family == 'Debian' else omit }}" cache_valid_time: "{{ apt_cache_valid_time }}"
update_cache: "{{ True if ansible_facts.os_family == 'Debian' else omit }}" update_cache: "True"
become: True become: True
when: ansible_facts.os_family == 'Debian'
- name: Ensure kolla-ansible virtualenv has the latest version of pip installed - name: Ensure kolla-ansible virtualenv has the latest version of pip installed
pip: pip:
@ -41,7 +42,7 @@
# Site packages are required for using the dnf python module, which # Site packages are required for using the dnf python module, which
# is not available via PyPI. # is not available via PyPI.
virtualenv_site_packages: True virtualenv_site_packages: True
virtualenv_python: "python3.{{ ansible_facts.python.version.minor }}" virtualenv_command: "python3.{{ ansible_facts.python.version.minor }} -m venv"
become: True become: True
- name: Ensure kolla-ansible virtualenv has docker SDK for python installed - name: Ensure kolla-ansible virtualenv has docker SDK for python installed

View File

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

View File

@ -1,7 +1,7 @@
--- ---
- name: Copy CentOS repo templates - name: Copy CentOS repo templates
vars: vars:
repo_file_prefix: "{{ 'CentOS-Stream' if ansible_facts.distribution == 'CentOS' else 'Rocky' }}" repo_file_prefix: "{{ ansible_facts.distribution }}{% if ansible_facts.distribution == 'CentOS'%}-Stream{% endif %}"
template: template:
src: "{{ item }}.j2" src: "{{ item }}.j2"
dest: /etc/yum.repos.d/{{ item }} dest: /etc/yum.repos.d/{{ item }}
@ -14,17 +14,6 @@
- "{{ repo_file_prefix }}-BaseOS.repo" - "{{ repo_file_prefix }}-BaseOS.repo"
- "{{ repo_file_prefix }}-Extras.repo" - "{{ repo_file_prefix }}-Extras.repo"
- name: Remove old (pre CentOS 8.3) repo files
file:
path: /etc/yum.repos.d/{{ item }}
state: absent
become: True
loop:
- CentOS-AppStream.repo
- CentOS-Base.repo
- CentOS-Extras.repo
when: ansible_facts.distribution == 'CentOS'
- name: Update cache - name: Update cache
dnf: dnf:
name: [] name: []
@ -50,7 +39,6 @@
become: True become: True
loop: loop:
- epel.repo - epel.repo
- epel-modular.repo
when: dnf_install_epel | bool when: dnf_install_epel | bool
- name: Update cache - name: Update cache

View File

@ -10,7 +10,7 @@
[extras] [extras]
name=CentOS Stream $releasever - Extras name=CentOS Stream $releasever - Extras
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/extras/$basearch/os/ baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/SIGs/$stream/extras/$basearch/extras-common/
gpgcheck=1 gpgcheck=1
enabled=1 enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

View File

@ -1,23 +0,0 @@
[epel-modular]
name=Extra Packages for Enterprise Linux Modular $releasever - $basearch
baseurl=http://{{ dnf_epel_mirror_host }}/{{ dnf_epel_mirror_directory }}/$releasever/Modular/$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
fastestmirror=0
[epel-modular-debuginfo]
name=Extra Packages for Enterprise Linux Modular $releasever - $basearch - Debug
baseurl=http://{{ dnf_epel_mirror_host }}/{{ dnf_epel_mirror_directory }}/$releasever/Modular/$basearch/debug
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
gpgcheck=1
fastestmirror=0
[epel-modular-source]
name=Extra Packages for Enterprise Linux Modular $releasever - $basearch - Source
baseurl=http://{{ dnf_epel_mirror_host }}/{{ dnf_epel_mirror_directory }}/$releasever/Modular/SRPMS
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
gpgcheck=1
fastestmirror=0

View File

@ -50,7 +50,7 @@
name: "{{ item.name }}" name: "{{ item.name }}"
state: latest state: latest
virtualenv: "{{ kolla_ansible_venv }}" virtualenv: "{{ kolla_ansible_venv }}"
virtualenv_python: "{{ kolla_ansible_venv_python }}" virtualenv_command: "{{ kolla_ansible_venv_python }} -m venv"
with_items: with_items:
- { name: pip } - { name: pip }

View File

@ -6,4 +6,4 @@ kolla_ansible_package_dependencies:
- libssl-dev - libssl-dev
- python3-dev - python3-dev
- python3-pip - python3-pip
- python3-virtualenv - python3-venv

View File

@ -49,7 +49,7 @@
name: "{{ item.name }}" name: "{{ item.name }}"
state: latest state: latest
virtualenv: "{{ kolla_venv }}" virtualenv: "{{ kolla_venv }}"
virtualenv_python: "python3.{{ ansible_facts.python.version.minor }}" virtualenv_command: "python3.{{ ansible_facts.python.version.minor }} -m venv"
with_items: with_items:
- { name: pip } - { name: pip }

View File

@ -6,3 +6,4 @@ kolla_package_dependencies:
- libssl-dev - libssl-dev
- python3-dev - python3-dev
- python3-pip - python3-pip
- python3-venv

View File

@ -1,16 +1,4 @@
--- ---
- name: Ensure NetworkManager is disabled
service:
name: NetworkManager
state: stopped
enabled: no
become: True
register: nm_result
failed_when:
- nm_result is failed
# Ugh, Ansible's service module doesn't handle uninstalled services.
- "'Could not find the requested service' not in nm_result.msg"
- import_role: - import_role:
name: ahuffman.resolv name: ahuffman.resolv
when: resolv_is_managed | bool when: resolv_is_managed | bool

View File

@ -1,43 +1,6 @@
--- ---
- name: Ensure veth sysconfig network control scripts exist - include_tasks: network-scripts.yml
copy: when: ansible_facts.distribution_major_version | int < 9
src: "{{ item }}"
dest: "{{ network_scripts_dir }}/{{ item }}"
owner: root
group: root
mode: 0755
with_items:
- "ifup-veth"
- "ifdown-veth"
become: True
register: ctl_result
- name: Ensure veth sysconfig network interface files exist - include_tasks: network-manager.yml
template: when: ansible_facts.distribution_major_version | int >= 9
src: ifcfg-veth.j2
dest: "{{ network_scripts_dir }}/ifcfg-{{ item.device }}"
owner: root
group: root
mode: 0644
with_items: "{{ veth_interfaces }}"
become: True
register: veth_result
- name: Ensure veth peer sysconfig network interface files exist
template:
src: ifcfg-peer.j2
dest: "{{ network_scripts_dir }}/ifcfg-{{ item.peer_device }}"
owner: root
group: root
mode: 0644
with_items: "{{ veth_interfaces }}"
become: True
register: peer_result
- name: Bounce veth interfaces
shell: ifdown {{ item[0].item.device }} ; ifup {{ item[0].item.device }}
with_together:
- "{{ veth_result.results }}"
- "{{ peer_result.results }}"
when: ctl_result is changed or item[0] is changed or item[1] is changed
become: True

View File

@ -0,0 +1,45 @@
- name: Ensure veth network manager connections file exists
template:
src: veth-nmconnection.j2
dest: "/etc/NetworkManager/system-connections/{{ item.device }}.nmconnection"
owner: root
group: root
mode: 0600
with_items: "{{ veth_interfaces }}"
become: True
register: veth_result
- name: Ensure veth peer network manager connections file exists
template:
src: peer-nmconnection.j2
dest: "/etc/NetworkManager/system-connections/{{ item.peer_device }}.nmconnection"
owner: root
group: root
mode: 0600
with_items: "{{ veth_interfaces }}"
become: True
register: peer_result
# NOTE(bbezak) For some reason adding veth pair via loading files to nmcli needs
# peer device to be loaded first. If not, can't start interface.
# "Error: Connection activation failed: p-br0-ovs failed to create resources:
# Failed to create veth interface 'p-br0-ovs' for 'p-br0-ovs': exists"
- name: Add veth interfaces to network manager
shell: |
nmcli connection load /etc/NetworkManager/system-connections/{{ item[0].item.peer_device }}.nmconnection &&
nmcli connection load /etc/NetworkManager/system-connections/{{ item[0].item.device }}.nmconnection
with_together:
- "{{ veth_result.results }}"
- "{{ peer_result.results }}"
when: item[0] is changed or item[1] is changed
become: True
- name: Start veth interfaces with network manager
shell: |
nmcli connection up {{ item[0].item.device }} &&
nmcli connection up {{ item[0].item.peer_device }}
with_together:
- "{{ veth_result.results }}"
- "{{ peer_result.results }}"
when: item[0] is changed or item[1] is changed
become: True

View File

@ -0,0 +1,43 @@
---
- name: Ensure veth sysconfig network control scripts exist
copy:
src: "{{ item }}"
dest: "{{ network_scripts_dir }}/{{ item }}"
owner: root
group: root
mode: 0755
with_items:
- "ifup-veth"
- "ifdown-veth"
become: True
register: ctl_result
- name: Ensure veth sysconfig network interface files exist
template:
src: ifcfg-veth.j2
dest: "{{ network_scripts_dir }}/ifcfg-{{ item.device }}"
owner: root
group: root
mode: 0644
with_items: "{{ veth_interfaces }}"
become: True
register: veth_result
- name: Ensure veth peer sysconfig network interface files exist
template:
src: ifcfg-peer.j2
dest: "{{ network_scripts_dir }}/ifcfg-{{ item.peer_device }}"
owner: root
group: root
mode: 0644
with_items: "{{ veth_interfaces }}"
become: True
register: peer_result
- name: Bounce veth interfaces
shell: ifdown {{ item[0].item.device }} ; ifup {{ item[0].item.device }}
with_together:
- "{{ veth_result.results }}"
- "{{ peer_result.results }}"
when: ctl_result is changed or item[0] is changed or item[1] is changed
become: True

View File

@ -0,0 +1,21 @@
[connection]
id={{ item.peer_device }}
type=veth
interface-name={{ item.peer_device }}
{% if item.peer_mtu is defined and item.peer_mtu %}
[ethernet]
mtu={{ item.peer_mtu }}
{% endif %}
[veth]
peer={{ item.device }}
[ipv4]
method=disabled
[ipv6]
addr-gen-mode=stable-privacy
method=disabled
[proxy]

View File

@ -0,0 +1,16 @@
[connection]
id={{ item.device }}
type=veth
interface-name={{ item.device }}
master={{ item.bridge }}
slave-type=bridge
{% if item.mtu is defined and item.mtu %}
[ethernet]
mtu={{ item.mtu }}
{% endif %}
[veth]
peer={{ item.peer_device }}
[bridge-port]

View File

@ -145,13 +145,13 @@ function is_yum {
function install_dependencies { function install_dependencies {
echo "Installing package dependencies for kayobe" echo "Installing package dependencies for kayobe"
if is_dnf; then if is_dnf; then
sudo dnf -y install gcc git vim python3-pyyaml python3-virtualenv libffi-devel sudo dnf -y install gcc git vim python3-pyyaml libffi-devel
elif is_yum; then elif is_yum; then
echo "CentOS 7 is no longer supported" echo "CentOS 7 is no longer supported"
exit 1 exit 1
else else
sudo apt update sudo apt update
sudo apt install -y python-is-python3 python3-dev python3-virtualenv gcc git libffi-dev sudo apt install -y python-is-python3 python3-dev python3-venv gcc git libffi-dev
fi fi
} }
@ -167,7 +167,33 @@ function install_venv {
fi fi
if [[ ! -f "${venv_path}/bin/activate" ]]; then if [[ ! -f "${venv_path}/bin/activate" ]]; then
echo "Creating virtual environment in ${venv_path}" echo "Creating virtual environment in ${venv_path}"
virtualenv -p python3 "${venv_path}" python3 -m venv "${venv_path}"
# NOTE: Virtualenv's activate and deactivate scripts reference an
# unbound variable.
set +u
source "${venv_path}/bin/activate"
pip install -U pip
pip install $pip_paths
deactivate
set -u
else
echo "Using existing virtual environment in ${venv_path}"
fi
}
function install_venv_system_site_packages {
# Install a virtualenv at $1. The rest of the arguments are passed
# directly to pip.
venv_path="$1"
shift
pip_paths="$@"
local venv_parent="$(dirname ${venv_path})"
if [[ ! -d "$venv_parent" ]]; then
mkdir -p "$venv_parent"
fi
if [[ ! -f "${venv_path}/bin/activate" ]]; then
echo "Creating virtual environment in ${venv_path}"
python3 -m venv --system-site-packages "${venv_path}"
# NOTE: Virtualenv's activate and deactivate scripts reference an # NOTE: Virtualenv's activate and deactivate scripts reference an
# unbound variable. # unbound variable.
set +u set +u
@ -193,7 +219,7 @@ function install_kayobe_dev_venv {
function upgrade_kayobe_venv { function upgrade_kayobe_venv {
echo "Upgrading kayobe virtual environment in ${KAYOBE_VENV_PATH}" echo "Upgrading kayobe virtual environment in ${KAYOBE_VENV_PATH}"
virtualenv -p python3 "${KAYOBE_VENV_PATH}" python3 -m venv "${KAYOBE_VENV_PATH}"
# NOTE: Virtualenv's activate and deactivate scripts reference an # NOTE: Virtualenv's activate and deactivate scripts reference an
# unbound variable. # unbound variable.
set +u set +u
@ -704,7 +730,7 @@ function tenks_deploy {
deactivate deactivate
# Install the Tenks venv. # Install the Tenks venv.
install_venv "${TENKS_VENV_PATH}" "$tenks_path" -c "$UPPER_CONSTRAINTS_FILE" install_venv_system_site_packages "${TENKS_VENV_PATH}" "$tenks_path" -c "$UPPER_CONSTRAINTS_FILE"
source ${TENKS_VENV_PATH:-$HOME/tenks-test-venv}/bin/activate source ${TENKS_VENV_PATH:-$HOME/tenks-test-venv}/bin/activate
${KAYOBE_SOURCE_PATH}/tools/ansible-galaxy-retried.sh install \ ${KAYOBE_SOURCE_PATH}/tools/ansible-galaxy-retried.sh install \

View File

@ -50,11 +50,11 @@ configure how this image is built. Consult the
:diskimage-builder-doc:`Diskimage-builder documentation <>` for further :diskimage-builder-doc:`Diskimage-builder documentation <>` for further
information on building disk images. information on building disk images.
The default configuration builds a CentOS 8 whole disk (partitioned) image with The default configuration builds a whole disk (partitioned) image using the
SELinux disabled and a serial console enabled. `Cloud-init selected :ref:`OS distribution <os-distribution>` with serial console enabled,
<https://cloudinit.readthedocs.io/en/latest/>`__ is used to process the and SELinux disabled if CentOS Stream is used. Rocky Linux 9 users should use
configuration drive built by Bifrost, rather than the Bifrost default of the default method of building images with
:diskimage-builder-doc:`simple-init <elements/simple-init/README>`. :ref:`Diskimage builder directly <overcloud-dib>`.
``kolla_bifrost_dib_os_element`` ``kolla_bifrost_dib_os_element``
DIB base OS element. Default is ``{{ os_distribution }}``. DIB base OS element. Default is ``{{ os_distribution }}``.
@ -65,9 +65,9 @@ configuration drive built by Bifrost, rather than the Bifrost default of
releases.* releases.*
List of default DIB elements. Default is ``["disable-selinux", List of default DIB elements. Default is ``["disable-selinux",
"enable-serial-console", "vm"]`` when ``os_distribution`` is ``centos``, or "enable-serial-console", "vm"]`` when ``os_distribution`` is ``centos`` or
``["enable-serial-console", "vm"]`` otherwise. The ``vm`` element is ``rocky``, ``["enable-serial-console", "vm"]`` otherwise. The ``vm`` element
poorly named, and causes DIB to build a whole disk image rather than a is poorly named, and causes DIB to build a whole disk image rather than a
single partition. single partition.
``kolla_bifrost_dib_elements_extra`` ``kolla_bifrost_dib_elements_extra``
*Added in the Train release. Use kolla_bifrost_dib_elements in earlier *Added in the Train release. Use kolla_bifrost_dib_elements in earlier

View File

@ -25,8 +25,8 @@ The following options cover building of IPA images via Diskimage-builder (DIB).
Consult the :diskimage-builder-doc:`Diskimage-builder documentation <>` for Consult the :diskimage-builder-doc:`Diskimage-builder documentation <>` for
full details. full details.
The default configuration builds a CentOS 8 ramdisk image which includes the The default configuration builds a CentOS Stream 9 ramdisk image which includes
upstream IPA source code, and has a serial console enabled. the upstream IPA source code, and has a serial console enabled.
The images are built for Bifrost via ``kayobe seed deployment image build``, The images are built for Bifrost via ``kayobe seed deployment image build``,
and for Ironic in the overcloud (if enabled) via ``kayobe overcloud deployment and for Ironic in the overcloud (if enabled) via ``kayobe overcloud deployment
@ -61,7 +61,7 @@ image build``.
``ipa_build_dib_env_default`` ``ipa_build_dib_env_default``
Dictionary of default environment variables to provide to Diskimage Builder Dictionary of default environment variables to provide to Diskimage Builder
(DIB) during IPA image build. Default is (DIB) during IPA image build. Default is
``{"DIB_RELEASE": "8-stream", "DIB_REPOLOCATION_ironic_python_agent": "{{ ``{"DIB_RELEASE": "9-stream", "DIB_REPOLOCATION_ironic_python_agent": "{{
ipa_build_source_url }}", "DIB_REPOREF_ironic_python_agent": "{{ ipa_build_source_url }}", "DIB_REPOREF_ironic_python_agent": "{{
ipa_build_source_version }}", "DIB_REPOREF_requirements": "{{ ipa_build_source_version }}", "DIB_REPOREF_requirements": "{{
openstack_branch }}"}``. openstack_branch }}"}``.
@ -217,7 +217,7 @@ Agent documentation <>` for full details.
``ipa.kernel``. ``ipa.kernel``.
``ipa_kernel_upstream_url`` ``ipa_kernel_upstream_url``
URL of Ironic deployment kernel image to download. Default is URL of Ironic deployment kernel image to download. Default is
``https://tarballs.openstack.org/ironic-python-agent/dib/files/ipa-centos8{{ ``https://tarballs.openstack.org/ironic-python-agent/dib/files/ipa-centos9{{
ipa_images_upstream_url_suffix }}.kernel``. ipa_images_upstream_url_suffix }}.kernel``.
``ipa_kernel_checksum_url`` ``ipa_kernel_checksum_url``
URL of checksum of Ironic deployment kernel image. Default is ``{{ URL of checksum of Ironic deployment kernel image. Default is ``{{
@ -230,7 +230,7 @@ Agent documentation <>` for full details.
``ipa.initramfs``. ``ipa.initramfs``.
``ipa_ramdisk_upstream_url`` ``ipa_ramdisk_upstream_url``
URL of Ironic deployment ramdisk image to download. Default is URL of Ironic deployment ramdisk image to download. Default is
``https://tarballs.openstack.org/ironic-python-agent/dib/files/ipa-centos8{{ ``https://tarballs.openstack.org/ironic-python-agent/dib/files/ipa-centos9{{
ipa_images_upstream_url_suffix }}.initramfs``. ipa_images_upstream_url_suffix }}.initramfs``.
``ipa_ramdisk_checksum_url`` ``ipa_ramdisk_checksum_url``
URL of checksum of Ironic deployment ramdisk image. Default is ``{{ URL of checksum of Ironic deployment ramdisk image. Default is ``{{

View File

@ -113,7 +113,7 @@ The following variables affect which Kolla images are used, and how they are
accessed. accessed.
``kolla_base_distro`` ``kolla_base_distro``
Kolla base container image distribution. Default is ``centos``. Kolla base container image distribution. Default is ``rocky``.
``kolla_base_distro_version`` ``kolla_base_distro_version``
Kolla base container image distribution version. Default is dependent on Kolla base container image distribution version. Default is dependent on
``kolla_base_distro``. ``kolla_base_distro``.
@ -138,14 +138,14 @@ accessed.
(e.g. ``rocky``) on stable branches and tagged releases, or ``master`` on (e.g. ``rocky``) on stable branches and tagged releases, or ``master`` on
the Kayobe ``master`` branch. the Kayobe ``master`` branch.
For example, to deploy Kolla ``centos`` images with a namespace of For example, to deploy Kolla ``rocky`` images with a namespace of
``example``, and a private Docker registry at ``registry.example.com:4000``, ``example``, and a private Docker registry at ``registry.example.com:4000``,
and the ``zed`` release. and the ``zed`` release.
.. code-block:: yaml .. code-block:: yaml
:caption: ``$KAYOBE_CONFIG_PATH/kolla.yml`` :caption: ``$KAYOBE_CONFIG_PATH/kolla.yml``
kolla_base_distro: centos kolla_base_distro: rocky
kolla_docker_namespace: example kolla_docker_namespace: example
kolla_docker_registry: registry.example.com:4000 kolla_docker_registry: registry.example.com:4000
kolla_openstack_release: zed kolla_openstack_release: zed
@ -154,7 +154,7 @@ The deployed ``ironic-api`` image would be referenced as follows:
.. code-block:: console .. code-block:: console
registry.example.com:4000/example/ironic-api:zed-centos-stream9 registry.example.com:4000/example/ironic-api:zed-rocky-9
Ansible Ansible
------- -------

View File

@ -74,7 +74,7 @@ affect :ref:`Kolla Ansible configuration <configuration-kolla-ansible-global>`.
``kolla_base_distro`` ``kolla_base_distro``
Kolla base container image distribution. Options are ``centos``, Kolla base container image distribution. Options are ``centos``,
``debian``, ``rocky``, or ``ubuntu``. Default is ``{{ os_distribution }}``. ``debian``, ``rocky`` or ``ubuntu``. Default is ``{{ os_distribution }}``.
``kolla_base_distro_version`` ``kolla_base_distro_version``
Kolla base container image distribution version. Default is dependent on Kolla base container image distribution version. Default is dependent on
``kolla_base_distro``. ``kolla_base_distro``.
@ -97,14 +97,14 @@ affect :ref:`Kolla Ansible configuration <configuration-kolla-ansible-global>`.
Kolla container image tag. This is the tag that will be applied to built Kolla container image tag. This is the tag that will be applied to built
container images. Default is ``kolla_openstack_release``. container images. Default is ``kolla_openstack_release``.
For example, to build the Kolla ``centos`` images with a namespace For example, to build the Kolla ``rocky`` images with a namespace
of ``example``, and a private Docker registry at ``registry.example.com:4000``, of ``example``, and a private Docker registry at ``registry.example.com:4000``,
using the ``zed`` release: using the ``zed`` release:
.. code-block:: yaml .. code-block:: yaml
:caption: ``kolla.yml`` :caption: ``kolla.yml``
kolla_base_distro: centos kolla_base_distro: rocky
kolla_docker_namespace: example kolla_docker_namespace: example
kolla_docker_registry: registry.example.com:4000 kolla_docker_registry: registry.example.com:4000
kolla_openstack_release: zed kolla_openstack_release: zed
@ -114,7 +114,7 @@ follows:
.. code-block:: console .. code-block:: console
registry.example.com:4000/example/ironic-api:zed-centos-stream9 registry.example.com:4000/example/ironic-api:zed-rocky-9
Further customisation of the Kolla configuration file can be performed by Further customisation of the Kolla configuration file can be performed by
writing a file at ``${KAYOBE_CONFIG_PATH/kolla/kolla-build.conf``. For example, writing a file at ``${KAYOBE_CONFIG_PATH/kolla/kolla-build.conf``. For example,

View File

@ -11,13 +11,13 @@ 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
or ``rocky`` or ``ubuntu``, and defaults to ``centos``. or ``rocky`` or ``ubuntu``, and defaults to ``rocky``.
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 ``9-stream``, and this is its default value. When ``os_distribution`` is
set to ``ubuntu`` it may be set to ``jammy``, and this is its default value. set to ``ubuntu`` it may be set to ``jammy``, and this is its default value.
When ``os_distribution`` is set to ``rocky`` it may be set to ``8``, and this When ``os_distribution`` is set to ``rocky`` it may be set to ``9``, and this
is its default value. is its default value.
These variables are used to set various defaults, including: These variables are used to set various defaults, including:

View File

@ -34,7 +34,7 @@ how these images are built. Consult the
information on building disk images. 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>` (Rocky Linux 9 by default)
with serial console enabled, and SELinux disabled if CentOS Stream or Rocky with serial console enabled, and SELinux disabled if CentOS Stream or Rocky
Linux is used. 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

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/Rocky 8/RHEL 8:: * Fedora or CentOS Stream 9/Rocky 9/RHEL 9::
sudo dnf install python3-devel openssl-devel python3-pip git gcc sudo dnf install python3-devel openssl-devel python3-pip git gcc

View File

@ -15,8 +15,8 @@ Prerequisites
Currently Kayobe supports the following Operating Systems on the Ansible 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 9 (since Zed 13.0.0 release)
- Rocky Linux 8 (since Yoga 12.0.0 release) - Rocky Linux 9 (since Zed 13.0.0 release)
- Ubuntu Jammy 22.04 (since Zed 13.0.0 release) - Ubuntu Jammy 22.04 (since Zed 13.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
@ -30,11 +30,11 @@ some of kayobe's python dependencies.
On CentOS/Rocky:: On CentOS/Rocky::
$ dnf install -y python3-devel python3-virtualenv gcc libffi-devel $ dnf install -y python3-devel gcc libffi-devel
On Ubuntu:: On Ubuntu::
$ apt install -y python3-dev python3-virtualenv gcc libffi-dev $ apt install -y python3-dev gcc libffi-dev python3-venv
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.
@ -95,7 +95,7 @@ code repositories and python virtual environments::
Create a virtualenv for Kayobe:: Create a virtualenv for Kayobe::
$ virtualenv <base_path>/venvs/kayobe $ python3 -m venv <base_path>/venvs/kayobe
Activate the virtualenv and update pip:: Activate the virtualenv and update pip::
@ -136,7 +136,7 @@ Next, obtain the Kayobe source code. For example:
Create a virtualenv for Kayobe:: Create a virtualenv for Kayobe::
$ virtualenv <base_path>/venvs/kayobe $ python3 -m venv <base_path>/venvs/kayobe
Activate the virtualenv and update pip:: Activate the virtualenv and update pip::

View File

@ -22,7 +22,7 @@ OpenStack using Kolla, Ansible and Kayobe. The guide makes use of
baremetal environment running on a single hypervisor. baremetal environment running on a single hypervisor.
To complete the walkthrough you will require a baremetal or VM hypervisor To complete the walkthrough you will require a baremetal or VM hypervisor
running CentOS 8 or Ubuntu Jammy 22.04 (since Zed 13.0.0) with at least running CentOS Stream 9, Rocky Linux 9 or Ubuntu Jammy 22.04 (since Zed 13.0.0) with at least
32GB RAM & 80GB disk space. Preparing the deployment can take some time - 32GB RAM & 80GB disk space. Preparing the deployment can take some time -
where possible it is beneficial to snapshot the hypervisor. We advise making a where possible it is beneficial to snapshot the hypervisor. We advise making a
snapshot after creating the initial 'seed' VM as this will make additional snapshot after creating the initial 'seed' VM as this will make additional

View File

@ -9,8 +9,8 @@ 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 9 (since Zed 13.0.0 release)
* Rocky Linux 8 (since Yoga 12.0.0 release) * Rocky Linux 9 (since Zed 13.0.0 release)
* Ubuntu Jammy 22.04 (since Zed 13.0.0 release) * Ubuntu Jammy 22.04 (since Zed 13.0.0 release)
.. note:: .. note::

View File

@ -46,11 +46,11 @@
# OS distribution. # OS distribution.
# OS distribution name. Valid options are "centos", "rocky", "ubuntu". Default # OS distribution name. Valid options are "centos", "rocky", "ubuntu". Default
# is "centos". # is "rocky".
#os_distribution: #os_distribution:
# OS release. Valid options are "8-stream" when os_distribution is "centos", or # OS release. Valid options are "9-stream" when os_distribution is "centos", or
# "8" when os_distribution is "rocky", or "jammy" when os_distribution is # "9" when os_distribution is "rocky", or "jammy" when os_distribution is
# "ubuntu". # "ubuntu".
#os_release: #os_release:

View File

@ -32,10 +32,10 @@
# 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/jammy/current/jammy-server-cloudimg-amd64.img" # "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img"
# when os_distribution is "ubuntu", or # when os_distribution is "ubuntu", or
# https://dl.rockylinux.org/pub/rocky/8/images/Rocky-8-GenericCloud.latest.x86_64.qcow2 # https://dl.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud.latest.x86_64.qcow2
# when os_distribution is "rocky", # when os_distribution is "rocky",
# or # or
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20220913.0.x86_64.qcow2" # "https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-20221206.0.x86_64.qcow2"
# otherwise. # otherwise.
#infra_vm_root_image: #infra_vm_root_image:

View File

@ -67,8 +67,7 @@
# Kolla configuration. # Kolla configuration.
# Kolla base container image distribution. Options are "centos", "debian", # Kolla base container image distribution. Options are "centos", "debian",
# "rocky", "ubuntu". Default is # "rocky", "ubuntu". Default is {{ os_distribution }}.
# {{ 'centos' if os_distribution == 'rocky' else os_distribution }}.
#kolla_base_distro: #kolla_base_distro:
# Kolla base container image distribution version default map. # Kolla base container image distribution version default map.

View File

@ -32,10 +32,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/jammy/current/jammy-server-cloudimg-amd64.img" # "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img"
# when os_distribution is "ubuntu", # when os_distribution is "ubuntu",
# https://dl.rockylinux.org/pub/rocky/8/images/Rocky-8-GenericCloud.latest.x86_64.qcow2 # https://dl.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud.latest.x86_64.qcow2
# when os_distribution is "rocky", # when os_distribution is "rocky",
# or # or
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20220913.0.x86_64.qcow2" # "https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-20221206.0.x86_64.qcow2"
# otherwise. # otherwise.
#seed_vm_root_image: #seed_vm_root_image:

View File

@ -48,3 +48,7 @@ kolla_ironic_pxe_append_params_extra:
kolla_enable_heat: false kolla_enable_heat: false
kolla_enable_horizon: false kolla_enable_horizon: false
{% endif %} {% endif %}
# NOTE(bbezak): Kolla does not build CentOS Stream 9 container images.
# Using Rocky Linux 9 images on CentOS Stream 9 in CI.
kolla_base_distro: "{% raw %}{{ 'rocky' if os_distribution == 'centos' else os_distribution }}{% endraw %}"

View File

@ -41,7 +41,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 in ['RedHat', 'Rocky'] %} {% if ansible_facts.os_family == 'RedHat' %}
- 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
@ -114,7 +114,7 @@ docker_storage_driver: devicemapper
# Set Honolulu time. # Set Honolulu time.
timezone: Pacific/Honolulu timezone: Pacific/Honolulu
{% if ansible_os_family == "Debian" %} {% if ansible_facts.os_family == "Debian" %}
apt_config: apt_config:
- content: | - content: |
Acquire::Retries 1; Acquire::Retries 1;
@ -137,14 +137,14 @@ apt_repositories:
apt_disable_sources_list: true apt_disable_sources_list: true
{% endif %} {% endif %}
{% if ansible_os_family in ['RedHat', 'Rocky'] %} {% if ansible_facts.os_family == 'RedHat' %}
# Use a local DNF mirror. # Use a local DNF mirror.
dnf_use_local_mirror: true dnf_use_local_mirror: true
{% if ansible_distribution == 'CentOS' %} {% if ansible_facts.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-stream'
{% endif %} {% 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 }}"

View File

@ -15,7 +15,7 @@
- pytest-testinfra - pytest-testinfra
- pytest-html - pytest-html
virtualenv: "{{ testinfra_venv }}" virtualenv: "{{ testinfra_venv }}"
virtualenv_python: python3 virtualenv_command: python3 -m venv
# NOTE(mgoddard): Use the name zzz-overrides.yml to ensure this takes # NOTE(mgoddard): Use the name zzz-overrides.yml to ensure this takes
# precedence over the standard config files and zz-overrides.yml from # precedence over the standard config files and zz-overrides.yml from
@ -40,3 +40,4 @@
command: ip link add dummy{{ item }} type dummy command: ip link add dummy{{ item }} type dummy
become: true become: true
loop: "{{ range(2, 8) | list }}" loop: "{{ range(2, 8) | list }}"
when: ansible_facts.os_family == 'Debian'

View File

@ -39,13 +39,17 @@ def test_network_ethernet_vlan(host):
assert interface.exists assert interface.exists
assert '192.168.35.1' in interface.addresses assert '192.168.35.1' in interface.addresses
assert host.file('/sys/class/net/dummy2.42/lower_dummy2').exists assert host.file('/sys/class/net/dummy2.42/lower_dummy2').exists
routes = host.check_output( # FIXME(bbezak): remove following IF after ansible-role-interfaces
'/sbin/ip route show dev dummy2.42 table kayobe-test-route-table') # receive support for custom routes in NetworkManager
assert '192.168.40.0/24 via 192.168.35.254' in routes if not ('centos' in host.system_info.distribution.lower() or
rules = host.check_output( 'rocky' in host.system_info.distribution.lower()):
'/sbin/ip rule show table kayobe-test-route-table') routes = host.check_output(
expected = 'from 192.168.35.0/24 lookup kayobe-test-route-table' '/sbin/ip route show dev dummy2.42 table kayobe-test-route-table')
assert expected in rules assert '192.168.40.0/24 via 192.168.35.254' in routes
rules = host.check_output(
'/sbin/ip rule show table kayobe-test-route-table')
expected = 'from 192.168.35.0/24 lookup kayobe-test-route-table'
assert expected in rules
def test_network_bridge(host): def test_network_bridge(host):
@ -203,8 +207,7 @@ def test_apt_custom_package_repository_is_available(host):
assert host.package("td-agent").is_installed assert host.package("td-agent").is_installed
@pytest.mark.parametrize('repo', ["appstream", "baseos", "extras", "epel", @pytest.mark.parametrize('repo', ["appstream", "baseos", "extras", "epel"])
"epel-modular"])
@pytest.mark.skipif(not _is_dnf_mirror(), reason="DNF OpenDev mirror only for 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.
@ -217,14 +220,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/Rocky 8") @pytest.mark.skipif(not _is_dnf(), reason="DNF only supported on CentOS/Rocky")
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/Rocky 8") @pytest.mark.skipif(not _is_dnf(), reason="DNF only supported on CentOS/Rocky")
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
@ -232,7 +235,7 @@ 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/Rocky 8") reason="tuned profile setting only supported on CentOS/Rocky")
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

View File

@ -87,7 +87,7 @@
# ipmitool chassis bootdev pxe # ipmitool chassis bootdev pxe
# Error setting Chassis Boot Parameter 5\nError setting Chassis Boot # Error setting Chassis Boot Parameter 5\nError setting Chassis Boot
# Parameter 0\n # Parameter 0\n
when: ansible_os_family != 'Debian' when: ansible_facts.os_family != 'Debian'
# Upgrade Kayobe, and use it to perform an upgrade of the control plane. # Upgrade Kayobe, and use it to perform an upgrade of the control plane.
@ -120,7 +120,7 @@
# ipmitool chassis bootdev pxe # ipmitool chassis bootdev pxe
# Error setting Chassis Boot Parameter 5\nError setting Chassis Boot # Error setting Chassis Boot Parameter 5\nError setting Chassis Boot
# Parameter 0\n # Parameter 0\n
when: ansible_os_family != 'Debian' when: ansible_facts.os_family != 'Debian'
environment: environment:
KAYOBE_CONFIG_SOURCE_PATH: "{{ kayobe_config_src_dir }}" KAYOBE_CONFIG_SOURCE_PATH: "{{ kayobe_config_src_dir }}"

View File

@ -39,3 +39,7 @@ ipa_build_dib_elements_extra:
overcloud_dib_build_host_images: {{ build_images }} overcloud_dib_build_host_images: {{ build_images }}
overcloud_dib_elements_extra: overcloud_dib_elements_extra:
- "openstack-ci-mirrors" - "openstack-ci-mirrors"
# NOTE(bbezak): Kolla does not build CentOS Stream 9 container images.
# Using Rocky Linux 9 images on CentOS Stream 9 in CI.
kolla_base_distro: "{% raw %}{{ 'rocky' if os_distribution == 'centos' else os_distribution }}{% endraw %}"

View File

@ -0,0 +1,9 @@
---
features:
- |
Adds support for Rocky Linux 9 as a host Operating System and base
container image. CentOS Stream 8 is not supported anymore.
upgrade:
- |
The default value of ``os_distribution`` was changed to ``rocky``.
CentOS Stream 8 is not supported anymore.

View File

@ -16,8 +16,10 @@ roles:
- src: jriguera.configdrive - src: jriguera.configdrive
# There are no versioned releases of this role. # There are no versioned releases of this role.
version: 29871bf3279ef95fc8f7339b9abd13f869980750 version: 29871bf3279ef95fc8f7339b9abd13f869980750
- src: MichaelRigart.interfaces - src: https://github.com/stackhpc/ansible-role-interfaces.git
version: v1.13.1 name: MichaelRigart.interfaces
scm: git
version: networkmanager
- src: mrlesmithjr.chrony - src: mrlesmithjr.chrony
version: v0.1.4 version: v0.1.4
- src: mrlesmithjr.manage-lvm - src: mrlesmithjr.manage-lvm
@ -35,7 +37,7 @@ roles:
- src: stackhpc.grafana-conf - src: stackhpc.grafana-conf
version: 1.1.1 version: 1.1.1
- src: stackhpc.libvirt-host - src: stackhpc.libvirt-host
version: v1.11.0 version: v1.12.1
- src: stackhpc.libvirt-vm - src: stackhpc.libvirt-vm
version: v1.14.2 version: v1.14.2
- src: stackhpc.luks - src: stackhpc.luks
@ -49,8 +51,8 @@ roles:
- src: stackhpc.os-networks - src: stackhpc.os-networks
version: v1.5.3 version: v1.5.3
- src: stackhpc.os-openstackclient - src: stackhpc.os-openstackclient
version: v1.4.1 version: v1.5.0
- src: stackhpc.os_openstacksdk - src: stackhpc.os_openstacksdk
version: v1.0.1 version: v1.3.0
- src: stackhpc.timezone - src: stackhpc.timezone
version: 1.2.1 version: 1.2.1

View File

@ -3,7 +3,7 @@
apt: apt:
name: dbus name: dbus
when: when:
- ansible_os_family == 'Debian' - ansible_facts.os_family == 'Debian'
become: true become: true
- block: - block:
@ -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 in ['RedHat', 'Rocky'] when: ansible_facts.os_family == 'RedHat'
become: true become: true

View File

@ -40,12 +40,18 @@ copy_logs() {
journalctl --no-pager > ${LOG_DIR}/system_logs/syslog.txt journalctl --no-pager > ${LOG_DIR}/system_logs/syslog.txt
journalctl --no-pager -u docker.service > ${LOG_DIR}/system_logs/docker.log journalctl --no-pager -u docker.service > ${LOG_DIR}/system_logs/docker.log
journalctl --no-pager -u vbmcd.service > ${LOG_DIR}/system_logs/vbmcd.log journalctl --no-pager -u vbmcd.service > ${LOG_DIR}/system_logs/vbmcd.log
journalctl --no-pager -u NetworkManager.service > ${LOG_DIR}/system_logs/NetworkManager.log
else else
cp /var/log/upstart/docker.log ${LOG_DIR}/system_logs/docker.log cp /var/log/upstart/docker.log ${LOG_DIR}/system_logs/docker.log
fi fi
cp -r /etc/sudoers.d ${LOG_DIR}/system_logs/ if [[ -d /etc/sysconfig/network-scripts/ ]]; then
cp /etc/sudoers ${LOG_DIR}/system_logs/sudoers.txt cp -r /etc/sysconfig/network-scripts/ ${LOG_DIR}/system_logs/
fi
if [[ -d /etc/NetworkManager/system-connections/ ]]; then
cp -r /etc/NetworkManager/system-connections/ ${LOG_DIR}/system_logs/
fi
df -h > ${LOG_DIR}/system_logs/df.txt df -h > ${LOG_DIR}/system_logs/df.txt
# Gather disk usage statistics for files and directories larger than 1MB # Gather disk usage statistics for files and directories larger than 1MB

View File

@ -115,14 +115,15 @@
timeout: 7200 timeout: 7200
- job: - job:
name: kayobe-overcloud-centos8s name: kayobe-overcloud-centos9s
parent: kayobe-overcloud-base parent: kayobe-overcloud-base
nodeset: kayobe-centos8s nodeset: kayobe-centos9s
voting: false
- job: - job:
name: kayobe-overcloud-rocky8 name: kayobe-overcloud-rocky9
parent: kayobe-overcloud-base parent: kayobe-overcloud-base
nodeset: kayobe-rocky8 nodeset: kayobe-rocky9
- job: - job:
name: kayobe-overcloud-ubuntu-jammy name: kayobe-overcloud-ubuntu-jammy
@ -137,9 +138,15 @@
ironic_boot_mode: "uefi" ironic_boot_mode: "uefi"
- job: - job:
name: kayobe-overcloud-tls-centos8s name: kayobe-overcloud-tls-centos9s
parent: kayobe-overcloud-tls-base parent: kayobe-overcloud-tls-base
nodeset: kayobe-centos8s nodeset: kayobe-centos9s
voting: false
- job:
name: kayobe-overcloud-tls-rocky9
parent: kayobe-overcloud-tls-base
nodeset: kayobe-rocky9
- job: - job:
name: kayobe-overcloud-upgrade-base name: kayobe-overcloud-upgrade-base
@ -177,14 +184,15 @@
build_images: false build_images: false
- job: - job:
name: kayobe-seed-centos8s name: kayobe-seed-centos9s
parent: kayobe-seed-base parent: kayobe-seed-base
nodeset: kayobe-centos8s nodeset: kayobe-centos9s
voting: false
- job: - job:
name: kayobe-seed-rocky8 name: kayobe-seed-rocky9
parent: kayobe-seed-base parent: kayobe-seed-base
nodeset: kayobe-rocky8 nodeset: kayobe-rocky9
- job: - job:
name: kayobe-seed-ubuntu-jammy name: kayobe-seed-ubuntu-jammy
@ -203,14 +211,15 @@
build_images: true build_images: true
- job: - job:
name: kayobe-seed-images-centos8s name: kayobe-seed-images-centos9s
parent: kayobe-seed-images-base parent: kayobe-seed-images-base
nodeset: kayobe-centos8s nodeset: kayobe-centos9s
voting: false
- job: - job:
name: kayobe-seed-images-rocky8 name: kayobe-seed-images-rocky9
parent: kayobe-seed-images-base parent: kayobe-seed-images-base
nodeset: kayobe-rocky8 nodeset: kayobe-rocky9
- job: - job:
name: kayobe-seed-images-ubuntu-jammy name: kayobe-seed-images-ubuntu-jammy
@ -229,14 +238,15 @@
timeout: 7200 timeout: 7200
- job: - job:
name: kayobe-overcloud-host-configure-centos8s name: kayobe-overcloud-host-configure-centos9s
parent: kayobe-overcloud-host-configure-base parent: kayobe-overcloud-host-configure-base
nodeset: kayobe-centos8s nodeset: kayobe-centos9s
voting: false
- job: - job:
name: kayobe-overcloud-host-configure-rocky8 name: kayobe-overcloud-host-configure-rocky9
parent: kayobe-overcloud-host-configure-base parent: kayobe-overcloud-host-configure-base
nodeset: kayobe-rocky8 nodeset: kayobe-rocky9
- job: - job:
name: kayobe-overcloud-host-configure-ubuntu-jammy name: kayobe-overcloud-host-configure-ubuntu-jammy
@ -278,14 +288,15 @@
timeout: 5400 timeout: 5400
- job: - job:
name: kayobe-seed-vm-centos8s name: kayobe-seed-vm-centos9s
parent: kayobe-seed-vm-base parent: kayobe-seed-vm-base
nodeset: kayobe-centos8s nodeset: kayobe-centos9s
voting: false
- job: - job:
name: kayobe-seed-vm-rocky8 name: kayobe-seed-vm-rocky9
parent: kayobe-seed-vm-base parent: kayobe-seed-vm-base
nodeset: kayobe-rocky8 nodeset: kayobe-rocky9
- job: - job:
name: kayobe-seed-vm-ubuntu-jammy name: kayobe-seed-vm-ubuntu-jammy
@ -305,14 +316,15 @@
timeout: 5400 timeout: 5400
- job: - job:
name: kayobe-infra-vm-centos8s name: kayobe-infra-vm-centos9s
parent: kayobe-infra-vm-base parent: kayobe-infra-vm-base
nodeset: kayobe-centos8s nodeset: kayobe-centos9s
voting: false
- job: - job:
name: kayobe-infra-vm-rocky8 name: kayobe-infra-vm-rocky9
parent: kayobe-infra-vm-base parent: kayobe-infra-vm-base
nodeset: kayobe-rocky8 nodeset: kayobe-rocky9
- job: - job:
name: kayobe-infra-vm-ubuntu-jammy name: kayobe-infra-vm-ubuntu-jammy

View File

@ -1,16 +1,15 @@
--- ---
- nodeset: - nodeset:
name: kayobe-centos8s name: kayobe-centos9s
nodes: nodes:
- name: primary - name: primary
label: centos-8-stream label: centos-9-stream
- nodeset: - nodeset:
name: kayobe-rocky8 name: kayobe-rocky9
nodes: nodes:
- name: primary - name: primary
label: rockylinux-8 label: rockylinux-9
- nodeset: - nodeset:
name: kayobe-ubuntu-jammy name: kayobe-ubuntu-jammy

View File

@ -11,25 +11,42 @@
- kayobe-tox-ansible-syntax - kayobe-tox-ansible-syntax
- kayobe-tox-ansible - kayobe-tox-ansible
- kayobe-tox-molecule - kayobe-tox-molecule
- kayobe-overcloud-rocky9
- kayobe-overcloud-centos9s
- kayobe-overcloud-ubuntu-jammy - kayobe-overcloud-ubuntu-jammy
- kayobe-overcloud-tls-rocky9
- kayobe-overcloud-host-configure-rocky9
- kayobe-overcloud-host-configure-centos9s
- kayobe-overcloud-host-configure-ubuntu-jammy - kayobe-overcloud-host-configure-ubuntu-jammy
- kayobe-overcloud-upgrade-ubuntu-focal - kayobe-overcloud-upgrade-ubuntu-focal
- kayobe-seed-rocky9
- kayobe-seed-ubuntu-jammy - kayobe-seed-ubuntu-jammy
- kayobe-seed-images-rocky9
- kayobe-seed-upgrade-ubuntu-focal - kayobe-seed-upgrade-ubuntu-focal
- kayobe-seed-vm-rocky9
- kayobe-seed-vm-ubuntu-jammy - kayobe-seed-vm-ubuntu-jammy
- kayobe-infra-vm-rocky9
- kayobe-infra-vm-ubuntu-jammy - kayobe-infra-vm-ubuntu-jammy
gate: gate:
jobs: jobs:
- kayobe-tox-ansible-syntax - kayobe-tox-ansible-syntax
- kayobe-tox-ansible - kayobe-tox-ansible
- kayobe-tox-molecule - kayobe-tox-molecule
- kayobe-overcloud-rocky9
- kayobe-overcloud-ubuntu-jammy - kayobe-overcloud-ubuntu-jammy
- kayobe-overcloud-tls-rocky9
- kayobe-overcloud-host-configure-rocky9
- kayobe-overcloud-host-configure-ubuntu-jammy - kayobe-overcloud-host-configure-ubuntu-jammy
- kayobe-overcloud-upgrade-ubuntu-focal - kayobe-overcloud-upgrade-ubuntu-focal
- kayobe-seed-rocky9
- kayobe-seed-ubuntu-jammy - kayobe-seed-ubuntu-jammy
- kayobe-seed-upgrade-ubuntu-focal - kayobe-seed-upgrade-ubuntu-focal
- kayobe-seed-vm-rocky9
- kayobe-seed-vm-ubuntu-jammy - kayobe-seed-vm-ubuntu-jammy
- kayobe-infra-vm-rocky9
- kayobe-infra-vm-ubuntu-jammy - kayobe-infra-vm-ubuntu-jammy
experimental: experimental:
jobs: jobs:
- kayobe-seed-images-ubuntu-jammy - kayobe-seed-images-ubuntu-jammy