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

Subscribers

People subscribed via source and target branches