Sdílet prostřednictvím


Appendix B: Tailspin Surveys Installation Guide

Retired Content

This content and the technology described is outdated and is no longer being maintained. For more information, see Transient Fault Handling.

patterns & practices Developer Center

On this page:
Introduction | Prerequisites | Install Source Code and Dependencies | Prepare Your Azure Subscription for Deployment | Generate the Azure Management Certificate and Export as .pfx File | Generate the SSL Certificate | Create the Required Hosted Services | Upload Certificates as Hosted Services' Service Certificates | Create the Storage Account | Building the Solution | Install NuGet Packages | Modify the Certificates in the Visual Studio Cloud Projects | Prepare the Settings in the Cloud Projects | Build the Solution | Deploy to Azure | Deploying Tailspin to the Staging Slot | Testing If Tailspin Surveys Works - Public Website, Tenant Website, Management Website | Configuring Tailspin Autoscaling Functionality | Configuring the Service Information Store | Uploading the Sample Rules | Running Tailspin Surveys Locally in Debug Mode | Running the Management Application in Simulated Mode | Known Issues | More Information

Introduction

This document will guide you through the installation of the Tailspin Surveys application for Microsoft® Enterprise Library 5.0 Integration Pack for Microsoft Azure, including the Autoscaling Application Block ("WASABi") and the Transient Fault Handing Application Block ("Topaz"). The Surveys application is a comprehensive sample application that demonstrates how you can use the Autoscaling Application Block to scale an application running on Microsoft Azure™ technology platform up or down elastically, based on the rules you specify. In addition, it contains an example of a management site that you can use to configure service information and rules that are used by the Autoscaling Application Block to monitor how the application's role instances change based on the rules and the conditions causing the changes.

The Tailspin Surveys application covers a few scenarios and features, but it does not cover the many other useful features of the Autoscaling Application Block or the Transient Fault Handing Application Block or the many possible scenarios in which you will benefit from their use. Therefore, we strongly encourage you to go beyond the basic uses of the application blocks demonstrated in the Tailspin Surveys application. For comprehensive coverage of the application blocks, see The Autoscaling Application Block and The Transient Fault Handling Application Block.

This version of the Tailspin Surveys application builds on the previous releases of the Surveys application by Microsoft patterns & practices. Please refer to the installation documents of the previous releases for the topics that are not covered in this document.

Installing this application can take between an hour and an hour and a half, depending on your software and hardware configuration and your experience with Azure. This document walks you through the following:

  • Installing the required dependencies using the included Dependency checking tool.
  • Creating two hosted services for the Tailspin Surveys web application and the Tailspin Surveys autoscaling runtime and management application.
  • Updating the project files with your Azure subscription information.
  • Deploying the application to Azure.
  • Verifying the installation on Azure.

Prerequisites

In order to run the Tailspin Surveys application, you will need the following:

  • A development machine running Microsoft Visual Studio® 2010 development system SP1.
  • All required Microsoft Windows® updates.
  • NuGet Package Manager (https://nuget.codeplex.com/).
  • A Azure subscription with room for two hosted services (if you want to run the Tailspin Surveys application and the Autoscaler component with the Management Web application in Azure).
  • A Azure storage account.
  • The Dependency checking tool, discussed below, which will verify that you have the prerequisites listed below installed. If not, it will help you install them.
    • Visual Studio 2010
    • MVC 3 Framework
    • Azure SDK for .NET and Azure Tools for Microsoft Visual Studio – November 2011 Release
    • Windows Identity Foundation Runtime
    • Optional: Microsoft Internet Information Services 7 (IIS)
      • This is required to run the management site in simulated mode or to deploy the Autoscaler locally.

Install Source Code and Dependencies

The Dependency checking tool will check to see if you have the required prerequisites and, if not, will help you install them.

To install the Tailspin Surveys application source code and dependencies

  1. Unzip the source code to a location on your hard drive.

    Note

    You should not place the source code in a folder that is nested too deeply, because the Azure Tools for Visual Studio do not support paths that are longer than 255 characters. We have tested the Tailspin Surveys application deployment from C:\Tailspin.

  2. Run "CheckDependencies.cmd" located in the root of your download folder.

  3. In the Dependency checking tool, click the Scan button.

    Hh680894.53360ECFE0A6602AB887E72F2CDB1945(en-us,PandP.50).png

  4. Ensure that all the required dependencies have been installed. If not, install each prerequisite one at a time and click the Rescan button.

Prepare Your Azure Subscription for Deployment

In order to prepare your Azure subscription for deployment, you will need to do the following:

  1. Generate the Azure management certificate and export it.
  2. Generate the SSL certificate.
  3. Create the required hosted services.
  4. Upload the certificates as hosted services' service certificates.
  5. Create the storage account.

The sections below will walk you through each of these tasks.

Generate the Azure Management Certificate and Export as .pfx File

The Enterprise Library Autoscaling Application Block needs to use a valid management certificate for your Azure subscription in order to be able to scale your application. If you do not already have a management certificate, you can follow the steps below to generate one. You will also need to upload to the Azure Management Portal the generated management certificate and an SSL certificate, which will be generated in the next steps. In summary, the following steps will allow you to:

  • Generate the management certificate.
  • Export from Current User\My store to upload to the Azure Management Portal.
  • Generate the SSL certificate to upload to the Azure Management Portal.

You should be aware of the following with respect to certificates:

  • Azure roles that expose SSL endpoints or affect changes to Azure deployments, such as the Autoscaling Block, require access to the related certificates from within the running instances of those roles. These certificates need to be uploaded to the Service Certificates section of the corresponding hosted services.
  • The certificates created by the sample application for SSL use are for demonstration purposes only and are not meant to be used in production.
  • The management and SSL certificates .pfx files generated during installation should be kept in a safe location with strict permissions via access control lists (ACLs), or deleted after uploading them to Azure.

To generate the Azure Management Certificate and import it for use in Visual Studio

  1. Go to the Azure profile generation site at https://go.microsoft.com/fwlink/?LinkId=229563.

  2. Sign in to your Windows Live® account that has a Azure subscription.

  3. Start Visual Studio as an administrator. To do this, right-click on Microsoft Visual Studio 2010 and select Run as administrator.

    Hh680894.8F7A43521790D071C85C453627E9C111(en-us,PandP.50).png

  4. Open the Tailspin.sln solution.

  5. Right-click on the Tailspin.Surveys.Cloud project and click Publish. Note that you will not complete the wizard yet; you will only perform some steps to generate and import the management certificate in preparation for the deployment.

  6. In the Publish Azure Application wizard page, click on the "Sign in to download credentials" link.

    Hh680894.B0B484DFE09E4FCE84CB1CC20938D6D6(en-us,PandP.50).png

  7. The link will open the Internet browser and navigate to the Azure site. Sign in with a Windows Live account with a Azure subscription.

  8. Follow the steps on the page to download the .publishsettings file.

  9. Return to the Publish Azure Application wizard page in Visual Studio.

  10. Click on the Import button and browse to the .publishsettings file you have just downloaded.

  11. You can now click Cancel because you will need to prepare the solution before you can publish to Azure.

Note

After this step, Visual Studio will be configured to publish to your Azure subscription, and the management certificate will be installed in the Current User\My certificate store.

To export the Azure Management Certificate to a .pfx file

  1. Start the Microsoft Management Console (MMC).

  2. Select File, select Add/Remove Snap-in.

  3. In the Add or Remove Snap-ins dialog, from the Available snap-ins, select Certificates, and click Add.

    Hh680894.865E50CC61C7FDA332F2DE0CD893DD11(en-us,PandP.50).png

  4. In the Certificates snap-in dialog, select My user account. Click Finish.

  5. In the Add or Remove Snap-ins dialog, click OK.

  6. In the MMC Console, select Certificates - Current User.

  7. Expand Personal, and select Certificates.

  8. In the Microsoft Management Console certificates list, locate and right-click the Azure Tools certificate that you imported in the previous steps, select All Tasks, and click Export.

    Follow link to expand image

  9. In the Certificate Export Wizard, click Next.

  10. Click Yes, export the private key. Click Next.

  11. Keep the Personal Information Exchange –PKCS #12 (.PFX) as the default. Click Next.

  12. Enter a password for the exported file. Do not use a blank password because a password is mandatory when uploading a .pfx file to Azure.

  13. Enter the directory where the application is located and give it a name such as "C:\Tailspin\AzureManagementCert.pfx" and click Next.

  14. Click Finish.

Generate the SSL Certificate

  1. Open a Visual Studio Command Prompt (2010) as an administrator (in the Windows 7 Start menu, type Visual Studio Command Prompt, select the "Visual Studio Command Prompt (2010)", right-click and select Run as administrator).

    Hh680894.E77A2EBDCEC44F0BF616CBE6FC78ECAC(en-us,PandP.50).png

  2. Change directories to the folder where you unzipped the source code for the Tailspin Surveys application.

  3. To generate the SSL certificate, enter "GenerateSSLCert.cmd."

  4. Enter a private key password for the certificate file. This is mandatory.

    Follow link to expand image

  5. A window will pop up asking you to provide another password. Keep this blank and click OK.

    Follow link to expand image

  6. You will see a popup to confirm the creation of the certificate without password protection. Click Yes, because this latter password would only be used temporarily, but the generated .pfx file will use the password you entered in the previous step.

  7. After completing these steps, you will have the SSL certificate in a file named ssl_certificate.pfx in your current directory.

Create the Required Hosted Services

Next, you will need to create the hosted services.

To create the required hosted services

  1. In the Management Portal - Azure, click Hosted Services, Storage Accounts & CDN on the navigation bar on the left.

    Hh680894.A552E299F066C881C7F85E7E58203F6C(en-us,PandP.50).png

  2. Click Hosted Services on the left menu.

  3. Select your Azure subscription.

  4. Select New Hosted Service, either from the ribbon bar or on the context menu, by right-clicking on your Azure subscription.

  5. In the Create a New Hosted Service dialog:

    1. In the "Enter a name for your service" text box, enter Tailspin-Surveys.
    2. In the "Enter a URL prefix for your service" text box, enter a name of your choice to signify that this is the Tailspin web application. This prefix must be unique.
    3. Select Create a new affinity group from the "Create or choose an affinity group" drop-down menu.
    4. In the Create a New Affinity Group dialog, enter an Affinity group name and select a Location, and press OK.
    5. Select Do not deploy.
    6. Click OK.
  6. Select the Azure subscription to create the second hosted service.

  7. In the Create a New Hosted Service dialog:

    1. In the "Enter a name for your service" text box, enter Tailspin-Autoscaling.
    2. In the "Enter a URL prefix for your service" text box, enter a name of your choice to signify that this is the Tailspin Autoscaling management website and run-time worker role. This prefix must be unique.
    3. Select the Affinity group that you created in the previous step from the "Create or choose an affinity group" drop-down menu.
    4. Select "Do not deploy."
    5. Click OK.

You should see the two hosted services.

Hh680894.F83777DAE16E7ED3E272E0F0503FF2C1(en-us,PandP.50).png

Upload Certificates as Hosted Services' Service Certificates

The cloud projects you will deploy to Azure use the service certificates that must be uploaded to the Azure service management certificates store. They are the secure sockets layer (SSL) certificates the websites use and the Azure management certificate the Autoscaling Application Block uses to govern the number of instances of configured roles.

To add the certificates

  1. Add the SSL certificate to the Tailspin-Surveys hosted service.
    1. In the Management Portal - Azure, select the Certificates folder under the Tailspin-Surveys hosted service and click Add Certificate.
    2. In the Upload an X.509 Certificate dialog, browse to the ssl_certificate.pfx certificate that was generated previously.
    3. Enter the password. Click OK.
    4. You should see the Tailspin RI SSL Certificate certificate added to the service certificates list on the portal.
  2. Add the SSL certificate to the Tailspin-Autoscaling hosted service.
    1. In the Management Portal - Azure, select the Certificates folder under the Tailspin-Autoscaling hosted service and click Add Certificate.
    2. In the Upload an X.509 Certificate dialog, browse to the ssl_certificate.pfx certificate that was generated previously.
    3. Enter the password. Click OK.
    4. You should see the Tailspin RI SSL Certificate added to the service certificates list on the portal.
  3. Add the management certificate for the Tailspin-Autoscaling hosted service.
    1. In the Management Portal - Azure, select the Certificates folder under the Tailspin-Autoscaling hosted service and click Add Certificate.
    2. In the Upload an X.509 Certificate dialog, browse to the AzureManagementCert.pfx certificate that you exported previously.
    3. Enter the password. Click OK.
    4. You should see the Azure Tools certificate****added to the service certificates list on the portal.

You should see the hosted services with the certificates, as shown in the following image.

Hh680894.7CC182092D211DE46DD47785EA345008(en-us,PandP.50).png

Create the Storage Account

The Autoscaling Application Block uses Azure storage for its operations. For more information about autoscaling and how the Autoscaling Application Block works, see Chapter 4, "Autoscaling and Microsoft Azure," in this guide. In this step you will create the storage account that the Autoscaling Application Block will use in the Tailspin scenario.

To create the storage account

  1. In the Management Portal - Azure, select Storage Accounts.
  2. Select the correct subscription, right-click, and select New Storage Account.
  3. In the Create a New Storage Account dialog,
    1. Choose a subscription.
    2. Enter a URL.
    3. Choose a region or affinity group you created previously.
    4. Click OK.

You should see the added storage account.

Note

You should make note of the name of the storage account because you will need it to configure your Visual Studio solution.

Hh680894.C473D727C1489DA4802D55C267607188(en-us,PandP.50).png

To make sure the application uses the created storage account

  1. In Visual Studio, for each of the cloud projects' roles, double-click the role, and click on the Configuration tab.

  2. Clear the check box "Use publish storage account as connection string when you publish to Azure" if it is checked (it should not be checked).

    Hh680894.E1DD05F9E16879B771A383125CD72BF3(en-us,PandP.50).png

Building the Solution

Before you can build the solution, you need to:

  1. Install NuGet packages.
  2. Modify the certificates in the Visual Studio Cloud Projects.
  3. Prepare the settings in the Cloud Projects.

Install NuGet Packages

The Tailspin Surveys application depends on certain binaries that are not included in the .zip file. Perform the following steps to download and install these dependencies using the NuGet Package Manager.

To install NuGet packages

  1. Start Visual Studio as an administrator. To do this, right-click on Microsoft Visual Studio 2010 and select Run as administrator.

    Hh680894.8F7A43521790D071C85C453627E9C111(en-us,PandP.50).png

  2. Open the Tailspin.sln solution.

  3. In Solution Explorer, right-click the Tailspin solution, select Enable NuGet Package Restore, and click Yes in the confirmation dialog box.

    Hh680894.901E5EB1531A52EEF88F6945385A3D15(en-us,PandP.50).png

Note

If you are using NuGet version 1.5 or earlier, you will not see the Enable NuGet Package Restore menu item. In this case, enter the following commands on the NuGet Package Manager Console. You can access the NuGet Package Manager Console through the Visual Studio menu. Point to Tools, point to Library Package Manager, select Package Manager Console, and enter the following commands:

  • Install-Package NuGetPowerTools
  • Enable-PackageRestore

Modify the Certificates in the Visual Studio Cloud Projects

The Cloud projects in the Tailspin scenario use various certificates you have uploaded to Azure in the previous sections. In this step, you will modify the Cloud projects to correctly refer to those certificates for the roles.

To modify the certificates in the Visual Studio Cloud Projects

  1. In Visual Studio, in the Solution Explorer, select the Tailspin.Web role under the Tailspin.Surveys.Cloud project.
    1. Double-click the Tailspin.Web role and click Certificates.

    2. You should make the thumbprint for ssl_certificate match the thumbprint for Tailspin RI SSL Certificate in the Management Portal - Azure. Update the thumbprint in Visual Studio, copying the value from the portal. Also make sure the Store Location is set to LocalMachine, and Store Name is set to My.

      SSL certificate thumbprint in Visual Studio

      Follow link to expand image

      SSL certificate thumbprint in Azure

      Hh680894.29FB98FDE2AAB7DE2406B138297F8329(en-us,PandP.50).png

  2. Double-click the Tailspin.Web.Management role under the Tailspin.Autoscaling.Cloud project, select Certificates, and ensure that the thumbprint for the ssl_certificate corresponds to the thumbprint for the Tailspin RI SSL Certificate in the Management Portal - Azure.
  3. Double-click the Tailspin.Workers.Autoscaling role under the Tailspin.Autoscaling.Cloud project, select Certificates, and ensure that the thumbprint for the TailspinManagementCert corresponds to the thumbprint for the Azure Tools certificate in the Management Portal - Azure.

Prepare the Settings in the Cloud Projects

In this step, you will need to update the settings in the Cloud projects to specify the storage account you created previously.

To prepare the settings in the Cloud Projects

  1. In the Management Portal - Azure, select Storage Accounts.

  2. Select the storage account that you created previously.

    1. On the right-hand side, under Primary access key, click View.
    2. In the View Storage Access Keys, copy the Primary access key.
  3. In Visual Studio, double-click the Tailspin.Web role in the Tailspin.Surveys.Cloud project and click Settings.

    1. In the Service Configuration drop-down, select All Configurations.

    2. Ensure that the setting type for DataConnectionString is Connection String.

    3. Click the ellipsis (…) button to the right of the DataConnectionStringValue field.

      1. In the Storage Account Connection String dialog, select Enter storage account credentials.
      2. Update the Account name with the corresponding name of the storage account that you created previously.
      3. Update the Account key with the primary access key copied in step 2.

      Hh680894.0BFD8DFCFE7C47BDD9F886C24C1B798A(en-us,PandP.50).png

  4. Update the connection string values to use the same value for all the following role settings:

    Note

    You will need to update the connection string value in several settings. Instead of using the Storage Account Connection String dialog every time, you can copy the value of the connection string you created in the previous step, and paste it into the Value field for the remaining settings.

    Role

    Setting Name

    Tailspin.Web

    DataConnectionString

    Tailspin.Web

    Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString

    Tailspin.Web.Survey.Public

    DataConnectionString

    Tailspin.Web.Survey.Public

    Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString

    Tailspin.Workers.Surveys

    DataConnectionString

    Tailspin.Workers.Surveys

    Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString

    Tailspin.Web.Management

    DataConnectionString

    Tailspin.Web.Management

    Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString

    Tailspin.Web.Management

    AutoscalingStorage

    Tailspin.Wokers.Autoscaling

    DataConnectionString

    Tailspin.Wokers.Autoscaling

    Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString

    Tailspin.Wokers.Autoscaling

    AutoscalingStorage

To create a password for accessing the Autoscaling management site

  1. In Visual Studio, double-click the Tailspin.Web.Management role in the Tailspin.Autoscaling.Cloud project and click Settings.

  2. Set a username and a password in the provided settings.

    Note

    Setting a password is mandatory for security reasons.

Build the Solution

At this point, you are now ready to build the Tailspin solution.

To build the solution

  1. In the Visual Studio Solution Explorer, select the Tailspin solution in Visual Studio.
  2. Right-click and select Rebuild Solution.

Deploy to Azure

The following projects need to be deployed to Azure:

  • Tailspin.Surveys.Cloud (to the Tailspin-Surveys hosted service)
  • Tailspin.Autoscaling.Cloud (to the Tailspin-Austoscaling hosted service)

Once you've deployed one project, you can deploy the next one as soon as you see that the deployment was added and has started in the Visual Studio Azure Activity Log window.

Hh680894.note(en-us,PandP.50).gifKnown Issue:
Due to a limitation in Visual Studio 2010 IntelliTrace, the following runtime exception is thrown when the application block is hosted on Azure with IntelliTrace enabled:
System.Security.VerificationException: Operation could destabilize the runtime.
Workaround: To address this issue, you will need to disable IntelliTrace on the Autoscaling Application Block assembly. To do this, add Microsoft.Practices.EnterpriseLibrary.WindowsAzure.* to the list of excluded modules. See instructions here: VerificationException from Azure IntelliTrace.

Deploying Tailspin to the Staging Slot

You will first deploy these projects to the Staging deployment slot in your hosted service because the default values in the service information store for Tailspin Surveys reference the deployment in the Staging slot.

To deploy Tailspin to the Staging slot

  1. In Solution Explorer, right-click the TailSpin.Surveys.Cloud project and select Publish.

    Hh680894.617483560124CDF7D1DBA843BEE2035F(en-us,PandP.50).png

  2. In the Publish Azure Application wizard, select the following:

    1. In the Azure Publish Sign In step, select the subscription you imported in the previous steps, and click Next.

    2. In the Azure Publish Settings step, select Tailspin-Surveys as the Hosted service.

    3. Select Staging as the Environment.

    4. In the Service configuration, select Cloud.

    5. Click Publish to publish the hosted service.

      Hh680894.067DB4D1888283B871D7B1BCFE968FC1(en-us,PandP.50).png

  3. Before continuing with the next step, wait until the project finishes building and you see that the deployment was added and has started in the Visual Studio Azure Activity Log window.

  4. In Solution Explorer, right-click the Tailspin.Autoscaling.Cloud project and select Publish.

  5. In the Publish Azure Application wizard, select the following:

    1. In the Azure Publish Sign In step, select the subscription you imported in the previous steps, and click Next.
    2. In the Azure Publish Settings step, select Tailspin-Autoscaling as the Hosted service.
    3. Select Staging as the Environment.
    4. In the Service configuration, select Cloud.
    5. Click Publish to publish the hosted service.

Testing If Tailspin Surveys Works

You should ensure that the Tailspin Surveys application works from a public website, tenant website, and management website.

Public Website

Tailspin contains a public website that allows end users to fill out surveys. To view this site, browse to the hosted service for Tailspin-Surveys.

http://[dns for Tailspin-Surveys hosted service]

You can find this URL in the Management Portal - Azure. Go into the Hosted Services section and select the Tailspin.Surveys.Cloud deployment that is under the Tailspin-Surveys hosted service. You will see the DNS name on the details on the right, and you can right-click and copy this value.

Tenant Website

Tenants can access the tenant website. This website allows the tenants to create surveys and analyze the results. There are two tenants provisioned: Adatum and Fabrikam.

To view this site, browse to the hosted service for Tailspin-Surveys using HTTPS. You can find this URL in the Management Portal - Azure.

https://[dns for Tailspin-Surveys hosted service]

The URL is the same as the public website, but you need to change the scheme from HTTP to HTTPS.

Because the solution uses a test certificate, you will see the message: "Continue to this website (not recommended)." Click on this link to continue.

When you browse to this site, you will be logged on using (simulated) claims-based authentication.

Management Website

Tailspin operators can use the management website to manage rules and monitor the autoscaling process. There is also a page to generate a simulated load on the website, to show how the autoscaling process works.

To view this site, browse to the hosted service for Tailspin-Autoscaling using HTTPS.

https://[dns for Tailspin-Autoscaling hosted service]

You can find this URL in the Management Portal - Azure. Go into the Hosted Services section and select the Tailspin.Autoscaling.Cloud deployment that is under the Tailspin-Autoscaling hosted service. You will see the DNS name on the details on the right, and you can right-click and copy this value, but make sure to update the scheme to use HTTPS instead of HTTP.

Because the solution uses a test certificate, you will see the message: "Continue to this website (not recommended)." Click on this link to continue.

Configuring Tailspin Autoscaling Functionality

Now you are ready to configure the Service Information Store and upload the sample rules.

Configuring the Service Information Store

The Service Information Store specifies the roles in the application that can be scaled, as well as additional settings for the operation of the Autoscaling Application Block. In order to see the scenario running, you will need to configure the Service Information Store to match your newly created environment.

To configure the Service Information Store

  1. Navigate to the Tailspin management site.

  2. Click the Reset service model to default link under the Service Information XML file heading in the Rules and Service Information Stores section. This option is only available on the Home page, not on the Service Information tab on the Navigation tab.

    Note

    This will upload to Blob storage a copy of the default-service-information-set.xml file that is in the SourceCode\Tailspin\Sample stores folder in your installation location.

  3. The default service information file does not contain the correct subscription information, so click the Service Information tab on the navigation bar in order to update it to reflect your current deployment in Azure.

  4. Click the line on the Subscriptions list with the TailspinSubscription name. You will paste in the value from the next step here.

  5. In the Management Portal - Azure, select your subscription.

    1. On the right-hand pane, select and copy your subscription ID using Ctrl+C (the portal is a Microsoft Silverlight® browser plug-in application, so the right-click copy menu option is not available).
  6. Paste the value into the SubscriptionId field on the Subscription Details form in the Tailspin management site.

  7. In the Management Certificates section on the Management Portal - Azure:

    1. Select the uploaded Tailspin management certificate with the name Azure Tools.
    2. Select and copy the thumbprint of the certificate from the pane on the right-hand side.
    3. Paste the thumbprint value into the Management Certificate Thumbprint field on the Subscription Details form in the Tailspin management site.
  8. In the Management Portal - Azure, select Tailspin-Surveys Hosted Service.

    1. Select the DNS Prefix value of the Hosted Service on the right-hand pane and copy the value.
    2. Paste the value into the DNS Prefix field under the Deployed Hosted Services section in the Tailspin management site form.
  9. In Visual Studio, double-click on the Tailspin.Workers.Autoscaling role under the Tailspin.Management.Worker.Cloud project roles.

    1. Select the Settings tab.
    2. Copy the value of the AutoscalingStorage setting.
  10. Paste the value into the Connection String field under the Storage Account section in the Tailspin management site form.

  11. Click the Save button at the bottom of the page.

Uploading the Sample Rules

  1. On the Tailspin management site, click on the Home tab.

  2. Click the Reset rules to default link under the Rule Set XML file heading in the Rules and Service Information stores section. This option is only available on the Home page, not on the Service Information tab on the Navigation tab.

    Note

    This will upload to Blob Storage a copy of the default-rules-set.xml file that is in the SourceCode\Tailspin\Sample stores folder in your installation location.

After these steps, the Tailspin Surveys application should be automatically scaled based on the rules. You can go to the Monitoring tab to see how the target application evolves with time, or go into the corresponding tabs and change the reactive and constraint rules at run time to see how it behaves with different settings.

Running Tailspin Surveys Locally in Debug Mode

The Autoscaling Application Block uses the Azure Storage functionality added during the SDK 1.6 timeframe, which is currently not supported by the Storage Emulator. Therefore, the local debug runs still need to access the live Azure Storage account. This is why you needed to set all of the connection strings in the Prepare the Settings in the Cloud Projects section to target All Configurations.

Also, the Azure Service Management API is not supported on the Compute Emulator, thus the Autoscaling Application Block can only target hosted services deployed to Azure.

The Tailspin.Autoscaling.Cloud project can be run in debug mode locally, but it needs to use Azure Storage for storing the data points and the target application must be hosted in Azure.

Running the Management Application in Simulated Mode

If you wish, you can run the management application in simulated mode. This allows you to explore the management application without having to deploy the full Tailspin Surveys application to Azure. This experimental mode is provided to present you with the option to concentrate on the Autoscaling Application Block's interactions, without including any Azure-related extra steps.

The implementation replaces some classes through implementing the interfaces that the block accesses, as shown in the following figure:

Hh680894.8BE0522B2DC85E02DC4231025E731C4B(en-us,PandP.50).jpeg

The solution uses an in-session storage, which is not durable across different sessions or debugs runs.

To work in the simulated mode

  1. Start Visual Studio as an administrator.

  2. Open the Tailspin.Simulated.sln solution.

  3. In Solution Explorer, right-click the Tailspin.Simulated solution, select Enable NuGet Package Restore, and click Yes in the confirmation dialog box.

    Hh680894.901E5EB1531A52EEF88F6945385A3D15(en-us,PandP.50).png

    Note

    If you are using NuGet version 1.5 or less, you will not see the Enable NuGet Package Restore menu item. In this case, enter the following commands on the NuGet Package Manager Console. You can access the NuGet Package Manager Console through the Visual Studio menu. Point to Tools, point to Library Package Manager, select Package Manager Console, and enter the following commands:

  • Install-Package NuGetPowerTools/
  • Enable-PackageRestore
  1. Set the Tailspin.Management.Simulated.Cloud project as the startup project.

  2. Press F5.

  3. Because the solution uses a test certificate, you will see the following message in the browser window: "Continue to this website (not recommended)." Click on that link to continue.

  4. You should see the "Simulated Scaling Mode is currently active" message on the lower left corner of the browser window.

Known Issues

The Tailspin Surveys application has the following known issues:

  • If the rules and service information store XML files do not conform to the included schemas, the application throws an exception and stops working.

  • Due to a limitation in Visual Studio 2010 IntelliTrace, the following runtime exception is thrown when the application block is hosted on Azure with IntelliTrace enabled:

    System.Security.VerificationException: Operation could destabilize the runtime. 
    

    Workaround: To address this issue, you will need to disable IntelliTrace on the Autoscaling Application Block assembly. To do this, add Microsoft.Practices.EnterpriseLibrary.WindowsAzure.* to the list of excluded modules. See instructions here: VerificationException from Azure IntelliTrace.

  • Input field validation is currently incomplete.

More Information

Visit the Enterprise Library Integration Pack for Microsoft Azure home page for the latest news:
https://entlib.codeplex.com/wikipage?title=EntLib5Azure

Please refer to the installation documents of the previous releases for the topics that are not covered in this document:
https://wag.codeplex.com/releases/view/71446

To learn more about this version of the Tailspin Surveys application, see the "Developer's Guide to the Enterprise Library 5.0 Integration Pack for Microsoft Azure."

To learn more about the Autoscaling Application Block, see Chapter 4, "Autoscaling and Microsoft Azure," in this guide and "The Autoscaling Application Block" on MSDN:
https://msdn.microsoft.com/en-us/library/hh680945(v=PandP.50).aspx

To view a video walkthrough about the Autoscaling Application Block, see "Autoscaling Azure applications" on Channel 9:
https://channel9.msdn.com/posts/Autoscaling-Windows-Azure-applications

To learn more about the Transient Fault Handing Application Block, see Chapter 6, "Transient Fault Handling" in this guide and "The Transient Fault Handing Application Block" on MSDN:
https://msdn.microsoft.com/en-us/library/hh680934(v=PandP.50).aspx

To get the NuGet Package Manager, see the NuGet community site on CodePlex:
https://nuget.codeplex.com/

To learn more about Azure profile generation, see Microsoft Azure:
https://go.microsoft.com/fwlink/?LinkId=229563.

To learn more about the limitation in Visual Studio 2010 IntelliTrace and how to disable IntelliTrace on an assembly, see "RIA, Azure, and IntelliTrace" on Kyle McClellan's blog:
https://blogs.msdn.com/b/kylemc/archive/2010/06/09/ria-azure-and-intellitrace.aspx

Next Topic | Previous Topic | Home

Last built: June 7, 2012