Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replicate data from staging, not integration #763

Closed
wants to merge 2 commits into from

Commits on Jul 12, 2024

  1. Replicate data from staging, not integration

    Since the env sync was ported over to govuk-helm-charts, not all
    apps have backups saved to s3 on integration (e.g. note the lack
    of `backup` operation [here](https://github.com/alphagov/govuk-helm-charts/blob/cae5e10baf0f67423bbebf66454da737da787d37/charts/db-backup/values.yaml#L767-L773)).
    This means that the data replication scripts fail, as they're
    looking for a bucket that does not exist.
    
    In contrast, all data is backed up to s3 on staging, so it should
    be safe to pull from there by default. The only downside is that
    integration access is given to devs by default, but that access to
    staging and production required Production Admin access. This is
    something that can hopefully be ironed out in the move to using
    govuk-helm-charts for local development, over the coming months.
    For now it seems better to fix the script for prod-admin users
    than to have it broken for everyone.
    
    NB I've also removed the unnecessary duplication of replication
    examples where one used a readonly role and one used a poweruser
    role. We should use principle of least privilege, so only show
    the readonly example.
    ChrisBAshton committed Jul 12, 2024
    Configuration menu
    Copy the full SHA
    a930b80 View commit details
    Browse the repository at this point in the history
  2. Change TTL from 180m to 60m

    The 180m value was failing with:
    
    ```
    $ gds aws govuk-production-poweruser --assume-role-ttl 180m ./bin/replicate-mysql.sh whitehall
    aws-vault: error: invalid input duration string, try --help
    ```
    
    A bit of searching suggests that the maximum TTL is now 1 hour:
    99designs/aws-vault#263
    ChrisBAshton committed Jul 12, 2024
    Configuration menu
    Copy the full SHA
    b7644ff View commit details
    Browse the repository at this point in the history