Skip to content

Commit

Permalink
Update data replication guidance
Browse files Browse the repository at this point in the history
- Fix `--assume-role-ttl` duration value. Using `180m` for this results
  in the following error: `aws-vault: error: invalid input duration
  string, try --help`. Updating it to `3h` fixes this
- Document potential issues when trying to run the data replication
  scripts
  • Loading branch information
yndajas committed Nov 21, 2024
1 parent d0dfb16 commit d742fc6
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions docs/how-tos.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ You will need to assume-role into AWS using the [gds-cli](https://docs.publishin

```
# as an AWS PowerUser...
gds aws govuk-integration-poweruser --assume-role-ttl 180m ./bin/replicate-postgresql.sh content-publisher
gds aws govuk-integration-poweruser --assume-role-ttl 3h ./bin/replicate-postgresql.sh content-publisher
# as an AWS User...
gds aws govuk-integration-readonly --assume-role-ttl 180m ./bin/replicate-postgresql.sh content-publisher
gds aws govuk-integration-readonly --assume-role-ttl 3h ./bin/replicate-postgresql.sh content-publisher
```

All the scripts, other than `replicate-elasticsearch.sh`, take the name of the app to replicate data for.
Expand All @@ -59,6 +59,15 @@ Draft data can be replicated with `replicate-postgresql.sh draft-content-store`

If you want to download data without importing it, set the `SKIP_IMPORT` environment variable (to anything).

### Troubleshooting

The replication scripts might fail for the following reasons:

- `pv` not being installed. This is used to display a progress bar. On macOS, you can [install pv using Homebrew](https://formulae.brew.sh/formula/pv).
- Running out of space in Docker. This might result in an error like `ERROR 1114 (HY000) at line 11768: The table 'govspeak_contents' is full`. If you see this, you could do either or both of the following:
- If you're okay with removing some or all of your Docker containers, images, and possibly volumes and other data, run [docker system prune](https://docs.docker.com/reference/cli/docker/system/prune).
- If you have enough spare space on your local machine, allocate more space to Docker. Using Docker Desktop, this setting is under Settings > Resources > Advanced > Resource Allocation > Virtual disk limit.

## How to: set environment variables

While most environment variables should be set in the config for a project, sometimes it's necessary to set assign one or more variables at the point of running a command, such as a Rake task. This can be done using `env` e.g.
Expand Down

0 comments on commit d742fc6

Please sign in to comment.