Home > Solution Packs > Zend > Zend Solution Pack Setup

Zend Solution Pack Setup

Prerequisites

  • You will need 'library' user role privileges to subscribe to the Macro in the MultiCloud Marketplace and 'actor', 'designer', and 'security_manager' privileges to run the Macro.
  • RightScale account that has access to the Solution Pack Macro in the MultiCloud Marketplace.  Please contact Sales for more information and pricing.
  • Pay edition of RightScale - Required to use the premium ServerTemplates published by RightScale to configure the Load Balancer and MySQL Database Servers.
  • Zend Access Credentials provided by Zend: API Key, License Key, Order ID

Overview

The Macro is designed to build an environment in the AWS US-East region.   The Macro will not automatically launch any Servers; it simply creates and configures the environment accordingly.

By default, the application servers will retrieve their application at boot time using a RightScripts. If you are using the Zend High Availability Solution Pack and wish to use the Zend Cluster Manager to deploy your application code instead, you will need to make the following changes:

  • Modify the 'zend-app' security group. Use port 80 instead of 8000
    • TCP port:80   add group:zend-haproxy
  • Set the health check url to /dummy.php under the deployment's inputs tab. (Zend puts that health check in /var/www/html)
    • HEALTH_CHECK_URI: /dummy.php
  • Disable the "WEB Application svn code checkout" RightScript from any application servers. If you are using a server array, you will need to clone the ServerTemplate and remove the RightScript from the boot script list so that the application server will not try to retrieve the application code at boot time.

Architectural Diagram

Below is an overview diagram of the architecture that the Macro will create upon execution. The following instance sizes are used by default for the setups below.

  • m1.small - Load Balancers, Zend Cluster Manager
  • m1.large - MySQL Database Servers, Zend Application Servers
Zend High Availability (HA) Solution Pack

When the Zend (application) Servers are launched, they will automatically connect to the Zend Cluster Manager Server and Load Balancer(s) at boot time.   Once the connections have been established, you can log into the Zend Cluster Manager Server's console to view all collected session data for each Zend (application) Server.  Four ServerTemplates will be used to configure the Deployment.  Zend ServerTemplates will be used to configure the Zend (application) Servers and Zend Cluster Manager Server.  RightScale ServerTemplates will be used for the Load Balancer and Database Servers.

diag-ZendHA-v2.png

Zend Standard Solution Pack

The key difference between the High Availability (HA) and Standard Solution Pack is that the HA pack leverages two load balancers instead of one and also has a Zend Cluster Manager Server.

diag-ZendStandard-v2.png

Breakdown of Components

Here is a breakdown of the components that are created/imported/cloned when the Macro is run.

  • The following ServerTemplates and all of its MultiCloud Images (MCIs) and RightScripts were imported into your RightScale account from the MultiCloud Marketplace:
    • ZEND PHP5 Zend Server - Zend Solution Pack
    • Database Manager for MySQL 5.1
    • RightScale Load Balancer with Apache/HAProxy
  • The following cloud resources are created:
    • EC2 Security Groups
      • zend-default - Default Security Group that's used by all Servers in the Deployment.  Allows SSH access over port 22.
        • TCP IPs:any port:22
      • zend-cm - For the Zend Cluster Manager Server.  Allows the Zend Cluster Manager Server to communicate with the Zend (application) Servers over port 10082 using HTTPS.
        • TCP IPs:any port:10081
        • TCP IPs:any port:10082 
        • TCP port:3306  group:zend-app
        • TCP port:10085  group:zend-app
        • UDP port:10085  group:zend-app
        • TCP port:1..65535  group:zend-cm
        • UDP port:1..65535  group:zend-cm
        • ICMP types:any  group:zend-cm
      • zend-haproxy - For the HAProxy Load Balancer Server(s). Allows incoming client requests over port 80.
        • TCP IPs:any port:80
      • zend-app - For the Zend (application) Servers.  Allows incoming requests from the load balancers over TCP port 8000.   Allows the Zend (application) Servers to communicate with the Cluster Manager Server over port 10081 and 10082.
        • TCP port:8000   add group:zend-haproxy
        • TCP port:1..65535   add group:zend-app
        • UDP port:1..65535   add group:zend-app
        • ICMP types:any   add group:zend-app
        • TCP port:10085   add group:zend-cm
        • UDP port:10085   add group:zend-cm
        • TCP IPs:any port:10081
        • TCP IPs:any port:10082
      • zend-mysql - For MySQL Database Servers.  Allows the MySQL Database Servers to accept requests from the Zend (application) Servers over the default MySQL port (3306).  It also allows the database servers to communicate with each other on their private IP address over any port.
        • TCP ports:1..65535   add group:zend-mysql
        • TCP port:3306   add group:zend-app 
    • Elastic IPs - Elastic IPs are created and assigned to the load balancer(s) and Zend Cluster Manager Server.  (Standard - 1, High Availability - 3)
    • EC2 SSH Key - The same SSH Key (e.g. zend solution packs) will be used by all Servers in the Deployment.

Steps

Go the MultiCloud Marketplace (Design -> Macros) and import the solution pack into your RightScale account.  Depending on how you were granted access to the solution pack, you may find it listed under the 'Shared' category.

Once you've subscribed to the Macro, you will be redirected to its show page in your RightScale account (Design -> Macros). 

Click the Run button to execute the Macro's javascript code.  The macro's code is designed to create a fully configured deployment.  In order to create the servers in the deployment, it will need to use several cloud resources (e.g. Elastic IPs).  You can either reuse existing ones or let the macro create new ones for you. Unless you are an advanced RightScale user and understand how to properly reuse cloud resources, keep the default "Select a value" selection, which will result in the creation of new cloud resources, which you will be able to name when the macro creates the resource.

Keep the default selections and click the Run button.  The screenshot below is an example of the "High Availability" Solution Pack. If you are running the "Standard" version, the list may be different.

screen-ZendHA_RunMacro-v1.png

First, you will be prompted to select a cloud (EC2 Region).  All servers will configured to launch into the selected cloud. Enter the number for the selected cloud. 

screen-ZendHA_SelectCloud-v1.png

Before the macro can create the servers in your new deployment, it must first create the necessary cloud resources that are required in order to create and define a server. The Macro will create these cloud resources based on the name that you specify and then use them to define the various servers in the deployment.

Next, the macro will create all of the required cloud resources (e.g. security groups, SSH keys, etc.).  You will be prompted to provide names for the security groups that will be used by the created servers. It's recommended that you use the suggested names for names for each cloud resource because it will make it easier to find the related cloud resources and understand the supporting documentation, which assumes the use of the suggested names.  

screen-ZendHA_SecurityGroup-v1.png

You will also be prompted to provide a nickname for the new Deployment that will be created.  (e.g. Zend HA) 

If you are running the Zend HA solution pack, a few Elastic IPs will be also be created.  Keep the default names when prompted. (e.g. LB1-Zend-HA)

Once you see the "Macro executed successfully!" message you'll be redirected to the deployment that the macro just created for you. 

You'll see several servers in your deployment.  Notice that a server array was also created and attached to the Deployment, which will be used for autoscaling the Application Tier of Zend Servers. (e.g. zend server array)

screen-ZendHA_Deployment-v1.png

Credentials

You will need to manually create the following RightScale Credentials, which you will later use when you configure the Inputs for your Deployment.  If you've previously created some of these Credentials for previous Deployments, you may need to create another Credential if you want a different value to be used.  (e.g. DBADMIN_PASSWORD_ZEND)

  • DBADMIN_PASSWORD
  • DBADMIN_USER
  • DBAPPLICATION_PASSWORD
  • DBAPPLICATION_USER
  • DBREPLICATION_PASSWORD
  • DBREPLICATION_USER
  • DNSMADEEASY_PASSWORD - The password to log into your DNS provider's account.  (e.g. DNSMadeEasy)
  • DNSMADEEASY_USER - The username to log into your DNS provider's account.  (e.g. DNSMadeEasy)
  • SVN_PASSWORD - The SVN password that's used to checkout your application code from the SVN repository.
  • SVN_USERNAME - The SVN username that's used to checkout your application code from the SVN repository.

Set up your DNS Records

The Macro created new Elastic IPs.  You will need to create the following DNS A Records with your DNS Provider.

  • One for each Load Balancer Server - Use the Elastic IP that will be assigned to the Load Balancer Server.
  • One for the Zend Cluster Manager Server* -  Use the Elastic IP that will be assigned to the Cluster Manager Server.
  • One for the Master-DB Server - Use a dynamic DNS (DDNS ID) to point to the Server's private IP address.
  • One for the Slave-DB Server - Use a dynamic DNS (DDNS ID) to point to the Server's private IP address.

* Only applies to the HA version.

For instructions on how to set up DNS Records with a supported DNS provider (e.g. DNSMadeEasy), follow one of the Domain Setup tutorials.

Launch your Database Servers

By default, the macro will create database servers that are configured to launch 'm1.small' instance types.  It's recommended that you use an 'm1.large' instance type to increase database performance.  

Change the Instance Type

To change the instance type from a "small" to a "large" you will need to update each database server's configuration.  

  1. Go to a database server's Info tab and click Edit.
  2. For the "MultiCloud Image" row, select a 64-bit MCI.  (e.g. RightImage_Ubuntu_10.04_i386_v5.6 - 11H1).  
  3. Click Save.  By default, an 'm1.large' instance type will be selected.  If you wish to select a larger instance type, click Edit and select the preferred instance type under the "Instance Type" row.
  4. Repeat steps 1-3 for the other database server in the deployment.

Configure the Database Servers

There are a couple of different ways that you can set up your database tier depending on whether or not you have an existing backup (set of snapshots) that you want to use instead of creating the database from a dump file.

  • First Time User - If you are setting up your MySQL database for the first time using RightScale's premium "Manager for MySQL 5.1" ServerTemplate, follow the Database Manager for MySQL 5.0/5.1 Database Setup tutorial.
  • Use an existing Backup (Snapshot) - If you're already using RightScale's premium "Manager for MySQL 5.1" ServerTemplate and have a backup (set of snapshots) that you want to use for your database servers, follow the Restore from a previous DB backup tutorial.

Define Inputs

The next step is to define any missing Input parameters at the Deployment level so that your Servers will be launched with the correct information.  As a best practice, you should always define inputs at the Deployment level for the ones that you're not inheriting from the ServerTemplate level so that the same input parameters will be used by all of your Servers. 

Note:  Several inputs are defined at the ServerTemplate level and reference Credentials that you should have created in a previous step.  If a different value needs to be used, you must override the input setting so that the appropriate value is either passed as Text or a Credential.

To define values for the missing inputs, go to your deployment's Inputs tab.  Hover over the info icon for a tooltip description for the input.

  • DB_SCHEMA_NAME
  • HEALTH_CHECK_URI
  • LB_HOSTNAME
  • MASTER_DB_DNSID
  • MASTER_DB_DNSNAME
  • OPT_ZEND_ZSCM_HOST*
  • SLAVE_DB_DNSID
  • SVN_APP_REPOSITORY
  • WEBSITE_DNS
  • ZEND_PHP_VERSION - Supported PHP versions include 5.2 and 5.3.  (e.g. php-5.2)

Only applies to the HA version.

Optional Inputs
  • OPT_ZEND_SERVER_REPO_BASEURL - Select the Zend Server version that will be used.  To avoid having different versions of Zend Servers in a server array, you can use this input to lock-down the Zend Server version.
    • text:http://repos.zend.com/zend-server   (the newest version available will be used)
    • text:http://repos.zend.com/zend-server/5.1.0 
    • text:http://repos.zend.com/zend-server/5.5

Launch your Load Balancer(s)

Before you launch your Load Balancer server, you should make sure that you're launching the Server in the proper cloud/region and availabilty zone.  Typically, you will want your load balancer to be in the same cloud/region and availability zone as your application and master database servers to reduce data transer costs and minimize latency.

Launch the Zend Server Cluster Manager Server

Note: This step only applies to the HA version.  If you are using the Standard version, you can skip this step.

Go to your Zend Deployment (Manage -> Deployments -> YourDeployment -> Servers tab) and launch the Cluster Manager server.

Launch the Zend (Application) Server

Note: If you are using the HA solution pack, both load balancers and Zend Cluster Manager Server must be operational before you launch any Zend Application Servers.

Go to your Zend Deployment (Manage -> Deployments -> YourDeployment -> Servers tab) and launch the Zend (Application) Server.

Enable the Server Array

At this point you have a functional deployment with all three tiers (load balancer, application, database).  To configure your setup for autoscaling the application tier, you can enable the server array.  The server array is currently configured to be disabled (default).  You must manually enable the server Array and make it active so that autoscaling can take place.  The server array is designed to have a minimum count of two instances, so when you enable the array, two new instances will soon be launched into the array. 

Note: The voting tag that will be used for autoscaling purposes is 'zendarray' for both solution packs. If you are running both solution pack deployments in the same account, you will experience autoscaling problems because both arrays will be using the same voter tag.  If you plan to run both solution pack deployments in the same account at the same time, you will need to modify your alert specifications and voter tag so that each array will be using a different voter tag for autoscaling purposes.

Verify that the Zend (Application) Servers are connected to the Cluster Manager (Optional)

This step only applies to Zend HA solution pack deployments.

Once the Zend (application) servers are operational, you can log into the Zend Cluster Manager (CM) web interface to verify that the servers were registered properly.

Using the DNS A Record that you created for the Zend Cluster Manager to build a URI similar to the following in order to access the Zend control panel:

http://zend-cm.mydomain.com:10081/ZendServerManager/Login

or use the CM's public DNS link to construct a URI like the following:

http://ec2-184-72-233-233.compute-1.amazonaws.com:10081/ZendServerManager/Login

Once you log in with your password (ZEND_GUI_PASSWORD), you should see all running Zend (application) servers.

screen-ClusterManagerGUI-v3.png

 

At this point, you should have a fully functioning Zend Server environment running in the cloud.


 


You must to post a comment.
Last Modified
23:46, 16 May 2013

Tags

This page has no custom tags.

Announcements

None

Glossary | 用語용어 Site Map | Site Help Community Corporate Site Get Support Dashboard Login
Doc Feedback Product Feedback Resources MultiCloud Marketplace Forums

Dashboard Status


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