Skip to content

Commit 2b0c7fc

Browse files
authored
Adds a Rocky 8 AIO test (#194)
* Adds Rocky 8 pulp repositories to dnf.yml (#152) * Adds Rocky 8 pulp repositories to dnf.yml This configures the hosts to use the mirrors in the local pulp. Prior to this change kayobe would attempt to configure CentOS stream mirrors on a Rocky host. * Use facts to pick dnf repositories * Adds Rocky 8 repository config for local pulp (#146) * Adds Rocky 8 repository config for local pulp We support Rocky 8 as a host OS with os_distribution == 'rocky'. This adds the configuration necessary to use the RPM snapshots from ark. * Abstract over version number v1 Unsure if it would be better to: 1) Update the remote on the repository 2) Change the publication to point to a new repository and keep repositories for every minor version Advantages of 1: - Single repository in pulp Advantages of 2: - Less chance of conflicts (although I think an old repo is just an old snapshot) * Fixups * Address code review comment Upadting variable name after feedback * Update docker baseurl to work with Rocky 8 (#153) This is the equivalent change of: https://review.opendev.org/c/openstack/ansible-collection-kolla/+/831642 * Adds a Rocky 8 AIO test * Use ansible fork with Rocky 8 support * Install fork of ansible unconditionally The kayobe docker image fron kayobe-automation was being built without Rocky Linux support. This is because os_distribution was not being set add build time. * Workaround lack of ovs-vsctl on the host. * Switch back to stackhpc/wallaby The PR has now been merged. * centos user has changed to cloud-user The images on smslab are now based on centos-minimal. * Add os-distribution to tempest artifact name This allows you to differentiate the artifacts across the distros. * Remove bootstrap override This is no longer necessary now the centos image also uses cloud-user. * Revert volume_size to 100GB 200G was only necessary for testing the DIB images from kayobe-config with the default LVM logical volume sizes. * Remove configure-local-networking
1 parent a95805e commit 2b0c7fc

20 files changed

+316
-179
lines changed

.automation

.github/workflows/stackhpc-all-in-one.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
description: Kayobe container image
1212
type: string
1313
required: true
14+
os_distribution:
15+
description: Host OS distribution
16+
type: string
17+
default: centos
1418
neutron_plugin:
1519
description: Neutron ML2 plugin
1620
type: string
@@ -19,6 +23,10 @@ on:
1923
description: Image for the all-in-one VM
2024
type: string
2125
default: CentOS-stream8
26+
vm_interface:
27+
description: Default network interface name
28+
type: string
29+
default: eth0
2230
vm_flavor:
2331
description: Flavor for the all-in-one VM
2432
type: string
@@ -81,11 +89,10 @@ jobs:
8189
- name: Generate terraform.tfvars
8290
run: |
8391
cat << EOF > terraform.tfvars
84-
ssh_private_key = "id_rsa"
8592
ssh_public_key = "id_rsa.pub"
93+
aio_vm_interface = "${{ env.VM_INTERFACE }}"
8694
aio_vm_name = "${{ env.VM_NAME }}"
8795
aio_vm_image = "${{ env.VM_IMAGE }}"
88-
aio_vm_keypair = "${{ env.VM_KEYPAIR }}"
8996
aio_vm_flavor = "${{ env.VM_FLAVOR }}"
9097
aio_vm_network = "${{ env.VM_NETWORK }}"
9198
aio_vm_subnet = "${{ env.VM_SUBNET }}"
@@ -94,10 +101,10 @@ jobs:
94101
env:
95102
VM_NAME: "skc-ci-aio-${{ inputs.neutron_plugin }}-${{ github.run_id }}"
96103
VM_IMAGE: ${{ inputs.vm_image }}
97-
VM_KEYPAIR: "skc-ci-aio-${{ inputs.neutron_plugin }}-${{ github.run_id }}"
98104
VM_FLAVOR: ${{ inputs.vm_flavor }}
99105
VM_NETWORK: ${{ inputs.vm_network }}
100106
VM_SUBNET: ${{ inputs.vm_subnet }}
107+
VM_INTERFACE: ${{ inputs.vm_interface }}
101108

102109
- name: Terraform Plan
103110
run: terraform plan
@@ -151,10 +158,12 @@ jobs:
151158
run: |
152159
cat << EOF > etc/kayobe/environments/$KAYOBE_ENVIRONMENT/zz-aio-scenario.yml
153160
---
161+
os_distribution: ${{ env.OS_DISTRIBUTION }}
154162
kolla_enable_ovn: ${{ env.ENABLE_OVN }}
155163
EOF
156164
env:
157165
ENABLE_OVN: ${{ inputs.neutron_plugin == 'ovn' }}
166+
OS_DISTRIBUTION: ${{ inputs.os_distribution }}
158167

159168
# https://renehernandez.io/snippets/multiline-strings-as-a-job-output-in-github-actions/
160169
- name: Set SSH key output
@@ -217,7 +226,7 @@ jobs:
217226
- name: Upload test result artifacts
218227
uses: actions/upload-artifact@v3
219228
with:
220-
name: tempest-results-${{ inputs.neutron_plugin }}
229+
name: tempest-results-${{ inputs.os_distribution }}-${{ inputs.neutron_plugin }}
221230
path: tempest-artifacts/*
222231

223232
- name: Fail if any Tempest tests failed

.github/workflows/stackhpc-pull-request.yml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ jobs:
3939
uses: ./.github/workflows/stackhpc-build-kayobe-image.yml
4040
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
4141

42-
all-in-one-ovs:
43-
name: aio (OVS)
42+
all-in-one-centos-ovs:
43+
name: aio (CentOS OVS)
4444
needs:
4545
- build-kayobe-image
4646
uses: ./.github/workflows/stackhpc-all-in-one.yml
@@ -51,8 +51,8 @@ jobs:
5151
secrets: inherit
5252
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
5353

54-
all-in-one-ovn:
55-
name: aio (OVN)
54+
all-in-one-centos-ovn:
55+
name: aio (CentOS OVN)
5656
needs:
5757
- build-kayobe-image
5858
uses: ./.github/workflows/stackhpc-all-in-one.yml
@@ -62,3 +62,33 @@ jobs:
6262
OS_CLOUD: sms-lab-release
6363
secrets: inherit
6464
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
65+
66+
all-in-one-rocky-ovs:
67+
name: aio (Rocky OVS)
68+
needs:
69+
- build-kayobe-image
70+
uses: ./.github/workflows/stackhpc-all-in-one.yml
71+
with:
72+
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
73+
os_distribution: rocky
74+
neutron_plugin: ovs
75+
vm_image: Rocky8
76+
vm_interface: ens3
77+
OS_CLOUD: sms-lab-release
78+
secrets: inherit
79+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
80+
81+
all-in-one-rocky-ovn:
82+
name: aio (Rocky OVN)
83+
needs:
84+
- build-kayobe-image
85+
uses: ./.github/workflows/stackhpc-all-in-one.yml
86+
with:
87+
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
88+
os_distribution: rocky
89+
neutron_plugin: ovn
90+
vm_image: Rocky8
91+
vm_interface: ens3
92+
OS_CLOUD: sms-lab-release
93+
secrets: inherit
94+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'

etc/kayobe/ansible/configure-aio-resources.yml

Lines changed: 50 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,56 @@
66
vars:
77
venv: '{{ virtualenv_path }}/openstack'
88
tasks:
9-
- block:
10-
- name: Install python openstack client
11-
pip:
12-
name: python-openstackclient
13-
virtualenv: '{{ venv }}'
14-
extra_args: -c "{{ pip_upper_constraints_file }}"
9+
- name: Install python build dependencies
10+
package:
11+
name:
12+
- "{% if ansible_facts.os_family == 'RedHat' %}gcc{% else %}build-essential{% endif %}"
13+
- "python3-dev{% if ansible_facts.os_family == 'RedHat' %}el{% endif %}"
14+
cache_valid_time: "{{ apt_cache_valid_time if ansible_facts.os_family == 'Debian' else omit }}"
15+
update_cache: "{{ True if ansible_facts.os_family == 'Debian' else omit }}"
16+
state: present
17+
become: true
1518

16-
- name: Include kolla secrets
17-
include_vars:
18-
dir: '{{ kayobe_env_config_path }}/kolla/'
19-
files_matching: passwords.yml
20-
name: kolla_passwords
19+
- name: Install python openstack client
20+
pip:
21+
name: python-openstackclient
22+
virtualenv: '{{ venv }}'
23+
extra_args: -c "{{ pip_upper_constraints_file }}"
2124

22-
- name: Add an IP to connect to the instances
23-
# FIXME: host configure will have bounced the bridge
24-
# and removed the IP
25-
command: ip a add 10.0.2.1/24 dev breth1
26-
register: result
27-
failed_when: 'result.rc !=0 and "RTNETLINK answers: File exists" not in
28-
result.stderr'
29-
changed_when: result.rc == 0
30-
become: true
25+
- name: Include kolla secrets
26+
include_vars:
27+
dir: '{{ kayobe_env_config_path }}/kolla/'
28+
files_matching: passwords.yml
29+
name: kolla_passwords
3130

32-
- name: Run init-run-once
33-
script:
34-
cmd: scripts/aio-init.sh
35-
creates: /tmp/.init-runonce
36-
environment:
37-
KOLLA_OPENSTACK_COMMAND: '{{ venv }}/bin/openstack'
38-
OS_PROJECT_DOMAIN_NAME: Default
39-
OS_USER_DOMAIN_NAME: Default
40-
OS_PROJECT_NAME: admin
41-
OS_TENANT_NAME: admin
42-
OS_USERNAME: admin
43-
OS_PASSWORD: "{{ kolla_passwords.keystone_admin_password | mandatory('Could\
44-
\ not find keystone_admin_password in passwords.yml') }}"
45-
# Use kolla_external_fqdn in wallaby
46-
OS_AUTH_URL: http://{{ kolla_external_fqdn | default(public_net_name
47-
| net_fqdn) | default(public_net_name | net_vip_address, true) }}:5000
48-
OS_INTERFACE: public
49-
OS_ENDPOINT_TYPE: publicURL
50-
OS_IDENTITY_API_VERSION: 3
51-
OS_REGION_NAME: RegionOne
52-
OS_AUTH_PLUGIN: password
31+
- name: Add an IP to connect to the instances
32+
# FIXME: host configure will have bounced the bridge
33+
# and removed the IP
34+
command: ip a add 10.0.2.1/24 dev breth1
35+
register: result
36+
failed_when: 'result.rc !=0 and "RTNETLINK answers: File exists" not in
37+
result.stderr'
38+
changed_when: result.rc == 0
39+
become: true
40+
41+
- name: Run init-run-once
42+
script:
43+
cmd: scripts/aio-init.sh
44+
creates: /tmp/.init-runonce
45+
environment:
46+
KOLLA_OPENSTACK_COMMAND: '{{ venv }}/bin/openstack'
47+
OS_PROJECT_DOMAIN_NAME: Default
48+
OS_USER_DOMAIN_NAME: Default
49+
OS_PROJECT_NAME: admin
50+
OS_TENANT_NAME: admin
51+
OS_USERNAME: admin
52+
OS_PASSWORD: "{{ kolla_passwords.keystone_admin_password | mandatory('Could\
53+
\ not find keystone_admin_password in passwords.yml') }}"
54+
# Use kolla_external_fqdn in wallaby
55+
OS_AUTH_URL: http://{{ kolla_external_fqdn | default(public_net_name
56+
| net_fqdn) | default(public_net_name | net_vip_address, true) }}:5000
57+
OS_INTERFACE: public
58+
OS_ENDPOINT_TYPE: publicURL
59+
OS_IDENTITY_API_VERSION: 3
60+
OS_REGION_NAME: RegionOne
61+
OS_AUTH_PLUGIN: password

etc/kayobe/compute.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@
172172
# compute_qemu_conf_extra.
173173
#compute_qemu_conf:
174174

175+
# Whether to enable libvirt SASL authentication. Default is true.
176+
#compute_libvirt_enable_sasl:
177+
178+
# libvirt SASL password. Default is unset.
179+
#compute_libvirt_sasl_password:
180+
175181
# Whether to enable a libvirt TLS listener. Default is false.
176182
#compute_libvirt_enable_tls:
177183

etc/kayobe/dnf.yml

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,27 @@
4141
# file: myrepo
4242
# gpgkey: http://gpgkey
4343
# gpgcheck: yes
44-
dnf_custom_repos:
44+
dnf_custom_repos: "{{ dnf_custom_repos_el8 | combine(lookup('vars', 'dnf_custom_repos_' ~ ansible_facts.distribution | lower )) }}"
45+
46+
# Custom repositories shared between all RHEL derivatives.
47+
dnf_custom_repos_el8:
48+
epel:
49+
baseurl: "{{ stackhpc_repo_epel_url }}"
50+
description: "Extra Packages for Enterprise Linux $releasever - $basearch"
51+
enabled: "{{ dnf_enable_epel | bool }}"
52+
file: epel
53+
gpgkey: "{{ dnf_epel_gpg_key_url }}"
54+
gpgcheck: yes
55+
epel-modular:
56+
baseurl: "{{ stackhpc_repo_epel_modular_url }}"
57+
description: "Extra Packages for Enterprise Linux Modular $releasever - $basearch"
58+
enabled: "{{ dnf_enable_epel | bool }}"
59+
file: epel-modular
60+
gpgkey: "{{ dnf_epel_gpg_key_url }}"
61+
gpgcheck: yes
62+
63+
# CentOS Stream 8 specific repositories
64+
dnf_custom_repos_centos:
4565
appstream:
4666
baseurl: "{{ stackhpc_repo_centos_stream_appstream_url }}"
4767
description: "CentOS Stream $releasever - AppStream"
@@ -60,19 +80,26 @@ dnf_custom_repos:
6080
file: CentOS-Stream-Extras
6181
gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
6282
gpgcheck: yes
63-
epel:
64-
baseurl: "{{ stackhpc_repo_epel_url }}"
65-
description: "Extra Packages for Enterprise Linux $releasever - $basearch"
66-
enabled: "{{ dnf_enable_epel | bool }}"
67-
file: epel
68-
gpgkey: "{{ dnf_epel_gpg_key_url }}"
83+
84+
# Rocky 8 specific repositories
85+
dnf_custom_repos_rocky:
86+
appstream:
87+
baseurl: "{{ stackhpc_repo_rocky_appstream_url }}"
88+
description: "Rocky Linux $releasever - AppStream"
89+
file: Rocky-AppStream
90+
gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
6991
gpgcheck: yes
70-
epel-modular:
71-
baseurl: "{{ stackhpc_repo_epel_modular_url }}"
72-
description: "Extra Packages for Enterprise Linux Modular $releasever - $basearch"
73-
enabled: "{{ dnf_enable_epel | bool }}"
74-
file: epel-modular
75-
gpgkey: "{{ dnf_epel_gpg_key_url }}"
92+
baseos:
93+
baseurl: "{{ stackhpc_repo_rocky_baseos_url }}"
94+
description: "Rocky Linux $releasever - BaseOS"
95+
file: Rocky-BaseOS
96+
gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
97+
gpgcheck: yes
98+
extras:
99+
baseurl: "{{ stackhpc_repo_rocky_extras_url }}"
100+
description: "Rocky Linux $releasever - Extras"
101+
file: Rocky-Extras
102+
gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
76103
gpgcheck: yes
77104

78105
# Whether to enable EPEL repositories. This affects RedHat-based systems only.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
3+
compute_libvirt_sasl_password: "{{ lookup('password', kayobe_env_config_path ~ '/secrets/libvirt_sasl_password') }}"

etc/kayobe/environments/ci-aio/kolla/globals.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ openstack_service_workers: "1"
1010
openstack_service_rpc_workers: "1"
1111

1212
docker_yum_baseurl: "{{ stackhpc_repo_docker_url }}"
13-
docker_yum_gpgkey: "https://download.docker.com/linux/{% raw %}{{ ansible_facts.distribution | lower }}{% endraw %}/gpg"
13+
docker_yum_gpgkey: "https://download.docker.com/linux/centos/gpg"

etc/kayobe/environments/ci-aio/stackhpc-ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ stackhpc_repo_ubuntu_cloud_archive_version: "{{ stackhpc_pulp_repo_ubuntu_cloud_
4141
stackhpc_repo_ubuntu_focal_version: "{{ stackhpc_pulp_repo_ubuntu_focal_version }}"
4242
stackhpc_repo_ubuntu_focal_security_version: "{{ stackhpc_pulp_repo_ubuntu_focal_security_version }}"
4343
stackhpc_repo_docker_ce_ubuntu_version: "{{ stackhpc_pulp_repo_docker_ce_ubuntu_version }}"
44-
44+
stackhpc_repo_rocky_baseos_version: "{{ stackhpc_pulp_repo_rocky_8_6_baseos_version }}"
45+
stackhpc_repo_rocky_appstream_version: "{{ stackhpc_pulp_repo_rocky_8_6_appstream_version }}"
46+
stackhpc_repo_rocky_extras_version: "{{ stackhpc_pulp_repo_rocky_8_6_extras_version }}"
4547

4648
# Host and port of container registry.
4749
# Push built images to the development Pulp service registry.

etc/kayobe/kolla.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,10 @@ kolla_ansible_source_version: "{{ stackhpc_kolla_ansible_source_version }}"
4848
#kolla_ansible_venv:
4949

5050
# Extra requirements to install inside the kolla-ansible virtualenv.
51-
kolla_ansible_venv_extra_requirements: "{{ lookup('vars', 'kolla_ansible_venv_extra_requirements_' ~ os_distribution, default=[]) }}"
52-
53-
# Rocky specific requirements in the kolla-ansible virtualenv
54-
kolla_ansible_venv_extra_requirements_rocky:
55-
# NOTE(wszumski): This is wallaby specific as we can use ansible-core 2.11 in Xena.
51+
kolla_ansible_venv_extra_requirements:
52+
# NOTE(wszumski): Fork with support for Rocky Linux target hosts. Remove in
53+
# Xena as kayobe supports ansible 2.11 which has Rocky Support out of the
54+
# box.
5655
- 'ansible-base@git+https://github.com/stackhpc/ansible@stackhpc/2.10/rocky'
5756

5857
# Pip requirement specifier for the ansible package. NOTE: This limits the
@@ -523,6 +522,7 @@ kolla_build_customizations: "{{ kolla_build_customizations_common | combine(koll
523522
#kolla_enable_keystone_horizon_policy_file:
524523
#kolla_enable_kibana:
525524
#kolla_enable_kuryr:
525+
kolla_enable_nova_libvirt_container: "{{ os_distribution not in ['rocky'] }}"
526526
#kolla_enable_magnum:
527527
#kolla_enable_manila:
528528
#kolla_enable_manila_backend_cephfs_native:

0 commit comments

Comments
 (0)