2-privatecloud · tp v1.0 v1.2 v1.4 v2.0 v2.2 v3.0 •develop & innovate •support the...

8
3/9/15 1 GridKa School 2015 GridKa School 2015 Private Clouds GridKa School 2015 Outline Introduction to private clouds and IaaS • OpenNebula – Introduction – CLI – Sunstone 2 GridKa School 2015 What private clouds are •A “Public Cloud behind the firewall” – Simplify internal operations – Dynamic allocation of resources – Higher utilization & operational savings – Security concerns 3 GridKa School 2015 What Who On-demand access to any application End-user (does not care about hw or sw) Platform for building and delivering web applications Developer (no managing of the underlying hw & swlayers) Raw computer infrastructure System Administrator (complete management of the computer infrastructure) Software as a Service Platform as a Service Infrastructure as a Service Physical Infrastructure 4 GridKa School 2015 IaaS challenges How do I provision a new VM? Image Management & Context Where do I store the disks? Storage How do I set up networking for a multitier service? Network & VLANs Where do I put my web server VM? Monitoring & Scheduling How do I manage any hypervisor? Virtualization Who has access to the Cloud’s resources? User & Role Management How do I manage my distributed infrastructure? Interfaces & APIs Uniform management layer that orchestrates multiple technologies 5 GridKa School 2015 Introduction to OpenNebula Adaptable: Integration capabilities to fit into any data center Enterprise-ready: Upgrade process and commercial support No Lock-in: Broad infrastructure and platform independent Light: Efficient & simple Proven: Rigorously tested, mature and widely used Powerful: Advanced features for virtualized Scalable: single instance & multi-tier architectures Be interoperable! rich set of API's & Interfaces Open Source: Apache License v2 6

Upload: others

Post on 26-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2-PrivateCloud · TP v1.0 v1.2 v1.4 v2.0 v2.2 v3.0 •Develop & innovate •Support the community •Collaborate Third party scalability tests: 16,000 VMs v3.2 v3.4 v3.6 v3.8 5,000

3/9/15

1

GridKa School 2015

GridKa School 2015 Private Clouds

GridKa School 2015

Outline

•  Introduction to private clouds and IaaS •  OpenNebula

–  Introduction – CLI – Sunstone

2

GridKa School 2015

What private clouds are

•  A “Public Cloud behind the firewall” – Simplify internal operations – Dynamic allocation of resources – Higher utilization & operational savings – Security concerns

3 GridKa School 2015

What Who On-demand access to any application

End-user (does not care about hw or sw)

Platform for building and delivering web

applications

Developer (no managing of the underlying hw

& swlayers)

Raw computer infrastructure

System Administrator (complete management of the

computer infrastructure)

Software as a Service

Platform as a Service

Infrastructure as a Service

Physical Infrastructure

4

GridKa School 2015

IaaS challenges •  How do I provision a new VM?

Image Management & Context •  Where do I store the disks?

Storage •  How do I set up networking for a multitier service?

Network & VLANs •  Where do I put my web server VM?

Monitoring & Scheduling •  How do I manage any hypervisor?

Virtualization •  Who has access to the Cloud’s resources?

User & Role Management •  How do I manage my distributed infrastructure?

Interfaces & APIs

Uniform management layer that orchestrates multiple technologies

5 GridKa School 2015

Introduction to OpenNebula •  Adaptable: Integration capabilities to fit into any data center •  Enterprise-ready: Upgrade process and commercial support •  No Lock-in: Broad infrastructure and platform independent •  Light: Efficient & simple •  Proven: Rigorously tested, mature and widely used •  Powerful: Advanced features for virtualized •  Scalable: single instance & multi-tier architectures •  Be interoperable! rich set of API's & Interfaces •  Open Source: Apache License v2

6

Page 2: 2-PrivateCloud · TP v1.0 v1.2 v1.4 v2.0 v2.2 v3.0 •Develop & innovate •Support the community •Collaborate Third party scalability tests: 16,000 VMs v3.2 v3.4 v3.6 v3.8 5,000

3/9/15

2

GridKa School 2015

Reference Users

Survey Q2/Q3 2012 (2,500 users http://c12g.com/resources/survey/)

7 GridKa School 2015

Introduction to OpenNebula

2005 2008 2009 2010 2011 2012

TP v1.0 v1.2 v1.4 v2.0 v2.2 v3.0

• Develop & innovate • Support the community • Collaborate

Third party scalability tests: 16,000 VMs

v3.2 v3.4 v3.6 v3.8

5,000 downloads/month

2014 2013

v4.0

Research Project

8

GridKa School 2015

Introduction to OpenNebula

OpenNebula core

Virtualization Images

Storage Network

Auth

Monitoring

Scheduler

XML-RPC API

OCA (Ruby, Java)

CLI GUI Cloud Servers

DB

Languages

9 GridKa School 2015

Interfaces, Tools & API •  CLI & Sunstone (GUI) •  API •  Cloud (EC2,OCCI) •  Service Management & Catalogs

Compute Hosts •  Grouped into logical clusters •  Multiple hypervisors •  Monitoring

Storage •  VM disks (file & block) •  Image Distribution •  Multiple Backends

Multi-tenancy •  AAA Services •  Scheduling •  Permissions & roles

Network •  VLAN •  Firewalling •  Multiple Technologies

10

GridKa School 2015

•  Repository of VM images •  Multiple Backends (LVM, Ceph)

Monitoring,Virtualization, Storage and Network

•  Provides physical resources for the VMs •  Must have a hypervisor installed

11 GridKa School 2015

What will be done

•  Basic management •  Both commands and web interface •  Accomplished through a sandbox

12

Page 3: 2-PrivateCloud · TP v1.0 v1.2 v1.4 v2.0 v2.2 v3.0 •Develop & innovate •Support the community •Collaborate Third party scalability tests: 16,000 VMs v3.2 v3.4 v3.6 v3.8 5,000

3/9/15

3

GridKa School 2015

Sandbox preparation

•  What it is – CentOS 6.3 virtual machine image – Preconfigured OpenNebula 4.12 frontend

•  OpenNebula core •  Scheduler •  Sunstone GUI

– Virtualization host using QEMU

13 GridKa School 2015

Sandbox preparation

•  Where do I get it –  http://opennebula.org/tryout/sandboxvirtualbox/

•  What do I need – 512M free RAM for the Virtual Machine – 3 GB of free disk space – 64-bit kernel

14

GridKa School 2015

Sandbox preparation

•  Steps – Download and uncompress the appliance – Start VirtualBox – Create a new Virtual Machine by clicking on

the New button. – Enter opennebula-sandbox in the Name

field, select Type Linux and Version Red Hat (64-bit)

– Select 512M for the Memory size

15 GridKa School 2015

Sandbox preparation

•  Steps – Select Use an existing virtual hard drive

and select the uncompressed image downloaded previously by clicking in the folder icon

– Click on Create

16

GridKa School 2015

Sandbox preparation

•  Steps – Under Machine → Settings, select the

Network option, click on the Advanced arrow, and you will see a Port Forwarding button

– Click on the icon that has a green plus sign and fill in 9869 both in the Host Port and Guest Port columns, leave all the other fields in blank

– Add another rule but with port number 29876 17 GridKa School 2015

Sandbox preparation

18

Page 4: 2-PrivateCloud · TP v1.0 v1.2 v1.4 v2.0 v2.2 v3.0 •Develop & innovate •Support the community •Collaborate Third party scalability tests: 16,000 VMs v3.2 v3.4 v3.6 v3.8 5,000

3/9/15

4

GridKa School 2015

Sandbox preparation

•  Steps – Start the appliance – Log in

•  User: root •  Password: opennebula

– Load the required keymap •  Example: loadkeys de

19 GridKa School 2015

CLI

•  OpenNebula runs as the openadmin user •  Switch to this user:

$ su - oneadmin •  All OpenNebula command names begin

with one*

20

GridKa School 2015

CLI

•  onehost – Manages physical hosts

•  Create, delete, enable, disable, update, …

– The sandbox has already a host configured (itself) $ onehost list $ onehost show 0

21 GridKa School 2015

CLI

•  onevnet – Manages virtual networks

•  Create, delete, add/remove leases, change permissions, …

– There is already a virtual network configured $ onevnet list $ onevnet show 0

22

GridKa School 2015

CLI

•  oneimage – Manages VM images

•  Create, delete, clone, …

– There is already an image created $ oneimage list $ oneimage show 0

23 GridKa School 2015

CLI

•  onetemplate – Manages OpenNebula templates

•  Create, delete, instantiate, …

– Existing VM templates can be shown $ onetemplate list $ onetemplate show 0

24

Page 5: 2-PrivateCloud · TP v1.0 v1.2 v1.4 v2.0 v2.2 v3.0 •Develop & innovate •Support the community •Collaborate Third party scalability tests: 16,000 VMs v3.2 v3.4 v3.6 v3.8 5,000

3/9/15

5

GridKa School 2015

CLI

•  Templates – Some examples in $HOME/templates/

•  cloud.net: virtual network •  ttylinux-template.one: virtual machine •  ttylinux-image: virtual machine image

25 GridKa School 2015

CLI

•  onevm – Creates VMs from a given template – Launch a VM

$ onevm create templates/ttylinux-template.one – List the launched instances

$ onevm list $ onevm show 0

26

GridKa School 2015

CLI

•  onevm – Resources can be created without templates – Create a VM with double memory $ onevm create --name "tty-doublemem" --memory 256 --cpu 1 --disk ttylinux --nic cloud

– This VM cannot be launched $ onevm list $ onevm show 1 •  Look for “SCHED_MESSAGE” $ onehost list

27 GridKa School 2015

CLI

•  onevm – Solution: remove first launched VM

$ onevm delete 0

– Re-check running instances $ onevm list

– Delete current running instance $ onevm delete 1

28

GridKa School 2015

CLI

•  onevm – Create a VM with 2 virtual CPUs $ onevm create --name "tty-doublecpu" --memory 128 --cpu 1 --vcpu 2 --disk ttylinux --nic cloud – Check running instances

29 GridKa School 2015

CLI

•  onevm – Suspend the running VM

$ onevm suspend 2

– Check its new status – Resume the VM

$ onevm resume 2

– Remove the VM

30

Page 6: 2-PrivateCloud · TP v1.0 v1.2 v1.4 v2.0 v2.2 v3.0 •Develop & innovate •Support the community •Collaborate Third party scalability tests: 16,000 VMs v3.2 v3.4 v3.6 v3.8 5,000

3/9/15

6

GridKa School 2015

VM lifecycle

31 GridKa School 2015

Sunstone

•  OpenNebula Cloud Operations Center •  A Graphical User Interface (GUI) intended for regular

users and administrators •  Simplifies the typical management operations in private

and hybrid cloud infrastructures. •  Allows to easily manage all OpenNebula resources and

perform typical operations on them.

32

GridKa School 2015

Sunstone

•  Create a user to launch VMs $ oneuser create myuser mypassword

•  Confirm its creation $ oneuser list $ oneuser show 2

•  Visit http://localhost:9869 –  Login: oneadmin –  Password: opennebula

33 GridKa School 2015

Sunstone

34

GridKa School 2015

Sunstone

•  Create and launch a VM – Virtual Resources → Virtual Machines – Click on the + button

•  Name: tty •  Template: ttylinux (id:0) •  Number of instances: 1

– Click on Create

35 GridKa School 2015

Sunstone

•  Access the VM – Once the VM is RUNNING, click on the

screen logo (right of the IP column) – Log in

•  Login: root •  Passwrd: password

36

Page 7: 2-PrivateCloud · TP v1.0 v1.2 v1.4 v2.0 v2.2 v3.0 •Develop & innovate •Support the community •Collaborate Third party scalability tests: 16,000 VMs v3.2 v3.4 v3.6 v3.8 5,000

3/9/15

7

GridKa School 2015

Sunstone

37 GridKa School 2015

Sunstone

•  Use the options in the Virtual Machines tab – Check the stats (below) – Reboot and delete (buttons above)

•  Create a new template – Virtual Resources → Template – Clone the existing template (Name: ttylinux2) – Click on the new template

38

GridKa School 2015

Sunstone

•  Give User permissions to Other •  Click on Update •  General:

–  CPU: 1 –  VCPU: 2

•  Storage: ttylinux •  Network: cloud •  Input/Output: VNC •  Click on Update

39 GridKa School 2015

Sunstone

•  Create and launch the VM – Virtual Resources → Virtual Machines – Click on the + button

•  Name: tty2 •  Template: ttylinux2 •  Number of instances: 1

– Click on Create

40

GridKa School 2015

Sunstone

OpenNebula Clusters –  Groups of hosts with associated datastores and

virtual networks –  Can be defined also through CLI

41

Cluster level

GridKa School 2015

Sunstone

OpenNebula Clusters –  Infrastructure → Clusters –  Click on the + button

•  Name: cluster1 •  Click on different resources from Hosts, Virtual Networks

and Datastores

42

Page 8: 2-PrivateCloud · TP v1.0 v1.2 v1.4 v2.0 v2.2 v3.0 •Develop & innovate •Support the community •Collaborate Third party scalability tests: 16,000 VMs v3.2 v3.4 v3.6 v3.8 5,000

3/9/15

8

GridKa School 2015

Sunstone

Example (High Availability) –  4CaaSt EU FP7 Project –  Physical scenario: 3 clusters

•  2 production clusters + 1 backup clusters •  Infrastructure from the FI-WARE Project (red.es)

–  Virtual scenario: 3 servers •  2 application servers + 1 load-balancer •  Active-Active configuration •  Application servers in different physical hosts

43 GridKa School 2015

Sunstone

Example (High Availability) 1. One of the physical production clusters crashes 2. Service is still available 3. The missing virtual isautomatically re-spawned in the physical backup cluster

44

HPC School 2013

GridKa School 2015