2. Setting up the cloud
Getting started with the Windows Azure
Tools
Building a new Cloud Service
Edit, build, debug
Migrating an existing ASP.NET Web
Application
Deploying to Windows Azure
3. Faster and more user friendly
portal for Windows Azure Platform
services
More visibility and control
Supports multiple service
administrators (co-admins)
Enable and connect to Windows
Azure instances using Remote
Desktop
Built on the Windows Azure
Service Management APIs
4. Setting up the Hosted Service and the
Storage accounts
New Redesigned Portal
Improved workflows – fewer clicks and less
waiting
Management console
User Management – NEW
Add Co-Admin to an account
SQL Azure account
Creating the server
Creating the database
5. Setting up the cloud
Getting started with the Windows Azure
Tools
6. Add-in for Visual Studio 2008 and Visual Studio
2010.
Support building Cloud Services that use .NET 3.5
SP1, .NET 4
Installable via the Web Platform Installer (2008
only) – http://microsoft.com/web
Download from http://windowsazure.com
Free download. Works with (the free) Visual
Web Developer Express 2008 & 2010
SQL Azure
Support in SQL Server 2008 R2 Management
Studio
Visual Studio 2010 Server Explorer
7. Getting started with the Windows Azure
Tools
Building a new Cloud Service
Edit, build, debug
8. SDK Portal Hosted
Service
Storage
Develop Deploy Run
11. Inherits RoleEntryPoint
OnStart() Method
Called by Fabric on startup, allows you to perform
initialization tasks.
Reports Busy status to load balancer until you return
true.
Run() Method
Main logic is here – can do anything, typically infinite
loop. Should never exit.
OnStop() Method
Called when role is to be shutdown, graceful exit.
30 Seconds to tidy up
12.
13. Defines the shape of each role
Internal and External Endpoints
Configuration setting definitions
<WebRole name="WebRole1">
<InputEndpoints>
<InputEndpoint name="HttpIn" protocol="http" port="80" />
</InputEndpoints>
<ConfigurationSettings>
<Setting name="DiagnosticsConnectionString" />
<Setting name="HelloMessage"/>
</ConfigurationSettings>
</WebRole>
14. Defines the scale of each role
Instance count
Configuration values
<Role name="WebRole1">
<Instances count="1" />
<ConfigurationSettings>
<Setting name="DiagnosticsConnectionString"
value="UseDevelopmentStorage=true" />
<Setting name="HelloMessage" value="Hello World!" />
</ConfigurationSettings>
</Role>
15. Port 80 Port 8090
WA-GUEST-OS-1.3 Http
Http
200px
200px
S XL M
StatusSvc
HTTP
17. Getting started with the Windows Azure
Tools
Core Windows Azure concepts
Building a new Cloud Service
Edit, build, debug
Migrating an existing ASP.NET Web
Application
18. Windows Azure Tools for Visual Studio pre-
defined role templates
ASP.NET WebForms Role
ASP.NET MVC 2 Role
21. What about the data?
What about Session State?
What about data and output caching?
How will authentication be handled?
How can I connect back to on premise
server applications?
23. Load balancer round-robins requests in
multi instance roles
Follow web farm best practices
Do not store state on individual instances
Do not assume subsequent requests will hit the
same instance
Don‟t forget things like dynamically generated
images loaded by a page
24. A distributed, in-memory cache for
applications running in Windows Azure
Simple administration; end-user doesn‟t
bother with configuration, deployment, or
management
Highlight scalable solution with low latency
and high throughput
Based on Windows Server AppFabric
Caching
Currently available in AppFabric LABS
Portal as a CTP
27. ASP.NET providers for session state and
page output caching
Cache any managed object
No object size limits
No serialization costs for local caching
Easily integrates into existing applications
28. Windows Azure Load Balancer uses round-robin allocation.
Session state must persist to client or storage on every
request
29. Persist to Storage via Session State Provider
Windows Azure AppFabric Caching
SQL Azure
Windows Azure Storage
Custom
Persist to Client
Use cookies
30. Using Windows Azure AppFabric Caching
as the session store
In-memory, distributed cache
Based on Windows Server AppFabric
Caching
Used the Microsoft.Web.DistributedCache
assembly found in the SDK
Currently available in AppFabric LABS
Portal as CTP
31.
32. Use SQL Azure as backing store
Round trip to database twice per request
Read at request start
Write at request end
Scale out across multiple DBs
Use session state partitioning
SQL Azure is competitive on cost basis
33. Sample ASP.NET Providers
(Session, Membership, Role etc…)
Sample Code
http://code.msdn.microsoft.com/windowsazu
resamples
Uses Blob + Table Storage
Several storage transactions per request
Sample Provider should be treated as a
starting point only.
34. Forms Authentication Migration
SQL Azure as Membership Store
Only change connection string
Azure Table Storage as Membership Store
Need to use TableStorageMembershipProvider and
TableStorageRoleProvider.
Claims based authentication
Windows Azure AppFabric Access Control
Service
35. Used to authenticate and authorize users
Integration Single Sign On and centralized
authorization into your web applications
Standards-based identity providers
Enterprise directories (e.g. Active Directory
Federation Server v2.0)
Web identities (e.g. Windows Live ID, Google,
Yahoo!, and Facebook)
V1 available in production
36.
37. Simplify and automate Provide abstraction for
complex authorization federated claims-based
schema requests. authentication.
Easily establish secure trust relationship.
Data and Applications Applications or Users
38.
39. • Secure network connectivity
between on-premises and
cloud Windows Azure
• Supports standard IP protocols
• Example use cases:
• Enterprise app migrated to
Windows Azure that requires
access to on-premise SQL
Server
• Windows Azure app domain-
joined to corporate Active
Directory
• Remote administration and
trouble-shooting of Windows
Azure Roles
Enterprise
• Simple setup and
40. • To use Connect with a WA service, enable one or more of its
Roles
• For Web & Worker Role, include the Connect plug-in as part of Service
Model (.csdef file)
• For VM role, install the Connect agent in VHD image using the Connect
VM install package
• Connect agent will automatically be deployed for each new role
instance that starts up
• Connect agent configuration managed through the
ServiceConfiguration (.cscfg) file
• One required setting - “ActivationToken”
o Unique per-subscription token, accessed from Admin UI
• Optional settings for managing AD domain-join and service availability
41. • Local computers are enabled for connectivity by installing & activating the
Connect agent
• Web-based installation link
o Retrieved from admin UI
o Contains per-subscription activation token embedded in URL
• Standalone install package
o Reads activation token from registry key
o Enables installation using existing S/W distribution tools
• Connect agent tray icon & client UI
• View activation state & connectivity status
• Refresh network policy
• Connect agent automatically manages network connectivity
• Sets up virtual network adapter
• “Auto-connects” to Connect relay service as needed
• Configures IPSec policy based on network policy
• Enables DNS name resolution
• Automatically syncs latest network policies
42. • Connect network policy managed through Windows Azure
admin portal
• Managed on a per-subscription basis
• Local computers are organized into Groups
• E.g. “SQL Servers”, “My Laptops”, “Project Foo”
• A computer can only belong to a single group at a time
• Newly activated computers are „unassigned‟ by default
• WA Roles can be connected to Groups
• Enables network connectivity between all Role instances (VM‟s) and
local computers in the Group
• WA Connect does not control connectivity between Roles or Role
instances (done through existing mechanisms)
• Groups can be connected to other Groups
• Enables network connectivity between computers in each group
• In addition, a Group can be „interconnected‟ - enables connectivity
within a group
• Useful for ad-hoc & roaming scenarios
43. Windows Azure
Role A Role B
Instance3
Instance2 Instance3
Instance2
Instance Instance
My Servers My Laptops
SERVER1
DEV_LAPTOP1
SERVER2 SERVER3 DEV_LAPTOP2
44. Getting started with the Windows Azure
Tools
Core Windows Azure concepts
Building a new Cloud Service
Edit, build, debug
Migrating an existing ASP.NET Web
Application
Deploying to Windows Azure
45. Create a new deployment:
Visual Studio
Windows Azure Portal
Command line and Powershell
Built using the Service Management REST
API
Hosted Service and Storage Account
created through the portal
47. Deploy via T-SQL scripts
Support for SQL Server Data-Tier Applications
(DAC) feature
DACPAC is unit of deployment
Cloud or on-premise is a deployment time choice
Create Logical Server in same region as Windows
Azure Affinity Group for code-near architecture
Support existing and new forms of deployment
48. If using Windows Azure Storage / SQL
Server
Move only storage to the cloud first
Test with on premise application
Move the application to cloud
Any non-framework dll‟s
Set “Copy Local” property to true
Included in the application package
All configurable settings
Add to the ServiceConfiguration.cscfg file
49. Update the service configuration file
OS update
Upgrade a role or all roles
Reuse existing instances
Deploy and VIP Swap or “DNS Swap”
Delete and Deploy
50. Getting started with the Windows Azure
Tools
Building a new Cloud Service
Edit, build, debug
Migrating an existing ASP.NET Web
Application
Deploying to Windows Azure