Transcript of "Developing and deploying windows azure applications"
Ashvini ShahaneHead – Strategic Services UnitSynergetics IT Services India Pvt. Ltd.
Setting up the cloudGetting started with the Windows AzureToolsBuilding a new Cloud Service Edit, build, debugMigrating an existing ASP.NET WebApplicationDeploying to Windows Azure
Faster and more user friendlyportal for Windows Azure PlatformservicesMore visibility and controlSupports multiple serviceadministrators (co-admins)Enable and connect to WindowsAzure instances using RemoteDesktopBuilt on the Windows AzureService Management APIs
Setting up the Hosted Service and theStorage accountsNew Redesigned Portal Improved workflows – fewer clicks and less waiting Management consoleUser Management – NEW Add Co-Admin to an accountSQL Azure account Creating the server Creating the database
Setting up the cloudGetting started with the Windows AzureTools
Add-in for Visual Studio 2008 and Visual Studio2010. 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.comFree download. Works with (the free) VisualWeb Developer Express 2008 & 2010SQL Azure Support in SQL Server 2008 R2 Management Studio Visual Studio 2010 Server Explorer
Getting started with the Windows AzureToolsBuilding a new Cloud Service Edit, build, debug
SDK Portal Hosted Service StorageDevelop Deploy Run
Inherits RoleEntryPointOnStart() 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
Defines the shape of each roleInternal and External EndpointsConfiguration setting definitions <WebRole name="WebRole1"> <InputEndpoints> <InputEndpoint name="HttpIn" protocol="http" port="80" /> </InputEndpoints> <ConfigurationSettings> <Setting name="DiagnosticsConnectionString" /> <Setting name="HelloMessage"/> </ConfigurationSettings> </WebRole>
Defines the scale of each roleInstance countConfiguration values <Role name="WebRole1"> <Instances count="1" /> <ConfigurationSettings> <Setting name="DiagnosticsConnectionString" value="UseDevelopmentStorage=true" /> <Setting name="HelloMessage" value="Hello World!" /> </ConfigurationSettings> </Role>
Port 80 Port 8090 WA-GUEST-OS-1.3 HttpHttp 200px 200px S XL M StatusSvc HTTP
Load balancer round-robins requests inmulti instance rolesFollow 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
A distributed, in-memory cache forapplications running in Windows AzureSimple administration; end-user doesn‟tbother with configuration, deployment, ormanagementHighlight scalable solution with low latencyand high throughputBased on Windows Server AppFabricCachingCurrently available in AppFabric LABSPortal as a CTP
ASP.NET providers for session state andpage output cachingCache any managed object No object size limits No serialization costs for local cachingEasily integrates into existing applications
Windows Azure Load Balancer uses round-robin allocation.Session state must persist to client or storage on everyrequest
Using Windows Azure AppFabric Cachingas the session storeIn-memory, distributed cacheBased on Windows Server AppFabricCachingUsed the Microsoft.Web.DistributedCacheassembly found in the SDKCurrently available in AppFabric LABSPortal as CTP
Use SQL Azure as backing storeRound trip to database twice per request Read at request start Write at request endScale out across multiple DBs Use session state partitioningSQL Azure is competitive on cost basis
Sample ASP.NET Providers(Session, Membership, Role etc…)Sample Codehttp://code.msdn.microsoft.com/windowsazuresamplesUses Blob + Table StorageSeveral storage transactions per request Sample Provider should be treated as a starting point only.
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
Used to authenticate and authorize usersIntegration Single Sign On and centralizedauthorization into your web applicationsStandards-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
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
• 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
• 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
• 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
• 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
Windows Azure Role A Role B Instance3 Instance2 Instance3 Instance2 Instance Instance My Servers My LaptopsSERVER1 DEV_LAPTOP1 SERVER2 SERVER3 DEV_LAPTOP2
Getting started with the Windows AzureToolsCore Windows Azure conceptsBuilding a new Cloud Service Edit, build, debugMigrating an existing ASP.NET WebApplicationDeploying to Windows Azure
Create a new deployment: Visual Studio Windows Azure Portal Command line and PowershellBuilt using the Service Management RESTAPIHosted Service and Storage Accountcreated through the portal
Deploying to Windows Azure using VisualStudio 2010DEMO
Deploy via T-SQL scriptsSupport for SQL Server Data-Tier Applications(DAC) feature DACPAC is unit of deployment Cloud or on-premise is a deployment time choiceCreate Logical Server in same region as WindowsAzure Affinity Group for code-near architecture Support existing and new forms of deployment
If using Windows Azure Storage / SQLServer Move only storage to the cloud first Test with on premise application Move the application to cloudAny non-framework dll‟s Set “Copy Local” property to true Included in the application packageAll configurable settings Add to the ServiceConfiguration.cscfg file
Update the service configuration fileOS updateUpgrade a role or all roles Reuse existing instancesDeploy and VIP Swap or “DNS Swap”Delete and Deploy
Getting started with the Windows AzureToolsBuilding a new Cloud Service Edit, build, debugMigrating an existing ASP.NET WebApplicationDeploying to Windows Azure
Email: AshviniShahane@Synergetics-india.comWeb: http://www.synergetics-india.comTHANK YOU
A particular slide catching your eye?
Clipping is a handy way to collect important slides you want to go back to later.