Presentation is loading. Please wait.

Presentation is loading. Please wait.

Windows Azure Boot Camp Webcast

Similar presentations


Presentation on theme: "Windows Azure Boot Camp Webcast"— Presentation transcript:

1 Windows Azure Boot Camp Webcast
Trainer: Evmenenko Arseny Company: IT Everest

2 Today’s Schedule Module Cloud Computing & Azure Web Roles Worker Roles
Queues Tables Blobs Cloud Computing Scenarios

3 Intro to cloud computing and Azure

4 Cloud-Addressable Challenges Facing Today’s Enterprise
1 1 5 Infrastructure costs are fixed and ongoing, and distract from the mission of reducing business process friction Leveraging past investments to provide future value Many data centers at limit—real estate, capacity, cooling and power Matching capacity to demand Maintaining security while increasing access and transparency—within and outside the organization 2 6 Security, access, and transparency across the value chain: suppliers, partners, etc. 3 7 Lack of a common platform 4

5 And in a non-Cloud view, there are inefficiencies in addressing those issues
Allocated IT-capacities Load Forecast “Under-supply“ of capacities “Waste“ of capacities Fixed cost of IT-capacities IT CAPACITY To build an application or solution in a legacy world, you have to think about network, OS, storage, and scale. But they have little to do with what you really want to build, an application. But what if there were a different way. Barrier for innovations Actual Load TIME

6 However, in a Cloud View IT CAPACITY Time Load Forecast
Allocated IT capacities No “under-supply“ IT CAPACITY Reduction of “over-supply“ Possible reduction of IT-capacities in case of reduced load This is the idea behind Cloud Computing, and in this case the Windows Azure platform, which allows you to run at scale, on the internet. In short, if you have to pay upfront for peak capacity, money will be wasted. Think of Cloud Computing and Windows Azure more like electricity – a utility. You pay only for what you need, and only when you turn it on. You can stop worrying about where the peak is, stop paying up front, and save a lot of money Reduction of initial investments Actual Load Time

7 Benefits of Cloud Computing
SHARING "PERISHABLE AND INTANGIBLE" COMPUTING POWER AMONG MULTIPLE TENANTS OPTIMIZES COSTS FOR ALL PAY FOR ACCESS – NOT OWNERSHIP – OF IT RESOURCES IMPROVE TIME-TO-MARKET FOR NEW APPLICATIONS, SERVICES, AND SOLUTIONS STAFF AND PLAN FOR TYPICAL USAGE. SCALE TO THE CLOUD AT PEAK TIMES – PLANNED OR UNPLANNED End of quarter reporting, tax-time, payroll, slashdot effect

8 Introducing Windows Azure
WEB & CLOUDS Web applications Third party cloud Developer Experience Use existing skills and tools Compute Storage Management Relational data Connectivity Access control Whether an application runs in the cloud, uses services provided by the cloud, or both, some kind of application platform is required. Viewed broadly, an application platform can be thought of as anything that provides developer-accessible services for creating applications. In the local, on-premises Windows world, for example, this includes technologies such as the .NET Framework, SQL Server, and more. To let applications exploit the cloud, cloud application platforms must also exist. And because there are a variety of ways for applications to use cloud services, different kinds of cloud platforms are useful in different situations. Microsoft’s Windows Azure platform is a group of cloud technologies, each providing a specific set of services to application developers. The Windows Azure platform can be used both by applications running in the cloud and by applications running on local systems. The components of the Windows Azure platform can be used by local applications running on a variety of systems, including various flavors of Windows, mobile devices, and others. Those components include:  Windows Azure: Provides a Windows-based environment for running applications and storing data on servers in Microsoft data centers.  Microsoft SQL Azure: Provides data services in the cloud based on SQL Server.  Microsoft Azure platform App Fabric: Offers distributed infrastructure services to cloud- based and local applications. Each component of the Windows Azure platform has its own role to play. This overview describes all four, first at a high level, then in a bit more detail. Composite applications LOB Applications ON-PREMISES

9

10

11

12 Video of IT Preassembled Components - http://www. microsoft
Video of IT Preassembled Components c70ef77981c Gen4 Vision ccbb63e4e

13 Windows Azure The Fabric Controller automates load balancing and computes resource scaling Security and Control Features include storage encryption, access authentication, and over-the-wire encryption using HTTPS. Industry certification is part of the Windows Azure roadmap. Computation provides application scalability. Developers can build a combination of web and worker roles. Those roles can be replicated as needed to scale the applications and computational processing power. Storage Services allow customers to scale to store large amounts of data – in any format – for any length of time, only paying for what they use or store. Read the slide headlines, answer questions Geographically distributed, state-of-the-art data centers host your applications and data, internet-accessible from everywhere you choose to allow.

14 Compute in Windows Azure
GOAL: SCALABILITY Two instance types: Web Role & Worker Role Windows Azure applications are built with web role instances, worker role instances, or a combination of both. Scale out by replicating instances as needed. Allow applications to scale user and compute processing independently. The Windows Azure Compute service can run many different kinds of applications. A primary goal of this platform, however, is to support applications that have a very large number of simultaneous users. (In fact, Microsoft has said that it will build its own SaaS applications on Windows Azure, which sets the bar high.) Reaching this goal by scaling up—running on bigger and bigger machines—isn’t possible. Instead, Windows Azure is designed to support applications that scale out, running multiple copies of the same code across many commodity servers. To allow this, a Windows Azure application can have multiple instances, each executing in its own virtual machine (VM). These VMs run 64-bit Windows Server 2008, and they’re provided by a hypervisor (based on Hyper-V) that’s been modified for use in Microsoft’s cloud. To run an application, a developer accesses the Windows Azure portal through her Web browser, signing in with a Windows Live ID. She then chooses whether to create a hosting account for running applications, a storage account for storing data, or both. Once the developer has a hosting account, she can upload her application, specifying how many instances the application needs. Windows Azure then creates the necessary VMs and runs the application. It’s important to note that a developer can’t supply her own VM image for Windows Azure to run. Instead, the platform itself provides and maintains its own copy of Windows. Developers focus solely on creating applications that run on Windows Azure. With Windows Azure, two different instance types are available for developers to use: Web role instances and Worker role instances. Each instance runs on its own VM (virtual machine), replicated as needed.

15 Defining the Web and Worker Roles
WEB ROLE WORKER ROLE Interacts with end-user or web services Handles incoming HTTP/HTTPS requests Develop with Microsoft and non-Microsoft tools: ASP.NET, WCF, other .NET tools Java, PHP, etc. Can only receive inbound traffic when configured properly Initiates their own requests for data or tasks from the queue Similar to a "batch job" or Windows service As its name suggests, a Web role instance can accept incoming HTTP or HTTPS requests. To allow this, it runs in a VM that includes Internet Information Services (IIS) 7. Developers can create Web role instances using ASP.NET, WCF, or another .NET technology that works with IIS. Developers can also create applications in native code—using the .NET Framework isn’t required. (This means that developers can upload and run other technologies as well, such as PHP.) And as Figure 3 shows, Windows Azure provides built-in hardware load balancing to spread requests across Web role instances that are part of the same application. By running multiple instances of an application, Windows Azure helps that application scale. To accomplish this, however, Web role instances must be stateless. Any client-specific state should be written to Windows Azure storage or passed back to the client after each request. Also, because the Windows Azure load balancer doesn’t allow creating an affinity with a particular Web role instance, there’s no way to guarantee that multiple requests from the same user will be sent to the same instance. Worker role instances aren’t quite the same as their Web role cousins. For example, by default they can’t accept requests from the outside world. Their VMs don’t run IIS, and a Worker application can’t (by default) accept any incoming network connections. Instead, a Worker role instance initiates its own requests for input. It can read messages from a queue, for instance, as described later, and it can open connections with the outside world. Given this more self-directed nature, Worker role instances can be viewed as akin to a batch job or a Windows service. A developer can use only Web role instances, only Worker role instances, or a combination of the two

16 Storage in Windows Azure
GOAL: SCALABLE, DURABLE STORAGE Tables: simply structured data, accessed using WCF Data Services Queues: serially accessed messages or requests, allowing web-roles and worker-roles to interact Blobs: large, unstructured data (audio, video, etc) 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 Regardless of how it’s stored—in blobs, tables, or queues—all data held in Windows Azure storage is replicated three times. This replication allows fault tolerance, so losing a copy isn’t fatal. The system guarantees consistency, however, so an application that reads data it has just written will get what it expects. Windows Azure storage can be accessed either by a Windows Azure application or by an application running someplace else. In both cases, all three Windows Azure storage styles use the conventions of REST to identify and expose data. Everything is named using URIs and accessed with standard HTTP operations. A .NET client can also use WCF Data Services and LINQ, but access to Windows Azure storage from, say, a Java application can just use standard REST.

17 Providing Security with Windows Azure
PHYSICAL: Microsoft data centers with modern and current security processes Redundant power supplies from separate providers, battery and diesel backup generators, climate control, and fire prevention and suppression CONTINUITY: Multiple data centers in different geographies Users can choose single location or geo-distributed data centers Storage data is replicated multiple times LOGICAL: Storage encryption and authentication HTTPS Optimized for Cloud access with no admin access to guests or applications Applications and users not allowed to update the underlying environment COMPLIANCE & CERTIFICATION: Microsoft is committed to complying with all local laws Industry certification is a core part of the Windows Azure roadmap Customers are ultimately responsible for the security and compliance of their services or applications–Windows Azure is a platform List of certifications available on Azure.com Read the slide, invite questions

18 Windows Azure Pricing Meters
COMPUTE STORAGE BANDWIDTH Virtual Machine instances Load balancers, routers, etc. Relational DB instances Automated service management Fabric controller operations Load balancer programming Blob Storage Table Storage Multiple replicas Ingress/Egress (to/from internet only) PRICE $0.12 / hour per size unit PRICE $0.15 / GB stored / month Storage transactions: $0.01 / 10k PRICE Bandwidth: $0.10 IN; $0.15 OUT; / GB Read the slide. Emphasize lower costs, refer to consumption based model and peak usage above SQL Azure PRICE 1GB db : $9.99/month 5 GB db: $49.95/month * 10 GB db : $99.99/month 50 GB db: $499.95/month * Data transfers = $0.10 in / $0.15 out / GB * Starting June 28, 2010 Easy to use Reliable Compatible with what you have

19 Windows Azure Platform Service Guarantee
Role instance monitoring and restart Compute connectivity Database availability Storage service will be available/ reachable (connectivity) Your storage requests will be processed successfully Storage availability .NET Service Bus endpoint will have external connectivity Message operation requests will be processed successfully Service availability All running roles will be continuously monitored If role is unhealthy, we will detect and initiate corrective state Your service is connected and reachable via web Internet facing roles will have external connectivity Database is connected to the internet gateway Availability monitoring every 5- minute interval Read the slide Automated Systems Management >99.95% >99.9% >99.9% >99.9%

20 Development Environment
The Developer Tools Development Environment Vista+ Must enable local IIS features Visual Studio 2008/2010 Must run as local Admin .NET 3.5 SP1 / .NET 4.0 Local SQL instance Azure SDK Provides local devfabric and dev storage Complete local simulation of the cloud fabric 90% of the local devfabric is the same as the cloud fabric Includes handy project templates Deployment and management tools Includes client storage library AppFabric SDK Provides libraries and tools to use ACS and Service Bus Includes ACM.exe and AF Configuration Management Browser source.

21 Web Roles

22 What is the web role? A web role hosts an IIS based web site or service. Supports HTTP and 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 DevFabric The DevFabric is a local simulation 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 DevFabric UI to watch your processes

24 DevFabric UI

25 DevStorage UI

26 Debugging in the cloud? No. No debug for you.

27 Debugging locally You can debug locally just like a normal ASP.NET application. Full support for multiple instances.

28 Looking at configuration.
Configuration is handled by two files. ServiceDefinition.csdef ServiceConfiguration.cscfg Role Specific Service Specific

29 GUI Double click on Role Name in Azure Project

30 Settings

31 Endpoints

32 Certificates

33 Deploying to the cloud You must create an Azure account, then a service, and then you deploy your code. We can deploy from the portal, from script (API), or Visual Studio. VS builds two files. Encrypted package of your code Your config file Can take 20 minutes (which is better than six months)

34 Portal

35 demo Deploying to the cloud
You can either deploy, and then come back to it later, or show screen shots (which will be ready shortly). demo

36 Visual Studio Deploy a management certificate
Connect to your service account Publish inside of VS2010 Easy integration with IntelliTrace and Storage

37 Basic Worker Roles

38 What is a worker role? Windows Server 2008 .NET 3.5 sp1 / 4.0
Focused on backend processing and non-HTTP service hosting By default, does not allow inbound connections

39 Common uses Batch processing Queue processing
Hosting non-HTTP WCF services

40 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.

41 Local Resource Configuration

42 Input endpoints Internal endpoints Expose a WCF service to the public.
Enrolled in the Azure load balancer. Any number of HTTP, HTTPS, and TCP endpoints. Internal endpoints Expose a WCF service to other internal instances. NOT enrolled in the Azure load balancer. Any number of HTTP, HTTPS, and TCP endpoints. Usually used in a peer-to-peer like manner.

43 Endpoints Model Input Endpoint Internal Endpoint Internet LB SVC SVC
Worker Role 0 Instance 0 SVC Worker Role 0 Instance 2 Worker Role 0 Instance 1 Worker Role 1 Instance 0 SVC Worker Role 1 Instance 2 Worker Role 1 Instance 1

44 Configuring an Endpoint

45 Four Ways to do More PHP on Azure Threads External Processes
Native Libraries

46 FastCGI Enabled any CGI module Provide .exe in project as content
Add CGI Web Role Define app path in web.roleconfig Add handler to web.config Change default doc in web.config

47 Background Threads You can create and work with threads.
Just like a normal server, be smart on how you do it. Consider Parallel Extensions for .NET Use a thread just like normal: Thread t = new Thread (new ThreadStart(Sample.Start)); t.Start();

48 Using External Processes
Sometimes you have an .exe that you have to leverage. Use the traditional approach: Use the Process class Set parameters Call Start, then WaitForExit var process = new Process(); var startInfo = process.StartInfo; startInfo.UseShellExecute = false; startInfo.CreateNoWindow = true; startInfo.FileName = Server.MapPath(cmdPath); startInfo.Arguments = arguments; startInfo.WorkingDirectory = Path.GetDirectoryName(startInfo.FileName); startInfo.RedirectStandardError = true; startInfo.RedirectStandardOutput = true; process.Start(); process.BeginErrorReadLine(); process.BeginOutputReadLine(); process.WaitForExit(); return process.ExitCode;

49 Messaging with Queues

50 What is a queue? Queues are used to store messages
They are FIFO, and one way A queue name must be lower case name, and URL friendly First In, First Out

51 Messages A queue can hold an unlimited number of messages
Messages must be serializable as XML Limited to 8KB in size

52 Queue Terminology

53 Storage Infrastructure
Each item in storage is stored in triplicate. The backend store is the same for queues, tables, and blobs.

54 Accessing Storage with REST
Use when a library isn’t available All features are available Lacks Intellisense Results in opaque code

55 With client library Automatically referenced in a cloud project
Supplies a nice .NET API on top of the REST API You will need the following: Account Name - movieconversion Account Shared Key – NOcqFlqUwJPLlm… Endpoint - blob.core.windows.net -or- UseDevelopmentStorage=true

56 Add a message

57 Peek a message Peeking lets you see the contents without ‘getting’ the message. Handy when trying to determine how to handle a message without consuming it.

58 Get a message The visibility is 30 seconds and can be as long as 2 hours.

59 Deleting a Message The Message Id and the Pop Receipt must match for a successful delete.

60 Polling Most queues are polled in an infinite loop
Make your processes idempotent

61 Long Queues A queue that collects messages for a period of time while the consumer is offline. The consumer might come online once a day to process all messages, then sleep again. Useful for messaging to an external vendor.

62 Using Azure Tables

63 What is the Table Service?
Simple Highly scalable Cost effective Non-relational Hierarchical

64 Storage Account: MovieData
Table Structure Account Table Storage Account: MovieData Star Wars Matrix Fan Boys Table Name: Movies Mike Collier Mr. Anderson Bill Gates Table Name: Customers Entity Tables store entities. Entity schema can vary in the same table.

65 Is not relational Can Not-
Create foreign key relationships between tables. Perform server side joins between tables. Create custom indexes on the tables.

66 Required Properties All entities must have the following properties:
Timestamp PartitionKey RowKey

67 Creating a Table Tables can be created and destroyed in code.
Wire up your storage in the on_start method. Use a CloudTableClient to access the table.

68 Create a Context Class WCF Data Services needs a context class.
CloudTableClient.CreateTablesFromModel() – Uses property with IQueryable<T> in class derived from TableServiceContext. “movies” – entity set which DataServiceContext is tracking.% WCF Data Services needs a context class. This represents your connection to the table.

69 Adding an Entity Other operations are just like normal WCF Data Services, such as delete, update, etc.

70 Deleting an Entity Keep the entity, or use a lightweight copy for better performance.

71 Replication Guarantee
All data exists in three replicas Replicas are created as needed A write operation is not complete until it has written to all three replicas. Reads are only load balanced to replicas in sync. Server 1 Server 2 Server 3 P1 P1 P1 P2 P2 P2 Pn Pn Pn

72 Partition Key and Row Keys matter!
Performance Super Fast Unique Partition Key Very Fast Partition Key + Row Key Slower Only Partition Key No Row Key Slowest No Partition Key Partition Key and Row Keys matter!

73 Guidance Treat entity schema as a data contract.
New properties should be optional. Consider self configuration and setup during startup. Use tables as a cache of relational data.

74 Costs Storage = $0.15 / GB stored / month
Storage transactions = $0.01 / 10K Data transfers = $0.10 in / $0.15 out / GB - ($0.30 in / $0.45 out / GB in Asia)*

75 Using BLOB Storage In this module- What is BLOB storage?
How do I access it? What is Azure Drive?

76 What is a BLOB Binary Large OBject

77 Current Storage Solutions
SQL Servers Challenges with cost, performance and backup Network Share Single point of failure Directly Attached Storage Storage Area Network Can be very expensive, specialized training, only for most important files All have backup and geo issues

78 Storage Account: MovieConversion
BLOBs in Azure & Size Each BLOB can be up to 1TB in size You can have as many containers and BLOBs as you want. Containers can be created/destroyed on the fly Storage Account: MovieConversion Job1.mpg Job2.mpg Header.png Container: Originals Job 9.mpg Index.docx Job8.pdf Container: Completed

79 BLOB Addresses Each BLOB has an address.

80 Containers Similar to a top level folder Has an unlimited capacity
Can only contain BLOBs Each container has an access level: Private Default, will require the account key to access Full public read Public read only Full public read – anonymous access; ability to list contents of container; access to container data Public read only – anonymous access; only list blob – not contents of container; no access to container data

81 Storage Infrastructure
Each item in storage is stored in triplicate. The backend store is the same for queues and tables.

82 Working with Containers

83 Working with BLOBs

84 <httpRuntime executionTimeout="300" maxRequestLength="51200"/>
Uploading a BLOB Other Options UploadFile UploadText UploadFromStream <httpRuntime executionTimeout="300" maxRequestLength="51200"/>

85 Downloading a BLOB Other Options DownloadText DownloadByteArray
DownloadToFile

86 Container & BLOB Metadata
Simple Dictionary. Must call SetMetadata() to persist to the store.

87 Snapshotting Pins a version of your BLOB that is read only.

88 CloudBlobDirectory Container: Pictures Cartoon/Color/Mouseman
Cartoon/Video/SuperBat Cartoon/TV/Jokester Directories are ‘/’ in blob names. Use GetDirectoryReference, GetSubdirectory, and ListBlobs to work with directories.

89 Azure Content Delivery Network
20 edge cache servers worldwide Requests go to local cache first Enhanced performance for client Latency to file File from different domain allows for parallel download Enabled by storage account in portal Pricing You basically pay for the transactions, and the bandwidth out of the CDN Details on pricing of CDN $0.15 per GB for data transfers from European and North American locations $0.20 per GB for data transfers from other locations $0.01 per 10,000 transactions

90 Windows Azure Drive Formats a Page Blob as an NTFS volume
Essentially like a VHD Azure roles can mount as drive letter Easy way to support legacy file system code Can automatically use local storage as a cache for drive reads Uses blob leases for drive lock. No shared access. Can upload a normal VHD as a page blob to use for your drive.

91 Windows Azure Drive API
Create Drive - Creates a Page Blob formatted as a single partition NTFS volume VHD. Initialize Cache – Allows an application to specify the location and size of the local data cache for all Windows Azure Drives mounted for that VM instance. Mount Drive – Takes a formatted Page Blob and mounts it to a drive letter for the Windows Azure application to start using. Get Mounted Drives – Returns the list of mounted drives. It consists of a list of the drive letter and Page Blob URLs for each mounted drive. Unmount Drive – Unmounts the drive and frees up the drive letter. Snapshot Drive – Allows the client application to create a backup of the drive (Page Blob). Copy Drive – Provides the ability to copy a drive or snapshot to another drive (Page Blob) name to be used as a read/writable drive.

92 Guidance Manage connection strings/keys in cscfg
Do not share keys, wrap with a service Strategy for accounts and containers You can assign a custom domain to your storage account

93 Cloud Computing Scenarios
In this module- Discover some of the common uses

94 We are all excited about the cloud

95 The trick is knowing what your systems need,
and how the cloud can help.

96 Not everything has to or can live in the cloud

97 Only move to the cloud that which can benefit

98 The core strategy is ‘hybrid’

99 Take a look at your system portfolio.
You have one right?

100 Look for pain or distractions

101 Only 2 reasons to use the cloud
Improve Bottom Line Improve Strategery

102 Determine an ROI Consider: Current hosting costs Current staff costs
Cooling/power/space Migration costs Licensing

103 Common scenarios

104 Dynamic scale / reduce costs

105 Disposable computing

106 Startups & POCs IT CAPACITY Time Load Forecast No “under-supply“
Allocated IT capacities No “under-supply“ IT CAPACITY Reduction of “over-supply“ Possible reduction of IT-capacities in case of reduced load Reduction of initial investments Actual Load Time

107 Common roadblocks

108 Security Concerns

109 Regulatory & Certification

110 Local hardware integration

111 Decompose your systems into pieces. This leads to flexibility.

112 How do things connect? Plan on service facades.
Cloud App Accounting Service Accounting

113 Design for scale. It leads to *-ability.

114 Decouple. Decouple. Decouple.

115 Trainer: Evmenenko Arseny
Company: IT Everest


Download ppt "Windows Azure Boot Camp Webcast"

Similar presentations


Ads by Google