building private cloud – prototype and test with opennebula by moniruzzaman

25
4/26/2013 OPENNEBULA BUILDING PRIVATE CLOUD PROTOTYPE AND TEST WITH OPENNEBULA A B M Moniruzzaman, M.Sc [email protected]

Upload: a-b-m-moniruzzaman-khan

Post on 22-Jan-2016

216 views

Category:

Documents


0 download

DESCRIPTION

The first objective of this thesis is to build and implement a private cloud with completely open source way FOSS (Fully Open Source Software) for small-scale prototype implementation and testing; and we have done this successfully. For this we use – OpenNebula-Sanbox In the chapter 5, we provide a technical perspective step-by-step guide with configuration stages of Installation and Configuration Private Cloud with OpenNebula with the most common Hypervisors VMware. It will help student, enthusiastic people, new learners to gain knowledge of the technologies for setting up a private cloud with open source software.

TRANSCRIPT

Page 1: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

4/26/2013

OPENNEBULA BUILDING PRIVATE CLOUD – PROTOTYPE AND

TEST WITH OPENNEBULA

A B M Moniruzzaman, M.Sc [email protected]

Page 2: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Chapter: Implementation of Private Cloud

5.1 Introduction

Build a real cloud in your machine with installation of OpenNebula - an enterprise-ready open-

source platform to manage cloud; and with virtualization platform to run the OpenNebula Cloud

Sandbox.

5.2 Cloud Implementation using FOSS (fully open source software)

Here we build a real cloud in any machine with FOSS (fully open source software):

We use

OpenNebula Sandbox for Private Cloud implementation;

Open Source Operating System like: CentOS or Ubuntu;

Open Source Hypervisor : VMware ESXi 5.0 for host, VMware vSphere ESX 5 for

client; You may also use KVM or Xen as Hypervisor;

These all are open source software for Cloud Computing platforms. OpenNebula is the most

feature-rich, innovative, customizable and mature open alternative to proprietary cloud solutions

to build virtualized enterprise data centers and cloud infrastructures on Xen, KVM and VMware

deployments. OpenNebula is not a feature or performance limited edition of an Enterprise

version, OpenNebula is truly open-source code, not open core, distributed under Apache license;

a true Fully Open Source Software.

Configuration options and specific information for each hypervisor can be found in these guides:

Xen Driver; KVM Driver; VMware Driver

OpenNebula packages are also available from the Official Repo of the main Linux Distributions.

Please note that the official packages from the distributions take some time to be updated to the

latest OpenNebula.

Page 3: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

5.3 Installation and Configuration

Here technical perspective step-by-step configuration stages of Installation and Configuration

OpenNebula with the most common Hypervisors:

Start working from my desktop for installation and configuration private cloud with OpenNebula

Sanbox:

Step 1:

Download and install VMware Workstation 9.0 from (https://my.vmware.com/web/vmware/info/slug/desktop_end_user_computing/vmware_workstation).

After successful installation, we will run the workstation. It will need to upload ESXi 5.0

hypervisor in this workstation to configure host for OpenNebula Sanbox.

Figure: Download VMware Workstation 9.0 from web

Page 4: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 2:

Download and install successfully VMware vSphere Hypervisor ESXi 5.0.0 on your machine

from

(https://my.vmware.com/web/vmware/info/slug/datacenter_cloud_infrastructure/vmware_vsphere_h

ypervisor_esxi/5_0)

Figure: Download VMware vSphere Hypervisor (ESXi) 5.0 from web

Step 3:

Download the Virtual Appliance

Download the image for ESX from the marketplace. The image is compressed with tar.gz. Be

sure to decompress it before moving on. You should end up with two .vmdk files.

OpenNebula 3.8 ESX (main Image file containing CentOS 6.3 virtual machine image with a pre-

configured OpenNebula 3.8.1 front-end) from the OpenNebula marketplace site and unzip with

IZArc. Recommended unarchivers: Mac OS X: The Unarchiver; Linux: use “tar xvzf

opennebula-3.8-sandbox.vmdk.tar.gz”; Windows: 7-Zip

Figure: Download the image for opennebula 4.0 ESX Sandbox from the marketplace.

Page 5: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

OpenNebula 4.0 ESX Sandbox

The sandbox is a CentOS 6.3 virtual machine image with a pre-configured OpenNebula 4.0

front-end, a virtualization host using QEMU ready to execute virtual machines, and prepared

images to offer a complete and rich cloud experience. Optionally other physical worker nodes

using any of the hypervisors supported by OpenNebula can be enrolled to build small-scale cloud

infrastructures. Users are able to log into an OpenNebula cloud, peer the managed resources, and

launch instances of virtual machines without the hassle of configuring a physical infrastructure.

Step 4:

Install VMware Workstation 9.0 and run it.

After successful installation, we will run the workstation. It will need to upload ESXi 5.0

hypervisor in this workstation to configure host for OpenNebula Sanbox.

Step 5:

Create a new virtual machine and select custom set up.

Page 6: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 5.2:

Choose virtual machine hardware compatibility and select workstation 9.0 setup.

Step 5.3:

Browse image for opennebula sandbox to upload into virtual machine and select open.

You should have to unzip this image file to vmdk file to upload.

Step 5.4:

Input name to virtual machine hardware and type VMware ESXi 5.

Page 7: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 5.6:

Choose virtual machine processors core and select 2 for number of processor. Virtual machine

should be not below 2 cores for OpenNebula Sanbox setup.

Step 5.7:

Choose virtual machine memory and select not below 512 MB; 2 GB should be best suited for

OpenNebula Sanbox setup.

Step 5.8:

Choose virtual machine network type and select host only setup.

Page 8: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 5.9:

Browse for virtual machine disk and select opennebula-3.8-sandbox.vmdk. you may use later

version.

Step 5.10:

Now virtual machine is ready to finish click. Check out information about virtual machine and

select finish button.

Step 5.11:

You can customize or change virtual machine hardware and select close to go back.

Page 9: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 6.1:

Now your virtual machine ESXi 5 hypervisor is configured and select power on to run the virtual

machine.

Step 6.2:

Now start running the Hypervisor ESXi 5.0. It will take few minutes to complete run.

Page 10: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 6.3:

Virtual machine ESXi 5 hypervisor is being running and loading it’s packages.

Step 6.4:

Virtual machine ESXi 5 hypervisor is being running and loading kernels.

Page 11: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 6.5:

Virtual machine ESXi 5 hypervisor is ready with default IP: 192.168.71.128.

Step 7:

Test with the default IP- 192.168.71.128. Now you can download VMware vSphere ESX 5.0

also from this site. Your test host setup is successful.

Page 12: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 8.1:

Run VMware vSphere client ESX 5.0. Use IP address 192.168.71.128 and user name root.

Step 8.2:

Connecting with Host VMware vSphere client ESX 5.0. with default IP address 192.168.71.128

and user name root.

Page 13: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 9.1:

Start VMware vSphere client ESX 5.0. and successfully connected with Host.

Step 10:

Upload Sandbox image (OpenNebula 3.8 ESX) in the VI client.

Step 10.1:

VMware vSphere client ESX 5.0. is running and successfully connected with Host. Upload

Sandbox image (OpenNebula 3.8 ESX) in the VI client. Start to create a new virtual machine

wizard.

Page 14: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 10.2:

From VMware vSphere client ESX 5.0, to create a new virtual machine wizard; select custom

when creating a new virtual machine from VSphere Client.

Step 10.3:

From VMware vSphere client ESX 5.0, to create a new virtual machine wizard - type name when

creating a new virtual machine from VSphere Client.

Page 15: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 10.4:

From VMware vSphere client ESX 5.0, to create a new virtual machine wizard; select datastore

when creating a new virtual machine from VSphere Client.

Step 10.5:

From VMware vSphere client ESX 5.0, to create a new virtual machine wizard; select Vitual

machine version when creating a new virtual machine from VSphere Client.

Page 16: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 10.6:

From VMware vSphere client ESX 5.0, to create a new virtual machine wizard; select Operating

System (OS) when creating a new virtual machine from VSphere Client. Please select

CentOS4/5/6 (64-bit).

Step 10.7:

From VMware vSphere client ESX 5.0, to create a new virtual machine wizard; select Processor

cores when creating a new virtual machine from VSphere Client. Please select at least 2 cores for

virtual machine.

Page 17: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 10.8:

From VMware vSphere client ESX 5.0, to create a new virtual machine wizard; select memory

when creating a new virtual machine from VSphere Client. Please select at least 2GB for virtual

machine; 4GB is better.

Step 10.9:

From VMware vSphere client ESX 5.0, to create a new virtual machine wizard; select Network

setting when creating a new virtual machine from VSphere Client. Please remain or select

default network setting.

Page 18: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 10.10:

From VMware vSphere client ESX 5.0, to create a new virtual machine wizard; select SCSI

controller when creating a new virtual machine from VSphere Client. Please select VMware

Paravirtual as SCSI controller.

Step 10.11:

From VMware vSphere client ESX 5.0, to create a new virtual machine wizard; select create a

new virtual disk when creating a new virtual machine from VSphere Client. Please select create a

new virtual disk.

Page 19: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 10.12:

From VMware vSphere client ESX 5.0, to create a new virtual machine wizard; specify the

virtual disk size when creating a new virtual machine from VSphere Client. Please select at least

10GB for virtual disk; 30 GB is better. Here datastore for OpenNebula-Sanbox is 35GB. You

have to select within this size.

Step 10.13:

From VMware vSphere client ESX 5.0, to create a new virtual machine wizard; now this is ready

to complete stage – you can also edit virtual machine setting before completion:

Page 20: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 11:

Now OpenNebula-Sanbox from vSphere Client is ready; you can power on this appliance

for client settings and resource allocation for the clients.

Step 11.1:

Now we power on opennebula-sandbox appliance. At this stage, start running opennebula-

sandbox from VMware ESX 5.0 vSphere Client.

Step 11.2:

Opennebula-sandbox from VMware ESX 5.0 vSphere Client is running successfully; this

(summary) section explores the general summary of opennebula-sandbox: basic virtual machine

hardware; Resources; Datastores, VM Network

Page 21: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 11.3:

Opennebula-sandbox from VMware ESX 5.0 vSphere Client is running successfully; this

(Resource Allocation) section explores the resource allocation of Host and Guest; CPU usages

allocation, Memory uses allocation.

Step 11.4:

Opennebula-sandbox from VMware ESX 5.0 vSphere Client is running successfully; this (Edit

Resource Allocation) section explores edit of resources of opennebula-sandbox: edit basic virtual

machine hardware.

Page 22: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 11.5:

Opennebula-sandbox from VMware ESX 5.0 vSphere Client is running successfully; this

(Performance) section explores unit performance of opennebula-sandbox.

Step 11.6:

Opennebula-sandbox from VMware ESX 5.0 vSphere Client is running successfully; this (Event)

section explores various event summaries and any error messages of opennebula-sandbox at

running stage.

Page 23: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

Step 11.7:

Opennebula-sandbox from VMware ESX 5.0 vSphere Client is running successfully; this

(Permissions) section explores various users/groups and their permissions of opennebula-

sandbox at running stage.

Step 12:

Enter the Appliance

At this point the Virtual Machine will be running. Wait until you see a login prompt in the VI

client console that says ''one-sandbox login:”

You can log in into the Virtual Machine using the following information:

Login: root

Password: opennebula

Step 13:

The VM is a CentOS 6.3 with the OpenNebula 4.0 packages installed and configured, and ready

to also act as cloud host to execute virtual machines. When the VM starts all the main services

are started:

OpenNebula Core

Scheduler

Sunstone GUI (for administrators / private cloud users)

Page 24: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

5.4 Deployment and Testing

OpenNebula 4.0 Sandbox Testdrive with Sunstone GUI

The VM is a CentOS 6.3 with the OpenNebula 4.0 packages installed and configured, and ready

to also act as cloud host to execute virtual machines. When the VM starts all the main services

are started:

OpenNebula Core

Scheduler

Sunstone GUI (for administrators / private cloud users)

The first thing we're going to do is to log in as oneadmin to take a look at the superuser

Sunstone, which has more options than the Sunstone panel for a regular user.

To login to sunstone open your browser at http://<IP>:9869

IP is different for specific Sandbox: VirtualBox, KVM, ESX or AWS.

The login information is:

Login: oneadmin

Password: opennebula

This login information can be obtained from ~/.one/one_auth of the oneadmin account.

Take a look at all the resources you can see. You can verify that the resources we created earlier

are visible. Now logout and log in as the user we created earlier (myuser / mypassword). The

first thing you might have noticed is that the physical and security resources aren't available

anymore, since they can be only managed by the oneadmin user. In particular: Users, Groups,

ACLs, Clusters and Hosts.

Page 25: Building Private Cloud – Prototype and Test with OpenNebula by Moniruzzaman

Building Private Cloud – Prototype and Test with OpenNebula

A B M Moniruzzaman, M.Sc Daffodil International University [email protected] http://www.daffodilvarsity.edu.bd/

To start the first Virtual Machine, you simply need to enter into the Virtual Resources → Virtual

Machines menu option (we refer to menu options throughout the documentation as TABs) and

click on the '+ Create' button. Enter a name: 'tty' and select the ttylinux template.

After clicking the create button, you will be brought back to the Virtual Machines TAB, where

you will see the Virtual Machine transition from 'PENDING' (waiting for the scheduler to deploy

it), to 'PROLOG' and finally to running.

You may want to click on the VNC icon at the far right of the Virtual Machine row. A new

dialog will open with the VNC console in it. Click inside the console to focus it and press the

enter key to enter the login screen. The login information is:

Login: root

Password: password