Skip to content

Commit

Permalink
Add 'backup' operations for integration environment
Browse files Browse the repository at this point in the history
What:

Ensures that every application has its database data backed up
to S3 in integration, for continued compatibility with
govuk-docker.

Why:

Since the env sync was ported over to govuk-helm-charts, not all
apps have backups saved to s3 on integration. This means that the
data replication scripts in govuk-docker fail, as they're looking
for a bucket that does not exist.

Whilst we could configure govuk-docker to pull from production or
staging instead (and indeed explored the idea in
alphagov/govuk-docker#763), this has the
downside of requiring that engineers have
[Production Admin access](https://docs.publishing.service.gov.uk/manual/rules-for-getting-production-access.html#production-admin-access),
so new starters would be unable to easily get production-like
data for local development (new starters are only granted
Integration Admin access).
  • Loading branch information
ChrisBAshton committed Jul 24, 2024
1 parent c46fc8a commit c653ace
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions charts/db-backup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -538,13 +538,15 @@ cronjobs:
operations:
- op: restore
bucket: s3://govuk-staging-database-backups
- op: backup

chat-postgres:
schedule: "47 3 * * 1-5"
db: govuk_chat_production
operations:
- op: restore
bucket: s3://govuk-staging-database-backups
- op: backup

ckan-postgres:
suspend: true
Expand All @@ -553,27 +555,31 @@ cronjobs:
operations:
- op: restore
bucket: s3://govuk-staging-database-backups
- op: backup

collections-publisher-mysql:
schedule: "21 3 * * 1-5"
db: collections_publisher_production
operations:
- op: restore
bucket: s3://govuk-staging-database-backups
- op: backup

contacts-admin-mysql:
schedule: "49 3 * * 1-5"
db: contacts_production
operations:
- op: restore
bucket: s3://govuk-staging-database-backups
- op: backup

content-data-admin-postgres:
schedule: "4 3 * * 1-5"
db: content_data_admin_production
operations:
- op: restore
bucket: s3://govuk-staging-database-backups
- op: backup

content-data-api-postgresql-primary:
suspend: true
Expand All @@ -584,6 +590,7 @@ cronjobs:
operations:
- op: restore
bucket: s3://govuk-staging-database-backups
- op: backup

content-publisher-postgres:
schedule: "9 3 * * 1-5"
Expand Down Expand Up @@ -618,6 +625,7 @@ cronjobs:
operations:
- op: restore
bucket: s3://govuk-staging-database-backups
- op: backup

email-alert-api-postgres:
schedule: "54 3 * * 1-5"
Expand All @@ -633,27 +641,31 @@ cronjobs:
operations:
- op: restore
bucket: s3://govuk-staging-database-backups
- op: backup

link-checker-api-postgres:
schedule: "43 3 * * 1-5"
db: link_checker_api_production
operations:
- op: restore
bucket: s3://govuk-staging-database-backups
- op: backup

local-links-manager-postgres:
schedule: "8 3 * * 1-5"
db: local-links-manager_production
operations:
- op: restore
bucket: s3://govuk-staging-database-backups
- op: backup

locations-api-postgres:
schedule: "32 3 * * 1-5"
db: locations_api_production
operations:
- op: restore
bucket: s3://govuk-staging-database-backups
- op: backup

publishing-api-postgres:
<<: *s5cmd-ram-workaround
Expand All @@ -670,6 +682,7 @@ cronjobs:
operations:
- op: restore
bucket: s3://govuk-staging-database-backups
- op: backup

router-mongo:
<<: *mongo-resources
Expand All @@ -690,13 +703,15 @@ cronjobs:
operations:
- op: restore
bucket: s3://govuk-staging-database-backups
- op: backup

service-manual-publisher-postgres:
schedule: "49 3 * * 1-5"
db: service-manual-publisher_production
operations:
- op: restore
bucket: s3://govuk-staging-database-backups
- op: backup

shared-documentdb:
<<: *mongo-resources
Expand Down Expand Up @@ -765,6 +780,7 @@ cronjobs:
operations:
- op: restore
bucket: s3://govuk-staging-database-backups
- op: backup

whitehall-mysql:
<<: *s5cmd-ram-workaround
Expand All @@ -773,3 +789,4 @@ cronjobs:
operations:
- op: restore
bucket: s3://govuk-staging-database-backups
- op: backup

0 comments on commit c653ace

Please sign in to comment.