Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Azure SDK

  Switch on low bandwidth view
Windows Azure SDK, Community Technology Preview
About the Development Fabric
[This is preliminary documentation and is subject to change.]

The development fabric simulates the Windows® Azure™ fabric on your local computer so that you can run and test your service locally before deploying it. The development fabric allows you to debug and fine-tune the behavior of your service before it is deployed.

The development fabric utility provides a UI for observing and managing local service deployments.

Dd179455.note(en-us,MSDN.10).gifNote:
Both the development fabric and the Windows Azure fabric run Internet Information Services (IIS) 7.0 in integrated mode. In integrated mode, the Application_Start event does not support access to the request context or to the members of the RoleManager class provided by the Windows Azure SDK runtime API. If you are writing an ASP.NET application that accesses the request context or calls the runtime API from the Application_Start event, you should modify it to initialize in the Application_BeginRequest event instead. For an example that shows how to use the Application_BeginRequest event, see the PersonalWebSite Sample that ships with the Windows Azure SDK.

This topic contains the following subtopics:

Packaging a Service for the Development Fabric

Deploying a Service to the Development Fabric

HTTP Endpoints in the Development Fabric

Using the Development Fabric UI

To deploy a service in the development fabric, you must first package the service in the appropriate format. To package a service for the development fabric, call the CSPack command-line tool with the /copyonly option. This option copies the service binaries to a directory layout from which they can be run in the development fabric.

By convention, the default name for the directory created by CSPack ends in the .csx extension, but you can choose a different name for this directory.

Note that when you package a service for deployment to the cloud, you create a file package rather than a directory structure. The directory structure is for deployment to the development fabric only.

For more information about the CSPack command-line tool, see CSPack Command-Line Tool.

After you have run CSPack to package the service for local deployment, ensure that you have taken the necessary steps to configure and run development storage, if your service uses the storage services. For information about configuring development storage, see About Development Storage.

After you have packaged your service and started development storage, call the CSRun command line tool to deploy the service to the development fabric. For more information about using CSRun, see CSRun Command-Line Tool.

Calling CSRun starts the development fabric if it is not yet running. When the fabric starts up, a system tray icon appears. You can right-click this icon to display the development fabric UI, to start or shut down the development fabric, and to exit the utility.

Note that calling CSRun requires administrative privileges. If you are not calling CSRun from an elevated command prompt, you'll be prompted with two User Access Control (UAC) prompts each time you start up the developer fabric.

To launch an additional service deployment to the development fabric, call CSRun again. Each deployment appears in the developer fabric UI. Note that the development fabric UI does not support launching additional service deployments.

To update the service configuration, call CSRun with the /update option. It's not possible to update the service configuration from the development fabric.

Within your service definition file, you must specify a port number for an HTTP or HTTP endpoint. An HTTP endpoint must request port 80; an HTTPS endpoint must request port 443. For a service running in the Windows Azure fabric, this port number is allocated with a unique IP address.

In the development fabric, it's not possible to allocate a unique IP address. The developer fabric will attempt to assign the requested port. If that port is not available, it will allocate the next best available port number. This means that in the development fabric, your service may be assigned a different port number from the one that you specified in the service definition file.

The development fabric UI shows your service deployments in an interactive format. You can examine the configuration of a service, its roles, and its role instances. From the UI, you can run, suspend, or restart a service. In this way, you can verify the basic functionality of your service.

Debugging with the Development Fabric

The development fabric UI enables you to debug your service locally. In this way, you can ensure that the service runs as expected in the development fabric and that the logging information that your code is writing will be adequate for diagnosing problems when the service is running in the cloud.

Dd179455.note(en-us,MSDN.10).gifNote:
It's not possible to attach a debugger to a role running in the cloud. Any live debugging information must be written to the logs.

To attach a debugger to a role running in the development fabric, right-click the role beneath the desired deployment in the left-hand pane of the development fabric UI and then click Attach Debugger. To configure the default debugger that the development fabric will attach to, display the development fabric UI, and then click Options from the Tools menu. Configure debugger information on the Attach Debugger tab.

Dd179455.note(en-us,MSDN.10).gifImportant:
A role running in the development environment runs with administrative privileges, whereas the same role running in Windows Azure runs with the privileges conferred by a standard Windows user account. It's possible that a role that relies on administrative privileges present in the local environment may behave differently when deployed to Windows Azure.

Logging and Alerting

The UI enables you to view logging information as it is being written to the logs, and change the threshold level for logging, so that only messages flagged at the specified level or above are displayed in the logs.

Note that messages designated as Critical are raised as alerts. In the cloud, alerts are raised to the portal. In the development fabric UI, alerts behave like any other logging message.

The UI only displays the logs from the time it was launched, not from the time that the developer fabric was launched. To display logging information before the UI was launched, including startup information, call CSRun with the /dumplogs option.

Opening the Local Store

The local store is a reserved directory location that may be used for caching data. Note that this storage resource is not persisted.

The GetLocalResource method of the RoleManager class provides a means to access the name of the local storage directory at runtime. You can also view this directory from the development fabric by clicking Open Local Store from the Tools menu.

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker