From d8430d3373a1583b494f353b2083c4bb399c896d Mon Sep 17 00:00:00 2001 From: Simone Pelosi Date: Mon, 17 Jun 2024 18:08:18 +0200 Subject: [PATCH] Collapse step 2 and 3 --- how-to/manage-users.rst | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/how-to/manage-users.rst b/how-to/manage-users.rst index f62d554..7723ea3 100644 --- a/how-to/manage-users.rst +++ b/how-to/manage-users.rst @@ -4,6 +4,9 @@ Manage users and teams in development environments Create new users ---------------- +Local +~~~~~ + In environments that use the test OpenID provider, such as the development appserver started via ``make run``, you can create a new account using the ``utilities/make-lp-user`` script and log into that account at @@ -12,6 +15,9 @@ appserver started via ``make run``, you can create a new account using the For example, to add user ``test-user``, navigate to your local Launchpad repo and run: ``utilities/make-lp-user test-user``. +Staging/Qastaging +~~~~~~~~~~~~~~~~~ + Some development environments, such as those deployed using the :doc:`Mojo spec <../explanation/charms>`, use production Single Sign-On for authentication. In these environments, you should not use @@ -19,8 +25,6 @@ authentication. In these environments, you should not use ``https://{qastaging,staging}.launchpad.net/`` via SSO as you would on production to create your user. - - Add user to a team ------------------ @@ -29,23 +33,18 @@ following handler ``~test-user`` and we want to add it to a team. In this example let's consider that we want to add it to the Launchpad Admins team, so ``~admins``. -We can use the ``utilities/anoint-team-member`` script within the Launchpad repo -to add a user to a team. +We can use the ``utilities/anoint-team-member`` script within the Launchpad +repo for this purpose. + For staging and qastaging we should: 1. Log into ``launchpad-bastion-ps5`` using the ``stg-launchpad`` user. -2. Source ``. .mojorc.{qastaging,staging}`` the correct -environment. - -3. Ssh into the scripts unit ``juju ssh launchpad-scripts/leader``. - -.. note:: - Alternatively, we can merge step 2,3 running this command: - ``in-model qastaging juju ssh launchpad-scripts/leader`` +2. SSH into the ``launchpad-scripts`` juju unit, by running +``in-model qastaging juju ssh launchpad-scripts/leader``. -4. Then we can run: +3. Add the user to the team by running: .. code::