Skip to content

Commit 8861980

Browse files
Merge remote-tracking branch 'origin/fix-scan-images' into build-ironic-conductor-plugin
2 parents 2b407ef + 20dfd7a commit 8861980

File tree

20 files changed

+364
-115
lines changed

20 files changed

+364
-115
lines changed

.github/workflows/stackhpc-update-kolla.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
codename: Epoxy
2222
uses: ./.github/workflows/update-dependencies.yml
2323
with:
24-
openstack_version: ${{ matrix.version }}
24+
branch: ${{ matrix.version }}
2525
openstack_codename: ${{ matrix.codename }}
2626
permissions:
2727
contents: write

.github/workflows/update-dependencies.yml

Lines changed: 159 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -3,92 +3,187 @@ name: Update dependencies
33
on:
44
workflow_call:
55
inputs:
6-
openstack_version:
7-
description: OpenStack version
6+
branch:
7+
description: Branch to update. Must exist in all repositories. e.g. stackhpc/2025.1
88
type: string
99
required: true
1010
openstack_codename:
11-
description: OpenStack codename
11+
description: OpenStack codename e.g. Epoxy
12+
type: string
13+
required: true
14+
workflow_dispatch:
15+
inputs:
16+
branch:
17+
description: Branch to update. Must exist in all repositories. e.g. stackhpc/2025.1
18+
type: string
19+
required: true
20+
openstack_codename:
21+
description: OpenStack codename e.g. Epoxy
1222
type: string
1323
required: true
1424

1525
jobs:
16-
propose_github_release_updates:
26+
propose-dependency-updates:
1727
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
18-
runs-on: ubuntu-22.04
19-
strategy:
20-
matrix:
21-
include:
22-
- key: kolla
23-
path: src/kayobe-config/etc/kayobe/stackhpc.yml
24-
repository: stackhpc/kolla
25-
search_regex: 'stackhpc_kolla_source_version\:.*$'
26-
prefix: 'stackhpc_kolla_source_version\: '
27-
28-
- key: kolla-ansible
29-
path: src/kayobe-config/etc/kayobe/stackhpc.yml
30-
repository: stackhpc/kolla-ansible
31-
search_regex: 'stackhpc_kolla_ansible_source_version\:.*$'
32-
prefix: 'stackhpc_kolla_ansible_source_version\: '
33-
34-
- key: kayobe
35-
path: src/kayobe-config/requirements.txt
36-
repository: stackhpc/kayobe
37-
search_regex: 'kayobe@stackhpc\/.*$'
38-
prefix: 'kayobe@'
28+
runs-on: ubuntu-24.04
3929
permissions:
4030
contents: write
4131
pull-requests: write
42-
name: ${{ matrix.key }}
32+
name: Propose dependency updates
33+
outputs:
34+
kolla-tag: ${{ steps.latest_kolla_tag.outputs.latest_tag || steps.current_kolla_version.outputs.version }}
35+
kolla-ansible-tag: ${{ steps.latest_kolla_ansible_tag.outputs.latest_tag || steps.current_kolla_ansible_version.outputs.version }}
36+
kayobe-tag: ${{ steps.latest_kayobe_tag.outputs.latest_tag || steps.current_kayobe_version.outputs.version }}
4337
steps:
44-
- name: Checkout
38+
- name: Checkout Kayobe-config
4539
uses: actions/checkout@v4
4640
with:
47-
ref: ${{ inputs.openstack_version }}
48-
path: ${{ github.workspace }}/src/kayobe-config
41+
ref: ${{ inputs.branch }}
42+
path: src/kayobe-config
43+
44+
- name: Set sanitised branch name
45+
id: branch_name
46+
run: |
47+
sanitised_name=$(echo "update-dependencies-${{ inputs.branch }}" | tr '/' '-')
48+
echo "name=${sanitised_name}" >> $GITHUB_OUTPUT
49+
50+
- name: Set up branch and Git config
51+
run: |
52+
git checkout -b ${{ steps.branch_name.outputs.name }}
53+
git config user.name "stackhpc-ci"
54+
git config user.email "22933334+stackhpc-ci@users.noreply.github.com"
55+
working-directory: src/kayobe-config
56+
57+
- name: Initialise PR Body
58+
run: |
59+
echo "This PR was created automatically to update dependencies for the ${{ inputs.branch }} release." > pr_body.md
60+
echo "" >> pr_body.md
61+
echo "### Changes" >> pr_body.md
62+
63+
- name: Checkout Kolla repository
64+
uses: actions/checkout@v4
65+
with:
66+
repository: stackhpc/kolla
67+
ref: ${{ inputs.branch }}
68+
fetch-tags: true
69+
path: src/kolla
70+
71+
- name: Get latest Kolla tag
72+
id: latest_kolla_tag
73+
run: echo "latest_tag=$(git describe --tags --abbrev=0 --match stackhpc/\*)" >> $GITHUB_OUTPUT
74+
working-directory: ${{ github.workspace }}/src/kolla
75+
76+
- name: Get current Kolla version
77+
id: current_kolla_version
78+
run: |
79+
VERSION=$(awk -F': ' '/stackhpc_kolla_source_version:/ {print $2}' src/kayobe-config/etc/kayobe/stackhpc.yml | xargs)
80+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
4981
50-
- name: Checkout the dependency repo
82+
- name: Update and commit Kolla version if needed
83+
if: steps.latest_kolla_tag.outputs.latest_tag != steps.current_kolla_version.outputs.version
84+
run: |
85+
sed -i "s/stackhpc_kolla_source_version\:.*$/stackhpc_kolla_source_version\: $(echo $TAG | sed 's|/|\\/|g')/g" etc/kayobe/stackhpc.yml
86+
echo "- **Kolla** bumped from \`${{ steps.current_kolla_version.outputs.version }}\` to \`${{ steps.latest_kolla_tag.outputs.latest_tag }}\`" >> ../../pr_body.md
87+
echo " - Changelog: https://github.com/stackhpc/kolla/releases/tag/${{ steps.latest_kolla_tag.outputs.latest_tag }}" >> ../../pr_body.md
88+
git add etc/kayobe/stackhpc.yml
89+
git commit -m "(automated) Bump kolla to ${{ steps.latest_kolla_tag.outputs.latest_tag }}"
90+
env:
91+
TAG: ${{ steps.latest_kolla_tag.outputs.latest_tag }}
92+
working-directory: src/kayobe-config
93+
94+
- name: Checkout Kolla Ansible repository
5195
uses: actions/checkout@v4
5296
with:
53-
repository: ${{ matrix.repository }}
54-
ref: ${{ inputs.openstack_version }}
97+
repository: stackhpc/kolla-ansible
98+
ref: ${{ inputs.branch }}
5599
fetch-tags: true
56-
path: ${{ github.workspace }}/src/${{ matrix.key }}
100+
path: src/kolla-ansible
57101

58-
- name: Get latest tag
59-
id: latest_tag
102+
- name: Get latest Kolla Ansible tag
103+
id: latest_kolla_ansible_tag
104+
run: echo "latest_tag=$(git describe --tags --abbrev=0 --match stackhpc/\*)" >> $GITHUB_OUTPUT
105+
working-directory: ${{ github.workspace }}/src/kolla-ansible
106+
107+
- name: Get current Kolla Ansible version
108+
id: current_kolla_ansible_version
60109
run: |
61-
TAG=$(git describe --tags --abbrev=0 --match stackhpc/\*)
62-
echo latest_tag=${TAG} >> $GITHUB_OUTPUT
63-
working-directory: ${{ github.workspace }}/src/${{ matrix.key }}
110+
VERSION=$(awk -F': ' '/stackhpc_kolla_ansible_source_version:/ {print $2}' src/kayobe-config/etc/kayobe/stackhpc.yml | xargs)
111+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
64112
65-
- name: Update dependency key
113+
- name: Update and commit Kolla Ansible version if needed
114+
if: steps.latest_kolla_ansible_tag.outputs.latest_tag != steps.current_kolla_ansible_version.outputs.version
66115
run: |
67-
TAG_OVERRIDE=$(echo $TAG | sed 's/\//\\\//g')
68-
sed -i "s/$SEARCH/$PREFIX$TAG_OVERRIDE/g" $REQUIREMENTS
116+
sed -i "s/stackhpc_kolla_ansible_source_version\:.*$/stackhpc_kolla_ansible_source_version\: $(echo $TAG | sed 's|/|\\/|g')/g" etc/kayobe/stackhpc.yml
117+
echo "- **Kolla-Ansible** bumped from \`${{ steps.current_kolla_ansible_version.outputs.version }}\` to \`${{ steps.latest_kolla_ansible_tag.outputs.latest_tag }}\`" >> ../../pr_body.md
118+
echo " - Changelog: https://github.com/stackhpc/kolla-ansible/releases/tag/${{ steps.latest_kolla_ansible_tag.outputs.latest_tag }}" >> ../../pr_body.md
119+
git add etc/kayobe/stackhpc.yml
120+
git commit -m "(automated) Bump kolla-ansible to ${{ steps.latest_kolla_ansible_tag.outputs.latest_tag }}"
69121
env:
70-
PREFIX: ${{ matrix.prefix }}
71-
TAG: ${{ steps.latest_tag.outputs.latest_tag }}
72-
REQUIREMENTS: ${{ github.workspace }}/${{ matrix.path }}
73-
SEARCH: ${{ matrix.search_regex }}
122+
TAG: ${{ steps.latest_kolla_ansible_tag.outputs.latest_tag }}
123+
working-directory: src/kayobe-config
74124

75-
- name: Propose changes via PR if required
76-
uses: peter-evans/create-pull-request@v7
125+
- name: Checkout Kayobe repository
126+
uses: actions/checkout@v4
77127
with:
78-
path: ${{ github.workspace }}/src/kayobe-config
79-
commit-message: >-
80-
Bump ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }}
81-
author: stackhpc-ci <22933334+stackhpc-ci@users.noreply.github.com>
82-
branch: update-dependency/${{ matrix.key }}/${{ inputs.openstack_version }}
83-
delete-branch: true
84-
title: >-
85-
Bump ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }}
86-
body: >
87-
This PR was created automatically to update ${{ inputs.openstack_version }}
88-
${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }}.
89-
90-
GitHub Release Changelog:
91-
https://github.com/stackhpc/${{ matrix.key }}/releases/tag/${{ steps.latest_tag.outputs.latest_tag }}
92-
labels: |
93-
automated
94-
${{ inputs.openstack_codename }}
128+
repository: stackhpc/kayobe
129+
ref: ${{ inputs.branch }}
130+
fetch-tags: true
131+
path: src/kayobe
132+
133+
- name: Get latest Kayobe tag
134+
id: latest_kayobe_tag
135+
run: echo "latest_tag=$(git describe --tags --abbrev=0 --match stackhpc/\*)" >> $GITHUB_OUTPUT
136+
working-directory: ${{ github.workspace }}/src/kayobe
137+
138+
- name: Get current Kayobe version
139+
id: current_kayobe_version
140+
run: |
141+
VERSION=$(grep 'kayobe@stackhpc/' src/kayobe-config/requirements.txt | sed 's/.*@//' | xargs)
142+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
143+
144+
- name: Update and commit Kayobe version if needed
145+
if: steps.latest_kayobe_tag.outputs.latest_tag != steps.current_kayobe_version.outputs.version
146+
run: |
147+
sed -i "s|kayobe@stackhpc/.*$|kayobe@$(echo $TAG | sed 's|/|\\/|g')|g" requirements.txt
148+
echo "- **Kayobe** bumped from \`${{ steps.current_kayobe_version.outputs.version }}\` to \`${{ steps.latest_kayobe_tag.outputs.latest_tag }}\`" >> ../../pr_body.md
149+
echo " - Changelog: https://github.com/stackhpc/kayobe/releases/tag/${{ steps.latest_kayobe_tag.outputs.latest_tag }}" >> ../../pr_body.md
150+
git add requirements.txt
151+
git commit -m "(automated) Bump kayobe to ${{ steps.latest_kayobe_tag.outputs.latest_tag }}"
152+
env:
153+
TAG: ${{ steps.latest_kayobe_tag.outputs.latest_tag }}
154+
working-directory: src/kayobe-config
155+
156+
- name: Check for new commits
157+
id: check_commits
158+
run: |
159+
count=$(git rev-list --count ${{ inputs.branch }}..HEAD)
160+
if [ "$count" -gt 0 ]; then
161+
echo "has_commits=true" >> $GITHUB_OUTPUT
162+
else
163+
echo "has_commits=false" >> $GITHUB_OUTPUT
164+
fi
165+
working-directory: src/kayobe-config
166+
167+
- name: Push commits
168+
if: steps.check_commits.outputs.has_commits == 'true'
169+
run: git push --force origin ${{ steps.branch_name.outputs.name }}
170+
working-directory: src/kayobe-config
171+
172+
- name: Create or Update Pull Request
173+
if: steps.check_commits.outputs.has_commits == 'true'
174+
env:
175+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
176+
working-directory: src/kayobe-config
177+
run: |
178+
EXISTING_PR=$(gh pr list --head "${{ steps.branch_name.outputs.name }}" --json number -q '.[0].number')
179+
if [ -n "$EXISTING_PR" ]; then
180+
gh pr close $EXISTING_PR
181+
fi
182+
gh pr create \
183+
--base "${{ inputs.branch }}" \
184+
--head "${{ steps.branch_name.outputs.name }}" \
185+
--title "(automated) Bump dependencies for OpenStack ${{ inputs.branch }}" \
186+
--body-file ../../pr_body.md \
187+
--label "automated" \
188+
--label "${{ inputs.openstack_codename }}"
189+

doc/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ sphinx-copybutton # MIT
33
sphinx-substitution-extensions # MIT
44
sphinx>=4.2.0 # BSD
55
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
6+
sphinx-immaterial # MIT

doc/source/conf.py

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
# Add any Sphinx extension module names here, as strings. They can be
5353
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
5454
extensions = [
55+
'sphinx_immaterial',
5556
'reno.sphinxext',
5657
#'sphinx.ext.autodoc',
5758
'sphinx.ext.extlinks',
@@ -89,15 +90,42 @@
8990
# The theme to use for HTML and HTML Help pages. Major themes that come with
9091
# Sphinx are currently 'default' and 'sphinxdoc'.
9192
# html_theme_path = []
92-
html_theme = 'default'
93+
html_theme = 'sphinx_immaterial'
9394
# html_static_path = ['static']
9495

9596
# Add any paths that contain "extra" files, such as .htaccess or
9697
# robots.txt.
9798
# html_extra_path = ['_extra']
9899

99100
html_theme_options = {
100-
# "show_other_versions": True,
101+
"palette": [
102+
103+
{
104+
"media": "(prefers-color-scheme: light)",
105+
"scheme": "default",
106+
"toggle": {
107+
"icon": "material/weather-sunny",
108+
"name": "Switch to dark mode",
109+
}
110+
},
111+
{
112+
"media": "(prefers-color-scheme: dark)",
113+
"scheme": "slate",
114+
"toggle": {
115+
"icon": "material/weather-night",
116+
"name": "Switch to system preference",
117+
}
118+
},
119+
],
120+
"features": [
121+
"navigation.expand",
122+
"navigation.top",
123+
"navigation.footer",
124+
"search.suggest",
125+
"content.code.copy",
126+
"toc.follow",
127+
"toc.sticky",
128+
]
101129
}
102130

103131
# Output file base name for HTML help builder.

doc/source/operations/bifrost-hardware-inventory-management.rst

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Replacing a Failing Hypervisor
8383

8484
To replace a failing hypervisor, proceed as follows:
8585

86-
* :ref:`Disable the hypervisor to avoid scheduling any new instance on it <taking-a-hypervisor-out-of-service>`
86+
* :ref:`Disable the hypervisor to avoid scheduling any new instances on it <taking-a-hypervisor-out-of-service>`
8787
* :ref:`Evacuate all instances <evacuating-all-instances>`
8888
* :ref:`Set the node to maintenance mode in Bifrost <set-bifrost-maintenance-mode>`
8989
* Physically fix or replace the node
@@ -102,6 +102,54 @@ To deprovision an existing hypervisor, run:
102102
system. Running this command without a limit will deprovision all overcloud
103103
hosts.
104104

105+
Removing a Hypervisor
106+
---------------------
107+
108+
To remove a hypervisor without replacing it, proceed as follows:
109+
110+
#. :ref:`Disable the hypervisor to avoid scheduling any new instances on it <taking-a-hypervisor-out-of-service>`
111+
#. :ref:`Evacuate all instances <evacuating-all-instances>`
112+
#. (optionally) Deprovision the hypervisor
113+
114+
.. code-block:: console
115+
116+
kayobe overcloud deprovision --limit <Hypervisor hostname>
117+
118+
.. warning::
119+
120+
Always use ``--limit`` with ``kayobe overcloud deprovision`` on a production
121+
system. Running this command without a limit will deprovision all overcloud
122+
hosts.
123+
124+
#. Physically remove the node from the deployment
125+
126+
#. Delete the node in Bifrost:
127+
128+
.. code-block:: console
129+
130+
docker exec -it bifrost_deploy bash
131+
(bifrost-deploy)[root@seed bifrost-base]# export OS_CLOUD=bifrost
132+
(bifrost-deploy)[root@seed bifrost-base]# openstack baremetal node delete <Hostname>
133+
134+
#. Delete the compute service in OpenStack:
135+
136+
.. code-block:: console
137+
138+
openstack compute service list | grep <Hypervisor hostname>
139+
openstack compute service delete <Service ID>
140+
141+
#. Delete the network agents in OpenStack:
142+
143+
.. code-block:: console
144+
145+
openstack network agent list | grep <Hypervisor hostname>
146+
openstack network agent delete <Agent IDs>
147+
148+
#. Remove the node from the Kayobe configuration. Ensure the node is removed
149+
from the inventory and ``network-allocation.yml``. Other configuration files
150+
may also be removed, but this is dependent on the deployment. Recursive
151+
``grep`` can help here.
152+
105153
.. _evacuating-all-instances:
106154

107155
Evacuating all instances

0 commit comments

Comments
 (0)