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
-
Activity
| Field | Original Value | New Value |
|---|---|---|
| Epic Link | IGBF-2323 [ 18477 ] |
| Rank | Ranked higher |
| Assignee | Ann Loraine [ aloraine ] | Chester Dias [ cdias1 ] |
| Status | To-Do [ 10305 ] | In Progress [ 3 ] |
| Summary | Investigate: replicate mysql database for appstore redeployment | Write role to replicate mysql database for appstore redeployment |
| Story Points | 1 | 2 |
| Story Points | 2 | 1.5 |
| Story Points | 1.5 | 2 |
| Status | In Progress [ 3 ] | Needs 1st Level Review [ 10005 ] |
| Assignee | Chester Dias [ cdias1 ] | Ann Loraine [ aloraine ] |
| Status | Needs 1st Level Review [ 10005 ] | First Level Review in Progress [ 10301 ] |
| Status | First Level Review in Progress [ 10301 ] | Ready for Pull Request [ 10304 ] |
| Assignee | Ann Loraine [ aloraine ] | Chester Dias [ cdias1 ] |
| Status | Ready for Pull Request [ 10304 ] | Pull Request Submitted [ 10101 ] |
| Assignee | Chester Dias [ cdias1 ] | Ann Loraine [ aloraine ] |
| Status | Pull Request Submitted [ 10101 ] | Reviewing Pull Request [ 10303 ] |
| Status | Reviewing Pull Request [ 10303 ] | Merged Needs Testing [ 10002 ] |
| Status | Merged Needs Testing [ 10002 ] | Post-merge Testing In Progress [ 10003 ] |
| Resolution | Done [ 10000 ] | |
| Status | Post-merge Testing In Progress [ 10003 ] | Closed [ 6 ] |
| Assignee | Ann Loraine [ aloraine ] | Chester Dias [ cdias1 ] |
| Link | This issue blocks IGBF-2371 [ IGBF-2371 ] |
| Link | This issue blocks IGBF-2371 [ IGBF-2371 ] |
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.