GSA / data.gov

Main repository for the data.gov service
https://data.gov
Other
648 stars 101 forks source link

Migrate dashboard to cloud.gov #3555

Closed adborden closed 2 years ago

adborden commented 2 years ago

User Story

In order to stop maintaining the FCS deployment, the data.gov team wants production service to be directed to our deployment on cloud.gov.

Acceptance Criteria

[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]

Background

[Any helpful contextual notes or links to artifacts/evidence, if needed]

Security Considerations (required)

[Any security concerns that might be implicated in the change. "None" is OK, just be explicit here!] This change will migrate us away from our old environment, which is harder to maintain and for which there are more things that we have to look after. The new environment has already been pen-tested and ATOd so we think it's going to be net win on attack surface overall.

Launch plan

Pre-launch

In the days leading up to the launch, these tasks should be completed:

Launch

Tasks to be completed at the time of launch.

In the event a rollback is necessary, apply these tasks.

Post-launch

Once the launch is stable and successful, these tasks should be performed.

adborden commented 2 years ago

Hit a snag when creating the data.gov domain in cloud.gov. We're working through this with the cg-support team.

$ cf create-domain gsa-datagov data.gov
Creating private domain data.gov for org gsa-datagov as aaron.borden@gsa.gov...
The domain name "data.gov" cannot be created because "staging.api.data.gov" is already reserved by another domain
FAILED
adborden commented 2 years ago

Backing up the staging database took ~1m and restoring took ~9m.

   2021-11-30T19:25:00.23-0800 [APP/TASK/dashboard-backup/0] OUT restoring dashboard-db (mysql) from /dashboard/staging/dashboard-db-20211201-023643-migration.sql.gz...
   2021-11-30T19:34:15.32-0800 [APP/TASK/dashboard-backup/0] ERR real   9m15.091s
   2021-11-30T19:34:15.32-0800 [APP/TASK/dashboard-backup/0] ERR user   0m59.095s
   2021-11-30T19:34:15.32-0800 [APP/TASK/dashboard-backup/0] ERR sys    0m6.885s
   2021-11-30T19:34:15.32-0800 [APP/TASK/dashboard-backup/0] OUT ok
   2021-11-30T19:34:15.32-0800 [APP/TASK/dashboard-backup/0] OUT Exit status 0
adborden commented 2 years ago

Migrating S3 is going to be a pain.

Total Objects: 91405
   Total Size: 351.6 GiB
adborden commented 2 years ago

Migrating the S3 bucket on staging took about 8 1/2 hours.

real    505m10.448s
user    52m59.490s
sys     43m49.413s
adborden commented 2 years ago

DB backup on FCS production:

real    4m31.271s
user    5m29.634s
sys     1m4.459s
dashboard-db (prod) backup complete.
adborden commented 2 years ago

DB restore in cloud.gov production

real       32m29.414s
user       3m33.197s
sys        0m28.964s
adborden commented 2 years ago

Production s3 migration:

real    647m47.594s
user    67m56.898s
sys     43m5.665s
adborden commented 2 years ago

At this point, we're waiting on GSA to create the dashboard.data.gov record and I'm scheduled with Shaw to update the labs.data.gov record on Monday.

adborden commented 2 years ago

Removed service keys from dashboard-db and dashboard-s3 in both prod and staging spaces