Vous êtes sur la page 1sur 39

Designing and Developing

Applications on the Cloud


CT071-3-3-DDAC & Version VC1

Cloud Services
Topic & Structure of The Lesson

1. What is a Cloud Service?


2. Roles and Instances
3. Service Definition
4. Service Configuration
5. VM Size in Microsoft Azure
6. Networking in Microsoft Azure

CT071-3-3-DDAC Cloud Services Slide 2 of 39


Learning Outcomes

• At the end of this topic, You should be


able to
• Identify and understand the components of
web and worker role within the context of azure
cloud service.

CT071-3-3-DDAC Cloud Services Slide 3 of 39


Key Terms You Must Be Able To
Use
• If you have mastered this topic, you should be able to use the
following terms correctly in your assignments:
• Cloud Services

CT071-3-3-DDAC Cloud Services Slide 4 of 39


CT071-3-3-DDAC Cloud Services Slide 5 of 39
relational/document/key-value database

Application tier which hosts web services, a web API,


workflows, and business logic.

Some (scheduled) jobs running in the background.

Dashboards, views, reports or some other UI elements


(ASP.NET MVC, Node JS, PHP)

CT071-3-3-DDAC Cloud Services Slide 6 of 39


What is a Cloud Service?

CT071-3-3-DDAC Cloud Services Slide 7 of 39


CT071-3-3-DDAC Cloud Services Slide 8 of 39
What is a Web Role?
Web Role is a Cloud Service role in Azure that is configured and
customized to run web applications developed on programming
languages/technologies that are supported by Internet Information Services
(IIS), such as ASP.NET, PHP, Windows Communication Foundation and
Fast CGI.

What is a Worker Role?


Worker Role is any role in Azure that runs applications and services level
tasks, which generally do not require IIS. In Worker Roles, IIS is not
installed by default. They are mainly used to perform supporting
background processes along with Web Roles and do tasks such as
automatically compressing uploaded images, run scripts when something
changes in the database, get new messages from queue and process and
more.

CT071-3-3-DDAC Cloud Services Slide 9 of 39


CT071-3-3-DDAC Cloud Services Slide 10 of 39
Azure Cloud Services are commonly used to;

• Deploy applications and API that can have anywhere from a


single compute instance to thousands of instances on top of
an auto-scalable infrastructure.
• Build applications using an integrated development
environment (IDE) with native support for Visual Studio
Azure SDK, Java, PHP, Python and more.
• Deliver a fully managed and fault tolerant hardware/server
infrastructure for web and cloud applications
• Provides a staging environment for testing the application
before deploying it into the production environment.

CT071-3-3-DDAC Cloud Services Slide 11 of 39


What to monitor in Azure Cloud
Services for performance?
There can be dozens of metrics that must be measured on
Azure Cloud Services to ensure top performance. However,
some of the key performance metrics for Azure Cloud
Services are;

• CPU Utilization and Availability ( capacity)


• Data In / Out
• Memory Utilization and Availability (capacity)
• Disk Utilization and Availability (capacity)
• Application level performance / utilization metrics.

CT071-3-3-DDAC Cloud Services Slide 12 of 39


CT071-3-3-DDAC Cloud Services Slide 13 of 39
What Can It Run?

CT071-3-3-DDAC Cloud Services Slide 14 of 39


CT071-3-3-DDAC Cloud Services Slide 15 of 39
Roles and Instances

CT071-3-3-DDAC Cloud Services Slide 16 of 39


Service Package, a .cspkg file

<nameOfyourCloudService>.cloudapp.net

CT071-3-3-DDAC Cloud Services Slide 17 of 39


Information on how you’ll be connecting to a database,
Table Storage, an API and other configurable items.

Advanced that “web.config”

CT071-3-3-DDAC Cloud Services Slide 18 of 39


Service Definition (*.csdef)
Service Configuration (*.cscfg)

Encrypted(Zipped(Code + *.csdef)) == *.cspkg

CT071-3-3-DDAC Cloud Services Slide 19 of 39


Service Definition

CT071-3-3-DDAC Cloud Services Slide 20 of 39


Service Definition

CT071-3-3-DDAC Cloud Services Slide 21 of 39


Service Configuration

CT071-3-3-DDAC Cloud Services Slide 22 of 39


Service Configuration
• <?xml version="1.0"?>
• <ServiceConfiguration serviceName="WebDeploy"
xmlns="http://schemas.microsoft.com/serviceHosting/2008/10ServiceConfiguration">
• <Role name="Webux">
• <Instances count="1"/>
• <ConfigurationSettings>
• <Setting name="DiagnosticsConnectionString" value="UseDevelopmentStorage=true/>
• <Setting name="Microsoft.WindowsAzure.plugins.RemoteAccess.Enabled" value="True"/>
• <Setting name="Microsoft.WindowsAzure.plugins.RemoteAccess.AccountUsername"
value="dunnry"/>
• <Setting name="Microsoft.WindowsAzure.plugins.RemoteAccess.AccountEncryptedPassword"
value="MIIBrAYJKoZIhvcNAQcDoIIB"/>
• <Setting name="Microsoft.WindowsAzure.plugins.RemoteAccess.AccountExpiration"
value="2010-12-23T23:59:59.0000000-07"/>
• <Setting name="Microsoft.Windows Azure.Plugins.RemoteForwarder.Enabled" value="True"/>
• <ConfigurationSettings>
• <Certificate>
• <Certificates name="Microsoft.WindowsAzure.Plugins.remoteAccess.PasswordEncryption"
thumbprint="D6BE55AC439FAC6CBEBAF"/>
• </Certificate>
• </Role>
• </ServiceConfiguration>

CT071-3-3-DDAC Cloud Services Slide 23 of 39


CT071-3-3-DDAC Cloud Services Slide 24 of 39
Microsoft Azure for .Net
Developers

CT071-3-3-DDAC Cloud Services Slide 25 of 39


CT071-3-3-DDAC Cloud Services Slide 26 of 39
CT071-3-3-DDAC Cloud Services Slide 27 of 39
Supports Various VM Sizes
Size set on Role in Service Definition - All instances of role will be of equal size
Service can have multiple roles
Balance of Performance per node vs. High Availability from multiple nodes

CT071-3-3-DDAC Cloud Services Slide 28 of 39


CT071-3-3-DDAC Cloud Services Slide 29 of 39
Load-balanced endpoint. Stable VIP per service.
Single port per endpoint.
Supported protocols: HTTP, HTTPS, TCP, UDP

Instance-to-instance communication
Supported protocols: HTTP, TCP, UDP
Port range supported

Address specific service role instance


Supported protocols: TCP, UDP

CT071-3-3-DDAC Cloud Services Slide 30 of 39


Microsoft Azure-provided DNS service for service-level name resolution
Runtime APIs for instance identification
Bring your own DNS server

Define load balance endpoint sets


Define custom load balance probe

Load-balancing based on performance, round-robin, or failover

CT071-3-3-DDAC Cloud Services Slide 31 of 39


Uses Staging and Production environments
Allows to quickly swap environments
Production: v1  Staging: v2, after swap then Production: v2  Staging: v1

Performs a rolling upgrade on live service


Entire service or a single role
Manual or Automatic across update domains
Cannot change Service Model

CT071-3-3-DDAC Cloud Services Slide 32 of 39


VIP Swap

CT071-3-3-DDAC Cloud Services Slide 33 of 39


Imperatively at Start time
Remotely any time
Configuration is saved in Storage

User can set a quota (FIFO)

Scheduled
On Demand

CT071-3-3-DDAC Cloud Services Slide 34 of 39


DiagnosticMonitorTraceListener

Event Logs
Performance Counters
Trace/Debug information (logging)
IIS Logs, Failed Request Logs
Crash Dumps or Arbitrary files

Transferred into your table and/or blob storage

CT071-3-3-DDAC Cloud Services Slide 35 of 39


Quick Review Question

• Explain what the difference between Roles


and Instances.

• Explain how a Web Role extends the


standard worker role

• Explain how and why to change the VM


Size for a Windows Azure role

CT071-3-3-DDAC Cloud Services Slide 36 of 39


Summary of Main Teaching Points

CT071-3-3-DDAC Cloud Services Slide 37 of 39


Question and Answer Session

Q&A

CT071-3-3-DDAC Cloud Services Slide 38 of 39


What we will cover next

• Infastructure As A Service

CT071-3-3-DDAC Cloud Services Slide 39 of 39

Vous aimerez peut-être aussi