Note: Please go to docs.rightscale.com to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > Solution Packs > Development and Test > Run a Multi-tier Development and Test Macro

Run a Multi-tier Development and Test Macro

Objective

Import and run one of the 3-tier Macros from the Development and Test Solution Pack.

Table of Contents

Prerequisites

  • A RightScale account that has access to subscribe to RightScale's Development and Test Solution Pack Macros
  • 'library' user role privileges are required to import the Macro from the MultiCloud Marketplace
  • 'actor' user role privileges are required to run the Macro
  • 'security_manager' user role privileges are required to create and edit Security Groups
  • 'designer' user role privileges are required for editing the ServerTemplates

Overview

The "Development and Test" solution pack contains several Macros that can be used to quickly stand-up functional Deployments.  Simply run your Macro of choice and the necessary components will automatically be created for you.  To learn more, see Development and Test Solution Pack.

diag-3tierLAMPMacro-v1.png

Steps

Import the Macro from the MultiCloud Marketplace

If the macro that you want to run does not exist in the local collection of your RightScale account, go to the MultiCloud Marketplace and download the appropriate macro(s).  Go to Design -> MultiCloud Marketplace -> Macros.   In addition to the All-In-One macros, the following 3-tier Macros are also available:

  • Load Balancer (HA Proxy/Apache) + two Appservers (PHP/Apache) and a Database server (MySQL)
  • Load Balancer (HA Proxy/Apache) + two Appservers (PHP/Apache/Tomcat) and a Database server (MySQL)
  • Load Balancer (HA Proxy) + Appserver (WebSphere) and Database server (DB2 Express)
  • Load Balancer (HA Proxy/Apache) + two Appservers (Zend PHP/Apache) and a Database server (MySQL)
  • Load Balancer (HA Proxy) + two Appservers (Ruby on Rails) and a Database server (MySQL)

Run the Macro

Go to Design -> Macros.  Select the macro that you want to execute and click the Run action button. 

Before the Macro actually runs, you'll have the option of selecting an existing SSH Key.  If you do not select an SSH Key, the Macro will simply create a new SSH Key.

 screen-RunMacro-v2.png

Next, you'll need to specify a Deployment Name Prefix.  We suggest using your initials.  The prefix (e.g. do) will be used to create the name of your Deployment (e.g. do_All-In-One (LAMP)_1284569536230). 

screen-PrefixName-v1.png

When you run the Macro a unique ID is added as a suffix to the namespace of each component that's created, which will help you more easily find the related components.

If you look at the output, you'll notice that the Macro performs the following steps:

  • Imports and clones the ServerTemplates that are used by the Macro to configure the Servers.  It's important that your Deployment uses cloned (editable) ServerTemplates so that you can later customize them
  • Creates a EC2 Security Group and adds the necessary ingress rules (i.e. Sets the firewall permissions for the server.)
  • Creates a new EC2 SSH Key (if you didn't select an existing one before running the macro)
  • Creates a Deployment and defines basic settings
  • Adds Servers to the Deployment using the cloned ServerTemplates
  • Launches the "Load Balancer" server


Go to the Deployment's show page.  Manage -> Deployments -> YourDeployment.  Notice that the load balancer server has already been launched.

screen-Show3tier-v1.png

Congratulations!  You just created a functional Development and Test environment in just a few steps.  You can now safely terminate the running server.  

Customize the Setup

The next step is to upload and point to your application and database.  If you do not ones of your own, you can use a Drupal example (read-only).

You will need to finish the configuration of your setup by defining the appropriate input parameters.   Some inputs are defined at the ServerTemplate level, while others are defined at the Deployment level, which overwrite values set at the ServerTemplate level.  See Inheritance of Inputs.  

Hover your cursor over the blue Info icons next to the Input name for helpful descriptions and suggested values.  Go to the Deployment's Inputs tab and click Edit.

  • APPLICATION
  • APPLICATION_CODE_BUCKET
  • APPLICATION_CODE_PACKAGE
  • DBADMIN_PASSWORD
  • DBADMIN_USER
  • DNSMADEEASY_PASSWORD
  • DNSMADEEASY_USER
  • DB_MYSQLDUMP_BUCKET
  • DB_MYSQLDUMP_PREFIX
  • DB_SCHEMA_NAME


The next step is to modify the cloned ServerTemplate to be specific for your application.  If you're still at the Server's Info tab, click the ServerTemplate link (e.g. LAMP v4 All-In-One v19 [HEAD]).   Or you can go to Design -> ServerTemplates and browse for the cloned ServerTemplate.  

Before you make any edits to the ServerTemplate, create a committed revision.  This way you can always go back to rev1 and reference the original version.  Click the Commit button.  Enter a comment like "original version" for the commit message.  Note:  Once you commit the ServerTemplate, you will still be viewing the HEAD version.

Click the Inputs tab of the HEAD version.  Click Edit.  You can either define these inputs at the ServerTemplate level or at the Deployment level.

  • DBAPPLICATION_PASSWORD
  • DBAPPLICATION_USER

Launch a New Server

The next step is to launch a Server using the revised ServerTemplate.  Go back to your Dev & Test Deployment.  Manage -> Deployments -> YourDeployment.  If you haven't already shutdown the first server that you launched, terminate it now.  Once the server is stopped, you can launch a new server.  Remember, the server that's defined in the Deployment should still referencing the HEAD version, so if you launch the server again, it will launch a fresh new server, but this time it will use the new input parameters that you just defined.

Test and Repeat

You will most likely have to repeat the process of making edits to the HEAD ServerTemplate's inputs and launching/terminating servers until you've configured your ServerTemplate to launch a custom server that can be used for your development and test purposes.

Once you're satisfied with the ServerTemplate's configuration, commit the ServerTemplate once again.  Going forward, you will want to use this committed revision of the ServerTemplate to launch future development and test servers.

Next Steps

Once you've properly configured your Dev & Test Deployment there are a couple of different steps you can take next depending on if and how you want to share it with other users.

  • Create a Custom Macro that can be used to create a custom Dev & Test Deployment within the same RightScale account and/or share it with other RightScale accounts
  • Clone and modify the Deployment for another project

See Create a Custom Development and Test Macro.

You must to post a comment.
Last modified
23:45, 16 May 2013

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.