Skip to content

Commit 095230d

Browse files
authored
Merge pull request #25 from stackhpc/xena-rocky-dib
Xena rocky dib
2 parents e557094 + 1e63dd9 commit 095230d

File tree

10 files changed

+57
-34
lines changed

10 files changed

+57
-34
lines changed

ansible/group_vars/all/infra-vms

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ infra_vm_root_format: qcow2
4646
# http://dl.rockylinux.org/pub/rocky/8.5/images/Rocky-8-GenericCloud-8.5-20211114.2.x86_64.qcow2
4747
# when os_distribution is "rocky",
4848
# or
49-
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210210.0.x86_64.qcow2"
49+
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2"
5050
# otherwise.
5151
infra_vm_root_image: >-
5252
{%- if os_distribution == 'ubuntu' %}
5353
https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
5454
{%- elif os_distribution == 'rocky' %}
5555
http://dl.rockylinux.org/pub/rocky/8.5/images/Rocky-8-GenericCloud-8.5-20211114.2.x86_64.qcow2
5656
{%- else -%}
57-
https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210210.0.x86_64.qcow2
57+
https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2
5858
{%- endif %}
5959

6060
# Capacity of the infra VM data volume.

ansible/group_vars/all/overcloud-dib

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
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

1313
# List of overcloud host disk images to build. Each element is a dict defining
1414
# an image in a format accepted by the stackhpc.os-images role. Default is to
@@ -22,20 +22,24 @@ overcloud_dib_host_images:
2222
env: "{{ overcloud_dib_env_vars }}"
2323
packages: "{{ overcloud_dib_packages }}"
2424

25-
# DIB base OS element. Default is {{ os_distribution }}.
26-
overcloud_dib_os_element: "{{ os_distribution }}"
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 }}"
2728

2829
# DIB image OS release. Default is {{ os_release }}.
2930
overcloud_dib_os_release: "{{ os_release }}"
3031

3132
# List of default DIB elements. Default is ["centos", "cloud-init-datasources",
3233
# "disable-selinux", "enable-serial-console", "vm"] when
33-
# overcloud_dib_os_element is "centos", or ["ubuntu", "cloud-init-datasources",
34-
# "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".
3539
overcloud_dib_elements_default:
3640
- "{{ overcloud_dib_os_element }}"
3741
- "cloud-init-datasources"
38-
- "{% if overcloud_dib_os_element == 'centos' %}disable-selinux{% endif %}"
42+
- "{% if overcloud_dib_os_element in ['centos', 'rocky'] %}disable-selinux{% endif %}"
3943
- "enable-serial-console"
4044
- "vm"
4145

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

4953
# DIB default environment variables. Default is
5054
# {"DIB_BOOTLOADER_DEFAULT_CMDLINE": "nofb nomodeset gfxpayload=text
51-
# net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive", "DIB_RELEASE":
52-
# "{{ 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 }}"}.
5358
overcloud_dib_env_vars_default:
5459
DIB_BOOTLOADER_DEFAULT_CMDLINE: "nofb nomodeset gfxpayload=text net.ifnames=1"
5560
DIB_CLOUD_INIT_DATASOURCES: "ConfigDrive"
61+
DIB_CONTAINERFILE_RUNTIME: "docker"
62+
DIB_CONTAINERFILE_NETWORK_DRIVER: "host"
5663
DIB_RELEASE: "{{ overcloud_dib_os_release }}"
5764

5865
# DIB additional environment variables. Default is none.

ansible/group_vars/all/seed-vm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ seed_vm_root_format: qcow2
4646
# http://dl.rockylinux.org/pub/rocky/8.5/images/Rocky-8-GenericCloud-8.5-20211114.2.x86_64.qcow2
4747
# when os_distribution is "rocky",
4848
# or
49-
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210210.0.x86_64.qcow2"
49+
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2"
5050
# otherwise.
5151
seed_vm_root_image: >-
5252
{%- if os_distribution == 'ubuntu' %}
5353
https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
5454
{%- elif os_distribution == 'rocky' %}
5555
http://dl.rockylinux.org/pub/rocky/8.5/images/Rocky-8-GenericCloud-8.5-20211114.2.x86_64.qcow2
5656
{%- else -%}
57-
https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210210.0.x86_64.qcow2
57+
https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2
5858
{%- endif %}
5959

6060
# Capacity of the seed VM data volume.

doc/source/configuration/reference/overcloud-dib.rst

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ following option:
1919
Whether to build host disk images with DIB directly instead of through
2020
Bifrost. Setting it to true disables Bifrost image build and allows images
2121
to be built with the ``kayobe overcloud host image build`` command. Default
22-
value is false. This will change in a future release.
22+
value is false, except on Rocky where it is true. This will change in a
23+
future release.
2324

2425
With this option enabled, Bifrost will be configured to stop building a root
2526
disk image. This will become the default behaviour in a future release.
@@ -35,7 +36,8 @@ information on building disk images.
3536

3637
The default configuration builds a whole disk (partitioned) image using the
3738
selected :ref:`OS distribution <os-distribution>` (CentOS Stream 8 by default)
38-
with serial console enabled, and SELinux disabled if CentOS Stream is used.
39+
with serial console enabled, and SELinux disabled if CentOS Stream or Rocky
40+
Linux is used.
3941
`Cloud-init <https://cloudinit.readthedocs.io/en/latest/>`__ is used to process
4042
the configuration drive built by Bifrost during provisioning.
4143

@@ -48,17 +50,19 @@ the configuration drive built by Bifrost during provisioning.
4850
"elements": "{{ overcloud_dib_elements }}", "env": "{{
4951
overcloud_dib_env_vars }}", "packages": "{{ overcloud_dib_packages }}"}``.
5052
``overcloud_dib_os_element``
51-
DIB base OS element. Default is ``{{ os_distribution }}``.
53+
DIB base OS element. Default is ``{{ 'rocky-container' if os_distribution == 'rocky' else os_distribution }}``.
5254
``overcloud_dib_os_release``
5355
DIB image OS release. Default is ``{{ os_release }}``.
5456
``overcloud_dib_elements_default``
5557
List of default DIB elements. Default is ``["centos",
5658
"cloud-init-datasources", "disable-selinux", "enable-serial-console",
57-
"vm"]`` when ``overcloud_dib_os_element`` is ``centos``, or ``["ubuntu",
58-
"cloud-init-datasources", "enable-serial-console", "vm"]`` when
59-
``overcloud_dib_os_element`` is ``ubuntu``. The ``vm`` element is poorly
60-
named, and causes DIB to build a whole disk image rather than a single
61-
partition.
59+
"vm"]`` when ``overcloud_dib_os_element`` is ``centos``, or
60+
``["rocky-container", "cloud-init-datasources", "disable-selinux",
61+
"enable-serial-console", "vm"]`` when overcloud_dib_os_element is ``rocky``
62+
or ``["ubuntu", "cloud-init-datasources", "enable-serial-console", "vm"]``
63+
when ``overcloud_dib_os_element`` is ``ubuntu``. The ``vm`` element is
64+
poorly named, and causes DIB to build a whole disk image rather than a
65+
single partition.
6266
``overcloud_dib_elements_extra``
6367
List of additional DIB elements. Default is none.
6468
``overcloud_dib_elements``
@@ -67,8 +71,9 @@ the configuration drive built by Bifrost during provisioning.
6771
``overcloud_dib_env_vars_default``
6872
DIB default environment variables. Default is
6973
``{"DIB_BOOTLOADER_DEFAULT_CMDLINE": "nofb nomodeset gfxpayload=text
70-
net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive", "DIB_RELEASE":
71-
"{{ overcloud_dib_os_release }}"}``.
74+
net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive",
75+
"DIB_CONTAINERFILE_RUNTIME": "docker", "DIB_CONTAINERFILE_NETWORK_DRIVER":
76+
"host", DIB_RELEASE": "{{ overcloud_dib_os_release }}"}``.
7277
``overcloud_dib_env_vars_extra``
7378
DIB additional environment variables. Default is none.
7479
``overcloud_dib_env_vars``

doc/source/deployment.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@ deploy the overcloud nodes using Disk Image Builder (DIB), unless
178178
.. note::
179179

180180
If you are using Rocky Linux - building of the Operating System image
181-
needs to be done outside of Kayobe (no support for diskimage-builder
182-
containerfile element based builds in bifrost container).
181+
needs to be done using ``kayobe overcloud host image build``.
183182

184183
To deploy the seed services in containers::
185184

@@ -230,7 +229,8 @@ Building Overcloud Host Disk Images
230229
.. note::
231230

232231
This step is only relevant if ``overcloud_dib_build_host_images`` is set to
233-
``True``. By default, a host disk image is automatically built by Bifrost.
232+
``True``. By default, a host disk image is automatically built by Bifrost
233+
unless you're running Rocky Linux - which requires this step.
234234

235235
Host disk images are deployed on overcloud hosts during provisioning. To build
236236
host disk images::

etc/kayobe/infra-vms.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# http://dl.rockylinux.org/pub/rocky/8.5/images/Rocky-8-GenericCloud-8.5-20211114.2.x86_64.qcow2
3636
# when os_distribution is "rocky",
3737
# or
38-
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210210.0.x86_64.qcow2"
38+
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2"
3939
# otherwise.
4040
#infra_vm_root_image:
4141

etc/kayobe/overcloud-dib.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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.
10+
# is {{ os_distribution == 'rocky' }}. This will change in a future release.
1111
#overcloud_dib_build_host_images:
1212

1313
# List of overcloud host disk images to build. Each element is a dict defining
@@ -18,16 +18,20 @@
1818
# "packages": "{{ overcloud_dib_packages }}"}.
1919
#overcloud_dib_host_images:
2020

21-
# DIB base OS element. Default is {{ os_distribution }}.
21+
# DIB base OS element. Default is {{ 'rocky-container' if os_distribution ==
22+
# 'rocky' else os_distribution }}.
2223
#overcloud_dib_os_element:
2324

2425
# DIB image OS release. Default is {{ os_release }}.
2526
#overcloud_dib_os_release:
2627

2728
# List of default DIB elements. Default is ["centos", "cloud-init-datasources",
2829
# "disable-selinux", "enable-serial-console", "vm"] when
29-
# overcloud_dib_os_element is "centos", or ["ubuntu", "cloud-init-datasources",
30-
# "enable-serial-console", "vm"] when overcloud_dib_os_element is "ubuntu".
30+
# overcloud_dib_os_element is "centos", or ["rocky-container",
31+
# "cloud-init-datasources", "disable-selinux", "enable-serial-console", "vm"]
32+
# when overcloud_dib_os_element is "rocky" or
33+
# ["ubuntu", "cloud-init-datasources", "enable-serial-console", "vm"]
34+
# when overcloud_dib_os_element is "ubuntu".
3135
#overcloud_dib_elements_default:
3236

3337
# List of additional DIB elements. Default is none.
@@ -39,8 +43,9 @@
3943

4044
# DIB default environment variables. Default is
4145
# {"DIB_BOOTLOADER_DEFAULT_CMDLINE": "nofb nomodeset gfxpayload=text
42-
# net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive", "DIB_RELEASE":
43-
# "{{ overcloud_dib_os_release }}"}.
46+
# net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive",
47+
# "DIB_CONTAINERFILE_RUNTIME": "docker", "DIB_CONTAINERFILE_NETWORK_DRIVER":
48+
# "host", "DIB_RELEASE": "{{ overcloud_dib_os_release }}"}.
4449
#overcloud_dib_env_vars_default:
4550

4651
# DIB additional environment variables. Default is none.

etc/kayobe/seed-vm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# http://dl.rockylinux.org/pub/rocky/8.5/images/Rocky-8-GenericCloud-8.5-20211114.2.x86_64.qcow2
3030
# when os_distribution is "rocky",
3131
# or
32-
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210210.0.x86_64.qcow2"
32+
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2"
3333
# otherwise.
3434
#seed_vm_root_image:
3535

playbooks/kayobe-seed-vm-base/overrides.yml.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,5 @@ configdrive_debian_network_interfaces_supports_glob: false
5353
# are using for SSH to be removed. Use a dummy interface.
5454
aio_bridge_ports:
5555
- dummy1
56+
57+
overcloud_dib_build_host_images: False
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
features:
3+
- |
4+
Updates base CentOS Stream cloud image to CentOS-Stream-GenericCloud-8-20210603.0.x86_64.

0 commit comments

Comments
 (0)