Details
-
Type: New Feature
-
Status: Closed (View Workflow)
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Story Points:2
-
Epic Link:
-
Sprint:Summer 1: 8 Jun - 19 Jun
Description
The current App Store deployed at https://apps.bioviz.org uses an out-of-date codebase.
We need to update it, but we also cannot risk (much) down-time.
To update the code, I would like to set up an entirely new EC2 with new code, but using a copy of the current production database.
For this task, let's a new role to appstore-playbooks that creates a copy of an existing mysql database to given host.
Assumptions:
- RDS hosts for the original and the copy are already configured
- RDS hosts may be different for original and copy
- Ansible control nodes can connect to both RDS hosts using mysql ansible modules
User must supply:
- admin username and passwords for both hosts
- name of database to copy
- name of copied database
Don't do anything to the database – just copy it.
Attachments
Issue Links
- relates to
-
IGBF-2426 Write next draft database migration code
- Closed
The below steps Summarize the flow order of tasks
a. Take a manual snapshot of the DB
b. Download the original DB copy.
c. Create a new DB from the copy if not existing, if existing drop and recreate
d. Load the data into the new DB.
e. (optional) Make changes to new DB code.
f. Set new DB as the Primary.
The above idea will help to follow the Blue-Green Code Deployment strategy(Minimal downtime)
As part of this, one DB(called Blue) will continue to be active during deployment while we ready the second DB(Green) with the code of Blue and additional code change of the release.
we can then just modify the EC2 code to point to the new DB. Both DB will be present on the RDS but only 1 will remain active, while second remains as a backup.
This way the Production DB will toggle between Blue and Green DBs and there always will be a backup present on the other DB.
The snapshot can be dropped once the activities are done and complete.
[~aloraine] Please let me know your thoughts on this idea https://docs.cloudfoundry.org/devguide/deploy-apps/blue-green.html#:~:text=Blue%2Dgreen%20deployment%20is%20a,live%20and%20Green%20is%20idle.