Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh
What is the role of an IT Pro in a world of SaaS and cloud computing with Windows Azure? Source: WikipediaWikipedia
demo Rainer Stropek CEO, Co-Founder software architects gmbh Windows Azure Configuration See hidden slides for code snippets.
Windows Azure Configuration (Sample) Configure size of instances (i.e. scaling unit) Configure public endpoints with SSL (i.e. firewall) Automate server setup using scripts
Windows Azure Configuration (Sample) Configure inter-role communication
Windows Azure Configuration (Sample) Configure inter-role network traffic restrictions (firewalls)
ClientsFirewall, Load Balancer Web FarmStorage Cluster
Tenant 1 Tenant 2 Tenant n ……
Covered By Platform TopicFullyPartlyNo Hardware Network (up to OSI layer 4) Internet Access Scaling Tenant Separation and Isolation Backup/Recovery Availability and SLAs Rating/Billing
TIME IT CAPACITY Real Load Resources Expected Load Drives Revenue Drives Costs (SW+HW) Drives Initial Investments
Rainer Stropek CEO, Co-Founder software architects gmbh Scaling See hidden slides for more information and code snippets.
Deployment With PowerShell cls $hostedServiceName ='teched2012paas' $slot="Production" $rolename="WebUI" $rolecount=(Get-AzureRole ` -ServiceName $hostedServiceName ` -Slot $slot ` -RoleName $rolename).InstanceCount $rolecount=$rolecount + 1 Set-AzureRole ` -ServiceName $hostedServiceName ` -Slot $slot ` -RoleName $rolename ` -Count $rolecount
Deployment With PowerShell cls $subscriptionId = 'e84ee480-8cd4-4fa7-81b9-…' $Certificate = Get-Item cert:\CurrentUser\My\F2242… $hostedServiceName ='teched2012paas' $slot="Production" $rolename="WebUI" $rolecount=(Get-RoleInstanceCount ` -SubscriptionId $subscriptionId ` -Certificate $Certificate ` -DeploymentSlot $slot ` -RoleName $rolename ` -ServiceName $hostedServiceName).instancecount $rolecount=$rolecount - 1 Set-RoleInstanceCount ` -SubscriptionId $subscriptionId ` -Certificate $Certificate ` -DeploymentSlot $slot ` -RoleName $rolename ` -ServiceName $hostedServiceName ` -Count $rolecount | Get-OperationStatus -WaitToComplete
See hidden slides for more information and links to tools.
See hidden slides for links to tools.
Tenant 1 Tenant 2 Shared Infrastructure
Tenant 1 Tenant 2 Shared Infrastructure Cache
Tenant 1 Tenant 2 T1 T2 … … … … … … List of Customers Query using DBAdmin user List of Customers Query using DBAdmin user SQL Exception U1 U2 U3 … T1 T2 … select … from DATA inner join USERS … where USERS.UID = U1 U1 U3 Connection String in web.config
See hidden slides for more information and links to tools.
Tenant 1 Tenant 2 T1 T2 List of Customers Tenant Directory (Encrypted Connection Strings) Tenant can be a claim of the user
Rainer Stropek CEO, Co-Founder software architects gmbh Tenant Separation See hidden slides for more information and code snippets.
Deployment of SQL Azure Server $subscriptionId = 'e84ee480-8cd4-4fa7-81b9-…' $Certificate = Get-Item cert:\CurrentUser\My\F2242… $sqlAdminLogin = "TechEdSqlAdmin" $sqlAdminPassword = $location = "North Europe" $server = (New-SqlAzureServer ` -AdministratorLogin $sqlAdminLogin ` -AdministratorLoginPassword $sqlAdminPassword ` -Location $location ` -SubscriptionId $subscriptionId ` -Certificate $Certificate).ServerName $fullServer = $server + ".database.windows.net" $ruleName = "Everyone" New-SqlAzureFirewallRule ` -Server $server ` -RuleName $ruleName ` -StartIpAddress " " ` -EndIpAddress " " ` -SubscriptionId $subscriptionId ` -Certificate $Certificate
Deployment of SQL Azure Server $cmdLineQuery = "CREATE DATABASE TechEd2012 GO CREATE LOGIN TechEd2012Admin WITH PASSWORD = sqlcmd -S $fullServer -d master -U $sqlAdminLogin -P $sqlAdminPassword -Q "$cmdLineQuery" $cmdLineQuery = "CREATE USER TechEd2012Admin FOR LOGIN TechEd2012Admin WITH DEFAULT_SCHEMA = dbo GO EXEC sp_addrolemember N'db_owner', N'TechEd2012Admin'" sqlcmd -S $fullServer -d TechEd2012 -U $sqlAdminLogin -P $sqlAdminPassword -Q "$cmdLineQuery" Create 3-node cluster in Azure Create user in SQL Azure
Tenant 1 Tenant 2 Shared Infrastructure Trusted Admin User E.g. Script Execute Trusted Admin User E.g. Script Execute Tenant Admin User Tenant Admin User E.g. Script Sandbox Execute
E.g. Script Tenant 1 Tenant 2 Tenant 3 Tenant 4 Tenant 5
Rainer Stropek CEO, Co-Founder software architects gmbh SQL Azure Backup See hidden slides for more information and links to tools.
Submit DAC Export Request REM Backup entire database DacIESvcCli.exe -X -Server qgmc….database.windows.net -Database MyDatabase -ACCESSKEYTYPE shared -BLOBURL " -BLOBACCESSKEY "?sr=b&si=Backup&sig=mBJfu8SODQYC5Ns…" -User … -Password … REM Selective backup DacIESvcCli.exe -SX -Server qgmc….database.windows.net -Database MyDatabase -ACCESSKEYTYPE shared -BLOBURL " -BLOBACCESSKEY "?sr=b&si=Backup&sig=mBJfu8SODQYC5Ns…" -User … -Password … -SXF c:\backup\selection.xml Tip: Use Shared Access Signatures
Submit DAC Export Request tenant1 Table1 tenant1 Table2 … Specify schema/table filter here
Data Center 1 Data Center 2 Clients
Rainer Stropek CEO, Co-Founder software architects gmbh Azure Traffic Manager See hidden slides for more information and code snippets.
Create Traffic Manager Policy With PowerShell cls $subscriptionId = 'e84ee480-8cd4-4fa7-81b9-1379fdcf78a6' $Certificate = Get-Item cert:\CurrentUser\My\F2242BC0925A2F5B01B2F57B572E6439B721AD4D $TMProfileName = 'TechEd2012TrafficMgr' $profile = New-TrafficManagerProfile ` -ProfileName $TMProfileName ` -DomainName 'teched2012trafficmgr.trafficmanager.net' ` -SubscriptionId $subscriptionId ` -Certificate $Certificate $endpoints $endpoints += New-TrafficManagerEndpoint -DomainName 'europenorth.cloudapp.net' $endpoints += New-TrafficManagerEndpoint -DomainName 'northcentralus.cloudapp.net' $monitors $monitors += New-TrafficManagerMonitor –Port 80 –Protocol HTTP –RelativePath / Cross data center failover cluster
Create Traffic Manager Policy With PowerShell $createdDefinition = New-TrafficManagerDefinition ` -ProfileName $TMProfileName ` -TimeToLiveInSeconds 30 ` -LoadBalancingMethod Failover ` -Monitors $monitors ` -Endpoints $endpoints ` -Status Enabled ` -SubscriptionId $subscriptionId ` -Certificate $Certificate Set-TrafficManagerProfile ` -ProfileName $TMProfileName ` -Enable ` -DefinitionVersion $createdDefinition.Version ` -SubscriptionId $subscriptionId ` -Certificate $Certificate
Rainer Stropek CEO, Co-Founder software architects gmbh CloudNinja Metering Block
Connect. Share. Discuss. Learning Microsoft Certification & Training Resources TechNet Resources for IT Professionals Resources for Developers
Evaluations Submit your evals online