Introduction to PaaS and IaaS Cloud Computing Roberto Beraldi - - PowerPoint PPT Presentation

introduction to paas and iaas cloud computing
SMART_READER_LITE
LIVE PREVIEW

Introduction to PaaS and IaaS Cloud Computing Roberto Beraldi - - PowerPoint PPT Presentation

Introduction to PaaS and IaaS Cloud Computing Roberto Beraldi Models for Cloud Computing (SaaS)Software as a Service XaaS (PaaS) Platform as a Service (IaaS) Infrastructure as a Service Models for cloud computing CC in a nutshell Cloud


slide-1
SLIDE 1

Introduction to PaaS and IaaS Cloud Computing

Roberto Beraldi

slide-2
SLIDE 2

Models for Cloud Computing

(IaaS) Infrastructure as a Service (SaaS)Software as a Service XaaS (PaaS) Platform as a Service

slide-3
SLIDE 3

Models for cloud computing

slide-4
SLIDE 4

CC in a nutshell

  • Cloud computing is a way to use Information

Technology infrastructures without the need to install specific HW related to the infrastructures being used.

  • IT infrastructure can be as simple as a single raw

virtual machine, … … more abstract as a sw platform used to develop and running applications on several machines, …or a sw application

slide-5
SLIDE 5

What CC can provide?

  • Infrastructure
  • Platform
  • Software
  • API
  • STorage
  • X

as a service (IaaS) as a service (PaaS) as a service (SaaS) as a service (APIaaS) as a service (STaaS) as a service (XaaS)

slide-6
SLIDE 6

Main characteristics of CC

  • Pay-per-use

– no ongoing commitment, utility prices

  • Elastic capacity and the illusion of infinite resources
  • Multitentancy

– Same instance of an application to serve multiple clients

  • Resources that are abstracted or virtualized Resources

provided as a Service and with a self-service Interface

– provides users the ability to upload, build, deploy, schedule, manage, and report on their business services

  • n demand.
slide-7
SLIDE 7

Factors enabling cloud computing

Hardware

HW virtualization Multi-core chips

Internet Technologies Distributed Computing

Web 2.0 Web Services Mashups SoA Utility computing Grid Computing ..

System Management

Autonomic Computing Data Center Automation

Cloud computing

slide-8
SLIDE 8

Cloud actors

slide-9
SLIDE 9

Platform as a Service

  • A cloud platform offering an environment on

which developers create and deploy applications

– E.g., decide the size of the VM, where they are located, etc.

  • Different Programming Languages

– PHP – Java – Ruby

  • Different DB
  • Web based console to create application (with

dashboard)

slide-10
SLIDE 10

Platform as a Service

  • Developers can use an IDE to develop the

application and use either an SDK or CLI to deploy the application

  • Impact on the programming model
  • Main players:

– Google’s app engine, OpenShift, Windows Azure, and many more…

slide-11
SLIDE 11

PaaS – example: GAE

  • Cloud service for running web applications on the

Google data center

  • GAE is one of the most interesting and complete

PaaS

– Simple configuration – Transparent scalability

  • “infinite” number of applications, req/sec storage

– Security

  • All applications run inside a sandbox, do not have direct access to

file system, cannot open other connections

  • Different programming languages
slide-12
SLIDE 12

GAE console

slide-13
SLIDE 13

Lots of service

  • Compute

– App Engine – VM

  • Storage

– BigTable – SQL – Datastore

  • Operations

– Monitoring – Debugging – Etc.

  • Tools

– Deployment Manager – Development

  • Big Data
slide-14
SLIDE 14

SDK

slide-15
SLIDE 15

GAE architecture

  • Google App Engine speaks with web applications

through the Web Server Gateway Interface (WSGI) standard protocol

  • App Engine and SDK includes the webapp2

framework that implements WSGI

WEB App HTTP Requests WEB Server WSGI Protocol

slide-16
SLIDE 16

GAE: supported language

  • Java

– JVM, Java servlet, … – SDK Eclipse extension

  • Python

– Standard library (without ‘unsecure’ calls)

  • Go
  • PHP (new)
slide-17
SLIDE 17

LAB: Hello Word in GAE

  • What we need:

– Google account – GAE registration

  • Plafond free (10 app)

– Register a new application

  • The application ID will be used to deploy the

application

– SDK – Use the language

  • Python 2.7 (no support for 3.x)
slide-18
SLIDE 18

Hello Word in GAE

helloworld.py app.yaml Code Conf Simulator “Google Cloud” Deploy Web-based Admin console Step 1 Step 3 Step 2 Step 4

slide-19
SLIDE 19

Hello Word in GAE

  • Define a handler for the HTTP requests as a class that extends

webapp2.RequestHandler class (MainPage)

– Attributes : response, request (instance of class Request, Response) – Methods: get,post, etc.. (to override)

  • Map HTTP get request to get method (also post, put, etc..)
  • Write data to HTTP response through self.response
  • app is a global name that must assigned to the application

helloworld.py Code Step 1

slide-20
SLIDE 20

app.yaml Conf “Google Cloud” Deploy Web-based Admin console Step 3 Step 4

  • An application name helloword must be registered with the

google engine

– helloworld.appspot.com

appcfg.py update .

slide-21
SLIDE 21

Dashboard

slide-22
SLIDE 22

GAE architecture (simplified view)

App Eng Front End App Eng Front End App Eng Front End App Server Load Balancer App Server App Server API layer APP APP APP

Other Google Service

HTTP Requests

slide-23
SLIDE 23

Python GAE architecture

Python VM Standard Lib App Read-only File system

Source: Google App Engine – Guido van Rossum

REQ/REP DATASTORE MEMCACHE BigTable URLfetch mail images Services Sandbox CGI

slide-24
SLIDE 24

Python GAE architecture (scaling)

Python VM Standard Lib App Read-only File system

Source: Google App Engine – Guido van Rossum

REQ/REP DATASTORE MEMCACHE BigTable URLfetch mail images Services Sandbox CGI . .

slide-25
SLIDE 25

Example: PHP

  • an app that handles customer requests might

include separate modules to handle other tasks, such as:

– API requests from mobile devices – Internal, admin-like requests – Backend processing such as billing pipelines and data analysis

slide-26
SLIDE 26

Appication modules instances

slide-27
SLIDE 27

GAE and mobile apps

slide-28
SLIDE 28

OpenShift

  • OpenShift Online by Red Hat is a Platform as a Service (PaaS) that provides

developers and IT organizations with an auto-scaling, cloud application platform for deploying new applications on secure, scalable resources with minimal configuration and management overhead.

  • Languages

– Java, Ruby, and PHP. Integrated developer tools, such as Eclipse integration, JBoss Developer Studio, and Jenkins, support the application life cycle.

  • Database

– MySQL, PostgreSQL, MongoDB, and SQLite.

  • OpenShift Online provides disk space, CPU resources, memory,

network connectivity, and an Apache or JBoss server to create, deploy, and manage applications in the cloud.

  • Management web console
  • CLI, very powerful for coding debugging etc

Source: online documentation

slide-29
SLIDE 29

OpenShift: basic System components

slide-30
SLIDE 30

Subscription plan

slide-31
SLIDE 31

Example: create and application

GEAR CLIENT git to pull git commit

slide-32
SLIDE 32

PaaS example2: Windows Azure

  • It is a set of integrated cloud technologies each

providing a specific set of services to application developers

  • Windows Azure provides developer-accessible

services for creating applications

  • Strongly integrated with Visual studio

– Development fabric simulator – Development storage simulator

slide-33
SLIDE 33

Windows azure

  • Two execution models for applications

– Web hosting: Web Site – PaaS: Cloud Service

  • IaaS: Virtual Machines

http://www.windowsazure.com/en-us/develop/net/fundamentals/intro-to-windows-azure/

slide-34
SLIDE 34

Deployement

Web Portal

  • 1. Register (Live-id)

Conf

(n.inst. =3)

Fabric Controller Service .cspkg Service Service Service

  • 2. Create Hosted-Service

http://xxxx.cloudapp.net

  • 3. Package upload

.csconf + .cspkg

slide-35
SLIDE 35

Microsoft azure

  • Lots of services are added during the years

– Computation

  • VM,Cloud Services,Batch,RemoteApp

– Web and mobile device

  • Backend for mobile app

– Data and storage – Data analysis

  • Machine learning

– Internet of Things – …

slide-36
SLIDE 36

INFRASTRUCTURE AS A SERVICE

slide-37
SLIDE 37

Cloud computing in a nutshell (by an analogy)

  • Electricity is “virtual” entity

– (many sources, we do not care from where we receive it,…)

  • “Pay-as-you-go”

– Elastic

Production Distribution Utilization

slide-38
SLIDE 38

CC: Virtual computing power

CPU cycles Storage Memory

Provider Utilization

Virtual machine control panel User decides the size on the VM…

slide-39
SLIDE 39

IaaS

  • A cloud infrastructure enables on-demand provisioning of

servers running several choices of operating systems and a customized software stack.

  • Cloud computing services are usually backed by large-scale

data centers composed of thousands of computers.

  • Such data centers are built to serve many users and host

many disparate applications.

  • Offers virtualized resources (computation, storage, and

communication) on demand

slide-40
SLIDE 40

IaaS: deployment models

slide-41
SLIDE 41

Virtualization, main idea

  • Memory:

– Virtual Memory (>=Physical memory)

  • Multitasking:

– Several processes concurrently on the same HW, see the same

  • ISA. HW is shared thanks to an OS than manages critical

instructions.

  • Virtual Machine:

– ‘60 from IBM on mainframes – Abandoned with the advent of PCs, now again used for cloud computing – Even different ISA on the same CPU – Used to run different OS (not processes) – Achieved through a Virtual Machine Monitor

slide-42
SLIDE 42

Isolation

  • Through virtualization, workload isolation is

achieved since all program instructions are fully confined inside a VM, which leads to improvements in security.

  • Better reliability is also achieved because

software failures inside one VM do not affect

  • thers.
  • Moreover, better performance control is attained

since execution of one VM should not affect the performance of another VM.

slide-43
SLIDE 43

Isolation

slide-44
SLIDE 44

Application mobility

  • Workload migration, also referred to as application

mobility, targets at facilitating hardware maintenance, load balancing, fault tolerance and disaster recovery.

  • It is done by encapsulating a guest OS state within a

VM and allowing it to be suspended, fully serialized, migrated to a different platform, and resumed immediately or preserved to be restored at a later date.

  • A VM’s state includes a full disk or partition image,

configuration files, and an image of its RAM.

slide-45
SLIDE 45

Application mobility

slide-46
SLIDE 46

HW consolidation

  • Virtualization makes it possible to consolidate

individual workloads onto a single physical platform, reducing the total cost of ownership.

slide-47
SLIDE 47

Interface of a computing system

slide-48
SLIDE 48

Virtual Machine

  • Virtual Machine is a logic machine (ML) whose ISA is

implemented exploiting software running on a physical machine (MF)

  • Two main types:

– Native. ML=MF

  • Same ISA. Indeed instructions of the MF are in large part executed
  • n the real CPU. Sensitive instruction are trapped.

– Emulation ML≠MF (different ISA)

  • HW emulation
  • Language level emulation (java)
slide-49
SLIDE 49

Emulation

  • HW emulation:

– ISA is different from real CPU

  • Sparc emulates IA32

– Installation of different OS

  • Language specific VM

– JVM – CLR

slide-50
SLIDE 50

Native emulation Virtual machine

  • Same machine as the physical machine

“Efficient, isolated duplicate of a real machine”)

  • Virtualization is realized by a Virtual Machine

Monitor (VMM) o hypervisor

slide-51
SLIDE 51

Native emulation

  • Full virtualization

– OS without modification (e.g., VMWare’s ESX, ESXi) – OS legacy

  • Para virtualization

– OS must be modified (e.g., Open source’s XEN) – Higher efficiency

slide-52
SLIDE 52

Resources

  • Xen and the Art of Virtualization, Pratt et al. SOSP

2003.

  • The Architecture of Virtual Machines, Smith, J.E.; R.

Nair, IEEE Computer, May 2005, Volume: 38 , Issue: 5

  • A Comparison of Software and Hardware Techniques

for x86 Virtualization, K. Adams, O. Agesen. ASPLOS 2006.

slide-53
SLIDE 53

Classical virtualization

  • “A classical VMM executes guest operating system

directly, but at a reduced privileged level. The VMM intercepts traps from the de-privileged guest, and emulates the trapping instruction against a virtual machine state”[*] [*]”A camparison of Software and Hardware Techniques for x86 Virtualization”, K.Adams, O.Agesen, ASPLOS 2006

slide-54
SLIDE 54

Classical virtualization, esempio

1 3 4 5 Guest OS

Not privileged instruction

green= User Mode red= System Mode

Privileged instruction e.g.. CLI, Clear Interrupts

2 trap VMM time

2’

User level Kernel level

  • a. CPU executes a kernel

instruction of the Guest OS while being in user mode

  • b. CPU generates a trap

c. Control passes to the VMM that emulates the instruction

  • d. 2’ is different of 2, but is

produces the same effect ( (for example, CLIVCPU.IF=0)

slide-55
SLIDE 55

Hw virtualizazion

Hardware virtualization allows running multiple operating systems and software stacks on a single physical platform. The virtual machine monitor (VMM), hypervisor, mediates access to the physical hardware presenting to each guest operating system a virtual machine (VM), which is a set of virtual platform interfaces

slide-56
SLIDE 56

Type-1 hypervisor (bare metal)

  • Guest OS runs unchanged
  • Used to build a “Hardware Server” (cloud computing)
  • Hyper-V(Microsoft) , VMWare’s ESX
slide-57
SLIDE 57

Type-2 hypervisor (hosted)

  • Runs on top of a Hosting OS
  • Often used on clients
slide-58
SLIDE 58

Example of VMM: Virtual Box

  • It usually runs on Desktop computers
  • VMM runs as an application hosted by an OS
  • Lower performance, easy to install VM
slide-59
SLIDE 59

HW assisted virtualization

  • Processors are designed to help virtualization
  • For example, Intel-VT and AMD-V provide

additional instructions that help virtualization

  • Hypervisors can use these instructions to

improve the performance

– Linux KVM, Microsoft Hyper-V, Microsoft Virtual PC, Xen, etc. use these features

slide-60
SLIDE 60

IaaS provider’s point of view

  • A key challenge IaaS providers face when

building a cloud infrastructure is managing physical and virtual resources, namely servers, storage, and networks, in a holistic fashion.

  • The orchestration of resources must be

performed in a way to rapidly and dynamically provision resources to applications.

slide-61
SLIDE 61

IaaS provider’s point of view

  • The software toolkit responsible for this
  • rchestration is called a virtual infrastructure

manager (VIM).

  • This type of software resembles a traditional
  • perating system (“cloud operating system”)—

but instead of dealing with a single computer, it aggregates resources from multiple computers, presenting a uniform view to user and applications.

slide-62
SLIDE 62

VIM and hypervisor

physical servers

Hypervisor Hypervisor Hypervisor

VIM

Virtualization platform Virtual server

slide-63
SLIDE 63

Automated scaling

VIM hypervisor hypervisor

1)User request a new VM That joins the existing 3 VM

1 2

2) VIM allocates the new VM

3

3) User increases the load request

4

Usage and administrator portal Physical server 1 Physical server 2

Automated scale listener

slide-64
SLIDE 64

Example: automated scaling

VIM hypervisor hypervisor

Physical server 1 Physical server 2

Automated scale listener

slide-65
SLIDE 65

Example: OpenNebula

  • Interface to Public Clouds: it offers a driver to

manage the life cycle of virtualized resources

  • btained from external cloud providers.
  • In case of spikes in demand, extra load can be
  • ffloaded to rented resources. To the

applications, the use of leased resources must ideally be transparent

slide-66
SLIDE 66

Example: OpenStack

OpenStack is a cloud operating system that controls large pools of compute, storage, and networking resources throughout a datacenter, all managed through a dashboard that gives administrators control while empowering their users to provision resources through a web interface.

slide-67
SLIDE 67

Example of IaaS

  • Windows azure

– Different machine with different size and OS – Different geographical region where the machine is located – Free trial (requires registration with VISA)

slide-68
SLIDE 68
slide-69
SLIDE 69
slide-70
SLIDE 70
slide-71
SLIDE 71
slide-72
SLIDE 72
slide-73
SLIDE 73

Main Amazon Web Service offering

  • Elastic Cloud Computing (EC2)

– Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable compute capacity in the cloud.

  • Amazon Simple Storage Service (Amazon S3)

– Amazon S3 provides a simple web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web.

  • Amazon Simple Queue Service (Amazon SQS)

– offers a reliable, highly scalable hosted queue for storing messages as they travel between computers

slide-74
SLIDE 74

Current offer

slide-75
SLIDE 75

Amazon Web Services (EC2)

  • Rich set of VM
  • General purpose

– baseline level of CPU performance with the ability to burst above the baseline

  • Compute Optimized, GPU, etc…
  • Reserved Instance

– Amazon EC2 Reserved Instances allow to reserve Amazon EC2 computing capacity for 1 or 3 years

  • Dedicated Instance

– run in a VPC (Virtual Private Cloud) on hardware that's dedicated to a single customer.

  • Cluster networking
  • Spot Instance

– allow to bid on spare Amazon EC2 computing capacity.

slide-76
SLIDE 76

Price (depends on the location)

slide-77
SLIDE 77

Microsoft Azure vs Amazon AWS

  • Short story: AWS is superior to Windows

Azure

  • Long story: see

– http://www.computerworlduk.com/it- vendors/microsoft-azure-vs-amazon-aws-public- cloud-comparison-which-cloud-is-best-for- enterprise-3624848/

slide-78
SLIDE 78

New trends: Containers

Each virtual machine includes the application, the necessary binaries and libraries and an entire guest operating system - all of which may be tens of GBs in size.

slide-79
SLIDE 79

Containers

Containers include the application and all of its dependencies, but share the kernel with

  • ther containers. They

run as an isolated process in userspace on the host operating system. Same OS! Runs only on Linux Much faster

slide-80
SLIDE 80

Mobile Cloud Computing

  • Exploiting ‘cloud’ approach to boost the

performance of an application, reduce the energy consumption, increase the computation power

  • Example: ‘CloneCloud’

– The system is a flexible application partitioner and execution runtime that enables unmodified mobile applications running in an application-level virtual machine to seamlessly off-load part of their execution from mobile devices onto device clones operating in a computational cloud.

slide-81
SLIDE 81

CloneCloud: main idea

slide-82
SLIDE 82

Mobile-to-mobile offloading

slide-83
SLIDE 83

Questions?