Inside Microsoft Azure

Post on 15-Jan-2015

4,609 views 3 download

Tags:

description

A Web architect who doesn't usually use Microsoft technologies explains Microsoft's cloud offering, Azure, in terms that hopefully other UNIX/open source people will understand.

transcript

National Instruments

Confidential

Inside Microsoft Azure

Ernest MuellerWeb Systems Architect

theagileadmin.com

3

Why Azure?

4

You’ve Sold Your Soul

5

It’s PaaS, not IaaS

= Managed for You StandaloneServers

IaaS PaaS SaaS

Applications

Runtimes

Database

Operating System

Virtualization

Server

Storage

Networking

6

Is That Better?

7

What Is Azure?

8

It’s Magic Fairy Dust

• You don’t have to worry about the servers!• You just deploy your code!• You don’t need ops!• You don’t need provisioning or monitoring or

anything, Azure “does it all for you!”• Just right click in Visual Studio and you’re all cloudy!

Update your resume!

9

• Of course, that’s all BS if you want to do much “real.”• But speaking as a open source/Linux/Java sysadmin

of 18 years experience who has been known to say “Microsoft is the devil” – Azure is actually pretty good.

• And it’s even easy to understand, once you dismiss the notion that it’s all “PaaS pixie dust” – it’s more like an IaaS offering with some cool additional facilities.

• Allow me to explain in sysadmin straight-talk terms. Many of you know AWS so I’ll compare to it some.

Cold Iron Truth

10

Azure Compute

• In your “hosted service,” you define tiers called “roles” instead of individual boxes; you then specify how many “instances” (VMs) run per role.

• There are three types of roles: Web Role: Win2k8 VM with IIS on it Worker Role: Win2k8 VM without IIS on it VM Role: uploaded Hyper-V VM with Win2k3-8 image of

your choice – with some limitations

11

Azure Instance Sizing• Extra Small - 1x1 GHz, 768 MB RAM, 20 GB disk, $0.05/instance-hour• Small - 1x1.6 GHz, 1.75 GB RAM, 225 GB disk $0.12/instance-hour• Medium – 2x1.6 GHz, 3.5 GB RAM, 490 GB disk, $0.24/instance-hour• Large – 4x1.6 GHz, 7.0 GB RAM, 1000 GB disk, $0.48/instance-hour • Extra Large - 8x1.6 GHz, 14 GB RAM, 2040 GB disk, $0.96/instance-

hour

• Note that these match Amazon EC2 Windows instance specs and costs closely

• But what about the details, you ask?

12

Role BCount: 2

Update Domains: 2Fault Domains: 2

Size: Medium

Role ACount: 3

Update Domains: 2Fault Domains: 3

Size: Large

Fault Domain 1 Fault Domain 2 Fault Domain 3

LoadBalancer

www.mycloudapp.net

www.mycloudapp.net

10.100.0.36

10.100.0.122

10.100.0.185

13

The Secret Sauce

• It’s model driven automation from XML config files – see demo

• The Azure Fabric checks instance health, balances stuff, controls upgrades. You can hook it for events like “RoleChanging”.

• Managed deployment and upgrades• Local compute and storage emulator (that’s a killer feature!)

and Visual Studio integration• And you can do everything via REST and/or command line!!!

14

Deployment

• You (or VS) runs cspack.exe which creates a .cspkg package (just a .zip file) and your .cscfg config file (just XML)

• It uploads it to storage and then you can do an in place update (rolling through upgrade domains) or a “VIP swap” of staging to production

15

Demo

• WARNING! I am not a .NET programmer and use Windows Server only when forced to by software requirements.

• But I can still do this!• If you have deep Microsoft-type questions, though, “I

don’t know.” Sorry!

16

Important Lessons - Compute• Do not use local instance storage for ANYTHING important.

It is ephemeral and role instances may be stopped and started at any time by Azure to move them around.

• Functional role limitations reduced (running in admin mode, installing using registry, full IIS, startup tasks now allowed)

• There is a limit of five kinds of role in a hosted service. Use multiple hosted services for complex architectures.

• Your app’s directory is READ ONLY when deployed/running.• Fault domains and upgrade domains are largely Azure

managed, you can say “how many upgrade domains.”

17

Azure Storage

• It’s all REST access, or APIs wrapping REST• One “storage account” has a 100 TB limit• Blobs – you know, files, like S3. Only one writer at a

time but you can make read-only copies. Page blob – optimized for streaming, up to 1 TB Block blob – optimized for random access, up to 200 GB

• Queues – you can put 8 KB XML messages in them.• Drives – a page blob mounted as a NTFS drive

18

More Storage

• Tables – noSQL style tables, arbitrary fields, partition and row keys for addressing. 1 MB entities with up to 255 properties each. Super scalable.

• SQL Azure- like SQL Server 2008 in Azure, with limitations of course. 50 GB max database size. No transaction log you can get to.

19

Important Lessons - Storage

• SQL Azure – no transaction cost, pay by size ($9.99/GB)• Azure Tables/Blobs/etc – pay by size ($0.15/GB) and per

transaction ($0.01/10k), looking funny at it is a transaction• Azure Queues – “you probably don’t want to use them, use

SQL Azure.” No guarantees against multiple readers getting the same message.

• Use a distributed caching midtier for dynamic persistence like memcached or Velocity (Azure AppFabric cache).

• Azure Sync the new direction for replication/DR

20

Important Lessons - Networking

• Under the covers it’s F5 load balancers.• Each role has a limit of 5 public or internal “endpoints” (VIPs)

you define in the .csdef file.• Azure Service Bus allows some pub-sub • Azure Connect is a new agent-based VPN node connect

option, can connect on premise to Azure… kinda• You can Remote Desktop to instances now too• You can query the Azure Fabric to get addresses of other

instances for peer to peer connection

21

Important Lessons - Operations

• Azure does not “autoscale.” It will scale, when you insert the integer number of VMs you want.

• The fabric monitors the instances at a very low level and the “Azure Diagnostics API” just dumps perfmon/log data to storage – it’s up to you to monitor apps and interpret the data (there’s a SCOM plugin for Azure now)

• Cumulux = RightScale for Azure, look them up

22

Using Azure Right

• The Azure architecture is specifically optimized for doing things “its way.” “Its way” is luckily arguably the “right way.” Ideally you are writing .NET code that has asynchronous processes (event-driven design) parallelization idempotent operations (handle duplicity) de-normalized, partitioned data (sharding) shared nothing architecture fault-tolerance by redundancy and replication

23

Using Azure Right

• You can run tomcat, memcached, and mySQL on it – “but you may not want to”

• You can install more legacy Windows apps now with their newest release – but there are still a lot of limitations, and the cuter your app tries to be with low level stuff, the less likely it’ll work in Azure

24

Why Azure Is Cool To An Old Crusty UNIX Guy

• The XML config/definition and Azure Fabric – anyone remember PIE? We implemented these concepts for our Amazon apps because they are so necessary.

• The staging/production VIP swap thing makes for easy continuous integration.

• Almost everything can be command lined/REST APIed so you can integrate with your existing tools.

25

Azure Resources

• Make sure and get all the “Azure stuff” – it’s a long and painful list of installs. http://www.microsoft.com/windowsazure/getstarted/

• Windows Azure Platform Training Kit is great• Azure boot camps - http://www.azurebootcamp.com/• Ryan Dunn’s blog - http://dunnry.com/blog/• Cerebrata tools - http://www.cerebrata.com/ • Codeplex stuff like Azure Storage Explorer

26

Azure Resources

• You can get some free Azure in a number of ways – MSDN comes with a minimal entitlement

• microsoftplatformready.com 30 day pass• microsoft.com/bizspark for startups• microsoft.com/web/websitespark for web design firms• microsoft.com/dreamspark for HS/college students• Talk to your Microsoft rep – they offer MTC visits and

“TAP/Metro” early access programs