View
1.290
Download
4
Category
Preview:
DESCRIPTION
Na predavanju bomo spoznali, kako narediti prve korake v smeri prenosa obstoječin aplikacij na platformo v oblaku Windows Azure. Pogledali bomo, kako lahko s premišljeno zasnovo rešitve na platformi Windows Azure znižamo stroške strojne opreme in infrastrukture ter prihranimo na licenciranju programske opreme. Seznanili se bomo z novimi tehnologijami, ki jih ponuja Microsoftov oblak.
Citation preview
Nivo 300
Migrating Applications
to Windows Azure
Blaž Lipušček,
Diventic d.o.o.
Nivo 300
Cloud Computing
• Software as a Service
• Platform as a Service
• Infrastructure as a Service
Computing capability delivered as a utility through
Internet standards and protocols.
Nivo 300
Windows Azure Fabric
• Fabric Controller is the brain of the entire ecosystem
• Highly redundant hardware and software environment
• It can‘t ever fail!
Nivo 300
The Components of Windows Azure
Nivo 300
Windows Azure Application Model
• High availability
• Scalability
• Manageability
When you deploy your application as a hosted service, Azure creates one or more virtual machines (VMs) that contain your application’s code.
Nivo 300
The Application Scenario
• Web and Worker Role
• Business logics and queues
• Backend storage (SQL, Blobs & Tables)
• On-premises resources, reporting and monitoring
Nivo 300
ASP.NET application On-premise
• ASP.NET application running on IIS
• Deployed in local data center
• Accessible via VPN (or Internet)
• Dependencies:
• SQL 2008 database
• Active Directory
• Event logs
Nivo 300
ASP.NET application in the Cloud
• ASP.NET application running on IIS ► WebRole IIS
• Deployed in local data center ► Windows Azure
• Accessible via VPN (or Internet) ► Internet
• Dependencies:
• SQL 2008 database ► SQL Azure
• Active Directory ► AD Federation Services
• Event logs ► Azure Diagnostics
Nivo 300
Deploy to Windows Azure
• Packaging and configuration
• Windows Azure Services are described as:
• Service Definition (*.csdef)
• Service Configuration (*.cscfg)
• Code is zipped and packaged with definition (*.cspkg)
• Deploy using Visual Studio
• Deploy using Windows Azure Portal
• Production and Staging deployment environments
Nivo 300
Deploy to Windows Azure
Nivo 300
Deploy to Windows Azure
Nivo 300
Running Startup Tasks
• RoleEntryPoint: OnStart, Run and OnStop,
• IISConfigurator.exe (Applications, Ports ...)
• Command line scripts
Limited or Elevated • Simple • Background • Foreground
Nivo 300
Deploy to Windows Azure
May overwrite Startup Task modifications to IIS!
Might fail or never complete!
Use in WorkerRole
Mind time restriction
Nivo 300
Deploy to Windows Azure
• Deploy multiple instances to scale
• 2 instances to cover 99.95% uptime SLA
• Upgrade domains
<ServiceDefinition name="ServiceName" upgradeDomainCount="5" ..>
Nivo 300
Manage deployments
• Delete / create
• Downtime between deployments (15 min)
• New VIP
• VIP Swap
• Easier to undo and test in production
• Identical external endpoints and two instances
• Web Deploy
• Instant update
• Should be used for development
Nivo 300
Manage deployments
• Multiple IIS Sites and Applications
• Web Roles now use full IIS not Hosted Web Core
• You can run multiple application on single instance
<WebRole name="WebRole1">
<Sites>
<Site name="Web">
<VirtualApplication name="mail" physicalDirectory="C:\Projects\WebSite"/>
<Bindings>
<Binding name="HttpIn" endpointName="HttpIn" />
</Bindings>
</Site>
<Site name="PDC" physicalDirectory="C:\Projects\SecondWebSite">
<Bindings>
<Binding name="HttpIn" endpointName="HttpIn" hostHeader=“test" />
</Bindings>
</Site>
</Sites>
Nivo 300
DEMO: Develop and deploy to
Windows Azure
• Using Visual Studio IDE and Azure SDK:
• Run Windows Azure Emulator
• Deploy to Windows Azure
• Enable Remote Desktop Connection
• Windows Azure Management Portal
https://windows.azure.com
Nivo 300
Connecting to SQL Azure
• Connecting to SQL Azure only requires change in configuration
• No support for Windows Authentication
• Encrypt credentials
Nivo 300
Connecting to SQL Azure
• A logged-in session that has been idle for 30 minutes will be
terminated automatically.
Open connections late and close early.
Nivo 300
SQL Azure Feature Limitations
• Common Language Runtime (CLR) and CLR User-Defined Types
• Integrated Full-Text Search
• SQL Server 2008 R2 Features (SQL Server Utility,
PowerShell Provider, Master Data Services)
• SQL Server Replications, Backup and Restore
CREATE DATABASE destination_database_name
AS COPY OF
[source_server_name.]source_database_name
Nivo 300
Migrate Data to SQL Azure
• SQL Azure Migration Wizard
• http://sqlazuremw.codeplex.com/
• SQL Server Integration Services (SSIS)
• Import and Export Data Wizard (SQL Server 2008 R2)
• Bulk copy utility (bcp.exe)
• Copy large data in user-specified format
• Microsoft Sync Framework 2.1
• Custom Transact-SQL script
• Brake into multiple transactions to avoid conn-losses
Nivo 300
Troubleshooting SQL Azure
• Service Unavailable or Does Not Exist
• Check if you are unable to resolve the name
• Firewall blocking port 1433 used by SQL Azure
• Using proxy server not configured properly
• General Network Errors
• Connection is idle for an extended period of time.
• Connection consumes an excessive amount of resources
• Connection holds onto a transaction for an extended period of time
• If the server is too busy
https://www.windowsazure.com/en-us/support/service-dashboard/
Nivo 300
DEMO: Connect to SQL Azure
• Create a SQL Azure Server
• Configure Access to the SQL Azure Server
• Management Portal for SQL Azure
• SQL Azure Management Using SSMS
Nivo 300
Store Files to Blob service
• WindowsAzure.StorageClient (REST API)
Nivo 300
Grant Access to Files
• Shared Access Signatures
• Read
• Write
• Delete
• List
https://mycontainer.blob.core.windows.net/files/image.jpg?se=2011-05-
18T12%3A50%3A38Z&sr=b&sp=r&sig=EUtAbKQ%2F%2FYY7k1fJtzE6hWt%2FjadF
AqxDYh5tAPK%2FeIw%3D
Nivo 300
Grant Access to Files:
Shared Access Signatures
• Remember to use UTC on DateTime
• Azure hides resources with invalid Shared Access Signatures
• DeleteIfExists will never fail
• Make sure URL is properly encoded
Nivo 300
Security considerations
Security of the datacenter, infrastructure and the operating system are taken care of by Microsoft, application security is still the responsibility of the application owners.
• Similar to its on-premises counterpart
• Basic identity model
• Federated identity model
Nivo 300
Basic identity model
• Self-contained identity architecture
• ASP.NET identity providers
• Membership, Role, Profile, Session
• Implemented on Windows Azure Storage
Nivo 300
Basic identity model: Asp.net
Membership Provider
Nivo 300
• WS-Trust and WS-Federation specification
• Windows Identity Foundation (WIF) with ASP.NET
• Security Token Service (STS) – ADFS, Facebook ...
Federated identity model
Nivo 300
Access Control Service - ACS
Nivo 300
Hybrid Application: Service Bus Relay
The Service Bus relay is designed for the use-case of taking existing WCF web services and making those services securely accessible to solutions that reside outside the corporate perimeter.
Nivo 300
Hybrid Application: Service Bus Relay
Nivo 300
DEMO: Hybrid Application
• Configure Service Bus
• Create an On-premise Server
• Create an ASP.NET MVC 3 Azure application
• Put the pieces together
Nivo 300
Windows Azure Diagnostics
• Microsoft.WindowsAzure.Diagnostics
• Diagnostic data is held in memory buffer
• Transfer it to table storage
WebRole : RoleEntryPoint
bool OnStart()
Nivo 300
Windows Azure Diagnostics
Nivo 300
WADLogsTable,
WADPerformanceCountersTable
Nivo 300
Cost-Oriented Architecture
Architecture decisions can have profound impacts on the economics of operations for small and large enterprises.
• Availability
• Reliability
• Scalability
• Performance
Optimized Operational
Expenses
Nivo 300
Windows Azure Cost structure
In the context of the cost-oriented architecture, various decisions will impact monthly operational expenses.
• Compute charges
• Storage charges
• Charges for Data Transfer
• Add-on service charges
Compute
Storage
Transfer
Services
Nivo 300
Windows Azure Pricing Windows Azure Capability Charge
Server Usage Small: $0.12 /service-hour
Medium: $0.24/service-hour
Large: $0.48/service-hour
XLarge: $0.96/service-hour
Windows Azure Blobs and
Tables
$0.15/GB
Transactions $0.01/10K transactions
SQL Azure: Web Edition $9.99/month (1GB RDBMS)
SQL Azure: Business Edition $99.99/month (10GB RDBMS)
Windows Azure $0.15/100K message operations
Nivo 300
VPRAŠANJA?
Po zaključku predavanja, prosimo, izpolnite vprašalnik.
Vprašalniki bodo poslani na vaš e-naslov, dostopni pa
bodo tudi preko profila na spletnem portalu konference
www.ntk.si.
Najlepša hvala!
Blaž Lipušček, Diventic d.o.o.
blaz.lipuscek@diventic.si
Recommended