Presentation is loading. Please wait.

Presentation is loading. Please wait.

02 – Cloud Services Bret Stateham | Senior Technical Evangelist​

Similar presentations


Presentation on theme: "02 – Cloud Services Bret Stateham | Senior Technical Evangelist​"— Presentation transcript:

1 02 – Cloud Services Bret Stateham | Senior Technical Evangelist​
Sidney Andrews | Cloud Applications Consultant​

2 Module Overview Cloud Service Architecture Developing Cloud Services
Deploying Cloud Services Monitoring Cloud Services

3 Cloud Service Architecture

4 Cloud Services - Azure’s original PaaS solution
You create the code, define the configuration, and deploy it to Azure. Azure sets up the compute environment, runs your code then monitors and maintains it for you. No need to get your hands dirty with the Virtual Machine configurations unless you need to.

5 Web Sites vs. Cloud Services vs. Virtual Machines
Control Legacy App Support Ease of Management Ease of Mgmt Ease Agility

6 A collection of related service roles
What is a Cloud Service? A collection of related service roles Web Role Worker Role

7 Web Roles Pre-configured Windows Server IIS Pre-Installed
Firewall open for port 80 Default Endpoint for port 80 You can run pretty much any IIS workload on it Customizable with startup scripts

8 Worker Roles Pre-configured Windows Server Nothing else installed
No default Azure endpoints Run custom workloads that don’t require IIS Install additional software, etc. using scripts Implement Logic in the WorkerRole.cs class

9 Roles vs. Instances Role (“Template”) Instance Configuration
OS Family (Server 2008, 2012) VM Size Role Type (Web, Worker) Endpoints Settings Etc… Code Keep at least two instances running for improved fault tolerance and SLA. Load balanced Endpoints are automatically maintained. Instance Running VM, configured, with code deployed, endpoints opened, etc. *

10 Scale Up Role (“Template”) Instance Configuration
Add more instances for load balancing and improved fault tolerance when demand is high. Role (“Template”) Scale Up Configuration OS Family (Server 2008, 2012) VM Size Role Type (Web, Worker) Endpoints Settings Etc… Code Keep at least two instances running for improved fault tolerance and SLA. Load balanced Endpoints are automatically maintained. Instance Running VM, configured, with code deployed, endpoints opened, etc. *

11 Scale Down Role (“Template”) Instance Configuration
Remove un-needed instances to save money when demand is low Configuration OS Family (Server 2008, 2012) VM Size Role Type (Web, Worker) Endpoints Settings Etc… Code Keep at least two instances running for improved fault tolerance and SLA. Load balanced Endpoints are automatically maintained. Instance Running VM, configured, with code deployed, endpoints opened, etc. *

12 Compute Web / Worker Role VMs
STATELESS A “Platform as a Service” (PaaS) solution Preconfigured Virtual Machines (VMs) Running Windows Server 2012 R2, 2012, or 2008 You DO NOT need to install the OS You DO NOT need to maintain the OS They are STATELESS When a VM is recycled, no data is preserved Data in local storage (local to the VM) will be lost Persist data in Table or Blob Storage or SQL Azure Role Virtual Machines STATELESS

13 EMBRACE STATELESS AND YOU’LL LOVE PaaS!

14 Azure Fabric Controller & Role Instance Recovery
Server Rack Physical Servers VM VM VM VM VM VM VM Tables / Queues/ Blobs / Azure SQL Database Data Data

15 Cloud Services Windows Azure Data Center
Cloud Service (cloudservicename.cloudapp.net) Storage (accountname.*.core.windows.net) Web Role Web Role Load Bal. 80 SQL Database (server.database.windows.net) Worker Role Firewall Worker Role 8081 ? ? Lot’s of other cool stuff they can use…. Virtual Machine 1433

16 Creating a Cloud Service using the Portal

17 Developing Cloud Services

18 Azure SDK

19 Visual Studio Project Templates

20 Add & Configure Cloud Service Role Projects

21 Cloud Service & Roles in Solution Explorer
Cloud Service Project Configuration Files (*.cscfg) Definition File (ServiceDefinition.csdef) Web Role Project(s) Regular ASP.NET Projects References to Azure Libraries WebRole.cs RoleEntryPoint Worker Role Project(s) Regular Class Library Projects WorkerRole.cs RoleEntryPoint

22 Microsoft.WindowsAzure.* Assembly References
Microsoft.WindowsAzure.Configuration Contains the CloudConfigurationManager class Microsoft.WindowsAzure.Diagnostics Diagnostics monitoring classes Diagnostics management classes Microsoft.WindowsAzure.ServiceRuntime Role, RoleEntryPoint, & RoleEnvironment classes Microsoft.WindowsAzure.Storage Classes to work with Tables, Blobs and Queues

23 RoleEntryPoint Class Implementations
Called by the Service Runtime Used to manage role lifetime Class Names WebRole.cs for Web Role Projects WorkerRole.cs for Worker Role Projects Virtual Methods OnStart() OnStop() Run()

24 ServiceDefinition.csdef File
Used to set <WebRole /> <Sites /> <WorkerRole/> <InputEndpoints /> <InstanceInputEndpoints /> <InternalEndpoints /> <ConfigurationSettings /> <Certificates /> <LocalResources /> <Imports /> <Startup /> Changes require the package to be re-deployed

25 ServiceConfiguration.*.cscfg Files
“Cloud” version used by default when deploying to the cloud “Local” version used by default when debugging locally Used to set <Instances /> <ConfigurationSettings /> <Certificates /> Must match pre-defined values in ServiceDefinition.csdef Can be changed without re-deploying package

26 Compute and Storage Emulators
Shipped as part of the Azure SDK Two Versions of the Compute Emulator Full Emulator Original Emulator Requires Visual Studio to be run as Administrator Express Emulator Only supports a single instance of each role Does NOT require Visual Studio to be run as Administrator Storage emulator uses SQL Server LocalDB by default Use WAStorageEmulator.exe /init to point to a different instance

27 Developing Cloud Services

28 Deploying Cloud Services

29 Packaging & Deployment
Azure Data Center Fabric Controller Cloud Service Deployment Slot Production or Staging Firewall Load Bal. ServiceConfiguration.cscfg Web Role Web Role Package (*.cspkg zip file) 80 csupload cspack Worker Role Worker Role ? Azure SDK command line tools ?

30 Deployment Slots Cloud Service Production Deployment Slot
Staging Deployment Slot Staging Deployment Slot Production Deployment Slot Worker Role ? Web Role 80 Worker Role ? Web Role 80 Firewall Load Bal. Firewall Load Bal. CloudServiceName.cloudapp.net and Virtual IP (VIP1) GUID.cloudapp.net and Virtual IP (VIP2) VIP SWAP

31 Deploying Cloud Services

32 Monitoring Cloud Services

33 Monitoring via the Portal

34 Diagnostics Monitoring
Collect Logs, Performance Counters and Trace data. Data is transferred periodically to Azure Storage Visual Studio can help you configure it!

35 Auto Scale Automatically scale up or scale down the number of instances for each role Can be Scheduled Automatic based on CPU load Automatic based on Queues You can also manually scale using APIs

36 Monitoring Cloud Services

37


Download ppt "02 – Cloud Services Bret Stateham | Senior Technical Evangelist​"

Similar presentations


Ads by Google