← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~jugmac00/turnip:how-to-qa-turnip-api-changes into turnip:master

 

Jürgen Gmach has proposed merging ~jugmac00/turnip:how-to-qa-turnip-api-changes into turnip:master with ~jugmac00/turnip:publish-docs-on-rtd as a prerequisite.

Commit message:
Add documentation for "How-to qa turnip API changes"

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jugmac00/turnip/+git/turnip/+merge/415252
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/turnip:how-to-qa-turnip-api-changes into turnip:master.
diff --git a/docs/index.rst b/docs/index.rst
index c2a6823..8cc0268 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -21,6 +21,7 @@ None of the Python interfaces here should be considered stable.
    self
    architecture
    development
+   qa
    internal_protocol
    deployment
 
diff --git a/docs/qa.rst b/docs/qa.rst
new file mode 100644
index 0000000..11b5f82
--- /dev/null
+++ b/docs/qa.rst
@@ -0,0 +1,94 @@
+============================
+How-to qa turnip API changes
+============================
+
+qa is usually performed on https://qastaging.launchpad.net.
+
+Prerequisites
+=============
+
+- You need access to ``launchpad-bastion-ps5.internal``
+
+- Your user needs to be able to sudo into ``stg-launchpad-git``
+
+- You need to have ``lp-shell`` installed in your development environment
+
+Access to above host and the sudo permission are granted by
+`IS <https://portal.admin.canonical.com/new/>`_.
+
+``lp-shell`` can be installed via
+
+.. code-block:: bash
+
+    sudo apt install lptools
+
+Perform qa
+==========
+
+- Pick a project on https://qastaging.launchpad.net, e.g.
+  https://qastaging.launchpad.net/turnip
+
+- From above project, pick one git repository, and get its ``repo id`` via
+
+  .. code-block:: bash
+
+     $ lp-shell qastaging devel
+
+     >>> lp.git_repositories.getByPath(path='~canonical-launchpad-branches/turnip/+git/turnip').id
+     3683
+
+  This id will be used for building the query,
+  e.g. for querying the commit API (``/repo/<id>/commits>``).
+
+- Turn on company VPN
+
+- Log into the bastion host
+
+  .. code-block:: bash
+
+     $ ssh launchpad-bastion-ps5.internal
+
+- Switch to the service user
+
+  .. code-block:: bash
+
+     ubuntu@juju-a7beac-stg-launchpad-git-7:~$ sudo -iu stg-launchpad-git
+
+- Get an overview of the available staging servers via Juju
+
+  .. code-block:: bash
+
+     $ stg-launchpad-git@launchpad-bastion-ps5:~$ juju status
+
+     ...
+
+     turnip-api ...
+     turnip-celery ...
+     turnip-pack...
+
+- Log into one of the API servers
+
+  .. code-block:: bash
+
+     stg-launchpad-git@launchpad-bastion-ps5:~$ juju ssh turnip-api/0
+
+- Perform the query
+
+  .. code-block:: bash
+
+     $ curl \
+     -H "Content-Type: application/json" \
+     -d '{"commits": ["180ad564a7297ee61fbdfe70fdf53d95febd1e09"], "filter_paths": ["config.yaml"]}' \
+     http://0.0.0.0:19417/repo/3683/commits
+
+     $ <results>
+
+- <optional> You can inspect the turnip logs in ``/srv/turnip/logs/``.
+
+Further steps
+=============
+
+Once the changes are verified,
+you can mark the corresponding commit on https://deployable.ols.canonical.com/project/turnip as deployable.
+
+And finally, the changes `can be deployed <https://wiki.canonical.com/InformationInfrastructure/WebOps/LP/LaunchpadGitDeployment#Code_upgrade>`_!