Skip to content

Commit

Permalink
Update moduletest reset runbooks
Browse files Browse the repository at this point in the history
  • Loading branch information
xendk committed Nov 28, 2024
1 parent df678a5 commit 43ecd3f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 17 deletions.
32 changes: 15 additions & 17 deletions docs/runbooks/reset-moduletest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,21 @@

## When to use

When a moduletest site need reseting
When a moduletest site need resetting.

## Prerequisites

* An authenticated `az` cli. The logged in user must have full administrative
permissions to the platforms azure infrastructure.
* A running [dplsh](using-dplsh.md) with `DPLPLAT_ENV` set to the platform
environment name.

## Procedure

1. Find the moduletest site of the project that need reseting in the Lagoon UI
2. Go to tasks
3. Select "Copy files between environments", and set the source
to "main" and run the task. This queues the task and lagoon will run it when
it can.
There's some role/user restrictions in place by lagoon, which
makes the task fail, as it can't set the correct time on the files. If that
is the only
error, then it copied the files, and this step is done. Otherwise run it again
4. Select "Copy database between environments", and set the source
to "main" and run the task
5. Go to deployments and pres "deploy", this ensures that the state matches that
of the environment.
6. Go the page URL and check that it looks alright

The moduletest site is now reset
From within `dplsh` run:

```sh
PROJECT=<site> task sites:webmaster:reset-moduletest
```

Where `<site>` is the site to reset.
29 changes: 29 additions & 0 deletions docs/runbooks/ui-reset-moduletest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# UI: Reset moduletest site

## When to use

When a moduletest site need resetting

**Warning:** This procedure does not sync the site properly, as it
doesn't delete files/tables that exists on moduletest but not in
production. In many cases, this isn't a problem, but i some instances
it could be. If in doubt, ask a platform engineer to do the sync.

## Procedure

1. Find the moduletest site of the project that need resetting in the Lagoon UI
2. Go to tasks
3. Select "Copy files between environments", and set the source
to "main" and run the task. This queues the task and lagoon will run it when
it can.
There's some role/user restrictions in place by lagoon, which
makes the task fail, as it can't set the correct time on the files. If that
is the only
error, then it copied the files, and this step is done. Otherwise run it again
4. Select "Copy database between environments", and set the source
to "main" and run the task
5. Go to deployments and pres "deploy", this ensures that the state matches that
of the environment.
6. Go the page URL and check that it looks alright

The moduletest site is now reset

0 comments on commit 43ecd3f

Please sign in to comment.