Note: Please go to docs.rightscale.com to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > ServerTemplates > Archive > 11H1 > References > Tomcat6 Front End - 11H1

Tomcat6 Front End - 11H1

Table of Contents

  1. Info
  2. Images
  3. Scripts
  4. Inputs
  5. Revision History
  6. See also

Info

Current Revision: 10
MultiCloud Marketplace: https://www.rightscale.com/library/server_templates/Tomcat6-Front-End-11H1/18204

  • Description - Frontend web server that functions as a load balancer and application server. Installs HAProxy, Apache and Tomcat6. Server is designed to use HAProxy to load balance web requests across the local PHP application server and other remote Tomcat Frontend and/or Tomcat Application servers. Can be configured for HTTPS traffic (SSL).
  • Supported Clouds - AWS US-East, AWS EU, AWS AP-Singapore, AWS AP-Tokyo, AWS US-West

Images

The following MultiCloud Images (MCIs) are used by the ServerTemplate. The MCIs determine which operating systems and clouds are supported.

MultiCloud Images

  • RightImage_CentOS_5.4_x64_v5.6 - 11H1
    • AWS US-East, AWS EU, AWS AP-Singapore, AWS AP-Tokyo, AWS US-West
  • RightImage_CentOS_5.4_i386_v5.6 - 11H1
    • AWS US-East, AWS EU, AWS AP-Singapore, AWS AP-Tokyo, AWS US-West
  • RightImage_Ubuntu_10.04_i386_v5.6 - 11H1
    • AWS US-East, AWS EU, AWS AP-Singapore, AWS AP-Tokyo, AWS US-West
  • RightImage_Ubuntu_10.04_x64_v5.6 - 11H1
    • AWS US-East, AWS EU, AWS AP-Singapore, AWS AP-Tokyo, AWS US-West

Scripts

Inputs

ADMIN_EMAIL

The email address that Apache uses to send administrative mail (set in /etc/httpd/conf/httpd.conf). By setting it to root@localhost.com emails are saved on the server. You can use your own email address, but your spam filters might block them because reverse DNS lookup will show a mismatch between EC2 and your domain.

APACHE_MPM

Can be set to "worker" or "prefork" and defines the setting in httpd.conf. Use "worker" for Rails/Tomcat/Standalone frontends and "prefork" for PHP.

APPLICATION

Sets the directory for your application's web files (/home/webapps/APPLICATION/current/). If you have multiple applications, you can run the code checkout script multiple times, each with a different value for APPLICATION, so each application will be stored in a unique directory. This must be a valid directory name. Do not use symbols in the name.

DBAPPLICATION_PASSWORD

If the MySQL administrator set up a restricted MySQL account for application servers to access the database, then specify the password of that account for this input. If there is not a restricted MySQL account then use the same value that's used for DBADMIN_PASSWORD. The application server will then have unrestricted access to the database.

DBAPPLICATION_USER

If the MySQL administrator set up a restricted MySQL account for application servers to access the database, then specify the username of that account for this input. If there is not a restricted MySQL account then use the same value that's used for DBADMIN_USER. The application server will then have unrestricted access to the database.

DB_SCHEMA_NAME

Enter the name of the MySQL database schema to which applications will connect. The database schema was created when the initial database was first set up. This input will be used to set the application server's database config file so that applications can connect to the correct schema within the database. This input is also used for MySQL dump backups in order to determine which schema is getting backed up. Ex: mydbschema

HEALTH_CHECK_URI

The URI of the health check page, which is used by HAProxy for checking whether the site is up or not. You must create your own health check page, which returns HTTP 200 OK. The contents of the page are not relevant but its name should be unique (preferably a random number). The same page will be used by the load balancers to determine which application servers are "up" and capable of handling requests. For example, if you use '/hlthchk378923.html' (Note: be sure to include the slash before the filename), the health check page would be 'http://www.mydomain.com:80/hlthchk378923.html' and its content could be as simple as "OK."

LB_APPLISTENER_NAME

Sets the name of the HAProxy load balance pool on frontends in /home/haproxy/rightscale_lb.cfg. Application severs will join this load balance pool by using this name. Ex: www

LB_BACKEND_NAME

Sets the name of the backend application server in the (/home/haproxy/rightscale_lb.cfg) location. This value needs to be unique. Therefore, it is best to use the EC2_INSTANCE_ID ENV variable. Ex: Select "EC2_INSTANCE_ID" from the ENV input dropdown. Do not enter this value manually.

LB_BIND_ADDRESS

The IP address that HAProxy will be listening on. Normally, it should be set to localhost. Ex: 127.0.0.1

LB_BIND_PORT

The port number that HAProxy will be listening on. Normally, it's set to 85. If you have multiple load balance pools, each pool must be assigned to a different port. Ex: 85

LB_HOSTNAME

The fully qualified hostname of all the servers that have HAProxy installed on them for load balancing purposes. For example, if www.domain.com has two dedicated load balancers with HAProxy installed on them, you would enter www.domain.com as the LB_HOSTNAME. It is necessary that these hosts be registered with DNS with matching A Records so that the application servers will be able to connect to and disconnect from all the HAProxy servers and update their configuration files. Ex: www.domain.com

LB_TEMPLATE_NAME

The name of the base HAProxy configuration file that will be used. This file will be modified according to the defined inputs. The current values are: haproxy_fullssl, haproxy_http, and haproxy_tcp. Ex: haproxy_http

MASTER_DB_DNSNAME

The fully qualified hostname for the MySQL Master-DB server. There must be a corresponding DNS A Record for the Master-DB server with your DNS provider (e.g. DNSMadeEasy). Application servers and Slave-DB servers will connect to the Master-DB by looking up the IP address that's mapped to the Master-DB's hostname. RightScale's scripts are designed to update the A Record with the Master-DB's private IP address. Ex: master.mydomain.com

MAX_CONN_PER_SERVER

Defines the maximum number of connections that HAProxy will allow on any given server in the load balance pool. For example, if set to 255, each server will have a maximum of 255 connections. While the default is 255, your application may not handle this many connections. Testing is encouraged to determine the proper number of connections per server. Ex: 255

MON_PROCESSES

A space-separated list of additional processes to monitor in the RightScale Dashboard. Ex: sshd crond

MON_PROCESSMATCH

A space-separated list of pairs used to match the name(s) of additional processes to monitor in the RightScale Dashboard. Pair arguments are passed in using the syntax 'name/regex'. Ex: ssh/ssh* cron/cron*

OPT_EXPLODE_WAR_FILES_IN_ARCHIVE

Exploding multiple war files inside of an archive file.

OPT_HAPROXY_COLLECTD_INTERVAL

The time interval (in seconds) that collectd uses to poll HAProxy for statistics. Default: 60

OPT_JAVA_XMS

The java Xms argument (i.e. 512m)

OPT_JAVA_XMX

The java Xmx argument (i.e. 512m)

OPT_LB_STATS_PASSWORD

The password to access the HAProxy statistic report page.

OPT_LB_STATS_URI

The URI for the HAProxy statistic report page, which lists the current session, queued session, response error, health check error, server status, etc., for each HAProxy group. Ex: /haproxy-status

OPT_LB_STATS_USER

The username to access the HAProxy statistic report page.

OPT_MAINTENANCE_PAGE

Optional path for a maintenance page, relative to document root (i.e., "".../current/public""). The file must exist in the subtree of the vhost, which will be served by the web server if it's present. If ignored, it will default to '/system/maintenance.html'.

OPT_MOD_JK_ENABLE

Set to 'True' to enable Apache mod_jk for TomCat communication.

OPT_PHP_ENABLE

Enables PHP support for Apache by enabling PHP module. Required to execute PHP scripts.

OPT_SERVE_LOCAL_FILES

If set to 'True', any existing static content (e.g. *.html, *.jpg, *.css) will be served directly by Apache. If set to 'False', static content will come from the application server. Regardless, Apache will forward requests for PHP and Tomcat dynamic content (e.g. *.php, *.action, *.jsp, and *.do) to the application servers.

OPT_SERVE_TOMCAT_APP_AT_ROOT

Determines whether to serve the TomCat application at root or use the war filename. Set to 'True' (Default) to serve the TomCat application at root. (Ex: http://myhost.com:8000/) Set to 'False' to use the war filename. (Ex: http://myhost.com:8000/myWar/)

OPT_SESSION_STICKINESS

Determines HAProxy session stickiness. Set to 'True' to use session stickiness where HAProxy will reconnect a session to the last server it was connected to (which it does via a cookie). Set to 'False' if you do not want to use sticky sessions; HAProxy will establish connections with the next available server.

OPT_SVN_CHECKOUT_MODE

The svn mode you would like to get your files in. 'Export' mode is more secure, but 'checkout' mode allows you to make changes and update them.

OPT_SVN_PASSWORD

The SVN password that is used to checkout the application code from SVN repository.

OPT_SVN_USERNAME

The SVN username that is used to checkout the application code from SVN repository.

PRIVATE_SSH_KEY

The private SSH Key of another instance that gets installed on this instance. It allows this instance to SSH into another instance to update the configuration files. Select input type "key" from the dropdown and then select an SSH key that is installed on the other instance. You must select an SSH Key where its private material is available.

SERVER_UUID

A value of 'env:RS_INSTANCE_UUID' is required for proper RightScale monitoring and logging.

SKETCHY

A value of 'env:RS_SKETCHY' is required to use RightScale monitoring servers.

SVN_APP_REPOSITORY

The URL of your SVN repository where your application code will be checked out from. Ex: http://mysvn.net/app/

SYSLOG_SERVER

The hostname of the syslog server where log files will be sent. This input should be set to 'env:RS_SYSLOG' so that you can view your log files in the Dashboard.

SYS_TZINFO

Sets the system time to the timezone of the specified input, which must be a valid zoneinfo/tz database entry. If the input is 'unset' the timezone will use the 'localtime' that's defined in your RightScale account under Settings -> User -> Preferences tab. You can find a list of valid examples from the timezone pulldown bar in the Preferences tab. Ex: US/Pacific, US/Eastern

WEBSITE_DNS

The fully qualified domain name that the server will accept traffic for. Ex: www.mydomain.com

Revision History

Revision Date Published Description of Changes Known Issues
10 Mar 22, 2011 Initial Release -- 11H1  

See also

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

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.