Note: Please go to docs.rightscale.com to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > ServerTemplates > Archive > Pre-11H1 > Migration Tutorials > MySQL Setup Migration: EBS Stripe v2 (Beta) to EBS Stripe (GA)

MySQL Setup Migration: EBS Stripe v2 (Beta) to EBS Stripe (GA)

Objective

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).

diag-MigrationBeta-GA-v2.png

Overview

What are the changes since the "Beta" release?

  • Support for new EC2 instance sizes: 2XL and 4XL
  • Support for 'AWS-AP' region
  • "MySQL 5.0 EBS v2"
    • Support for CentOS 5.4 i386/x64
    • Support for Ubuntu 8.04 i386/x64
  • "MySQL 5.1 EBS v2"
    • Support for Ubuntu 9.10 i386/x64
  • Stripe management and migration script improvements.
  • Improve exception handling in db tools.
  • Fix for MySQL 5.1 pristine DB install issues.
  • Deleting volumes is now performed by 'DB TERMINATE SERVER' operational script.
  • Added new "DB Create MySQL EBS stripe - 11H1" RightScript to bootstrap a new database
  • Prevent MySQL 5.0 / 5.1 snapshot cross restore. (OPT_DB_RESTORE_VERSION_CHECKING = true)
  • RightScript "EBS stripe volume create - 11H1" now exits with failure when error occurs.
  • MySQL logs rotation fixes.

Prerequisites

  • A Deployment with at least a running MySQL EBS Master-DB server that was launched using a revision of the "MySQL EBS v2 (Beta)" ServerTemplate.

Steps

  • 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".
    diag-ebs_v2_launch_slave1-v1.png
  • 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.
    diag-promote_master-v2.png
  • 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.
    screen-List_Stripe_Snapshot-v1.png
  • 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.
    diag-ebs_v2_ga-v1.png
  • 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.

You must to post a comment.
Last modified
14:19, 7 Oct 2014

Tags

This page has no custom tags.

Classifications

This page has no classifications.

Announcements

None


© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.