Closed
Bug 1248747
Opened 8 years ago
Closed 8 years ago
Migrate database to RDS
Categories
(Release Engineering Graveyard :: Applications: Balrog (backend), defect)
Release Engineering Graveyard
Applications: Balrog (backend)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mostlygeek, Assigned: mostlygeek)
References
Details
Determine the requirements and process for migrating the database to RDS. Things to look at: - size of database (what to keep/leave behind) - security requirements around the data - migration process - RDS sizing requirements (how much load the DB handles) - MySQL version requirements
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → bwong
Comment 1•8 years ago
|
||
If it helps, the db server sends lots of data to New Relic. I can pull the stats if you don't have access to it.
Comment 2•8 years ago
|
||
One thing I realized last night is that we don't need to bother with a database import for dev - we can start fresh there and add what little data we need. If we still want to a dev db import as a way of making sure it'll work for production, that's fine with me, but it's not necessary from my standpoint.
Assignee | ||
Comment 3•8 years ago
|
||
It's mainly for the production data which I assume we need to move. Do you have any information on the MySQL version of the database? Does Balrog have any specific MySQL requirements?
Comment 4•8 years ago
|
||
Sorry - missed this comment. (In reply to Benson Wong [:mostlygeek] from comment #3) > It's mainly for the production data which I assume we need to move. > > Do you have any information on the MySQL version of the database? I'm not sure which version we're running...probably should check with the Data team. > Does Balrog have any specific MySQL requirements? We don't use anything in the way of fancy features AFAIK. However, we do have migration scripts that we use to change the schema. I assume we'll be able to run those against RDS still? All they need is to be able to connect through a mysql:/// URI.
Flags: needinfo?(bwong)
Assignee | ||
Comment 5•8 years ago
|
||
Migration scripts can still be run like normal. RDS is really just managed MySQL, for the most part nothing will change.
Flags: needinfo?(bwong)
Assignee | ||
Comment 6•8 years ago
|
||
For the migration plan we will try to use Amazon's recommended process [1] for reduced downtime. In a nutshell this is: - create an RDS instance, seed it w/ mysqldump - set up replication between RDS and the main DB - run SHOW SLAVE STATUS, wait until Seconds_behind_master is 0 At that point all data will be kept in sync and we will be able repoint services to AWS and maintain a consistent database state. [1] http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.NonRDSRepl.html
Comment 7•8 years ago
|
||
https://aws.amazon.com/blogs/aws/aws-database-migration-service/ seems to be a newly-available wrapper around that process.
RDS stack is up and running in stage.
Comment 9•8 years ago
|
||
To enable SSL, I downloaded the certificate authority - rds-ca-2015-root.pem copied it to /usr/local/etc on aus4-1 and aus4-2.db.phx1.mozilla.com. added the following to /etc/my.cnf: ssl-ca=/usr/local/etc/rds-ca-2015-root.pem took aus4-1 out of the load balancer (it's the slave) and restarted MySQL, and all is good.
Comment 10•8 years ago
|
||
[root@aus4-2.db.phx1 ~]# date; /etc/init.d/mysqld restart; date Wed Jun 1 17:04:28 UTC 2016 Stopping mysqld: [ OK ] Starting mysqld: [ OK ] Wed Jun 1 17:04:46 UTC 2016 mysql> show variables like '%ssl%'; +---------------+-------------------------------------+ | Variable_name | Value | +---------------+-------------------------------------+ | have_openssl | YES | | have_ssl | YES | | ssl_ca | /usr/local/etc/rds-ca-2015-root.pem | aus4-2 has certificates now.
Comment 11•8 years ago
|
||
This work has been completed.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
It has *not* been completed. Reopening.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 13•8 years ago
|
||
Database has been migrated to AWS. We're not rolling back.
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
Resolution: --- → FIXED
Updated•4 years ago
|
Product: Release Engineering → Release Engineering Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•