Merge ~cjwatson/launchpad-buildd:improve-deployment-docs into launchpad-buildd:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: c4ff8e511a7e4e5584774549a4e6d42e027eeb36
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad-buildd:improve-deployment-docs
Merge into: launchpad-buildd:master
Diff against target: 137 lines (+82/-17)
3 files modified
debian/changelog (+6/-0)
docs/how-to/deployment.rst (+75/-16)
tox.ini (+1/-1)
Reviewer Review Type Date Requested Status
Jürgen Gmach Approve
Review via email: mp+427029@code.launchpad.net

Commit message

Improve deployment documentation

Description of the change

To post a comment you must log in.
Revision history for this message
Jürgen Gmach (jugmac00) wrote (last edit ):

Thank you! The documentation looks good! Looking forward to use it / testdrive it :-)

A few minor things:
- `tox -e docs` gives a warning, easily fixed with that diff
https://pastebin.canonical.com/p/cZSfGfR88T/

explanation:
 https://stackoverflow.com/a/14067756/672833

- Could you please update the build command in tox to turn warnings into errors by adding `-W`?https://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-W
While not critical here, this might prevent future issues.

review: Approve
07d7ec9... by Colin Watson

Use anonymous references to avoid Sphinx warning

Thanks to Jürgen Gmach.

c4ff8e5... by Colin Watson

Turn sphinx-build warnings into errors

Revision history for this message
Colin Watson (cjwatson) wrote :

Thanks, I thought I'd checked for warnings but indeed had managed to miss that. I've applied both your suggestions.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 5f3804e..7824911 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,9 @@
6+launchpad-buildd (217) UNRELEASED; urgency=medium
7+
8+ * Improve deployment documentation.
9+
10+ -- Colin Watson <cjwatson@ubuntu.com> Mon, 18 Jul 2022 15:07:23 +0100
11+
12 launchpad-buildd (216) focal; urgency=medium
13
14 [ Andrey Fedoseev ]
15diff --git a/docs/how-to/deployment.rst b/docs/how-to/deployment.rst
16index 67473a3..34898a3 100644
17--- a/docs/how-to/deployment.rst
18+++ b/docs/how-to/deployment.rst
19@@ -1,21 +1,60 @@
20 How to deploy launchpad-buildd
21 ******************************
22
23-The following steps need to be performed before `Upgrading the builders
24-<https://wiki.canonical.com/InformationInfrastructure/ISO/BuildInfrastructure/BuilddFixing>`_.
25+In Canonical's datacentre environments, launchpad-buildd is deployed as a
26+``.deb`` package installed in a fleet of VMs. To upgrade it, we need to
27+rebuild the VM images.
28
29-#. Ensure everything has been merged to master, that the `recipe
30+Each environment uses its own PPA and management environment:
31+
32++--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+
33+| Environment | PPA and management environment |
34++==================================================+====================================================================================================================+
35+| `production <https://launchpad.net/builders>`_ | `ppa:launchpad/ubuntu/buildd <https://launchpad.net/~launchpad/+archive/ubuntu/buildd/+packages>`_ |
36+| | ``prod-launchpad-vbuilders@is-bastion-ps5`` |
37++--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+
38+| `dogfood <https://dogfood.paddev.net/builders>`_ | `ppa:launchpad/ubuntu/buildd-staging <https://launchpad.net/~launchpad/+archive/ubuntu/buildd-staging/+packages>`_ |
39+| | ``stg-vbuilder@launchpad-bastion-ps5`` |
40++--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+
41+
42+These instructions use various tools from `ubuntu-archive-tools
43+<https://git.launchpad.net/ubuntu-archive-tools>`_ (``copy-package`` and
44+``manage-builders``).
45+
46+Testing on dogfood
47+------------------
48+
49+#. Ensure everything has been merged to master.
50+
51+#. Check that the `recipe
52 <https://code.launchpad.net/~launchpad/+recipe/launchpad-buildd-daily>`_
53- has built successfully, and that the resulting package has been published
54- in the `Launchpad PPA
55+ has built successfully (you can start a build manually if required), and
56+ that the resulting package has been published in the `Launchpad PPA
57 <https://launchpad.net/~launchpad/+archive/ubuntu/ppa/+packages>`_.
58
59-#. Upgrade the dogfood builders
60- (you may need someone on the LP team with permissions to help with this;
61- see `documentation <https://wiki.canonical.com/InformationInfrastructure/ISO/BuildInfrastructure/BuilddFixing#Upgrading_launchpad-buildd_in_scalingstack>`_).
62+#. Run ``copy-package --from=ppa:launchpad/ubuntu/ppa --suite=focal
63+ --to=ppa:launchpad/ubuntu/buildd-staging -b launchpad-buildd`` to copy
64+ the current version of launchpad-buildd to the deployment PPA.
65+
66+#. `Wait for PPA publishing to complete
67+ <https://launchpad.net/~launchpad/+archive/ubuntu/buildd-staging/+packages>`__.
68+
69+#. Run ``mojo run -m manifest-rebuild-images`` in the management environment
70+ (``stg-vbuilder@launchpad-bastion-ps5``) to start rebuilding images.
71+ After a minute or so, ``juju status glance-simplestreams-sync-\*`` will
72+ show "Synchronising images"; once this says "Sync completed", images have
73+ been rebuilt.
74+
75+#. Builders will get the new image after they finish their next build (or
76+ are disabled) and go through being reset. Since dogfood's build farm is
77+ typically mostly idle, you can use ``manage-builders -l dogfood --reset``
78+ to reset all builders and force them to pick up the new image.
79
80 #. Perform QA on dogfood until satisfied.
81
82+Releasing to production
83+-----------------------
84+
85 #. Create a new release branch, e.g. ``release-213``, based on master.
86
87 #. Run ``DEBEMAIL="<email address>" DEBFULLNAME="<name>" dch -rD focal``.
88@@ -26,11 +65,31 @@ The following steps need to be performed before `Upgrading the builders
89 ``Release version 213`` for review.
90
91 #. Once the release branch has merged to master,
92- tag the release commit (e.g. ``git tag 213 && git push origin --tags``) and
93- check https://code.launchpad.net/~launchpad/+recipe/launchpad-buildd-daily
94- for the recipe build to happen.
95- You can start a build if required.
96-
97-#. File an upgrade RT (`sample <https://portal.admin.canonical.com/C150737>`_),
98- noting the version number and possibly multiple suites/releases
99- (`IS procedure <https://wiki.canonical.com/InformationInfrastructure/ISO/BuildInfrastructure/BuilddFixing>`_).
100+ tag the release commit (e.g. ``git tag 213 && git push origin 213``).
101+
102+#. Check that the `recipe
103+ <https://code.launchpad.net/~launchpad/+recipe/launchpad-buildd-daily>`_
104+ has built successfully (you can start a build manually if required), and
105+ that the resulting package has been published in the `Launchpad PPA
106+ <https://launchpad.net/~launchpad/+archive/ubuntu/ppa/+packages>`_.
107+
108+#. Run ``copy-package --from=ppa:launchpad/ubuntu/ppa --suite=focal
109+ --to=ppa:launchpad/ubuntu/buildd -b launchpad-buildd`` to copy the
110+ current version of launchpad-buildd to the deployment PPA.
111+
112+#. `Wait for PPA publishing to complete
113+ <https://launchpad.net/~launchpad/+archive/ubuntu/buildd/+packages>`__.
114+
115+#. File an RT ticket asking IS to run ``mojo run -m
116+ manifest-rebuild-images`` in the management environment
117+ (``prod-launchpad-vbuilders@is-bastion-ps5``) to start rebuilding images.
118+ (`cRT#151858 <https://portal.admin.canonical.com/C151858>`_ will allow
119+ this step to be self-service.)
120+
121+#. Once image builds complete, builders will get the new image after they
122+ finish their next build (or are disabled) and go through being reset.
123+ `Build farm administrators
124+ <https://launchpad.net/~launchpad-buildd-admins/+members>`_ can use
125+ ``manage-builders --virt --idle --reset`` to reset idle builders.
126+
127+#. Close any bugs fixed by the new release.
128diff --git a/tox.ini b/tox.ini
129index 4f38868..83137f5 100644
130--- a/tox.ini
131+++ b/tox.ini
132@@ -6,4 +6,4 @@ description = Build documentation via Sphinx.
133 basepython = python3
134 extras = docs
135 commands =
136- sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
137+ sphinx-build -W -b html -d docs/_build/doctrees docs docs/_build/html

Subscribers

People subscribed via source and target branches