Table of Contents | |||
|
Infinity Leading edge features |
|
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 Server (v14 Infinity) ServerTemplate. The server can also connect to either an HAProxy load balancer (such as the Load Balancer with HAProxy (v14 Infinity) 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.
The following are prerequisites for completing this tutorial:
Note: All images > v13.5 have Windows Firewall enabled, but allow ports 80 and 443 by default.
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 (HAProxy-IIS-SQL) tutorial.
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. See Create a New Credential for more information.
Create the appropriate credentials depending where the application code will be retrieved.
If you are going to use a cloud load balancing service such as Amazon Elastic Load Balancers (ELB) or Rackspace Cloud Load Balancers (CLB), you will should create the required cloud credentials.
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.
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
For CLB
When you create a server, 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.
The next step is to define the properties of your IIS 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.
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.
The application code can be retrieved from several different location. You must specify the appropriate inputs depending on the option.
Input Name | Description | Example Value |
APPLICATION_LISTENER_IP_ADDRESS | The IP protocol that the application service listens on for accepting inbound connections.
| text: private |
APPLICATION_LISTENER_PORT | The TCP port that the application service will listen on to receive requests from the load balancing servers/service. Ex: 8000 | text: 8000 |
PACKAGE_FILE_NAME | File name of WebDeploy package to download from Remote Storage and sync with IIS instance on the server. Ex: mypackage.zip | For the provided sample file use: text: DotNetNuke_msdeploy.zip |
REMOTE_STORAGE_ACCOUNT_ID_APP | In order to retrieve a tarball of the application code that's a "private" object within the specified Remote Object Storage (ROS) location, you must provide proper cloud authentication credentials. For security reasons, it's recommended that you create and use credentials for these values instead of entering the text value. Specify the Account ID or name of the Remote Storage account.
| cred: AWS_ACCESS_KEY_ID |
REMOTE_STORAGE_ACCOUNT_PROVIDER_APP | Name of Remote Storage provider. Amazon S3, Rackspace Cloud Files, Windows Azure Storage, Softlayer Object Storage and OpenStack Swift are currently supported. Please select appropriate value from the dropdown.
| text: Amazon_S3 |
REMOTE_STORAGE_ACCOUNT_SECRET_APP | The Secret Key or Password of the Remote Storage account which is used to authenticate your requests to Remote Storage services. For security reasons, it's recommended that you create and use credentials for these values instead of entering the text value. Specify the Secret Key or password of the Remote Storage account.
| cred: AWS_SECRET_ACCESS_KEY |
WEB_SITE_NAME | Name of the web site for the application. Default value is 'Default web site'. Ex: MyWebsite | For the provided sample file use: text: Default web site |
REMOTE_STORAGE_CONTAINER_APP | Name of Remote Storage container (S3 bucket name, Rackspace Cloud Files, Windows Azure Storage or SoftLayer Storage container to be used as storage web application code. Ex: mycontainer | text: my_app |
REMOTE_STORAGE_BLOCK_SIZE_APP (For Amazon S3 and Windows Azure Storage only) | Size of upload block in megabytes (currently supported by Amazon S3 and Windows Azure Storage only). Default and recommended value is 10 (10MB). Supported ranges are 1..5024 for S3 and 1..64 for Windows Azure Storage. | text: 10 |
REMOTE_STORAGE_ENDPOINT_URL_APP (For Swift storage only) | The endpoint URL for the Remote Storage provider. Currently this is used to specify an endpoint for OpenStack Swift. | text: http://myswift.com:5000/v2.0/tokens |
REMOTE_STORAGE_THREAD_COUNT_APP (For Windows Azure Storage only) | Number of parallel threads to be used for file downloads and uploads. | text: 2 |
REMOTE_STORAGE_USE_INTERNAL_NETWORK_APP (For Swift storage only) | Set this input to True to force network connection to remote storage service using private interface (if the server is located in the same cloud/datacenter as remote storage service). This input is supported for Rackspace Open cloud, SoftLayer and OpenStack. Default is False (uses public network interface). | text: False |
(For ELB or CLB only)
If the application server is going to connect to one of the supported cloud load balancing services such as Amazon Elastic Load Balancers (ELB) or Rackspace Cloud Load Balancers (CLB), you must specify the following cloud credentials so that the application servers has the necessary credentials (for authentication purposes) to interact with the cloud services.
Input Name | Description | Example Value |
AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY (For ELB only) | Specify the following Amazon EC2 cloud credentials to interact with an ELB. | cred: AWS_ACCESS_KEY_ID cred: AWS_SECRET_ACCESS_KEY |
RACKSPACE_USERNAME | Specify the following Rackspace cloud credentials to interact with a CLB. | cred: RACKSPACE_USERNAME |
RACKSPACE_REGION (For CLB only) | 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, this input is ignored.
| text: us |
Input Name | Description | Example Value |
DB_CONNECTION_STRING | Use this input to specify database connection string which is assigned to 'Database Connection String' parameter of the package file. It's recommended that you create a credential for this value because it contains sensitive data that you may not want to disclose to your end users.
Example: Server=184.106.99.159;Database=mydb;User ID=myuser;Password=MyPassword123; | cred: DB_CONNECTION_STRING |
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_POOLS (For HAProxy only) | The name of the load balancing pool that the application server will connect to. If you are connecting to a load balancer launched with RightScale's 'Load Balancer with HAProxy' ServerTemplate, this value should match one or more values in the 'Load Balance Pools' 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' pool 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.
| text: ord |
The SYS Configure IIS logs rotation policy boot script configures a scheduled task (that runs once per day) on the server, which creates a .zip of IIS application server logs (older than one day) and uploads it to a container in a supported ROS service (e.g., Amazon S3, Windows Azure Storage). If you do not want to upload IIS logs to an ROS container, leave the following inputs set to 'no value' (default).
Input Name | Description | Example Value |
REMOTE_STORAGE_ACCOUNT_ID | In order to upload IIS log files to an ROS location, you must provide proper cloud authentication credentials. For security reasons, it's recommended that you create and use credentials for these values instead of entering the text value. This input is also used for specifying the ROS container for database initialization and ROS-based backups. Specify the Account ID or name of the Remote Storage account.
| cred: AWS_ACCESS_KEY_ID |
REMOTE_STORAGE_ACCOUNT_PROVIDER | Name of Remote Storage provider. Amazon S3, Rackspace Cloud Files, Windows Azure Storage, Softlayer Object Storage and OpenStack Swift are currently supported. Please select appropriate value from the dropdown.
| text: Amazon_S3 |
REMOTE_STORAGE_ACCOUNT_SECRET | The Secret Key or Password of the Remote Storage account which is used to authenticate your requests to Remote Storage services. For security reasons, it's recommended that you create and use credentials for these values instead of entering the text value. Specify the Secret Key or password of the Remote Storage account.
| cred: AWS_SECRET_ACCESS_KEY |
REMOTE_STORAGE_CONTAINER | The name of the container in the specified Remote Storage provider where the IIS log files will be stored. This input is also used for specifying the ROS container for database initialization and ROS-based backups. | text: my_iis_logs |
REMOTE_STORAGE_BLOCK_SIZE (For Amazon S3 and Windows Azure Storage only) | Size of upload block in megabytes (currently supported by Amazon S3 and Windows Azure Storage only). Default and recommended value is 10 (10MB). Supported ranges are 1..5024 for S3 and 1..64 for Azure. | text: 10 |
REMOTE_STORAGE_ENDPOINT_URL (For Swift storage only) | The endpoint URL for the Remote Storage provider. Currently this is used to specify an endpoint for OpenStack Swift. | text: http://myswift.com:5000/v2.0/tokens |
REMOTE_STORAGE_THREAD_COUNT (For Windows Azure Storage only) | Number of parallel threads to be used for file downloads and uploads. | text: 2 |
REMOTE_STORAGE_USE_INTERNAL_NETWORK (For Swift storage only) | Set this input to True to force network connection to remote storage service using private interface (if the server is located in the same cloud/datacenter as remote storage service). This input is supported for Rackspace Open cloud, SoftLayer and OpenStack. Default is False (uses public network interface). | text: False |
After configuring your inputs, launch the application server.
Once the package has been loaded you may need to run the following script if the package (being deployed) was built on a different server. If you find that it's necessary to run this operational script for deploying your application you should modify the ServerTemplate and add the script to the end of the Boot Scripts phase.
If you are connecting the IIS application servers to an HAProxy load balancer, see the 3 Tier Deployment Setup (HAProxy-IIS-SQL) tutorial.
If you want to create a server array for the application tier, see Add a Scalable Application Server Array to a Deployment.
© 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.