Introduction to PaaS and IaaS Cloud Computing Roberto Beraldi - - PowerPoint PPT Presentation
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
Models for Cloud Computing
(IaaS) Infrastructure as a Service (SaaS)Software as a Service XaaS (PaaS) Platform as a Service
Models for cloud computing
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
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)
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.
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
Cloud actors
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)
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…
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
GAE console
Lots of service
- Compute
– App Engine – VM
- Storage
– BigTable – SQL – Datastore
- Operations
– Monitoring – Debugging – Etc.
- Tools
– Deployment Manager – Development
- Big Data
SDK
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
GAE: supported language
- Java
– JVM, Java servlet, … – SDK Eclipse extension
- Python
– Standard library (without ‘unsecure’ calls)
- Go
- PHP (new)
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)
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
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
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 .
Dashboard
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
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
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 . .
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
Appication modules instances
GAE and mobile apps
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
OpenShift: basic System components
Subscription plan
Example: create and application
GEAR CLIENT git to pull git commit
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
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/
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
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 – …
INFRASTRUCTURE AS A SERVICE
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
CC: Virtual computing power
CPU cycles Storage Memory
Provider Utilization
Virtual machine control panel User decides the size on the VM…
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
IaaS: deployment models
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
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.
Isolation
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.
Application mobility
HW consolidation
- Virtualization makes it possible to consolidate
individual workloads onto a single physical platform, reducing the total cost of ownership.
Interface of a computing system
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)
Emulation
- HW emulation:
– ISA is different from real CPU
- Sparc emulates IA32
– Installation of different OS
- Language specific VM
– JVM – CLR
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
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
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.
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
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)
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
Type-1 hypervisor (bare metal)
- Guest OS runs unchanged
- Used to build a “Hardware Server” (cloud computing)
- Hyper-V(Microsoft) , VMWare’s ESX
Type-2 hypervisor (hosted)
- Runs on top of a Hosting OS
- Often used on clients
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
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
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.
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.
VIM and hypervisor
physical servers
Hypervisor Hypervisor Hypervisor
VIM
Virtualization platform Virtual server
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
Example: automated scaling
VIM hypervisor hypervisor
Physical server 1 Physical server 2
Automated scale listener
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
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.
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)
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
Current offer
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.
Price (depends on the location)
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/
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.
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
Mobile Cloud Computing
- Exploiting ‘cloud’ approach to boost the
performance of an application, reduce the energy consumption, increase the computation power
- Example: ‘CloneCloud’