ucldc / exhibitapp

0 stars 2 forks source link

Exhibitions RDS DB Infrastructure (database debacle) #51

Open amywieliczka opened 2 months ago

amywieliczka commented 2 months ago

[From Trello]

We are planning to migrate the following RDS instances into the cdl-pad-prod aws account, from the main aws account, starting sometime in February:

rds-dsc-registry-dev (rds-dsc-registry-dev.cmcguhglinoa.us-west-2.rds.amazonaws.com) rds-dsc-registry-stg (rds-dsc-registry-stg.cmcguhglinoa.us-west-2.rds.amazonaws.com) rds-dsc-registry-prd (rds-dsc-registry-prd.cmcguhglinoa.us-west-2.rds.amazonaws.com)

We are planning to decommission the following RDS instance from the dsc account:

rds-dsc-registry-prd-manual-02252022 rds-dsc-registry-stg-copy

Steps:

~ Registry Dev ~

  1. take a snapshot of rds-dsc-registry-dev
  2. create a new rds instance in the cdl-pad-prod (or cdl-pad-dev) account
  3. create a security policy which allows the registry-dev ec2 instance in the main aws account to access the new rds instance in the cdl-pad-prod (or cdl-pad-dev) account
  4. update

registry@dsc-registry2-dev $ ~/code/avram/collection_registry/local_settings.py to use the new database hostname, username, password

~ Registry Stg ~

  1. take a snapshot of rds-dsc-registry-stg
  2. create a new rds instance in the cdl-pad-prod (or cdl-pad-dev) account
  3. create a security policy which allows the registry-stg ec2 instance in the main aws account to access the new rds instance in the cdl-pad-prod (or cdl-pad-dev) account
  4. create a security policy which allows the calisphere-test elasticbeanstalk instance in the dsc aws account to access the new rds instance in the cdl-pad-prod (or cdl-pad-dev) account
  5. update

registry@dsc-registry2-stg $ ~/code/avram/collection_registry/local_settings.py to use the new database hostname, username, password

  1. update calisphere-test elasticbeanstalk configuration to use the new database hostname, username, password

~ Registry Prd ~

  1. take a snapshot of rds-dsc-registry-prd
  2. create a new rds instance in the cdl-pad-prod account
  3. create a security policy which allows the registry-prd ec2 instance in the main aws account to access the new rds instance in the cdl-pad-prod account
  4. create a security policy which allows the calisphere elasticbeanstalk instance in the dsc aws account to access the new rds instance in the cdl-pad-prod account
  5. update

registry@dsc-registry2-prd $ ~/code/avram/collection_registry/local_settings.py to use the new database hostname, username, password

  1. update calisphere elasticbeanstalk configuration to use the new database hostname, username, password

~ Decommissioning ~

  1. decommission rds-dsc-registry-dev, rds-dsc-registry-stg, rds-dsc-registry-prd, rds-dsc-registry-prd-manual-02252022, and rds-dsc-registry-stg-copy

~ Documentation ~

  1. update exhibition manual to specify using registry-stg as a staging area for new exhibitions

~ Create an Update Script for Exhibition Prod ~

  1. create a way to sync the exhibition table between registry-stg and registry-prd rds instances.