Outline •  What is Cloud Computing? •  Cloud Service and Deployment Models

Introduction to CLOUD COMPUTING and OPENSTACK

•  Virtualization •  OpenStack

Luis Tomás Department of Computing Science Umeå University, Sweden

2

Outline

What is cloud computing? •  What is cloud computing in plain English

•  What is Cloud Computing?

–  https://www.youtube.com/watch? v=QJncFirhjPg

•  Cloud Service and Deployment Models •  Virtualization •  OpenStack

3

4

What is cloud computing?

What is cloud computing?

•  Wikipedia:

Many more definitions

–  “the delivery of computing as a service rather than a product, whereby shared resources, software, and information are provided to computers and other devices as a utility (like the electricity grid) over a network (typically the Internet)”

•  A break in the clouds: –  “Clouds are a large pool of easily usable and accessible virtualized resources (such as hardware, development platforms and/or services). These resources can be dynamically reconfigured to adjust to a variable load (scale), allowing also for an optimum resource utilization. This pool of resources is typically exploited by a pay-peruse model in which guarantees are offered by the Infrastructure Provider by means of customized SLAs” 5

6

What is cloud computing?

What is cloud computing?

Many more definitions

Many more definitions

•  Above the clouds (Berkeley report):

•  NIST:

–  “Cloud Computing refers to both the applications delivered as services over the Internet and the hardware and systems software in the datacenters that provide those services. The services themselves have long been referred to as Software as a Service (SaaS). The datacenter hardware and software is what we will call a Cloud. When a Cloud is made available in a pay-as-you-go manner to the general public, we call it a Public Cloud; the service being sold is Utility Computing”

–  “Cloud computing is a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction”

7

8

Similar trends in history

Similar trends in history •  Utility computing (1960’s) –  “Computing may someday be organized as a public utility just as the telephone system” –  Too slow computers and networks

•  Sounds familiar? –  Utility computing –  Service-Oriented Architectures (SOAs) –  Grid computing

•  SOAs (1980’s) –  Software development through composition of services –  Hard to define suitable & reusable services

•  Grid computing (1990’s)

9

What’s new with clouds then?

Critical performance + cost efficiency •  Extremely rapid growth (from global scale) •  Regular/planned peaks •  Unexpected peaks

–  Fast networks enabled remote resource connection and collaboration –  Complex administration, security hierarchies (multiple user domains)

10

What’s new with clouds then?

Critical performance + cost efficiency •  Extremely rapid growth (from global scale) –  YouTube (16 months) 100M/movies per day, 20M unique users per month –  AppStore (19 months): Over 100000 Iphone programs, over 3 billion downloads

•  Regional aspects in usage patters

11

12

What’s new with clouds then?

What’s new with clouds then?

•  Regular/planned peaks

•  Unexpected peaks

Critical performance + cost efficiency –  Banks, tax filing –  Market campaign effects

Critical performance + cost efficiency –  News related video streaming –  Stock trading peaks at financial crises

•  Christmas

•  Regional aspects in usage patters –  Regional concerns (news, events, etc) –  Time- dependent usage-patterns

13

14

Solution: novel data centers (cloud infrastructures)

Overprovisioning vs elasticity

•  Traditionally (Pre-cloud):

•  “Successful” overprovisioning

–  Manage peak loads by hosting ”too much” hardware (overprovisioning)

•  Not that successful overprovisioning

•  Today (cloud): –  Elastic data center infrastructure adjusting capacity to peaks/lows in load

•  Elastic provisioning

15

NIST: 5 Properties 1.  On-demand self-service –  Users can access as needed automatically –  No human interaction with each service provider

2.  Broad network access –  –  – 

Available over the network (Internet or Intranet) Accessed through standard mechanisms Heterogeneous (thin or thick) client platforms

3.  Resource pooling –  Multi-tenancy: One provider servers multiple consumers –  Location independence for consumers

16

Outline •  What is Cloud Computing? •  Cloud Service and Deployment Models •  Virtualization •  OpenStack

4.  Rapid elasticity –  Capacity can be elastically provisioned and released (scale up or scale down) upon demand –  Capacity appears to be unlimited to users –  Automatic elasticity?

5.  Measured service –  Pay for what you use: CPU/h, storage/GB, network/GB, etc. –  Metering, accounting, and billing (measure usage + charge)

18

Deployment models •  Private cloud (“my stuff”) –  Institution resources managed in a “Cloudlike” fashion

•  Community cloud (“our stuff”) –  Share resources among institutions

•  Public cloud (“anyone's stuff”) –  Resources to rent by anybody with a credit card

•  Hybrid cloud –  A combination of the above

19

20

Infrastructure as a Service (IaaS)

Cloud Service Model •  SaaS: Software as a Service

•  Raw infrastructure capacity to users

–  Ready to use applications –  E.g.: Gmail, Google Docs, YouTube, Facebook

–  Computing/Processing •  Most often in terms in Virtual Machines

–  Storage

•  PaaS: Platform as a Service

•  Disk or more tailored solutions

–  Ready to use tools –  E.g.: Google Apps Engine, OpenShift

–  Networks •  For interconnecting other resources + externally

•  IaaS: Infrastructure as a Service

•  The user can deploy arbitrary applications

–  Fundamental computing resources –  E.g., Amazon EC2, Amazon S3, Windows Azure

–  Choose your operating system, programming language, runtime environment, etc.

•  User does not control cloud infrastructure –  But controls operating systems, storage, and deployed applications –  Limited control of networks •  virtual networking, firewalls, etc.

Infrastructure as a Service (IaaS)

22

Infrastructure as a Service (IaaS)

•  Mostly in an virtualized way –  Details of the underlying physical resources are hidden from the user –  Hypervisors: Xen, VMware, KVM, Microsoft Hyper-V –  Isolates different users –  Flexible infrastructure management: consolidation •  At VM start: mapping •  During VM execution: migration

PUBLIC IaaS Clouds: •  Amazon: EC2, S3 •  Windows Azure •  RackSpace •  E.g.: Amazon EC2 –  1 year micro instance for free

•  Try it yourself! –  Small: 0.60 $/hr –  8XL: 4.60 $/hr

•  For comparison: 23

–  8XL in your own datacenter: 1.50 $/hr (estimated)

24

Infrastructure as a Service (IaaS)

Infrastructure as a Service (IaaS)

Open-source solutions •  Useful to build private/community/hybrid clouds

IaaS Cloud Standards •  De-facto: Amazon

–  –  –  –  – 

–  WSDL-based –  createInstance() –  startInstances(), stopInstances()

Eucalyptus CloudStack OpenNebula Nimbus OpenStack

•  Open Cloud Compute Interface (OCCI) –  REST-based

25

Infrastructure as a Service (IaaS)

26

Cloud-ready applications

IaaS Pros and Cons

•  Almost any application can run in the Cloud, but they are not “Cloud-ready” •  Use API to auto-scale

•  Pros –  General purpose –  Very flexible

–  Applications need to be elastic

•  Cons –  Low-level –  Need to handle application •  Deployment •  Elasticity •  Failure 27

Example: transactional workload

28

1 VM per tier

29

30

Scalable architecture

Add auto-scaling

31

Platform as a Service (PaaS)

32

Platform as a Service (PaaS)

•  Tools to create and deploy onto the cloud infrastructure user-created applications –  Programming languages, libraries, etc.

•  PaaS simplies compared to IaaS –  User does not manage/control infrastructure resources (network, servers, OS, etc.) –  Higher level than IaaS

•  PaaS restricts compared to IaaS –  Particular OS, programming languages, etc. –  Often, tuned towards certain application types

Examples: •  For web applications: Google Apps Engine, OpenShift •  For BigData processing: MapReduce Google Apps Engine •  Develop and host web applications •  Take advantage of Google technologies for scalability, resilience •  Python, Java, Go •  Several APIs –  Images, Mail, Log –  Blobstore, Datastore, BigTable

•  Web applications, database-driven apps, etc.

–  Only for new applications, no legacy code –  Special purpose, less flexible

•  TRY IT, IT’S FREE!! 33

Software as a Service (SaaS)

https://cloud.google.com/appengine/docs

34

Discussion •  Benefits of the cloud model include:

•  Hosted services (applications) accessible in thin client (Web browser) or similar •  User does not manage/control application infrastructure (network, servers, OS, storage, etc.)

–  Cost, especially for peaks and bursty workloads –  Flexibility; rapid scalability and de-scalability –  Data replication –  Easier cross-institution collaboration –  Any {time, place, device} access via browser –  Alternative if departmental or central IT nonresponsive –  Priorities: no need to focus on commodity IT

•  Service may be hosted in a cloud data center (IaaS provider) –  Or not

•  Service may be developed/deployed using a PaaS solution –  Or not

•  You use many of these every day, some are cloud services, some not… 35

36

Discussion

Clouds vs. Grids

•  Drawbacks of the cloud include: –  Security/policy/trust – where is my data? •  The Snowden-effect

–  Vendor-lock in / interoperability –  Performance and reliability –  Offline access? –  Cost •  Is leasing really cheaper? For static workloads?

37

38

Outline

Virtualization

•  What is Cloud Computing?

•  Types of virtualization –  Para-virtualization

•  Cloud Service and Deployment Models

–  Full Virtualization

•  Virtualization

–  Hardware supported full virtualization

•  OpenStack

–  Container virtualization

39

40

Virtualization

Virtualization

Para-Virtualization

Full Virtualization

•  Do not try to emulate everything

•  Runs unmodified guests •  Simulates BIOS, communicates with VMs through ACPI emulation, BIOS emulation, sometimes custom drivers

–  Work as a guard –  Pass safe instructions directly to CPU and device –  Guests have some exposure to the hardware

–  Guests cannot access hardware

•  Better performance •  Need to slightly modify guest OS, but no need to modify applications •  Xen, Sun Logical Domains

•  Generally worst performance, but often acceptable •  VMWare, Xen HVM, KVM, Microsoft VM, Parallels

41

42

Virtualization

Virtualization

Hardware supported full virtualization

Paravirtualization vs. Hardware supported virt.

•  Based on recent extensions to CPU architectures –  Intel VT-x and AMD-V series –  Hardware support for System calls directly to guest OS, instead of through Hypervisor/ Emulator –  Performance improvements

•  •  •  • 

•  Performance very similar and close to bare-metal •  If modern enough hardware (virt-enabled) is used, KVM (or similar) is the best choice

No need to modify guest OS No need to modify applications Example: KVM Most promising approach today… 43

44

Virtualization Container Virtualization •  User-space virtual machines (cgroups) •  Same kernel on all containers •  Provide extra-level of security compared to normal processes –  Unprivileged containers cannot mount drives or change network settings

•  Native Speeds, no emulation overhead •  OpenVZ, Virtuozzo, Solaris Containers, FreeBSD Jails, Linux-Vserver, Docker https://www.docker.com

45

46

Docker (Containers): pros and cons •  Developer benefits: –  –  –  – 

A clean, safe, portable runtime environment for your app. No worries about missing dependencies, packages, etc. Isolation: each container can have different lib versions Virtualization without the overhead of VMs

•  Operator benefits: –  Simplified lifecycle management –  Consistent environments: development, test, production, customer –  Isolation and segregation of duties –  Lightweight and good performance

•  Drawbacks:

47

–  Isolation? –  Portability? –  No live migration capabilities

48

Docker: Containers vs. VMs

Docker: Containers vs. VMs

49

LibVirt

50

Outline

•  Toolkit to interact with the virtualization capabilities

•  What is Cloud Computing?

•  Allows to manage VMs in a more easy, convenient way •  Abstracts low level details

•  Cloud Service and Deployment Models •  Virtualization •  OpenStack

51

52

What is OpenStack?

What is OpenStack?

•  •  •  • 

•  Mission statement

The Cloud Operation System Founded by NASA and Rackspace in 2010 The biggest open source project in the world > 33000 people, >550 companies, >170 countries, >20M lines of code, … •  http://www.openstack.org/

–  “To produce the ubiquitous open source cloud computing platform that will meet the needs of public and private cloud providers regardless of size, by being simple to implement and massively scalable.”

•  Open –  –  –  – 

53

Open Open Open Open

source design development community

54

What is OpenStack?

What is OpenStack?

•  OpenStack Foundation –  “OpenStack is a cloud operating system

Design and coding standards •  Scalability and elasticity •  Asynchronous •  Horizontally scalable •  Share-nothing (or sharding) •  Distribute everything •  Accept eventual consistency •  Test everything •  Enforce PEP-8 •  6 month release cycle

that controls large pools of compute, storage, and networking resources throughout a data center, all managed through a dashboard that gives administrators control while empowering users to provision resources through a web interface”

55

Why Service Providers Are Adopting?

Release history •  •  •  •  •  •  •  •  •  •  • 

Austin Bexar Cactus Diablo Essex Folsom Grizzly Havana Icehouse Juno Kilo

October 2010 February 2011 April 2011 September 2011 April 2012 September 2012 April 2013 October 2013 April 2014 October 2014 April 2015

•  Liberty •  Mitaka

October 2015 April 2016??

56

•  •  •  •  •  •  • 

Originated by Rackspace and NASA Designed to scale cost effectively Emerging standard backed by large ecosystem Open source with no lock-in or license No desire to build proprietary clouds Highly configurable Easy to extend/customize

57

Contributors

58

Conceptual Architecture

59

60

Example: Nova Architecture

What is in OpenStack? •  Compute (Nova) •  Network (Neutron) •  Image storage (Glance) •  Block storage (Cinder) •  Object storage (Swift) •  Identity (Keystone) •  Metering (Ceilometer) •  Orchestration (Heat) •  Dashboard (Horizon)

And many more:

•  Concepts

•  Database Service (Trove) •  Deployment (TripleO) •  Common Libraries (Oslo) •  Bare metal (Ironic) •  Queue service (Marconi) •  Data processing (Sahara) •  Key management (Barbican) •  …

61

Example: Nova Scheduler •  Places instances on compute hosts •  Filter Scheduler: Pluggable filtering rules –  CPU model / architecture –  Virtualization type –  PCI device availability

–  CPU, RAM, Disk usage –  +more...

63

–  –  –  – 

Instances Flavours Virt drivers Security group

•  Dual APIs –  OpenStack REST –  EC2 compatible REST

62