To migrate an existing MySQL EBS database setup that's using the "MySQL EBS v2 (Beta)" ServerTemplate to the general availability (GA) release of the same template ("Database Manager for MySQL 5.x - 11H1 "), which is stable and recommended for use in production environments.
Although, this tutorial assumes that you are going to take advantage of the EBS striping capability, it is not required. You can still migrate to the v2 template and continue to use a non-striped EBS volume for backups (EBS_STRIPE_COUNT=1).
- Go to Design -> MultiCloud Marketplace. In order to perform the migration you will need to import the following components. Both MySQL 5.0 and 5.1 are supported. Be sure to select the appropriate ServerTemplate.
Warning: You must use the ServerTemplate that matches the MySQL version that you're currently using. So if you're using MySQL 5.0, be sure to use the 5.0 ServerTemplate for the migration otherwise you might have version incompatibility issues.
- ServerTemplate: "Database Manager for MySQL 5.0 - 11H1" or "Database Manager for MySQL 5.1 - 11H1"
- Clone the imported ServerTemplate if you plan to make modifications to it.
- Reconcile any custom alerts over to the cloned ServerTemplate. For example, you might have defined custom alerts in the "Beta" ServerTemplate or at the Server level.
- Any custom configurations or scripts will also have to be reconciled accordingly and incorporated into the new ServerTemplate.
- Add a server into the cloned Deployment using the new "Database Manager for MySQL 5.x - 11H1" ServerTemplate. You will need to select which MCI should be used. Both the 5.0 and 5.1 ServerTemplates support CentOS 5.4, but only the 5.1 support Ubuntu 10.04.
- Launch the new Server. When the input confirmation window appears, be sure to set SLAVE_INIT_AT_BOOT = "True".
- Once the server becomes operational you can promote it to become your new Master-DB by running the "DB EBS promote to master - 11H1" operational script. A backup EBS snapshot will also be created of the new Master-DB. When you promote the new slave to become the new master, the old master automatically becomes a slave of the new master.
- You must wait for ALL of the new snapshot(s) of the EBS stripe to be 100% complete. One way to track the status of the Snapshots, is to go to the Deployment's Volumes tab and click on each volume to see its associated Snapshots. Or you can go to Clouds -> AWS Region -> EBS Snapshots and use your DB_LINEAGE_NAME prefix (e.g. rails_regression_stripe) as a filter to find the appropriate Snapshots.
- The next step is to create a new Slave-DB. Simply clone the new server that you just launched.
- Launch the new server. When the input confirmation window appears, be sure to set SLAVE_INIT_AT_BOOT = "True".
- Congratulations! You've successfully upgraded your MySQL EBS setup from using the "Beta" ServerTemplates.
- The old "beta" database servers will still be operational at this point. If you need to roll-back for some reason to the "old" database, you can simply promote the Slave-DB (that used to be the old Master-DB) to become the Master-DB again. Once you are 100% satisfied that your database setup is stable using the new ServerTemplates, you can choose to dispose the old servers at your own discretion.
Warning: If you need to terminate a v2 instance, be sure to terminate it by running the 'DB TERMINATE SERVER' operational script, which will automatically delete the detached EBS volumes. If you terminate an instance using the "Terminate" action button in the Dashboard, the detached EBS volumes will not be deleted. You will need to manually delete them.