Merge ~jugmac00/launchpad:add-how-to-qa-turnip-api-changes into launchpad:master

Proposed by Jürgen Gmach
Status: Rejected
Rejected by: Jürgen Gmach
Proposed branch: ~jugmac00/launchpad:add-how-to-qa-turnip-api-changes
Merge into: launchpad:master
Diff against target: 120 lines (+97/-2)
2 files modified
doc/guides/how-to-qa-turnip-api-changes.rst (+94/-0)
doc/index.rst (+3/-2)
Reviewer Review Type Date Requested Status
Launchpad code reviewers Pending
Review via email: mp+414463@code.launchpad.net

Commit message

Add `How-to qa turnip API changes`

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

Thanks for the first review - let's have a quick discussion on Monday whether the information fits in here, or whether we want to create new repo for the "Launchpad project" documentation.

Unmerged commits

903f0be... by Jürgen Gmach

Add `How-to qa turnip API changes`

Also the section header was renamed to `How-to guides`, according to the
new documentation system we are following, see https://diataxis.fr/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/doc/guides/how-to-qa-turnip-api-changes.rst b/doc/guides/how-to-qa-turnip-api-changes.rst
2new file mode 100644
3index 0000000..11b5f82
4--- /dev/null
5+++ b/doc/guides/how-to-qa-turnip-api-changes.rst
6@@ -0,0 +1,94 @@
7+============================
8+How-to qa turnip API changes
9+============================
10+
11+qa is usually performed on https://qastaging.launchpad.net.
12+
13+Prerequisites
14+=============
15+
16+- You need access to ``launchpad-bastion-ps5.internal``
17+
18+- Your user needs to be able to sudo into ``stg-launchpad-git``
19+
20+- You need to have ``lp-shell`` installed in your development environment
21+
22+Access to above host and the sudo permission are granted by
23+`IS <https://portal.admin.canonical.com/new/>`_.
24+
25+``lp-shell`` can be installed via
26+
27+.. code-block:: bash
28+
29+ sudo apt install lptools
30+
31+Perform qa
32+==========
33+
34+- Pick a project on https://qastaging.launchpad.net, e.g.
35+ https://qastaging.launchpad.net/turnip
36+
37+- From above project, pick one git repository, and get its ``repo id`` via
38+
39+ .. code-block:: bash
40+
41+ $ lp-shell qastaging devel
42+
43+ >>> lp.git_repositories.getByPath(path='~canonical-launchpad-branches/turnip/+git/turnip').id
44+ 3683
45+
46+ This id will be used for building the query,
47+ e.g. for querying the commit API (``/repo/<id>/commits>``).
48+
49+- Turn on company VPN
50+
51+- Log into the bastion host
52+
53+ .. code-block:: bash
54+
55+ $ ssh launchpad-bastion-ps5.internal
56+
57+- Switch to the service user
58+
59+ .. code-block:: bash
60+
61+ ubuntu@juju-a7beac-stg-launchpad-git-7:~$ sudo -iu stg-launchpad-git
62+
63+- Get an overview of the available staging servers via Juju
64+
65+ .. code-block:: bash
66+
67+ $ stg-launchpad-git@launchpad-bastion-ps5:~$ juju status
68+
69+ ...
70+
71+ turnip-api ...
72+ turnip-celery ...
73+ turnip-pack...
74+
75+- Log into one of the API servers
76+
77+ .. code-block:: bash
78+
79+ stg-launchpad-git@launchpad-bastion-ps5:~$ juju ssh turnip-api/0
80+
81+- Perform the query
82+
83+ .. code-block:: bash
84+
85+ $ curl \
86+ -H "Content-Type: application/json" \
87+ -d '{"commits": ["180ad564a7297ee61fbdfe70fdf53d95febd1e09"], "filter_paths": ["config.yaml"]}' \
88+ http://0.0.0.0:19417/repo/3683/commits
89+
90+ $ <results>
91+
92+- <optional> You can inspect the turnip logs in ``/srv/turnip/logs/``.
93+
94+Further steps
95+=============
96+
97+Once the changes are verified,
98+you can mark the corresponding commit on https://deployable.ols.canonical.com/project/turnip as deployable.
99+
100+And finally, the changes `can be deployed <https://wiki.canonical.com/InformationInfrastructure/WebOps/LP/LaunchpadGitDeployment#Code_upgrade>`_!
101diff --git a/doc/index.rst b/doc/index.rst
102index 2fa2b59..dc76c5f 100644
103--- a/doc/index.rst
104+++ b/doc/index.rst
105@@ -30,12 +30,13 @@ Tutorials
106
107 running
108
109-Guides
110-======
111+How-to guides
112+=============
113
114 .. toctree::
115 :maxdepth: 1
116
117+ guides/how-to-qa-turnip-api-changes
118 guides/architecture
119 guides/python
120 guides/tests

Subscribers

People subscribed via source and target branches

to status/vote changes: