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

Subscribers

People subscribed via source and target branches

to status/vote changes: