nimbus & opennebula

31
Nimbus & OpenNebula Young Suk Moon

Upload: amara

Post on 24-Feb-2016

117 views

Category:

Documents


3 download

DESCRIPTION

Nimbus & OpenNebula. Young Suk Moon. Nimbus - Intro. Open source toolkit Provides virtual workspace service (Infrastructure as a Service) A client uses virtual machines ( Xen ) on remote resources. Virtual machines are configured as user demand Uses X.509 certificates. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Nimbus &  OpenNebula

Nimbus & OpenNebula

Young Suk Moon

Page 2: Nimbus &  OpenNebula

Nimbus - Intro

• Open source toolkit• Provides virtual workspace service

(Infrastructure as a Service)• A client uses virtual machines (Xen) on remote

resources.• Virtual machines are configured as user

demand• Uses X.509 certificates

http://grid.rit.edu 2

Page 3: Nimbus &  OpenNebula

Nimbus - Architecture

http://grid.rit.edu 3

cloud client

workspace resource manager

context broker

RM APIEC2 client

WSRFworkspace

serviceEC2 WSDL

workspace pilot

IaaS Gateway

workspace control

Page 4: Nimbus &  OpenNebula

Nimbus - Architecture

http://grid.rit.edu 4

cloud client

workspace resource manager

context broker

RM APIEC2 client

WSRFworkspace

serviceEC2 WSDL

workspace pilot

IaaS Gateway

workspace control

Cloud client: connects to Nimbus and use VMs

Page 5: Nimbus &  OpenNebula

Nimbus - Architecture

http://grid.rit.edu 5

cloud client

workspace resource manager

context broker

RM APIEC2 client

WSRFworkspace

serviceEC2 WSDL

workspace pilot

IaaS Gateway

workspace control

EC2 client: connects to the Amazon Elastic Compute Cloud (EC2)

Page 6: Nimbus &  OpenNebula

Nimbus - Architecture

http://grid.rit.edu 6

cloud client

workspace resource manager

context broker

RM APIEC2 client

WSRFworkspace

serviceEC2 WSDL

workspace pilot

IaaS Gateway

workspace control

WSRF & EC2 WSDL: protocol implementations

Page 7: Nimbus &  OpenNebula

Nimbus - Architecture

http://grid.rit.edu 7

cloud client

workspace resource manager

context broker

RM APIEC2 client

WSRFworkspace

serviceEC2 WSDL

workspace pilot

IaaS Gateway

workspace control

RM API: interface to Virtual Workspace Service

Page 8: Nimbus &  OpenNebula

Nimbus - Architecture

http://grid.rit.edu 8

cloud client

workspace resource manager

context broker

RM APIEC2 client

WSRFworkspace

serviceEC2 WSDL

workspace pilot

IaaS Gateway

workspace control

IaaS Gateway: connects to EC2 or other cloud services

Page 9: Nimbus &  OpenNebula

Nimbus - Architecture

http://grid.rit.edu 9

cloud client

workspace resource manager

context broker

RM APIEC2 client

WSRFworkspace

serviceEC2 WSDL

workspace pilot

IaaS Gateway

workspace control

Workspace service: VM manager, Web Service base, run in GT Java container

Page 10: Nimbus &  OpenNebula

Nimbus - Architecture

http://grid.rit.edu 10

cloud client

workspace resource manager

context broker

RM APIEC2 client

WSRFworkspace

serviceEC2 WSDL

workspace pilot

IaaS Gateway

workspace control

Workspace pilot: uses local site manager such as PBS

Page 11: Nimbus &  OpenNebula

Nimbus - Architecture

http://grid.rit.edu 11

cloud client

workspace resource manager

context broker

RM APIEC2 client

WSRFworkspace

serviceEC2 WSDL

workspace pilot

IaaS Gateway

workspace control

Workspace control: run VMs, build VM image, connect VMs to network, send contextualization information to the context broker

Page 12: Nimbus &  OpenNebula

Nimbus - Architecture

http://grid.rit.edu 12

cloud client

workspace resource manager

context broker

RM APIEC2 client

WSRFworkspace

serviceEC2 WSDL

workspace pilot

IaaS Gateway

workspace control

Context broker: coordinates virtual cluster at its deploymentContext agent: runs on each VM to communicate with the context broker

Page 13: Nimbus &  OpenNebula

Nimbus – Administration - I

• Setting service container– Creating new host / user certificates– Relevant file configuration

• Installing Xen• Setting DHCP (Dynamic Host Configuration

Protocol)– Each hypervisor needs DHCP server and ebtable

http://grid.rit.edu 13

Page 14: Nimbus &  OpenNebula

Nimbus – Administration - II

• Installing Nimbus service pakages– RM API, workspace service (VM, VMM)– WSRF frontend– EC2 frontend

• Configuration– Service host name– VMM (Virtual Machine Manager) names– Networks (DNS, subnet, etc.)– Authorization: edit nimbus-grid-mapfile

http://grid.rit.edu 14

Page 15: Nimbus &  OpenNebula

Nimbus – Administration - III

• Installing workspace-control program• Configuration

– sudoers file: set paths to dhcp-config.sh, mount-alter.sh, etc. for the users

– DHCP (only for delivery): add subnet in dhcpd.conf– Kernels: copy kernel images and edit [image]

section in worksp.conf file for clients to choose– Networks: edit [networking] section in

worksp.conf file

http://grid.rit.edu 15

Example: association_0: private; xenbr0; vif0.0 ; none; 192.168.0.0/24

Page 16: Nimbus &  OpenNebula

Nimbus – Client Administration• Download and install

– Create proxy credential: $ ./bin/grid-proxy-init.sh• Select VM

– $ ./bin/cloud-client.sh –list• Deploy VM

– $ ./bin/cloud-client.sh --run --name hello-cloud --hours 1– Output:SSH public keyfile contained tilde: - '~/.ssh/id_rsa.pub' --> '/home/guest/.ssh/id_rsa.pub’Launching workspace.Using workspace factory endpoint: https://cloudurl.edu:8443/wsrf/services/WorkspaceFactoryServiceCreating workspace "vm-023"... done. IP address: 123.123.123.123 Hostname: ahostname.cloudurl.edu Start time: Fri Feb 29 09:36:39 CST 2008 Shutdown time: Fri Feb 29 10:36:39 CST 2008 Termination time: Fri Feb 29 10:46:39 CST 2008Waiting for updates.State changed: RunningRunning: 'vm-023’

http://grid.rit.edu 16

http://workspace.globus.org/clouds/cloudquickstart.html

Page 17: Nimbus &  OpenNebula

Nimbus – Client Commands

• Log on– $ ssh [email protected]

• Get info about VM– $ ./bin/cloud-client.sh --status --handle vm-023

• Save changes– $ ./bin/cloud-client.sh --save --handle vm-023 --newname

custom-1• Terminate VM

– $ ./bin/cloud-client.sh --terminate --handle vm-023

http://grid.rit.edu 17

http://workspace.globus.org/clouds/cloudquickstart.html

Page 18: Nimbus &  OpenNebula

Nimbus – APIs (Java)

• Request authorization: creation process– org.globus.workspace.service.binding.GlobalPolici

es– org.globus.workspace.service.binding.authorizatio

n.CreationAuthorizationCallout• Initial request intake: handle creation requests

– org.globus.workspace.creation.Creation– org.globus.workspace.service.binding.Bind*

http://grid.rit.edu 18

Page 19: Nimbus &  OpenNebula

OpenNebula - Intro

• Open source virtual infrastructure engine• Deploy VMs• A distributed virtualization layer

http://grid.rit.edu 19

OpenNebula: The Open Source Virtual Machine Manager for Cluster Computing, http://www.opennebula.org/lib/exe/fetch.php?id=outreach&cache=cache&media=opennebula-oakland.pdf

Page 20: Nimbus &  OpenNebula

OpenNebula - Architecture

http://grid.rit.edu 20

Scheduler Command Line Interface

Information Driver

Virtual MachineDriver

Transfer Driver

Request Manager (XML-RPC)

SQL Pool

VM Manager

Host Manager

VN Manager

Page 21: Nimbus &  OpenNebula

OpenNebula - Architecture• Scheduler: deploy VMs in physical hosts

• Request Manager: implements a XML-RPC interface

• SQL Pool: maintains status of VMs, hosts, virtual networks.

• VM (Virtual Machine) Manager: manages VM life cycles

• VN (Virtual Network) Manager: generates MAC / IP addresses

http://grid.rit.edu 21

• Host Manager: maintains information about hosts and communicate with them

Page 22: Nimbus &  OpenNebula

OpenNebula - Architecture

http://grid.rit.edu 22

• Transfer Driver: interacts with the image operations (cloning, deleting, …)

• Virtual Machine Driver: interacts with the VM life cycle operations (deploy, shutdown, ...)

• Information Driver: gets information about physical hosts (memory, cpu, …)

Page 23: Nimbus &  OpenNebula

OpenNebula - Administration• Set up users & groups by NIS (Network

Information Service)– server$ groupadd xen– server$ useradd –G xen oneadmin– server$ cd /var/yp– server$ make

• Create local groups– node1$ echo "rootxen:x:<xen_gid>:root >>

/etc/group– node2$ echo "rootxen:x:<xen_gid>:root >>

/etc/group

• Configure SSH– server$ ssh-keygen– server$ scp id_rsa.pub node1:– node1$ cd ~/.ssh– node1$ cat id_rsa.pub >> authorized_keys

http://grid.rit.edu 23

Front-End OpenNebula

server

Cluster Node 2

SSH

SSH

Cluster Node 1

SSHXen Xen

Page 24: Nimbus &  OpenNebula

OpenNebula – Admin: Storage

• Image repository (separate or in the front-end)– Contains VM images

http://grid.rit.edu 24

http://www.opennebula.org/doku.php?id=documentation:rel1.2:ignc• Image life-cycle– Preparation: images are in the repository– Cloning: copy an image from the repository to VM

directory– Save / remove: save and dispose the image

• Physical cluster configuration– $ONE_LOCATION/etc/oned.conf– $ONE_LOCATION/etc/tm_nfs/tm_nfs.conf

Page 25: Nimbus &  OpenNebula

OpenNebula – Admin: Networks

http://grid.rit.edu 25

2 VM clusters have virtual networks and access to the Internet

http://www.opennebula.org/doku.php?id=documentation:rel1.2:nm

Page 26: Nimbus &  OpenNebula

OpenNebula – Admin: Networks

• Define a virtual network– oned.conf– Fixed virtual networks: set specific addresses– Ranged virtual networks: set a base address

• Create a virtual network– $ onevnet –v create private_red.net

http://grid.rit.edu 26

Page 27: Nimbus &  OpenNebula

OpenNebula – Administration

• Install OpenNebula– $ ./install.sh -d /opt/nebula/ONE

• Set up cluster– $ onehost create node1 im_xen vmm_xen tm_ssh– $ onehost create node2 im_xen vmm_xen tm_ssh

im_xen: reference to information drivervmm_ssh: reference to virtual machine drivertm_ssh: reference to transfer driver

• Start OpenNebula– $ ONE_LOCATION/bin/one start

http://grid.rit.edu 27

Page 28: Nimbus &  OpenNebula

OpenNebula – Command Line Interface

• Three commands– onevm [<options>] <command> [<parameters>]– onehost <command> [<parameters>]– onevnet <command> [<parameters>]

• Commands of onevm– create, deploy, shutdown, livemigrate, migrate, hold, release, stop,

suspend, resume, delete, list, show, top, history• Commands of onehost

– create, show, delete, list, enable, disable, top• Commands of onevnet

– create, show, delete, list

http://grid.rit.edu 28

Page 29: Nimbus &  OpenNebula

OpenNebula – Client APIs

• XMLrpc methods– VM allocation: one.vmallocate– VM deployment: one.vmdeploy– VM actions: one.vmaction

• shutdown, hold, release, stop, suspend, resume– VM migration: one.vmmigrate– VM information: one.vmget_info

http://grid.rit.edu 29

Page 30: Nimbus &  OpenNebula

OpenNebula – Java Example

• Invoking one.vmallocateimport org.apache.xmlrpc.XmlRpcClient;import java.util.Vector;

public class XmlRpcTest {public static void main( String args[] ) throws Exception {

XmlRpcClient client = new XmlRpcClient( "http://localhost:2633/RPC2" ): Vector params = new Vector(); params.addElement("SESSION-GOLA&4H910"); params.addElement("MEMORY=345 CPU=4

DISK=[FILE=\"img\",TYPE=cd]""DISK=[FILE=\"../f\"]");

Object result = client.execute( "one.vmallocate", params );

if ( result != null )System.out.println( result.toString() );

}}

http://grid.rit.edu 30

http://www.opennebula.org/doku.php?id=documentation:rel1.2:api_examples

Page 31: Nimbus &  OpenNebula

References• http://workspace.globus.org/• http://www.opennebula.org/doku.php• Open Source Grid and Cluster Software Conference - May 12th-16th 2008

- San Francisco, USA, OpenNebula: The Open Source Virtual Machine Manager for Cluster Computing, http://www.opennebula.org/lib/exe/fetch.php?id=outreach&cache=cache&media=opennebula-oakland.pdf

• Tutorial about Elastic Management of a Grid Computing Service with OpenNebula and Amazon EC2, March 2th, 2009, http://www.opennebula.org/lib/exe/fetch.php?id=outreach&cache=cache&media=tutorial_ogf25.pdf