Migrating an N-Tier Application Containing Data
This section uses an application called RollerWeBlog to describe the CloudCenter process to migrate a three-tier Java web application with data running at the customer's location.
- CloudCenter does not provide out-of-box mapping for any cloud-specific service to an alternate service in another environment.
- If using cloud-specific services (such as ELB or RDS), then the author/owner of the Application Profile must be aware that are making a decision to lock that Application Profile to a particular cloud (for example, AWS).
- However, you can create a custom service definition and include the scripts required to detect whether it was being deployed in AWS or in VMWare or another cloud and then connect that application to either the ELB or their F5 load balancer.
- CloudCenter does not inherently update the DNS to point to a migrated deployment.
- However, you can configure the migration process to include any scripts required to change the DNS mapping in your environment.
- See CloudCenter External URL for additional context.
To migrate an N-tier application with data, follow this process:
- Back up the data for the RollerWeBlog application. For this example:
- The data backup file is called dbbkup.sql.
- The RollerWeBlog application runs on a different cloud than CloudCenter.
- Identify the relevant Parameters and Macros , and Configuration Files for this application. ,
- Modify the Configuration File (or properties file) to include CloudCenter-defined system macros to automatically plug in the appropriate values for parameters defined in the configuration file. Alternately, you can pass these parameters as arguments to install or configuration scripts.
The RollerWeBlog application configuration file changes:
- Prior to the macro substitution, the configuration file had the following description in the highlighted area:
Effectively, the localhost IP address is replaced by a dynamically generated private IP address (database tier) during runtime using %DB_TIER_IP%.
- In Application Profiles, users can define parameters to pass as arguments to the username and password field. Optionally, users can also include default values in scripts.
- After modifying the configuration files with system macros, create a .war application package and include the updated configuration file.
- Upload the application data (packages, configuration files, backup data, SQL script, and other scripts) to your shared directory in the .
- Create an application directory under /storage/app/<application name> and upload the application data to the newly created directory.
- If the application requires certain parameters to be defined or overridden (administrator, username, and password), include them in the Topology Modeler's section.
- Define the application architecture and services using the Topology Modeler. For the RollerWeBlog example, use Tomcat as the web server, MySQL as the database, and NginX as the load balancer. For each tier, use the Properties panel to provide additional details. For example:
- MySQL tier: Parameters, username, password, the path for the database script that has the backup data from a previous environment, and so forth.
- RollerWeBlog tier: Define the path for the application binary file (roller.war) and the configuration file.
- Similarly, provide the dependent details for the Tomcat and NginX tiers as well.
- Save the Java web app profile. Access your new application from the Apps tab and verify your changes for each tier. The application is now ready for deployment.
- Submit the application for deployment. The sends the application package information (JSON package) to the .
- View the deployment progress in the Status field.
- SSH or VNC to the cloud VM for additional troubleshooting access or to run additional commands and scripts.
- Once the deployment is complete, click the Access link to open the IP address for this application. You may need to specify the full path in the context of the application in the Topology Modeler's Basic Information pane.
- Use the full path URL to access the migrated RollerWeBlog application.
- No labels