Application code is typically downloaded at boot time when an application server is launched. However, you can manually update the application code on a running server by executing an operational script. For example, you may want to retrieve the latest version of your application from a different branch in your software repository.
Use the DB SQLS Create login operational script on your Microsoft SQL database server to create a new SQL Server user (login) and password for your application's use. Enter the following RightScript inputs before running this script.
Note: It's recommended that you set up credentials for password values and any other sensitive data as shown in the examples below.
Input Name | Description | Example Values |
DB_NAME | Default database to assign to the new SQL Server user. | Text:MyDatabase |
DB_NEW_LOGIN_NAME | User name for the new SQL Server user. | Cred:SQL_SERVER_USER |
DB_NEW_LOGIN_PASSWORD | Password for the new SQL Server user. | Cred:SQL_SERVER_PASSWORD |
DB_REMOTE_SERVER_IP | IP address of the target SQL Server. The script assumes that the default SQL Server port, 1433, is used for server communications. | Text:180.100.100.38 |
DB_REMOTE_SQL_LOGIN | Login ID for a SQL Server user with administrative permissions, used to create the new application-specific user account. | Cred:SQL_APPLICATION_USER |
DB_REMOTE_SQL_PASSWORD | Login password for a SQL Server user with administrative permissions (DB_REMOTE_SQL_LOGIN). | Cred:SQL_APPLICATION_PASSWORD |
Add a connection string to the database's web.config file that the IIS application server will use to securely connect to the database. Typically, the connection string is created at boot time, but you can also create a new connnection string, if desired.
Run the IIS Add connection string operational script on the IIS application server and specify values for the following inputs.
Input Name | Description | Example Value |
OPT_CONNECTION_STRING_DB_NAME | The name of the target Microsoft SQL database that the IIS application will connect to. (e.g., MyDatabase) | 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 available). If the database server uses a TCP communications port other than TCP 1433 (default), specify the desired 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 server using the 'DB SQLS Create login' operational script, use the same value that you used for the DB_NEW_LOGIN_NAME input. | cred: SQL_APPLICATION_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 server using the 'DB SQLS Create login' operational script, use the same value that you used for the DB_NEW_LOGIN_PASSWORD input. | cred: SQL_APPLICATION_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. | text: SiteSqlServer |
By default, the IIS Download application code boot script places the application code into the following directory by default: C:\inetpub\wwwroot\release\<GMT-timestamp>
If the application code is located in a different directory, run the IIS Switch Website operational script and specify the correct path using the OPT_DEFAULT_SITE_ROOT_PATH input so that IIS knows the new location of the application code.
Run the IIS Restart application operational script on an application server to restart the IIS application by touching the web.config file.
Input Name | Description | Example Values |
WEB_SITE_NAME | Name of the web site for the application. Default value is 'Default web site'. | Text:MyWebsite |
Run the IIS Restart web server operational script on an application server to restart the IIS web server.
Input Name | Description | Example Values |
WEB_SITE_NAME | Name of the web site for the application. Default value is 'Default web site'. | Text:MyWebsite |
To run your IIS server in conjunction with an Amazon Elastic Load Balancer (ELB), you must follow the steps below:
Note: If your ELB will use the HTTPS protocol, refer to the next section for information on generating the required server certificate and private key files in PEM format.
To use the HTTPS (HTTP with SSL/TLS) protocol, the ELB and HAProxy load balancers require a server certificate and private key in X.509/PEM format.
IIS server certificates are typically exported in .pfx (PKCS#12) format. However, you can generate a PEM-formatted certificate and private key files for the load balancers using the SYS Convert PFX operational script, in conjunction with a .pfx (PKCS#12 format) server certificate file and the following inputs:
The SYS Convert PFX script saves your PEM-formatted certificate and key files in the same directory as the original .pfx file with a .crt and .pem extension on the IIS server.
In Amazon and Rackspace environments, the SYS Configure IIS logs rotation policy boot script sets up a Windows scheduled task on your IIS server, which runs daily and archives any log entries older than one day to an ROS container based on the REMOTE_STORAGE_* inputs.
The SYS Upload IIS Logs operational script allows you to manually run an IIS log archive on demand. The same inputs (REMOTE_STORAGE_*) used by the 'SYS Configure IIS Logs Rotation Policy' script will also be used by the 'SYS Upload IIS Logs' manual script.
Installs the RightScale Powershell Library, which is a prerequisite before you can run the 'SYS Setup firewall rule' and 'SYS Dump firewall rules' operational scripts.
To connect a remote server to a domain controller that was launched in a cloud using the Microsoft Active Directory ServerTemplate, you must first configure the domain controller to accept ingress communication from the remote server. See the Create a Windows firewall permission steps.
By default, remote servers will connect to the domain controller using tags. However, you may need to connect servers where tags are not available or supported. For example, perhaps the remote server is located in a different cloud/region where it does not have access to the domain controller on the private network or the tag scope of the deployment that contains the domain controller is not set to be account-wide and the remote server is located in a different deployment than the domain controller. In such cases, you can either connect to the primary AD server using an IP address or FQDN.
Input Name | Description | Example Value |
AD_ADMIN_ACCOUNT | This is a login for account with administrative right in Active Directory. Example: Administrator. (Note: "Administrator" will be used as a default value for the AD_ADMIN_ACCOUNT input if it's unset at launch time. However, the input must match the value specified for the ADMIN_ACCOUNT_NAME input that was set for the AD servers.) | text: Administrator |
AD_ADMIN_PASSWORD | Specify the new password for the 'administrator' user specified by the AD_ADMIN_ACCOUNT input. It's strongly recommended that you use a credential to hide this value. | cred: AD_ADMIN_PASSWORD |
AD_CONTROLLER_IP | If the remote server is going to connect to the AD domain controller using an IP address, specify the IP address of the AD domain controller that the server will connect to. Make sure the IP address matches the selected interface. (AD_NETWORK_INTERFACE) | text: 192.23.45.678 |
AD_DOMAIN_NAME | If the remote server is going to connect to the AD domain controller using a FQDN, specify the FQDN that points to the primary Active Directory controller that the server will join. | text: ad-primary.example.com |
AD_NETWORK_INTERFACE | The interface used for domain communication.
| text: public |
Run the 'SYS Enable Windows Firewall' and 'SYS Disable Windows Firewall' operational scripts to enable or disable Windows firewall settings. Add the script to the "Boot Scripts" list to enable Windows Firewall by default at boot time when a new instance is launched.
Run the 'SYS Setup firewall rule' script to creates or remove firewall rule based on the following inputs.
Input Name | Description | Example Values |
FIREWALL_RULE_ACTION | Specify whether you want to enable or disable network access by either creating or removing a firewall rule.
| text: Enable |
FIREWALL_RULE_PORT | Number of port or comma-separated list of ports. Each port should be integer value in range 1..65535. Ex: 80 | text: 80 |
FIREWALL_RULE_REMOTE_IP | Specify the IP address or range of IP addresses in CIDR notation with optional inversion flag. This parameter could be of one of the formats below:
| text: 192.16.2.0/24 |
FIREWALL_RULE_PROTOCOL | The protocol for the firewall rule. Supported protocols are TCP and UDP.
| text: tcp |
Run the 'SYS Dump firewall rules' script to display a list of all firewall rules or only rules created by RightScripts (those which have 'RightScale' prefix in the name). This behavior is controlled by FIREWALL_RULE_DISPLAY_ALL input. If displaying only RightScale rules is selected the script also collects list of all IP addresses that are granted network access to the current instance to simplify a network security audit.
Input Name | Description | Example Values |
FIREWALL_RULE_DISPLAY_ALL | Specify whether you want to display a list of all firewall rules or only the rules created by RightScripts (those which have 'RightScale' prefix in the name).
| text: True |
By default, no Windows updates are applied to a running server. However, you can set the following input and run the 'SYS Set Windows Automatic Updates Policy' operational script to define how Windows automatic updates should be applied to an operational Windows server.
Input Name | Description | Example Values |
WINDOWS_AUTOMATIC_UPDATES_POLICY | Define the Windows automatic updates policy. Default is no auto updates.
| text: Install updates automatically |
Some Windows updates require a server to be rebooted in order to complete the installation process. However, you might want to reboot the instance at a more convenient time in order to reduce the amount of site downtime or negative impact to your end users. In such cases, you can set the following input before running either the 'SYS Install All Windows Updates' or 'SYS Install Microsoft update by KB number' operational script to specify whether or not an instance is allowed to reboot after the script is run. Reboot is not allowed by default.
Input Name | Description | Example Values |
WINDOWS_UPDATES_REBOOT_SETTING | Defines whether or not the instance is rebooted after installing a Windows update.
| text: Allow Reboot |
Run the 'SYS Install All Windows Updates' operational script to download and install all new Windows updates. Any updates that require a user to accept a EULA are NOT installed. Use the WINDOWS_UPDATES_REBOOT_SETTING input to control whether or not the instance is rebooted after the updates are installed, if required.
Input Name | Description | Example Values |
WINDOWS_UPDATES_REBOOT_SETTING | Defines whether or not the instance is rebooted after installing a Windows update.
| text: Allow Reboot |
Set the following input and run the 'SYS Install Microsoft update by KB number' operational script to install a specific KB update.
To apply the KB updates to the running server at boot time, add the script to the end of the "Boot Scripts" list.
Input Name | Description | Example Values |
KB_ARTICLE_NUMBER | Microsoft KB number of update to be installed. Use format KBxxxxxx (x is digit) or just xxxxxx to specify the number. You can either specify a single KB article number or a comma-separated list. | text: 961402 |
WINDOWS_UPDATES_REBOOT_SETTING | Defines whether or not the instance is rebooted after installing a Windows update.
| text: Allow Reboot |
Set the following inputs and run the 'SYS Activate Windows with KMS server' operational script to activate the instance's license with a Microsoft Key Management Server (KMS). Before you run the script, make sure that the KMS server's firewall settings are configured to accept a request from the instance.
Input Name | Description | Example Values |
KMS_HOST | Specify the FQDN or IP address of the KMS server with whom the instance will activate its license e.g., kms.mydomain.com | text: kms.example.com text: 10.567.333.45 |
KMS_PORT | The port number that the instance will use to connect to the KMS server. Default value is 1688 e.g., 1688 | text: 1688 |
Run the SYS Install Web Deploy 2.0 script to install the Microsoft Web Deployment Tool Version 2.0 (http://www.microsoft.com/download/en/details.aspx?id=25230).
Run the SYS Install .NET Framework 4 script to install the Microsoft .NET Framework 4 (http://www.microsoft.com/download/en/details.aspx?id=17718).
Note: Be sure to install Microsoft .NET Framework 4 first since it is a prerequisite.
© 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.