r19 - 09 Nov 2007 - 18:47:38 - StephenQYou are here: Wiki >  AppLogic2 Web > CatDynMig
led-green December 24 - AppLogic 2.4.7 is now available and is the latest production release!

MIG: Self-Migration Enabler


AppLogic 2.1 and 2.2 Beta ONLY

MIG Icon At a Glance
Catalog Dynamic
Category Dynamic
User volumes yes
Min. memory 192M
OS Linux
Constraints no
Questions/Comments Ask Forum

Functional Overview

MIG enables the containing application to migrate or snapshot itself to another grid. These operations are initiated through a simple web interface (GUI) exposed by MIG and work in conjunction with the helper application MigHelper. The GUI is accessible through the application IP and the configured MIG port.

Using the GUI, a user can request either of the following operations over the containing application:

  • Migrate: the application migrates itself to a target grid selected from the GUI. The original source application is stopped and destroyed.

  • Snapshot: the application makes a copy of itself in a stopped state on a target grid selected from the GUI. The original source application is re-started.

Grids involved in these operations must first be configured. See preparing the grids.

Boundary

Resources

Resource Minimum Maximum Default
CPU 0.10 4.05 0.10
Memory 192 MB 192 MB 192 MB
Bandwidth 2 Mbps 2 Mbps 2 Mbps

Terminals

name dir prot. description
in in any Exposes a web interface for requesting application migration or snapshot. All other network traffic not directed to the GUI is passed-through aux without modification.
net out any Output for accessing grids in order to facilitate application migration or snapshot.
aux out any Auxiliary output. Incoming traffic that is not directed to the GUI is sent through this terminal without modification. This terminal can be left unconnected.
mon out cce Used for performance and resource usage statistics.

User Volumes

Volume Description
config Read-write volume for configuration data.

The volume is used to store the private_key and grid_info files required for application migration or snapshot.

Properties

name type description
username string User name for access to the web interface. Default: empty
If username is empty no authentication is performed, even if password is non-empty.
password string Password for access to the web interface. Default: empty
mode string migrate, snapshot or both. Default: both
migrate constrains the GUI to only allow application migration
snapshot constrains the GUI to only allow application snapshot
both allows both migration and snapshot
port_no integer Port for accessing the web interface. This GUI is accessed through the application IP and this port. Default: 8080.
private_key_file string File containing the openssh formatted private key whose corresponding public key is authorized on the relevant grids. Default: private.key.
File name may contain path information. See preparing the application for more information.
grid_info_file string File containing configuration information for each of the relevant grids. Default: grid.info.
File name may contain path information. See preparing the application for more information.

Performance

Additional resources do not affect performance.

Web Interface (GUI)

MIG exposes a web interface which is used to migrate or snapshot the containing application. This GUI is accessed using the application IP on the configured port.

MIG_monitor_input_half.png

Above is an example of the GUI page used for initiating application migration or snapshot. A user selects an operation (migrate or snapshot), a target application name, and a target grid. On Submit, the browser displays the progress monitor.

MIG_monitor_input_half.png

Above is an example of the GUI progress monitor during migration. This page contains three monitors:

  • The Source Application Monitors tracks:
    • provisioning MigHelper on the target grid
  • The MigHelper Application Monitor tracks:
    • stopping the source application
    • migrating the source application to the target grid as the target application
    • starting the target application
  • The Target Application Monitor tracks:
    • destroying the source application
    • stopping MigHelper
    • destroying MigHelper

MIG_monitor_snap_half.png

Above is an example of the GUI progress monitor during snapshot. This page contains three monitors:

  • The Source Application Monitors tracks:
    • provisioning MigHelper on the target grid
  • The MigHelper Application Monitor tracks:
    • stopping the source application
    • migrating the source application to the target grid as the target application
    • re-starting the source application
  • The Re-Start Source Application Monitor tracks:
    • stopping MigHelper
    • destroying MigHelper

Preparing For Migration & Snapshot

These steps must be taken before MIG can be used to migrate or snapshot an application. A step-by-step example is provided here.

Preparing The Grids

The MIG appliance must be able to authenticate on any grid to which it will migrate or snapshot. To ensure this, create a public/private key pair in openssh format without a passphrase. Create a user on each grid whose public key corresponds to the generated public key.

Each grid must be able to authenticate on every other grid involved. To ensure this, create users on each grid whose public keys correspond to the public keys of the other grids.

Each grid must have installed:

  • The MigHelper reference application template.
  • The MIG catalog appliance.
  • The MIGCTL catalog appliance (this appliance is necessary for MIG).

Preparing The Application

Connect the MIG appliance to an existing application - see Typical Usage below.

Put the generated private key file, named according to the private_key_file property, on the root of the config volume of the appliance with owner and group nobody and mode 600 .

Create a grid info file which records the information necessary for the application to migrate or snapshot amongst a collection of grids. Put the grid info file, named according to the grid_info_file property, on the root of the config volume with owner and group root and mode 644. This file contains application information for each grid according to the example below:

grid g1: Indicates that the following information relates to grid "g1" where "g1" is a unique identifier among the grids within this file.
   {
   controller = w.x.y.z IP address for the grid controller or resolvable domain name.
   location = Los Angeles Location identifier.
   MIG_ip = w.x.y.z:8080 IP address and port number of the web interface for the MIG appliance on the instance of the application on this grid.
   app_config = "in_ip=w.x.y.z out_ip=w.x.y.z ..." The quoted string is a list of application properties to be configured for the instance of the application on this grid. Properties not on this list will retain the values from any source instance. Note, do not use .name=new_name.
   MigHelper_config = "in_ip=w.x.y.z out_ip=w.x.y.z netmask=w.x.y.z gateway=w.x.y.z" The quoted string is a list of all properties used to provision an instance of the MigHelper application on this grid. The MigHelper application requires the netmask and gateway of the grid and two unassigned IP's which are used during migration or snapshot. See MigHelper for more information.
   }

Note: The file sample.grid.info located in /var/www/html of the MIG appliance can be used as a template.

Typical Usage

LampX4

The diagram below shows how MIG can be connected to the LampX4 reference application. The INSSL gateway properties are set to forward tcp traffic on port 8080 to the aux terminal. Pointing a browser at port 8080 of the application IP or resolvable domain name brings up the web interface for MIG.

Note: the MIG applicance should not be connected directly between an IN gateway and the rest of the application, but rather to the aux terminal of an INSSL gateway.

A step-by-step example for setting up the LampX4 use case on two grids is provided here.

MIG_LampX4 app

Notes and Links

Notes

  • It is good practice to set the username and password properties of MIG to prevent unauthorized users from migrating the application.
  • It is necessary to properly set the start order of MIG. MIG must start after the appliance connected to MIG's net terminal in order for MIG to identify the grid on which it is running.

Related Documents

Questions and Comments

IDEA! To post a question about this appliance, visit our forum.


-- StephenQ - 12 Sep 2007

 
Copyright © 2005-2008 3tera, Inc. All Rights Reserved.
%