Cloud Computing
1
Adam Barker
Overview
•
Introduction to Cloud computing•
Enabling technologies•
Different types of cloud: IaaS, PaaS and SaaS•
Cloud terminology•
Interacting with a cloud: management consoles•
Launching an instance•
Connecting to an instance•
Running your application•
Clouds / Constraints2
Cloud Computing
•
Cloud computing provides resizable computing capacity that enables users to build and hostapplications in a data centre
•
Cloud computing characteristics•
Computing as a utility•
Pay-per-use (no commitment, utility prices)•
Elastic capacity - resources can scale up/down on demand•
Self service interface•
Resources are abstracted / virtualised3
Cloud Computing
•
To application developers clouds offer:•
No upfront infrastructure investment•
Reduced operating cost through utility pricing•
Elastic on-demand architecture•
High service availability4
Cloud Computing
•
To providers clouds offer:•
The opportunity to exploit existing data-centre capacity•
The opportunity to take advantage of theeconomies of scale available to purchasers of extremely large volumes of hardware and
network capacity.
5
Enabling Technologies
•
A combination of technologies matured at the same time to enable Cloud computing•
Virtual machines•
Isolated (self contained) guest operating system installation running within a host operating system•
Multiple isolated OS environments can co-exist on the same computer•
Java Virtual Machine (JVM)•
VMWare, XenSource6
Enabling Technologies
•
Virtualised storage•
Pooling of physical storage from multiplenetwork storage devices into what appears to be a single device, managed centrally
•
Google File System (GFS)•
Hadoop Distributed File System (HDFS)•
Web services•
WS - * / REST7
Cloud Types
•
Resources can be provisioned at different levels of abstraction from the user•
Infrastructure as a Service (IaaS)•
delivers raw computer infrastructure as a service, typically through platformvirtualisation
•
vendors manage networking, hard drives, virtualisation, operating system etc.•
Amazon Web Services is an example8
Cloud Types
•
Platform as a Service (PaaS)•
delivers an application framework as a service•
hosted framework for applications•
Windows Azure is an example•
Software a Service (SaaS)•
delivers applications as a service•
Google Mail is an example9
Infrastructure as a Service (IaaS)
10
Applications
Data
Runtime
Middleware
O/S
Virtualisation
Servers
Storage
Networking
You manage
Managed by Vendor
Platform as a Service (PaaS)
11
Applications
Data
Runtime
Middleware
O/S
Virtualisation
Servers
Storage
Networking
You manage
Managed by Vendor
Software as a Service (SaaS)
12
Applications
Data
Runtime
Middleware
O/S
Virtualisation
Servers
Storage
Networking
Managed by Vendor
Terminology
13
Terminology
•
Amazon Web Services (AWS) Infrastructure as a Service (IaaS) cloud as an exemplar Cloudenvironment
•
Many other vendors supply cloud services and this presentation is not endorsed by Amazon14
Terminology: Machine Images
•
Machine Images: a template that contains asoftware configuration, e.g., an operating system, application server and applications
•
On the Amazon stack these are called an Amazon Machine Image (AMI)•
From an AMI you launch instances, which are running copies of the AMI15
Terminology: Instances
•
From a Machine Image you can launch different instance types•
Instance types are essentially a hardware archetype•
Users select an instance type based on the amount of memory and computing power16
Instance Types
17
Instance Types
18
Instance Types
19
Terminology: Regions
•
Instances can be deployed into different areas of the world (e.g., North America, Europe, Asia etc.)•
Amazon calls these different locations Regions•
Each Region contains multiple Availability Zones•
Availability Zones are isolated from one another and provide low latency network connectivity to other zones in the same region20
21
Regions, Availability Zones
Elastic Compute Cloud (EC2)
•
Amazon Elastic Compute Cloud (EC2) is a service that provides resizable computing capacity inAmazon's data centres
•
enables users to manage Linux/UNIX and Windows server instances•
can be used to build and host software systems•
In order to use Amazon EC2 users require an AWS account•
associated with each account is a credit card such that services can be paid for using the pay-per-use charging model22
Simple Storage Service (S3)
•
When using EC2 you may need to store data•
The Amazon Simple Storage Service (S3) can be used to store and retrieve large quantities of data•
S3 stores data as objects within buckets•
An object is comprised of a file and optionally any metadata that describes that file•
Users upload a file they want to store to a bucket, once uploaded they can set permissions and add any relevant metadata23
24
Interacting with a Cloud:
Management Consoles
Management Consoles
•
The simplest way of interacting with cloud resources is through a management console•
Management consoles provide a Web-basedgraphical user interface to hosted cloud services
25
26
AWS Management Console
•
The AWS Management Console provides a simple point and click interface to Cloud resourcesLaunching an Instance
•
Instances can be launched via the AWS Management Console•
Once launched the instance will be live and begin incurring usage fees immediately•
Once an instance is running you will be charged per hour of use•
Instances are packaged as instance types: a specification that defines the memory, CPU,storage capacity, and hourly cost for an instance
•
Instance types are grouped more broadly intogeneral families and can be launched with a Linux or Windows Operating System
27
Amazon Instance Families
•
Standard: have memory-to-cpu ratios suitable for most general purpose applications•
Micro: provide a small amount of consistent CPU resources and allow you to burst CPU capacitywhen additional cycles are available. Well suited for web sites that consume significant compute cycles periodically
•
High-CPU: have proportionally more CPUresources than memory (RAM), well suited for compute intensive applications
28
Amazon Instance Families
•
High memory: have proportionally more memory resources and are well suited for high throughput applications, such as database and memorycaching applications
•
Cluster compute: have a very large amount of CPU coupled with increased networkingperformance, making them well suited for High Performance Computing (HPC) applications
•
Cluster GPU: provide general purpose graphicsprocessing units (GPUs), with proportionally high CPU and increased network performance for
applications that benefit from parallel processing
29
Launching an Instance
•
First select the Amazon Machine Image (AMI) type; this specifies the Operating System and packaged software that will be initialised•
After the AMI has been selected you need to configure the instance details•
Number of instances to launch•
Availability zone: which physical data centre your instance will be deployed into•
Instance type: micro, small, large etc.30
Launching an Instance
31
Launching an Instance
•
Configuring security•
Key pair is a security credential similar to apassword which you use to securely connect to your instance after it is running
•
You will be required to name your key pair which consists of a public and a private key•
The private key should be saved as a .pem file onto a secure location on your desktop•
A security group defines firewall rules for your instances; these rules specify which incoming network traffic should be delivered32
Launching an Instance
33
Launching an Instance
•
Once launched your instance will be running on one of the Amazon data centres•
It will be assigned a public DNS name34
Connecting to an Instance
•
Use this public DNS name to connect to your running instance in the cloud via SSH•
Use the private key which was generated earlier as an argument to the command•
ssh -i GSG_Keypair.pem ec2-[email protected] ws.com
•
You're now logged in as ec2-user and can work with the instance like you would any normalserver
35
Connecting to an Instance
36
Running your application
•
Amazon Web Services is an IaaS cloud provider•
Amazon give you root access to that instance•
You can therefore install relevant packages, code and data in order to run your application37
Programming Libraries
•
Cloud providers commonly provide language specific programming libraries•
These libraries remove the complexity fromcoding directly against a Web service interface
•
Provide a more abstract interface•
Hides the low-level plumbing including authentication, error handling etc.•
Provide much of the same functionality•
Calls to services are still sent over SOAP it’s just hidden from the end-user38
Programming Libraries
•
Amazon Web Services (AWS) provide a Software Development Kit (SDK) for (amongst others) the following languages:•
Java•
.NET•
PHP•
Android•
iOS39