Download presentation
Presentation is loading. Please wait.
Published byJasper Byrd Modified over 8 years ago
1
Nivo 300 Seminar Windows Azure Bootcamp za razvijalce Rok Bermež, Kompas Xnet
2
Nivo 300 Agenda Part 1 Introduction Windows Azure Roles Part 2 Windows Azure Storage Part 3 - bonus Sql Azure Other services Part 4 Service bus Q&A
3
Nivo 300 Cloud Services
4
Nivo 300 The Benefits of the Cloud The Cloud is about cheap, on-demand capacity = Managed for You Standalon e Servers IaaSPaaSSaaS Applications Runtimes Database Operating System Virtualization Server Storage Networking Windows Azure Efficiency Control+Cost
5
Nivo 300 2) Choose image, then create and configure VM(s) for application 1) Choose image, then create VM for DBMS and configure DBMS IaaS Library VM Images Developer Application Data Load Balancer 5) Configure load balancer 6) Manage VMs and DBMS (e.g., deploying new OS images in VMs) 3) Provision database, then create tables and add data 4) Install applica tion
6
Nivo 300 PaaS Developer Application Data Load Balancer 2) Deploy application 1) Provision database, then create tables and add data
7
Nivo 300 Simple Definition? It’s another place to run your code. Choose between on-premises, hosting, or the cloud based on your needs.
8
Nivo 300 Introducing Windows Azure ON-PREMISES Developer ExperienceDeveloper Experience Use existing skills and tools.Use existing skills and tools. ComputeStorageManagement Relational data Management Connectivity Access control
9
Nivo 300 Windows Azure Platform Data Centers
10
Nivo 300 Anatomy of a Windows Azure Service Worker Role Web Role Web Role VM Role
11
Nivo 300 GOAL: SCALABLE, DURABLE STORAGE Windows Azure storage is an application managed by the Fabric Controller Windows Azure applications can use native storage or SQL Azure Application state is kept in storage services, so worker roles can replicate as needed Blobs: large, unstructured data (audio, video, etc) Tables: simply structured data, accessed using WCF Data Services Queues: serially accessed messages or requests, allowing web- roles and worker-roles to interact Storage in Windows Azure
12
Nivo 300 Windows Azure Platform Consumption Prices Access Control $1.99/10k transactions Per Message Operation $3.99/month per connection Per Message Operation Service Bus
13
Nivo 300 Azure Benefits for VS 2010 MSDN Premium, Ultimate: Get 8 months of benefits… MSDN Premium, Ultimate: Get 8 months of benefits… …Then extend them another 8 months $2,518 of cloud resources For a quick video on how to sign up: http://bit.ly/bqtAzAct1
14
Nivo 300 Monthly Service Level Agreement All running roles will be continuously monitored If role is not running, we will detect and initiate corrective state >99.9% Instance monitoring and restart Database is connected to the internet gateway All databases will be continuously monitored >99.9% Database availability >99.9% Service bus and access control endpoints will have external connectivity Message operation requests processed successfully Service bus and access control availability Your service is connected and reachable via web. Internet facing roles will have external connectivity >99.95% Compute connectivity >99.9% Storage service will be available/reacha ble (connectivity) Your storage requests will be processed successfully Storage availability http://www.microsoft.com/windowsazure/sla/
15
Nivo 300 The Developer Tools Development Environment Vista+ Must enable local IIS features Visual Studio 2010 Must run as local Admin.NET 3.5 SP1 /.NET 4.0 Local SQL instance Azure SDK Provides local emulator Complete local simulation of the cloud fabric 90% of the local emulator is the same as the cloud fabric Includes handy project templates Deployment and management tools Includes client storage library
16
Nivo 300 Basic Roles
17
Nivo 300 Roles and Instances Roles are defined in a Service Model May define one or more Roles per Service A role definition specifies VM size Communication Endpoints Local storage resources Etc… At runtime each Role will execute on one or more instances (up to 20 per subscription) A role instance is a set of code, configuration, and local data, deployed in a dedicated VM
18
Nivo 300 Comparison of Role Types Web Role : The role is hosted on IIS Worker Role : The role is an executable (you can create your own web server, host a database, …) VM Role : The role is the VM. Use Windows services, scheduled tasks, etc. You configure and maintain the OS. ControlControl Abstraction (i.e. Less IT & Less Plumbing Code) Abstraction Admin Web / Worker Role VM Role Web / Worker Role
19
Nivo 300 Operating System is provided by customer Patches are provided by customer Operating system is provided by Microsoft Patches are provided by Microsoft Compute Service Roles Web and Worker Role VM Role
20
Nivo 300 Compute Services Security Customer code run on dedicated virtual machines (VMs) VMs isolated by a Hyper-V based hypervisor All access to network and disk is mediated by a “root” virtual machine Hypervisor and “Sandbox” Hypervisor Network/Disk 1, 2, 4 or 8 CPUs, up to 14GB of memory Stripped down, hardened version of Windows Server 2008 Three virtual hard disks Limited number of device drivers Network connectivity restricted using host firewall Hyper-V based hypervisor
21
Nivo 300 Interacts with a “Fabric Agent” on each machine Monitors every VM, application and instance Performs load balancing, check pointing and recovery Fabric Controller Web Role Instance Worker Role Instance VM Role Instance
22
Nivo 300 What is the web role? A web role hosts an IIS based web site or service. Supports HTTP, HTTPS and certificates Automatically load balanced by Azure Can be internal only, but usually public facing Runs on IIS7 Usually runs an ASP.NET site.
23
Nivo 300 Full IIS – Overview Web Role will now use full IIS by default One Web role can run many Web sites, all hosted behind the same public IP address Multiple sites, applications, virtual directories, and bindings can be modeled Everything else can be scripted (using admin access where necessary)
24
Nivo 300 Full IIS Scenario - Walkthrough PhaseKey Steps Local Development Use Visual Studio solution to code & deploy to Compute Emulator Edit local content files without redeploying to Compute Emulator First-time Publish (~10 Min) Deploy service to Windows Azure Ensure Windows Azure service definition (csdef/cscfg) configures Web role: To enable remote WMSVC, WebDeploy, PowerShell, etc. As single instance Iterative Development (seconds) Continue coding in same Visual Studio solution Push intermittent changes (e.g. w/ Web Deploy) Deployment of Final Version (~10 Min) Deploy service to Windows Azure Note: If service is now multi-instance, Remote Desktop can be used, but other remote mgmt. tools will get load- balanced to arbitrary instances. Mitigation: Run mgmt. tools inside Remote Desktop session
25
Nivo 300 What is a worker role?.NET 3.5 sp1 / 4.0 Focused on backend processing and non-HTTP service hosting By default, does not allow inbound connections
26
Nivo 300 Role Programming Model 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
27
Nivo 300 Worker Role Patterns Queue Polling Worker Poll and Pop Messages within while(true) loop E.g. Map/Reduce pattern, background image processing Listening Worker Role Create TcpListener or WCF Service Host External Process Worker Role OnStart or Run method executes Process.Start() Startup Task installs or executes background/foreground process E.g. Run a database server, web server, distributed cache
28
Nivo 300 What is the VM Role Developers have full control over the OS image Ability to upload your own customized WS08R2 Enterprise images Operators can reboot, re-image and Remote Desktop Continue to benefit from automated service management, including service model enhancements described on subsequent slides
29
Nivo 300 VM Role Lifecycle Cloud On-Premises Blob Storage Boot VHD Customize VHD Save Diff.VHD Base.VHD Identical/similar deployment instances using common uploaded OS image (base.VHD + diff.VHD) & Additional Software & Windows Azure Integration Components - Agent - Runtime Interface (topo, config, shutdown notification, …) - Remote Desktop configurator - Diagnostics - Windows Azure Drives driver - Windows Azure Connect & Generalize (Recommended)
30
Nivo 300 VM Role – Common Questions Will any WS08 R2-based application work? No, VM Role inherits some Web/worker restrictions: SLA requires at least two identical/similar instances No durability of OS image on hardware failure One public IP per service (unless using Windows Azure Virtual Network) Does Windows Azure take care of *everything*? No With VM Role, the customer creates & maintains the OS Windows Azure does not automatically understand the health of the applications running in our VM But, since you deploy services instead of individual VM’s, Windows Azure does automate many management tasks.
31
Nivo 300 VM Role – Common Questions How will it be priced? It will be priced the same as Web and Worker roles. Customers will be charged at an hourly rate depending on the compute instance size. How does licensing in the cloud work? Windows: Included in the CPU-hour price Licensing status of uploaded image is not considered Applications: Per the licensing terms of the application
32
Nivo 300 Instances An instance is a physical implementation of your role template. There are different sizes of instances, but all instances of a role must be the same size. You can not change instance size on the fly. SizeCPU CoresCPU SpeedMemoryCost Per Hour Extra SmallShared 1.0 GHz 768 MB $0.04 Small1 1.6 GHz 1.75 GB $0.12 Medium2 1.6 GHz 3.5 GB $0.24 Large4 1.6 GHz 7 GB $0.48 Extra Large8 1.6 GHz 14 GB $0.96
33
Nivo 300 Windows Azure FabricControllerFabricController Web Portal (API) (API) LBLBLBLB LBLBLBLB LBLBLBLB LBLBLBLB YourServiceYourService
34
Nivo 300 LBLBLBLB LBLBLBLB LBLBLBLB LBLBLBLB Service Deployment YourServiceYourService FabricControllerFabricController Web Portal (API) (API) ServiceService ModelModel ServiceService ServiceService DNSDNS configconfig
35
Nivo 300 LBLBLBLB LBLBLBLB LBLBLBLB LBLBLBLB Service Scaling YourServiceYourService FabricControllerFabricController Web Portal (API) (API) ServiceService ServiceService ServiceService ModelModel ServiceService ServiceService ServiceService ServiceService ServiceService
36
Nivo 300 LBLBLBLB LBLBLBLB LBLBLBLB LBLBLBLB Service Monitoring & Recovery YourServiceYourService FabricControllerFabricController Web Portal (API) (API) ServiceService ServiceService ServiceService ModelModel ServiceService
37
Nivo 300 Local Emulator The SDK includes a local emulation of the real fabric and fabric controller. Based on 90% of the real fabric code Uses a local SQL instance to simulate storage Best way to debug your application Use the Compute Emulator UI to watch your processes
38
Nivo 300 SDK Emulator Icon
39
Nivo 300 Compute Emulator UI
40
Nivo 300 Storage Emulator UI
41
Nivo 300 SQL Express? If you have SQL Express the storage emulator will auto-configure on the first run If you want to use a different SQL instance: DSInit /sqlInstance:.
42
Nivo 300 Are we running in the fabric?
43
Nivo 300 Debugging in the cloud? No. No debug for you.
44
Nivo 300 Debugging locally You can debug locally just like a normal ASP.NET application. Full support for multiple instances.
45
Nivo 300 Support for IntelliTrace IntelliTrace now supported in Windows Azure Integrated into VS2010 Ultimate Requires.NET 4 applications Deploys an agent to your instances Gathers and reports all debugging stack information Can replay the app locally
46
Nivo 300 Support for Profiling Easily detect performance bottlenecks in your application while its running in Windows Azure. Choose “View Profiling Report” Open shortcut menu for instance to profile Profiling report is retrieved from Windows Azure After report is downloaded, it is displayed
47
Nivo 300 Looking at configuration. Configuration is handled by two files. ServiceDefinition.csdef ServiceConfiguration.cscfg
48
Nivo 300 Service Definition
49
Nivo 300 Service Configuration
50
Nivo 300 GUI Double click on Role Name in Azure Project
51
Nivo 300 Settings
52
Nivo 300 Endpoints
53
Nivo 300 Certificates
54
Nivo 300 Hello Cloud
55
Nivo 300 Three Choices to Deploy Code Visual Studio Portal Script/Management API
56
Nivo 300 Deploying to the cloud You must create an Azure account, then a service, and then you deploy your code. VS builds two files. Encrypted package of your code Your config file Can take 20 minutes (which is better than six months) In a dev scenario, you can use Web Deploy
57
Nivo 300 Portal
58
Nivo 300 Visual Studio Publishing Fast publishing direct from Visual Studio Uses.publishsettings file (like Web Matrix) Wizard uses Windows Live ID credentials to download file Auto-generation of X509 certificate Base64 encoded certificate in.publishsettings Subscription ID and name of each subscription linked to that Windows Live ID. Publishing will add new X509 certificate and your package to Windows Azure.
59
Nivo 300 Visual Studio Publishing
60
Nivo 300 Deploying to the cloud
61
Nivo 300 DNS All services get a *.cloudapp.net address myservicename.cloudapp.net TTL is 10 seconds Standard approach is to CNAME to *.cloudapp.net Requires two DNS lookups Limited caching due to low TTL Officially we do not support the use of A records IP Address for deployment is fixed for lifetime of that slot
62
Nivo 300 Advanced Roles
63
Nivo 300 Admin Access & Startup Tasks Scenarios Perform short, unattended setups on role startup. E.g. COM Component Registry Key Configuring a Windows Server Role, such as IIS Debugging Reminders Durability: Runtime state on OS image does not survive OS upgrade and hardware failure Drift: Service should behave correctly when any role instance fails
64
Nivo 300 Admin Access & Startup Tasks <Task commandline="relative\path\ToSetupExecutable" executionContext="limited|elevated" taskType="simple|foreground|background"/> Task Types: Simple [Default] – System waits for the task to exit before any other tasks are launched Background – System does not wait for the task to exit Foreground – Similar to background, except role is not restarted until all foreground tasks exit
65
Nivo 300 Startup tasks
66
Nivo 300 Local Storage Each role can define an amount of local storage. Protected space on the local drive. Considered volatile storage. You can define several resources. Size is between 1MB and 20GB+. Defined in.csdef.
67
Nivo 300 Local Resource Configuration
68
Nivo 300 Using a Local Resource
69
Nivo 300 Where is Local Storage?
70
Nivo 300 Local storage
71
Nivo 300 Input endpoints Expose a WCF service to the public. Enrolled in the Azure load balancer.
72
Nivo 300 Endpoints Model Internet LB Worker Role 0 Instance 0 SVC Worker Role 0 Instance 2 SVC Worker Role 0 Instance 1 SVC Worker Role 1 Instance 0 SVC Worker Role 1 Instance 2 SVC Worker Role 1 Instance 1 SVC
73
Nivo 300 Configuring an Endpoint
74
Nivo 300 Using Endpoints Just like normal WCF You need to define your address at runtime Select from the InstanceEndpoints collection Typical pattern is to loop on all internal endpoints.
75
Nivo 300 Using an Input Endpoint
76
Nivo 300 Using an Internal Endpoint
77
Nivo 300 Calling all Internal Endpoints
78
Nivo 300 Endpoints
79
Windows Azure Connect Secure network connectivity between on-premises and cloud 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 Simple setup and management Windows Azure Enterprise
80
Nivo 300 Windows Azure Connect
81
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.www.ntk.si Najlepša hvala!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.