-
Notifications
You must be signed in to change notification settings - Fork 10
DevOps: Upgrading PostgreSQL Engine version
This guide is helpful when attempting to upgrade the postgreSQL version for our databases.
- Access to AWS management console
- Access to Jenkins
- Ensure it is approved in VA TRM
- Ensure that version is available in Amazon RDS via the AWS management console
- Ensure that version is available to download in the [PostgreSQL apt Repository]
-
Log in to the AWS management console
-
Go to RDS
-
Click "Create database"
-
Select "PostgreSQL" and drop down to the version approved by the TRM and the one you want to upgrade to
- Scroll down to "Additional configuration
- Turn off "Enable Enhanced monitoring"
- Turn off "Deletion protection"
-
Create the database
-
Once it successfully creates without issue, go ahead and delete the database.
-
Find Yaml file here https://github.com/department-of-veterans-affairs/diffusion-marketplace/actions/workflows/run-tests.yml
-
Run the build in to ensure tests continue to pass
-
Go to Amazon RDS and select the database identifier you want to upgrade.
-
click "Action"
-
click "Take Snapshot"
-
Snapshot name "dev-before-upgrade" or stage or Prod
-
click "Take snapshot" After snapshot has been taken, then follow 6-11 steps below
-
Click "Modify"
-
Select the DB version you want to upgrade to
Note: If the version you want to upgrade to is initially not there you may need to update it to the closest major version. After that version update is complete, you should be able to upgrade it to the minor version you want.
-
Click "Continue"
-
Under "Scheduling of modifications", select "Apply immediately"
-
Apply these changes, by clicking "Modify DB instance"
-
Apply these steps to the other databases.
You will most likely need to make changes to the "Backup PROD DB" and "Backup PROD DB and Refresh STG and DEV DBs" scripts in Jenkins especially if it is a major change in version number.