Note: Please go to docs.rightscale.com to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > ServerTemplates > v12.11 LTS > ST > Microsoft IIS App Server (v12.11.2-LTS) > Microsoft IIS App Server (v12.11 LTS) - Tutorial

Microsoft IIS App Server (v12.11 LTS) - Tutorial

 

 

 

 


Table of Contents    

Long Term Support

icon-lts-v1.png

Stable, tested ServerTemplate assets

    ►  Tutorial - Setup


Objective

To set up a Microsoft Internet Information Services (IIS) web application server that connects to a Microsoft SQL database server that was launched using RightScale's "Database Manager for Microsoft SQL" ServerTemplate. The server can also connect to either an HAProxy load balancer ("Load Balancer with HAProxy" ServerTemplate) or a cloud load balancing service such as Amazon's Elastic Load Balancers or Rackspace Cloud Load Balancers. 

Note: The ServerTemplate can be used to launch an IIS application server in one of the supported public or private cloud infrastructures.

 

Prerequisites

The following are prequisites for completing this tutorial:

  • Required user roles: actor, designer, security_manager, and library 
  • When adding a server to a Cloud.com CloudStack-based cloud, only the Xen hypervisor is supported at this time.
  • For Amazon EC2 and CloudStack-based clouds, you must have a security group defined with TCP port 3389 open for Remote Desktop Connection (RDC), and any other ports required by the server for the required security groups and IP addresses. Also remember that for clouds other than Amazon EC2, Windows Firewall is turned on by default.
  • We strongly recommend that you set up credentials for password values and any other sensitive data included as inputs. See the "Create Credentials" section below.
  • This tutorial assumes that you are connecting the Microsoft SQL database server that was launched with RightScale's "Database Manager for Microsoft SQL" ServerTemplate.
  • If you are going to connect the application server to an Amazon Elastic Load Balancer (ELB) or Rackspace Cloud Load Balancer (CLB), you should create it before starting this tutorial. Note: Both the ELB/CLB and application servers must be launched into the same cloud/region.

Overview

This tutorial describes the steps for launching a single Microsoft IIS application server. If you are launching multiple IIS application servers, you should launch them in different data centers / availability zones for high availability purposes. To launch an IIS application server in the context of a multi-tier deployment, please see the 3 Tier Deployment Setup (IIS and SQL) tutorial.

Create Credentials

Prerequisite: Requires 'actor' user role privileges in the RightScale account.

In order to securely pass sensitive information to a script at runtime, you can use Credentials as a means of variable substitution. Later in this tutorial you will select these credentials when you define your inputs.

Create the following credentials.  For more information on setting up credentials, see Create a New Credential.

  • WINDOWS_ADMIN_PASSWORD - Password for the Windows 'Administrator' user (default) or specified user with administrative privileges. You must specify a value that satisfies the minimum password requirements, otherwise the initial Windows password will be used instead. For example, a valid password should contain at least 7 characters and include at least one upper case letter, one lower case letter, and one digit. See Password Policy for details.
  • SQL_APPLICATION_USER - A SQL database user with login privileges for the specified database.
  • SQL_APPLICATION_PASSWORD - The password for the SQL database user with login privileges for the specified database.
  • SVN_USERNAME (Optional) - If you are downloading application files from a private SVN repository, create a credential for the repository login user name.
  • SVN_PASSWORD (Optional) - The password of the SVN_USERNAME.

 

If you are retrieving application code from a Remote Object Storage (ROS) location, you will need to provide the necessary cloud credentials for authentication purposes. 

Amazon S3

You do not have to create credentials for AWS because they were automatically created for you when you added AWS credentials to the RightScale account.

Note: These credentials are not listed under Design > Credentials.

  • AWS_ACCESS_KEY_ID - Amazon access key ID for authentication.
  • AWS_SECRET_ACCESS_KEY - Amazon secret key corresponding to AWS_ACCESS_KEY_ID.


Rackspace Cloud Files

If you are using Rackspace Cloud Files for storing binary database backups, you will need to create the following credentials.

  • RACKSPACE_USERNAME - The username used to log into Rackspace's Cloud Control Panel. 
  • RACKSPACE_AUTH_KEY - The Rackspace account API key. 

Steps

Upload the Application

The ServerTemplate contains scripts that can retrieve application code from either an SVN or Git repository, or from an ROS container. If you do not have an application, you can upload the example below to an ROS container. If you used the 'DotNetNuke.bak' example to launch the Microsoft SQL database server, use the matching sample application below.


Upload the sample application to the ROS container you created above.

Import the ServerTemplate

  1. Go to the MultiCloud Marketplace (Design > MultiCloud Marketplace > ServerTemplates) and import the most recently published revision of the Microsoft IIS App Server Server ServerTemplate into your RightScale account.

Customize the ServerTemplate

By default, the application ServerTemplate is configured to connect to an HAProxy load balancer server launched with the Load Balancer with HAProxy ServerTemplate. The ServerTemplate contains scripts that will connect to the load balancers at boot time and disconnect from the load balancers at decommission time when the server is terminated. If you are going to connect to an HAProxy load balancer or launch a standalone application server, no customizations are required. Please proceed to the next step.

If you are going to connect the IIS application server to either an Amazon Elastic Load Balancer (ELB) or a Rackspace Cloud Load Balancer (CLB), you must customize the ServerTemplate's scripts accordingly. Follow the instructions below.

For ELB 

  1. Clone and rename the ServerTemplate.
  2. Go the Scripts tab of the cloned ServerTemplate.
  3. Replace the LB Register with HAProxy script in the Boot Script list with the AWS Register with ELB script.
  4. Replace the LB Deregister from HAProxy script in the Decommission Script list with the AWS Deregister from ELB script.


For CLB 

  1. Clone and rename the ServerTemplate.
  2. Go the Scripts tab of the cloned ServerTemplate.
  3. Replace the LB Register with HAProxy script in the Boot Script list with the LB Register with CLB script.
  4. Replace the LB Deregister from HAProxy script in the Decommission Script list with the LB Deregister from CLB script.

Create a Server or Server Array

When you create a server or server array, you will first need to select a deployment and the cloud where the server will eventually be launched into (e.g. AWS us-east). Based on the chosen cloud provider, you will need to complete the configuration process that's specific for that cloud. For example, some cloud providers support features that are unique to their specific cloud.

Go to the imported or cloned ServerTemplate's show page and click the Add Server or Add Array button.

  • To create a server, click the Add Server button and complete the steps in the wizard. See Add Server Assistant for details. If you are setting up a multi-tier deployment, it's strongly recommended that you create at least two application servers for redundancy purposes.
    • The easiest way to create the second server is to clone the first one. Be sure to change the name of the server accordingly (e.g. app2) and its availability zone (if available) under the the Info tab.
  • To create a scalable server array, click the Add Array button and complete the steps in the wizard. See Add Server Array Assistant for details. 

Configure Inputs

The next step is to define the properties of your database server or servers by entering values for inputs. It is simplest and best to do this at the deployment level. For a detailed explanation of how inputs are defined and used in Chef recipes and RightScripts, see Understanding Inputs.

The inputs that you need to provide values for will depend on which options you're going to use. The ServerTemplate is very flexible and supports a variety of different configurations. You will need to provide the necessary values as inputs based on which options you want to use.

Set Inputs at the Deployment Level

Go to the deployment's Inputs tab (Manage > Deployments > your deployment) and click Edit.

Although you can enter text values for all missing inputs, it's strongly recommended that you set up credentials for passing sensitive information to scripts such as passwords or any other sensitive data.

APPLICATION

The application code can be retrieved from several different location. You must specify the appropriate inputs depending on the option.

  • SVN Repository - Application files are retrieved from a specified repository. Username and password may be required for authentication purposes.
  • ROS Container (e.g. S3 bucket or Cloud Files container) - A zip file of the application code is retrieved from an ROS container. Cloud credentials may be required for authentication purposes.
  • URL - Specify a full url to where a zip file of the application code can be retrieved. The zip file must be publicly accessible.
     
Input Name Description Example Value
SVN_APP_PATH

The full URL to access the application code in your SVN repository. Supports SVN, HTTP, and HTTPS protocols. When specifying this input, set the ZIP_URL input to "ignore." Ex: http://myserver.com/path/repo

text:  http://myserver.com/path/repo

SVN_PASSWORD Login password for the SVN repository, if required. Leave set to "ignore" if using a public repository that does not require login credentials.

 

cred:  SVN_PASSWORD
SVN_USERNAME

Login user name for the SVN repository, if required. Leave set to "ignore" if using a public repository that does not require login credentials.

cred:  SVN_USERNAME
ZIP_FILE_NAME The filename of the application zip file (*.zip) that is stored in an ROS container specified by the STORAGE_CONTAINER_NAME input.

For the provided sample file use:

text:  DotNetNuke.zip

ZIP_URL

Full URL to a zip file (*.zip) containing application code. Supports HTTP and HTTPS protocols. Ex: http://myserver.com/path/archive.zip

text:  http://myserver.com/app.zip

Cloud

In order to create volumes or retrieve objects such as a database or backup file from an ROS container, you must provide the required cloud credentials for authentication purposes.

Input Name Description Example Value

AWS_ACCESS_KEY_ID

AWS_SECRET_ACCESS_KEY

Specify valid cloud credentials to retrieve a private application (*.zip) file from an Amazon S3 bucket.

cred:  AWS_ACCESS_KEY_ID

cred:  AWS_SECRET_ACCESS_KEY

RACKSPACE_AUTH_KEY

RACKSPACE_USERNAME

Specify valid cloud credentials to retrieve the application (*.zip) file from a Rackspace Cloud Files container.

cred:  RACKSPACE_AUTH_KEY

cred:  RACKSPACE_USERNAME

RACKSPACE_REGION

The location of the Cloud Load Balancer (CLB) that the IIS application server will connect to for load balancing purposes. If you are not using a CLB, set this input to 'ignore'.

  • us - Rackspace US
  • uk - Rackspace UK
text: us
STORAGE_CONTAINER_NAME

Specify the name of the remote object storage (ROS) container where the application (*.zip) file will be retrieved from such as the name of the Amazon S3 bucket or Cloud Files container. It's also used to store IIS log files (older than 1 day).

text:  my-container
STORAGE_TYPE

Select the type of remote object storage (ROS) location where the file will be retrieved.

  • S3 - Amazon S3 Bucket
  • Cloud Files - Rackspace Cloud Files Container
text:  S3

Database

Important!
If you are configuring a mirrored setup (consisting of a Principal and Mirror server) and you want to launch the Mirror server in a different availability zone as the Principal server, you must use the 'Remote Storage' option for the INIT_MIRRORING_METHOD input.

Input Name Description Example Value
DB_NAME

The name of the target Microsoft SQL database that the IIS application will connect to. (e.g. My Database Name)

For the provided sample file use:

text:  DotNetNuke

OPT_CONNECTION_STRING_DB_NAME Name of the target SQL Server Database.

For the provided sample file use:

text:  DotNetNuke

OPT_CONNECTION_STRING_DB_SERVER_NAME

Fully qualified domain name or IP address of the (standalone or principal) Microsoft SQL database server that contains the target database (OPT_CONNECTION_STRING_DB_NAME). The application server will make a connection request to the database server using this value. It's recommended to establish connections using the server's private IP.

If it uses a TCP communications port other than TCP 1433 (default), specify the specific port number after the server name, separated by a colon. (e.g. my-db1.example.com:56)

text:  my-db1.example.com

text:  180.12.34.567

OPT_CONNECTION_STRING_DB_USER_ID

The IIS application will connect to the database by logging in with a SQL user that has database privileges. Specify the username of this SQL Server user. 

Important!  If you previously created the SQL Server user on the database user using the 'DB SQLS Create login' operational script, use the same value that you used for the DB_NEW_LOGIN_NAME input. 

cred:  SQL_SERVER_USER
OPT_CONNECTION_STRING_DB_USER_PASSWORD

The password of the SQL Server user that the application will use to log into SQL database.

Important!  If you previously created the SQL Server user on the database user using the 'DB SQLS Create login' operational script, use the same value that you used for the DB_NEW_LOGIN_PASSWORD input. 

cred:  SQL_SERVER_PASSWORD
OPT_CONNECTION_STRING_NAME

The name of the connection string that the IIS application will use to connect to the database specified by the OPT_CONNECTION_STRING_DB_NAME input. 

For the provided sample file use:

text:  SiteSqlServer

LOAD BALANCER

If you are launching a standalone application server that will not connect to any load balancing tier, ignore the inputs below.

Input Name Description Example Value

ELB_NAME

(For ELB only)

The name of the Amazon Elastic Load Balancer (ELB) that the IIS application server will connect to for load balancing purposes.

Important! You must launch the IIS application server into the same EC2 region as the ELB.

If you are not using an ELB, set this input to 'ignore'. 

text:  my-elb
LB_PORT

The port that the load balancers will use to connect to the IIS application servers. By default, the IIS application server listens on TCP port 80.

text: 80

LB_VHOST_NAME

(For HAProxy only)

The name of the virtual host that the application server will connect to. If you are connecting to an load balancer launched with RightScale's 'Load Balancer with HAProxy' ServerTemplate, this value should match the 'Virtual Host Names' input for the load balancer servers. You can specify an application listener name (e.g. default) or hostname of the load balancer servers (e.g. my-www.example.com)

Machine tags are used to establish a connection between an application server and the HAProxy load balancer servers. For example, if you are using the 'default' vhost name, the tag on the application server would be 'loadbalancer:default=app'.

If you are not using HAProxy for load balancing, set this input to 'ignore'.  

text:  default

RACKSPACE_CLB_NAME

(For CLB only)

The name of the Rackspace Cloud Load Balancer (CLB) that the IIS application server will connect to for load balancing purposes. If you are not using a CLB, set this input to 'ignore'. 

text:  my-clb

RACKSPACE_CLB_REGION

(For CLB only)

The location of the Rackspace Cloud Load Balancer (CLB). If you are not using a CLB, set this input to 'ignore'.

Important! You must launch the IIS application server into the same datacenter as the CLB.

  • lon - London (UK)
  • ord - Chicago (US)
  • dfw - Dallas / Fort Worth (US)

text:  ord

Launch the Application Server

After configuring your inputs, launch the application server. 

  1. Go to the deployment's Servers tab and launch the server.
  2. When you view the input confirmation page, there should not be any required inputs with missing values.  If there are any required inputs that are missing values (highlighted in red), cancel the launch and add the missing values at the deployment level before launching the server again. Refer to the instructions in Launch a Server if you are not familiar with this process. Because there are no required inputs that are missing values for any boot scripts, you can click the Launch button at the bottom of the input confirmation page. 
  3. (Optional) Clone the current application server to launch another application server. As a best practice, you should launch application servers into different availability zones for high-availability purposes. Repeat the process to launch additional application servers or configure a server array for autoscaling purposes.

Post Tutorial Steps

Launch Load Balancer Servers

If you are connecting the IIS application servers to an HAProxy load balancer, see the 3 Tier Deployment Setup (IIS and SQL) tutorial.

Create a Server Array

If you want to create a server array for the application tier, see Add a Scalable Application Server Array to a Deployment.

You must to post a comment.
Last modified
12:27, 31 Jul 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.