Skip to content

Commit 1def418

Browse files
authored
Merge pull request #1687 from stackhpc/caracal-sync-master
Caracal sync master
2 parents 04a71db + a2e81f0 commit 1def418

File tree

75 files changed

+361
-73
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+361
-73
lines changed

.ansible-lint-ignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ etc/kayobe/ansible/vault-generate-internal-tls.yml fqcn[action-core]
55
etc/kayobe/ansible/vault-generate-test-external-tls.yml fqcn[action-core]
66
etc/kayobe/ansible/rabbitmq-reset.yml command-instead-of-module
77
etc/kayobe/ansible/ubuntu-upgrade.yml syntax-check[missing-file]
8+
etc/kayobe/ansible/check-kayobe-version.yml command-instead-of-module
9+
etc/kayobe/ansible/check-kolla-ansible-version.yml command-instead-of-module

.github/workflows/runner-selector.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737

3838
- name: Set output for container image build runner
3939
run: echo "Setting runner for ${{ inputs.runner_env }} -> ${{ vars.RUNS_ON_TARGET_CONTAINER_IMAGE_BUILDER }}"
40-
40+
4141
- id: container-image-build-runner
4242
run: echo "runner_name_container_image_build=${{ vars.RUNS_ON_TARGET_CONTAINER_IMAGE_BUILDER }}" >> $GITHUB_OUTPUT
4343

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

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ name: All in one
77
on:
88
workflow_call:
99
inputs:
10-
runner:
11-
required: false
10+
runner_env:
11+
description: Which cloud to run on?
1212
type: string
13-
description: 'Runner name'
14-
default: 'arc-skc-aio-runner'
13+
default: SMS Lab
1514
kayobe_image:
1615
description: Kayobe container image
1716
type: string
@@ -40,18 +39,6 @@ on:
4039
description: Default network interface name
4140
type: string
4241
default: ens3
43-
vm_flavor:
44-
description: Flavor for the all-in-one VM
45-
type: string
46-
default: en1.medium
47-
vm_network:
48-
description: Network for the all-in-one VM
49-
type: string
50-
default: stackhpc-ci
51-
vm_subnet:
52-
description: Subnet for the all-in-one VM
53-
type: string
54-
default: stackhpc-ci
5542
OS_CLOUD:
5643
description: Name of cloud in clouds.yaml
5744
type: string
@@ -87,11 +74,18 @@ on:
8774
required: true
8875

8976
jobs:
77+
runner-selection:
78+
uses: ./.github/workflows/runner-selector.yml
79+
with:
80+
runner_env: ${{ inputs.upgrade == true && 'Leafcloud' || inputs.runner_env }}
9081
# NOTE: Runner needs unzip and nodejs packages.
9182
all-in-one:
9283
name: All in one
9384
if: ${{ inputs.if && !cancelled() }}
94-
runs-on: ${{ inputs.runner }}
85+
environment: ${{ inputs.upgrade == true && 'Leafcloud' || inputs.runner_env }}
86+
runs-on: ${{ needs.runner-selection.outputs.runner_name_aio }}
87+
needs:
88+
- runner-selection
9589
permissions: {}
9690
env:
9791
KAYOBE_ENVIRONMENT: ci-aio
@@ -170,9 +164,9 @@ jobs:
170164
aio_vm_interface = "${{ env.VM_INTERFACE }}"
171165
aio_vm_name = "${{ env.VM_NAME }}"
172166
aio_vm_image = "${{ env.VM_IMAGE }}"
173-
aio_vm_flavor = "${{ env.VM_FLAVOR }}"
174-
aio_vm_network = "${{ env.VM_NETWORK }}"
175-
aio_vm_subnet = "${{ env.VM_SUBNET }}"
167+
aio_vm_flavor = "${{ vars.HOST_IMAGE_BUILD_FLAVOR }}"
168+
aio_vm_network = "${{ vars.HOST_IMAGE_BUILD_NETWORK }}"
169+
aio_vm_subnet = "${{ vars.HOST_IMAGE_BUILD_SUBNET }}"
176170
aio_vm_volume_size = "${{ env.VM_VOLUME_SIZE }}"
177171
aio_vm_tags = ${{ env.VM_TAGS }}
178172
EOF
@@ -181,9 +175,6 @@ jobs:
181175
SSH_USERNAME: "${{ inputs.ssh_username }}"
182176
VM_NAME: "skc-ci-aio-${{ inputs.neutron_plugin }}-${{ github.run_id }}"
183177
VM_IMAGE: ${{ steps.image_name.outputs.image_name }}
184-
VM_FLAVOR: ${{ inputs.vm_flavor }}
185-
VM_NETWORK: ${{ inputs.vm_network }}
186-
VM_SUBNET: ${{ inputs.vm_subnet }}
187178
VM_INTERFACE: ${{ inputs.vm_interface }}
188179
VM_VOLUME_SIZE: ${{ inputs.upgrade && '65' || '50' }}
189180
VM_TAGS: '["skc-ci-aio", "PR=${{ github.event.number }}"]'
@@ -192,7 +183,7 @@ jobs:
192183
run: terraform plan
193184
working-directory: ${{ github.workspace }}/terraform/aio
194185
env:
195-
OS_CLOUD: ${{ inputs.OS_CLOUD }}
186+
OS_CLOUD: ${{ vars.OS_CLOUD }}
196187
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
197188
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
198189

@@ -213,7 +204,7 @@ jobs:
213204
exit 1
214205
working-directory: ${{ github.workspace }}/terraform/aio
215206
env:
216-
OS_CLOUD: ${{ inputs.OS_CLOUD }}
207+
OS_CLOUD: ${{ vars.OS_CLOUD }}
217208
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
218209
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
219210

@@ -471,7 +462,7 @@ jobs:
471462
run: terraform destroy -auto-approve
472463
working-directory: ${{ github.workspace }}/terraform/aio
473464
env:
474-
OS_CLOUD: ${{ inputs.OS_CLOUD }}
465+
OS_CLOUD: ${{ vars.OS_CLOUD }}
475466
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
476467
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
477468
if: always()

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,21 @@ jobs:
236236
upgrade: true
237237
secrets: inherit
238238
if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
239+
240+
all-in-one-upgrade-rocky-9-ovs:
241+
name: aio upgrade (Rocky 9 OVS)
242+
needs:
243+
- check-changes
244+
- build-kayobe-image
245+
uses: ./.github/workflows/stackhpc-all-in-one.yml
246+
with:
247+
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
248+
os_distribution: rocky
249+
os_release: "9"
250+
ssh_username: cloud-user
251+
neutron_plugin: ovs
252+
OS_CLOUD: openstack
253+
if: ${{ needs.check-changes.outputs.aio == 'true' }}
254+
upgrade: true
255+
secrets: inherit
256+
if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}

.github/workflows/update-dependencies.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414

1515
jobs:
1616
propose_github_release_updates:
17+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
1718
runs-on: ubuntu-22.04
1819
strategy:
1920
matrix:

.github/workflows/upstream-sync.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Upstream Sync
3+
'on':
4+
schedule:
5+
- cron: "15 8 * * 1"
6+
workflow_dispatch:
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
jobs:
11+
synchronise-2023-1:
12+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
13+
name: Synchronise 2023.1
14+
uses: stackhpc/.github/.github/workflows/upstream-sync.yml@main
15+
with:
16+
release_series: 2023.1
17+
upstream: openstack/kayobe-config
18+
synchronise-2024-1:
19+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
20+
name: Synchronise 2024.1
21+
uses: stackhpc/.github/.github/workflows/upstream-sync.yml@main
22+
with:
23+
release_series: 2024.1
24+
upstream: openstack/kayobe-config
25+
synchronise-2025-1:
26+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
27+
name: Synchronise 2025.1
28+
uses: stackhpc/.github/.github/workflows/upstream-sync.yml@main
29+
with:
30+
release_series: 2025.1
31+
upstream: openstack/kayobe-config
32+
synchronise-master:
33+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
34+
name: Synchronise master
35+
uses: stackhpc/.github/.github/workflows/upstream-sync.yml@main
36+
with:
37+
release_series: master
38+
upstream: openstack/kayobe-config

doc/source/configuration/ipa.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ StackHPC provides prebuilt Ironic Python Agent (IPA) images in Release Train
1111
through Ark.
1212

1313
These images are built in CI using a GitHub workflow and are configured in this
14-
repository. See :kayobe-doc: `Kayobe documentation
14+
repository. See :kayobe-doc:`Kayobe documentation
1515
<configuration/reference/ironic-python-agent.html>` for more details on IPA.
1616

1717
Release Train IPA images are used by Bifrost and Overcloud Ironic by default in

doc/source/configuration/release-train.rst

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,29 @@ The Pulp container is deployed on the seed by default, but may be disabled by
5252
setting ``seed_pulp_container_enabled`` to ``false`` in
5353
``etc/kayobe/seed.yml``.
5454

55-
The URL and credentials of the local Pulp server are configured in
56-
``etc/kayobe/pulp.yml`` via ``pulp_url``, ``pulp_username`` and
57-
``pulp_password``. In most cases, the default values should be sufficient.
58-
An admin password must be generated and set as the value of a
59-
``secrets_pulp_password`` variable, typically in an Ansible Vault encrypted
60-
``etc/kayobe/secrets.yml`` file. This password will be automatically set on
61-
Pulp startup.
62-
63-
If a proxy is required to access the Internet from the seed, ``pulp_proxy_url``
64-
may be used.
55+
The URL for the local Pulp server is configured by ``pulp_url`` within
56+
``etc/kayobe/pulp.yml``.
57+
58+
The Pulp service can be configured with two sets of credentials; one for
59+
administrator operations and another read-only for overcloud hosts
60+
to use.
61+
The administrator credentials can be configured ``pulp_username``,
62+
``pulp_password``
63+
The basic user account credentials can be configured with ``pulp_stack_username``
64+
and ``pulp_stack_password``.
65+
Both sets of credentials can be found within ``etc/kayobe/pulp.yml``.
66+
67+
Both the ``pulp_password`` and ``pulp_stack_password`` are intended to be
68+
configured via their ``secrets_*`` counterparts, i.e.
69+
``secrets_pulp_password`` and ``secrets_pulp_stack_password``. These variables
70+
are expected to be set in an Ansible Vault encrypted
71+
``etc/kayobe/secrets.yml`` file.
72+
73+
Passwords can be generated using ``OpenSSL``
74+
75+
.. code-block:: console
76+
77+
openssl rand -base64 32
6578
6679
Host images are not synchronised to the local Pulp server, since they should
6780
only be pulled to the seed node once. More information on host images can be

etc/kayobe/ansible/cephadm-gather-keys.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
# Kolla Ansible's merge_configs module does not like the leading tabs in ceph.conf.
6969
content: |
7070
{{ cephadm_ceph_conf.stdout | regex_replace('\t') }}
71+
{{ kolla_ceph_conf_append if kolla_ceph_conf_append is defined }}
7172
dest: "{{ kayobe_env_config_path }}/kolla/config/{{ kolla_service_to_conf_dir[item.0.name] }}/ceph.conf"
7273
loop: "{{ query('subelements', kolla_ceph_services | selectattr('required'), 'keys') }}"
7374
loop_control:
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
- name: Check Kayobe version
3+
tags: kayobe-version-check
4+
hosts: localhost
5+
gather_facts: false
6+
vars:
7+
requirements_path: "{{ kayobe_config_path }}/../../requirements.txt"
8+
tasks:
9+
- name: Check version
10+
when: stackhpc_enable_kayobe_check
11+
check_mode: false
12+
block:
13+
- name: Get package info
14+
community.general.pip_package_info:
15+
register: packages
16+
17+
- name: Check if pip is version 24.0 or newer
18+
ansible.builtin.assert:
19+
that: "{{ packages.packages.pip.pip[0].version is version('24.0', '>=') }}"
20+
fail_msg: |
21+
Pip must be 24.0 or newer to run this check. Upgrade pip by running
22+
pip install -U pip and reinstall Kayobe by running:
23+
pip install --force-reinstall -r {{ requirements_path }}
24+
25+
- name: Get installed Kayobe commit
26+
ansible.builtin.shell:
27+
cmd: set -o pipefail && pip freeze | grep kayobe | cut -d @ -f 3
28+
executable: /usr/bin/bash
29+
register: kayobe_git_commit
30+
failed_when: kayobe_git_commit.stdout == ""
31+
32+
- name: Clone Kayobe
33+
ansible.builtin.git:
34+
repo: https://github.com/stackhpc/kayobe.git
35+
dest: /tmp/kayobe-git
36+
version: stackhpc/{{ openstack_release }}
37+
38+
- name: Get tag from Kayobe commit
39+
ansible.builtin.command:
40+
cmd: git describe --tags {{ kayobe_git_commit.stdout }}
41+
chdir: /tmp/kayobe-git
42+
register: kayobe_current_version
43+
44+
- name: Get latest Kayobe version
45+
ansible.builtin.shell:
46+
cmd: set -o pipefail && grep -o kayobe@stackhpc\/.*$ {{ requirements_path }} | cut -d @ -f 2
47+
executable: /usr/bin/bash
48+
register: kayobe_latest_version
49+
50+
- name: Check installed Kayobe version is the latest
51+
ansible.builtin.assert:
52+
that: "kayobe_latest_version.stdout in kayobe_current_version.stdout"
53+
fail_msg: |
54+
Kayobe must use the expected version before continuing.
55+
56+
Current Kayobe version: {{ kayobe_current_version.stdout }}
57+
Expected Kayobe version: {{ kayobe_latest_version.stdout }}
58+
59+
Recreate the Kayobe environment, or install the expected version
60+
by running: pip install --force-reinstall -r {{ requirements_path }}
61+
success_msg: |
62+
Kayobe running at version: {{ kayobe_current_version.stdout }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
- name: Check Kolla-Ansible version
3+
tags: kolla-ansible-version-check
4+
hosts: localhost
5+
gather_facts: false
6+
tasks:
7+
- name: Check version
8+
when: stackhpc_enable_kolla_ansible_check
9+
check_mode: false
10+
block:
11+
- name: Get current Kolla-Ansible tag
12+
ansible.builtin.command:
13+
cmd: git describe --tags
14+
chdir: "{{ lookup('ansible.builtin.env', 'KOLLA_SOURCE_PATH') }}"
15+
register: kolla_ansible_current_version
16+
17+
- name: Check installed Kolla-Ansible version is the expected version
18+
ansible.builtin.assert:
19+
that: "stackhpc_kolla_ansible_source_version in kolla_ansible_current_version.stdout"
20+
fail_msg: |
21+
Kolla-Ansible must use the expected version before continuing.
22+
23+
Current Kolla-Ansible version: {{ kolla_ansible_current_version.stdout }}
24+
Expected Kolla-Ansible version: {{ stackhpc_kolla_ansible_source_version }}
25+
26+
Upgrade Kolla-Ansible by running: kayobe control host upgrade
27+
success_msg: |
28+
Kolla-Ansible running at version: {{ kolla_ansible_current_version.stdout }}

etc/kayobe/ansible/deploy-radosgw-usage-exporter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
- name: Ensure radosgw_usage_exporter container is running
108108
community.docker.docker_container:
109109
name: radosgw_usage_exporter
110-
image: ghcr.io/stackhpc/radosgw_usage_exporter:v0.1.1
110+
image: ghcr.io/stackhpc/radosgw_usage_exporter:v0.1.3
111111
network_mode: host
112112
env:
113113
RADOSGW_SERVER: "{{ radosgw_server }}"

etc/kayobe/ansible/pci-passthrough.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
vfio_pci_ids: |-
1212
{% set gpu_list = [] %}
1313
{% set output = [] %}
14-
{% for gpu_group in gpu_group_map | dict2items | default([]) %}
14+
{% for gpu_group in (gpu_group_map | default({})) | dict2items %}
1515
{% if gpu_group.key in group_names %}
1616
{% set _ = gpu_list.append(gpu_group.value) %}
1717
{% endif %}

etc/kayobe/ansible/smartmon-tools.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@
1515

1616
- name: Ensure Python 3, venv, and pip are installed
1717
ansible.builtin.package:
18-
name:
19-
- python3
20-
- python3-venv
21-
- python3-pip
18+
name: >
19+
{{ ['python3', 'python3-pip'] + (['python3-venv'] if ansible_facts['distribution'] == 'Ubuntu' else []) }}
2220
state: present
2321
become: true
2422

etc/kayobe/cephadm.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,6 @@ kolla_ceph_manila_required: "{{ kolla_enable_manila | bool }}"
133133

134134
# Whether to generate Ceph configuration for Nova.
135135
kolla_ceph_nova_required: "{{ kolla_enable_nova | bool }}"
136+
137+
# A (multiline) string to append to all Ceph configuration files.
138+
#kolla_ceph_conf_append:

etc/kayobe/containers/pulp/post.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@
2828
- stackhpc_pulp_sync_for_local_container_build | bool
2929
- pulp_settings.changed
3030

31+
- name: Ensure Pulp stack user exists
32+
ansible.builtin.include_role:
33+
name: stackhpc.pulp.pulp_user
34+
vars:
35+
pulp_users:
36+
- username: "{{ pulp_stack_username }}"
37+
password: "{{ pulp_stack_password }}"
38+
is_staff: false
39+
when:
40+
- pulp_stack_username is defined and pulp_stack_username | length > 0
41+
- pulp_stack_password is defined and pulp_stack_password | length > 0
42+
3143
- name: Login to docker registry
3244
docker_login:
3345
registry_url: "{{ kolla_docker_registry or omit }}"

0 commit comments

Comments
 (0)