Skip to content

Commit 80cd352

Browse files
authored
Merge pull request #465 from stackhpc/package-updates-docs
Add docs describing the package update process
2 parents 1cfc796 + 9d6e39a commit 80cd352

File tree

2 files changed

+250
-0
lines changed

2 files changed

+250
-0
lines changed

doc/source/contributor/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ This guide is for contributors of the StackHPC Kayobe configuration project.
1010
documentation
1111
release-notes
1212
environments/index
13+
package-updates
Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,249 @@
1+
=============================
2+
Package and Container Updates
3+
=============================
4+
5+
This section describes the Release Train process of creating new package repository snapshots and updating the container images to use these new packages. It includes instructions on the recommended way to test these updates, using the multinode test environment.
6+
7+
Preparations
8+
============
9+
10+
1. Before building images, you should check for any outstanding PRs into the earliest supported release. Below are the links for the Wallaby branches.
11+
12+
kayobe-config: https://github.com/stackhpc/stackhpc-kayobe-config/pulls?q=is%3Apr+is%3Aopen+base%3Astackhpc%2Fwallaby
13+
14+
kolla: https://github.com/stackhpc/kolla/pulls?q=is%3Apr+is%3Aopen+base%3Astackhpc%2Fwallaby
15+
16+
kolla-ansible: https://github.com/stackhpc/kolla-ansible/pulls?q=is%3Apr+is%3Aopen+base%3Astackhpc%2Fwallaby
17+
18+
You should also check any referenced source trees in etc/kayobe/kolla.yml.
19+
20+
e.g: https://github.com/stackhpc/stackhpc-kayobe-config/blob/320ba8b28da879917beec0ce7c4c90c478aaeaf7/etc/kayobe/kolla.yml#L112-L158
21+
22+
2. Follow the workflows documented `here <https://stackhpc.github.io/stackhpc-release-train/usage/content-howto/#update-package-repositories>`_. Sync the package repositories. Then, for each release:
23+
24+
* Make sure the nightly sync of package repositories has succeeded.
25+
26+
* Update the Kayobe package repository versions.
27+
28+
* Build and push Kolla container images.
29+
30+
* Open a draft PR into ``stackhpc-kayobe-config`` with the updated container image tags.
31+
32+
* Test.
33+
34+
* Review the PR. Once approved, promote the container images before then merging the PR.
35+
36+
The rest of this document describes the final "test" stage.
37+
38+
Testing
39+
=======
40+
41+
The following steps describe the process to test the new package and container repositories. See the subsections beneath for further explanations.
42+
43+
1. Build two multinode environments for OVS and OVN, both on the earliest supported release.
44+
45+
2. Run tests on current package versions as a baseline.
46+
47+
3. Upgrade host packages.
48+
49+
4. Upgrade containers.
50+
51+
5. Run tests again with the new packages.
52+
53+
6. Request reviews for your proposed PR to bring in the new packages.
54+
55+
7. Promote these packages before merging the PR, but after the CI checks have passed.
56+
57+
8. Upgrade OpenStack to the next release.
58+
59+
9. Repeat steps 2 and 4-7. (Step 3 is skipped as the host packages will be shared across these releases.)
60+
61+
10. Repeat 8 and 9 for any further releases.
62+
63+
Creating the multinode environments
64+
-----------------------------------
65+
66+
There is a comprehensive guide to setting up a multinode environment with Terraform, found here: https://github.com/stackhpc/terraform-kayobe-multinode. There are some things to note:
67+
68+
* OVN is enabled by default, you should override it under ``etc/kayobe/environments/ci-multinode/kolla.yml kolla_enable_ovn: false`` for the OVS multinode environment.
69+
70+
* Remember to set different vxlan_vnis for each.
71+
72+
* Before starting any tests, run ``dnf distro-sync`` on each host to ensure you are using the same snapshots as in the release train. You can do this using the following commands:
73+
74+
.. code-block:: console
75+
76+
kayobe seed host command run -b --command "dnf distro-sync"
77+
kayobe overcloud host command run -b --command "dnf distro-sync"
78+
79+
* This may have installed a new kernel version. If so, you will need to reboot the overcloud hosts. You can check the installed kernels and the currently running kernel with the following commands. If the latest listed version is not running, you will need to reboot.
80+
81+
.. code-block:: console
82+
83+
kayobe seed host command run -b --show-output --command "dnf list installed kernel"
84+
kayobe seed host command run -b --show-output --command "uname -a"
85+
86+
kayobe playbook run --limit seed,overcloud $KAYOBE_CONFIG_PATH/ansible/reboot.yml
87+
88+
* The tempest tests run automatically at the end of deploy-openstack.sh. If you have the time, it is worth fixing any failing tests you can so that there is greater coverage for the package updates. (Also remember to propose these fixes in the relevant repos where applicable.)
89+
90+
Upgrading host packages
91+
-----------------------
92+
93+
Checkout the new kayobe-config branch (from the draft PR):
94+
95+
.. code-block:: console
96+
97+
cd $KAYOBE_CONFIG_ROOT
98+
git fetch
99+
git checkout <branch-name>
100+
101+
Bump the snapshot versions in /etc/yum/repos.d with:
102+
103+
.. code-block:: console
104+
105+
kayobe overcloud host configure -t dnf -kt none
106+
107+
Install new packages:
108+
109+
.. code-block:: console
110+
111+
kayobe overcloud host package update --packages "*"
112+
113+
Perform a rolling reboot of hosts:
114+
115+
.. code-block:: console
116+
117+
export ANSIBLE_SERIAL=1
118+
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/reboot.yml --limit controllers
119+
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/reboot.yml --limit compute[0]
120+
121+
# Test live migration
122+
openstack server create --image cirros --flavor m1.tiny --network external --hypervisor-hostname wallaby-pkg-refresh-ovs-compute-02.novalocal --os-compute-api-version 2.74 server1
123+
openstack server migrate --live-migration server1
124+
watch openstack server show server1
125+
126+
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/reboot.yml --limit compute[1]
127+
128+
# Try and migrate back
129+
openstack server migrate --live-migration server1
130+
watch openstack server show server1
131+
132+
Upgrading containers within a release
133+
-------------------------------------
134+
135+
Checkout the new kayobe-config branch (from the draft PR):
136+
137+
.. code-block:: console
138+
139+
cd $KAYOBE_CONFIG_ROOT
140+
git fetch
141+
git checkout <branch-name>
142+
143+
Deploy the services, once the new tags are set in the kayobe_config:
144+
145+
.. code-block:: console
146+
147+
kayobe overcloud service deploy
148+
149+
Upgrading OpenStack to the next release in a multinode environment
150+
------------------------------------------------------------------
151+
152+
As this is not a full production system, only a reduced number of steps need to be followed to upgrade to a new release. Below describes these steps, with ``stackhpc/wallaby`` as the starting branch:
153+
154+
.. code-block:: console
155+
156+
cd <base_path>/src/kayobe-config/
157+
git fetch
158+
git checkout -b xena_uber_merge
159+
git merge origin/stackhpc/xena
160+
161+
source <base_path>/venvs/kayobe/bin/activate
162+
cd <base_patch>/src/kayobe
163+
git checkout stackhpc/xena
164+
git fetch
165+
pip install -U ~/src/kayobe
166+
167+
kayobe control host upgrade
168+
kayobe overcloud host upgrade
169+
170+
kayobe overcloud container image pull
171+
172+
---Optional
173+
kayobe overcloud service configuration save --output-dir config/wallaby
174+
kayobe overcloud service configuration generate --node-config-dir /tmp/kolla-xena-config
175+
kayobe overcloud service configuration save --output-dir config/xena --node-config-dir /tmp/kolla-xena-config
176+
kayobe overcloud host command run --command 'rm -rf /tmp/kolla-xena-config' --become
177+
# Check the diff between the old and new configs
178+
---
179+
180+
kayobe overcloud service upgrade
181+
182+
Tests
183+
-----
184+
185+
Tempest
186+
#######
187+
188+
Run tempest, you can then perform the other tests while it runs. Once complete, check if any tests are failing.
189+
190+
As of February 2023, only one test was expected to fail. This may no longer be the case, so any additional failures are worth exploring.
191+
192+
.. code-block:: console
193+
194+
tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_port_security_macspoofing_port
195+
196+
Poke around horizon
197+
###################
198+
199+
Perform some basic operations such as spawning VMs or attaching/detaching volumes and check that each page works correctly.
200+
201+
Monitoring
202+
##########
203+
204+
Check for any ERROR log messages in Kibana.
205+
206+
Check that the Grafana dashboards are all populated with data.
207+
208+
Check that there are no active alerts.
209+
210+
Check that there are no flapping alerts.
211+
212+
Octavia (OVN only)
213+
##################
214+
215+
You will need to add an Ubuntu image and create a keypair.
216+
217+
.. code-block:: console
218+
219+
wget http://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
220+
221+
openstack image create \
222+
--progress \
223+
--container-format bare \
224+
--disk-format qcow2 \
225+
--file focal-server-cloudimg-amd64.img \
226+
Ubuntu-20.04
227+
228+
openstack keypair create --private-key ~/.ssh/os-admin os-admin
229+
230+
Then run Octavia test script:
231+
232+
https://gist.github.com/MoteHue/ee5990bddea0677f54d8bb93d307aa71#file-octavia_test-sh
233+
234+
235+
Attempt to build OFED against the latest kernel
236+
###############################################
237+
238+
Note that this only needs to be performed once.
239+
240+
.. code-block:: console
241+
242+
kayobe seed host configure -t dnf -kt none
243+
kayobe seed host package update --packages "*"
244+
245+
Then run the OFED test script:
246+
247+
https://gist.github.com/cityofships/b4883ee19f75d14534f04115892b8465
248+
249+

0 commit comments

Comments
 (0)