Skip to content

Commit 8c91175

Browse files
authored
Merge pull request #233 from stackhpc/feature/wallaby/rocky
Add support for Rocky Linux 8
2 parents 0091b4d + c7ed881 commit 8c91175

File tree

18 files changed

+187
-38
lines changed

18 files changed

+187
-38
lines changed

ansible/group_vars/all/dnf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,18 @@ dnf_config: {}
77
# Whether or not to use a local Yum mirror. Default value is 'false'.
88
dnf_use_local_mirror: false
99

10-
# Mirror FQDN for Yum repos. Default value is 'mirror.centos.org'.
10+
# Mirror FQDN for Yum CentOS repos. Default value is 'mirror.centos.org'.
1111
dnf_centos_mirror_host: 'mirror.centos.org'
1212

1313
# Mirror directory for Yum CentOS repos. Default value is 'centos'.
1414
dnf_centos_mirror_directory: 'centos'
1515

16+
# Mirror FQDN for Yum Rocky repos. Default value is 'dl.rockylinux.org'.
17+
dnf_rocky_mirror_host: 'dl.rockylinux.org'
18+
19+
# Mirror directory for Yum Rocky repos. Default value is 'pub/rocky'.
20+
dnf_rocky_mirror_directory: 'pub/rocky'
21+
1622
# Mirror FQDN for Yum EPEL repos. Default value is
1723
# 'download.fedoraproject.org'.
1824
dnf_epel_mirror_host: 'download.fedoraproject.org'

ansible/group_vars/all/globals

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,17 @@ kayobe_ansible_user: "stack"
4444
###############################################################################
4545
# OS distribution.
4646

47-
# OS distribution name. Valid options are "centos", "ubuntu". Default is
48-
# "centos".
47+
# OS distribution name. Valid options are "centos", "rocky", "ubuntu". Default
48+
# is "centos".
4949
os_distribution: "centos"
5050

5151
# OS release. Valid options are "8-stream" when os_distribution is "centos", or
52-
# "focal" when os_distribution is "ubuntu".
53-
os_release: "{{ '8-stream' if os_distribution == 'centos' else 'focal' }}"
52+
# "8" when os_distribution is "rocky", or "focal" when os_distribution is
53+
# "ubuntu".
54+
os_release: >-
55+
{{ '8-stream' if os_distribution == 'centos'
56+
else '8' if os_distribution == 'rocky'
57+
else 'focal' }}
5458

5559
###############################################################################
5660
# Ansible configuration.

ansible/group_vars/all/infra-vms

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,16 @@ infra_vm_root_format: qcow2
4343
# Base image for the infra VM root volume. Default is
4444
# "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img"
4545
# when os_distribution is "ubuntu", or
46-
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210210.0.x86_64.qcow2"
46+
# http://dl.rockylinux.org/pub/rocky/8.5/images/Rocky-8-GenericCloud-8.5-20211114.2.x86_64.qcow2
47+
# when os_distribution is "rocky",
48+
# or
49+
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2"
4750
# otherwise.
4851
infra_vm_root_image: >-
4952
{%- if os_distribution == 'ubuntu' %}
5053
https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
54+
{%- elif os_distribution == 'rocky' %}
55+
http://dl.rockylinux.org/pub/rocky/8.5/images/Rocky-8-GenericCloud-8.5-20211114.2.x86_64.qcow2
5156
{%- else -%}
5257
https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210210.0.x86_64.qcow2
5358
{%- endif %}

ansible/group_vars/all/kolla

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ kolla_node_custom_config_path: "{{ kolla_config_path }}/config"
5353
# Kolla configuration.
5454

5555
# Kolla base container image distribution. Options are "centos", "debian",
56-
# "ubuntu". Default is {{ os_distribution }}.
57-
kolla_base_distro: "{{ os_distribution }}"
56+
# "ubuntu". Default is
57+
# {{ 'centos' if os_distribution == 'rocky' else os_distribution }}.
58+
kolla_base_distro: "{{ 'centos' if os_distribution == 'rocky' else os_distribution }}"
5859

5960
# Kolla container image type: binary or source.
6061
kolla_install_type: "binary"

ansible/group_vars/all/overcloud-dib

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,39 @@
77
# Whether to build host disk images with DIB directly instead of through
88
# Bifrost. Setting it to true disables Bifrost image build and allows images to
99
# be built with the `kayobe overcloud host image build` command. Default value
10-
# is False. This will change in a future release.
11-
overcloud_dib_build_host_images: False
10+
# is {{ os_distribution == 'rocky' }}. This will change in a future release.
11+
overcloud_dib_build_host_images: "{{ os_distribution == 'rocky' }}"
1212

13-
# DIB base OS element. Default is {{ os_distribution }}.
14-
overcloud_dib_os_element: "{{ os_distribution }}"
13+
# List of overcloud host disk images to build. Each element is a dict defining
14+
# an image in a format accepted by the stackhpc.os-images role. Default is to
15+
# build an image named "deployment_image" configured with the overcloud_dib_*
16+
# variables defined below: {"name": "deployment_image", "elements": "{{
17+
# overcloud_dib_elements }}", "env": "{{ overcloud_dib_env_vars }}",
18+
# "packages": "{{ overcloud_dib_packages }}"}.
19+
overcloud_dib_host_images:
20+
- name: "deployment_image"
21+
elements: "{{ overcloud_dib_elements }}"
22+
env: "{{ overcloud_dib_env_vars }}"
23+
packages: "{{ overcloud_dib_packages }}"
24+
25+
# DIB base OS element. Default is {{ 'rocky-container' if os_distribution ==
26+
# 'rocky' else os_distribution }}.
27+
overcloud_dib_os_element: "{{ 'rocky-container' if os_distribution == 'rocky' else os_distribution }}"
1528

1629
# DIB image OS release. Default is {{ os_release }}.
1730
overcloud_dib_os_release: "{{ os_release }}"
1831

1932
# List of default DIB elements. Default is ["centos", "cloud-init-datasources",
2033
# "disable-selinux", "enable-serial-console", "vm"] when
21-
# overcloud_dib_os_element is "centos", or ["ubuntu", "cloud-init-datasources",
22-
# "enable-serial-console", "vm"] when overcloud_dib_os_element is "ubuntu".
34+
# overcloud_dib_os_element is "centos", or ["rocky-container",
35+
# "cloud-init-datasources", "disable-selinux", "enable-serial-console", "vm"]
36+
# when overcloud_dib_os_element is "rocky" or
37+
# ["ubuntu", "cloud-init-datasources", "enable-serial-console", "vm"]
38+
# when overcloud_dib_os_element is "ubuntu".
2339
overcloud_dib_elements_default:
2440
- "{{ overcloud_dib_os_element }}"
2541
- "cloud-init-datasources"
26-
- "{% if overcloud_dib_os_element == 'centos' %}disable-selinux{% endif %}"
42+
- "{% if overcloud_dib_os_element in ['centos', 'rocky'] %}disable-selinux{% endif %}"
2743
- "enable-serial-console"
2844
- "vm"
2945

@@ -36,11 +52,14 @@ overcloud_dib_elements: "{{ overcloud_dib_elements_default | select | list + ove
3652

3753
# DIB default environment variables. Default is
3854
# {"DIB_BOOTLOADER_DEFAULT_CMDLINE": "nofb nomodeset gfxpayload=text
39-
# net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive", "DIB_RELEASE":
40-
# "{{ overcloud_dib_os_release }}"}.
55+
# net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive",
56+
# "DIB_CONTAINERFILE_RUNTIME": "docker", "DIB_CONTAINERFILE_NETWORK_DRIVER":
57+
# "host", "DIB_RELEASE": "{{ overcloud_dib_os_release }}"}.
4158
overcloud_dib_env_vars_default:
4259
DIB_BOOTLOADER_DEFAULT_CMDLINE: "nofb nomodeset gfxpayload=text net.ifnames=1"
4360
DIB_CLOUD_INIT_DATASOURCES: "ConfigDrive"
61+
DIB_CONTAINERFILE_RUNTIME: "docker"
62+
DIB_CONTAINERFILE_NETWORK_DRIVER: "host"
4463
DIB_RELEASE: "{{ overcloud_dib_os_release }}"
4564

4665
# DIB additional environment variables. Default is none.
@@ -53,6 +72,20 @@ overcloud_dib_env_vars: "{{ overcloud_dib_env_vars_default | combine(overcloud_d
5372
# List of DIB packages to install. Default is to install no extra packages.
5473
overcloud_dib_packages: []
5574

75+
# List of default git repositories containing Diskimage Builder (DIB) elements.
76+
# See stackhpc.os-images role for usage. Default is empty.
77+
overcloud_dib_git_elements_default: []
78+
79+
# List of additional git repositories containing Diskimage Builder (DIB)
80+
# elements. See stackhpc.os-images role for usage. Default is empty.
81+
overcloud_dib_git_elements_extra: []
82+
83+
# List of git repositories containing Diskimage Builder (DIB) elements. See
84+
# stackhpc.os-images role for usage. Default is a combination of
85+
# overcloud_dib_git_elements_default and overcloud_dib_git_elements_extra.
86+
overcloud_dib_git_elements: >-
87+
{{ overcloud_dib_git_elements_default + overcloud_dib_git_elements_extra }}
88+
5689
# Upper constraints file for installing packages in the virtual environment
5790
# used for building overcloud host disk images. Default is {{
5891
# pip_upper_constraints_file }}.

ansible/group_vars/all/seed-vm

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,17 @@ seed_vm_root_format: qcow2
4242

4343
# Base image for the seed VM root volume. Default is
4444
# "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img"
45-
# when os_distribution is "ubuntu", or
46-
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210210.0.x86_64.qcow2"
45+
# when os_distribution is "ubuntu",
46+
# http://dl.rockylinux.org/pub/rocky/8.5/images/Rocky-8-GenericCloud-8.5-20211114.2.x86_64.qcow2
47+
# when os_distribution is "rocky",
48+
# or
49+
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2"
4750
# otherwise.
4851
seed_vm_root_image: >-
4952
{%- if os_distribution == 'ubuntu' %}
5053
https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
54+
{%- elif os_distribution == 'rocky' %}
55+
http://dl.rockylinux.org/pub/rocky/8.5/images/Rocky-8-GenericCloud-8.5-20211114.2.x86_64.qcow2
5156
{%- else -%}
5257
https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210210.0.x86_64.qcow2
5358
{%- endif %}

ansible/roles/dnf/tasks/local-mirror.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
- name: Copy CentOS repo templates
3+
vars:
4+
repo_file_prefix: "{{ 'CentOS-Stream' if ansible_facts.distribution == 'CentOS' else 'Rocky' }}"
35
template:
46
src: "{{ item }}.j2"
57
dest: /etc/yum.repos.d/{{ item }}
@@ -8,9 +10,9 @@
810
mode: 0664
911
become: True
1012
loop:
11-
- CentOS-Stream-AppStream.repo
12-
- CentOS-Stream-BaseOS.repo
13-
- CentOS-Stream-Extras.repo
13+
- "{{ repo_file_prefix }}-AppStream.repo"
14+
- "{{ repo_file_prefix }}-BaseOS.repo"
15+
- "{{ repo_file_prefix }}-Extras.repo"
1416

1517
- name: Remove old (pre CentOS 8.3) repo files
1618
file:
@@ -21,6 +23,7 @@
2123
- CentOS-AppStream.repo
2224
- CentOS-Base.repo
2325
- CentOS-Extras.repo
26+
when: ansible_facts.distribution == 'CentOS'
2427

2528
- name: Update cache
2629
dnf:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Rocky-AppStream.repo
2+
#
3+
# The mirrorlist system uses the connecting IP address of the client and the
4+
# update status of each mirror to pick current mirrors that are geographically
5+
# close to the client. You should use this for Rocky updates unless you are
6+
# manually picking other mirrors.
7+
#
8+
# If the mirrorlist does not work for you, you can try the commented out
9+
# baseurl line instead.
10+
11+
[appstream]
12+
name=Rocky Linux $releasever - AppStream
13+
baseurl=http://{{ dnf_rocky_mirror_host }}/{{ dnf_rocky_mirror_directory }}/$releasever/AppStream/$basearch/os/
14+
gpgcheck=1
15+
enabled=1
16+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Rocky-BaseOS.repo
2+
#
3+
# The mirrorlist system uses the connecting IP address of the client and the
4+
# update status of each mirror to pick current mirrors that are geographically
5+
# close to the client. You should use this for Rocky updates unless you are
6+
# manually picking other mirrors.
7+
#
8+
# If the mirrorlist does not work for you, you can try the commented out
9+
# baseurl line instead.
10+
11+
[baseos]
12+
name=Rocky Linux $releasever - BaseOS
13+
baseurl=http://{{ dnf_rocky_mirror_host }}/{{ dnf_rocky_mirror_directory }}/$releasever/BaseOS/$basearch/os/
14+
gpgcheck=1
15+
enabled=1
16+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Rocky-Extras.repo
2+
#
3+
# The mirrorlist system uses the connecting IP address of the client and the
4+
# update status of each mirror to pick current mirrors that are geographically
5+
# close to the client. You should use this for Rocky updates unless you are
6+
# manually picking other mirrors.
7+
#
8+
# If the mirrorlist does not work for you, you can try the commented out
9+
# baseurl line instead.
10+
11+
[extras]
12+
name=Rocky Linux $releasever - Extras
13+
baseurl=http://{{ dnf_rocky_mirror_host }}/{{ dnf_rocky_mirror_directory }}/$releasever/extras/$basearch/os/
14+
gpgcheck=1
15+
enabled=1
16+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial

0 commit comments

Comments
 (0)