Upload
a-b-m-moniruzzaman
View
2.740
Download
4
Embed Size (px)
DESCRIPTION
Build a small-scale private cloud as prototype and test with OpenNebula (open source cloud management platform). The aims and objectives of this work include: 1. The first objective of this thesis is to build and implement a private cloud with completely open source way for small-scale prototype implementation and testing. 2. Explores the current state of open source cloud Management platforms (CMPs) in context with private cloud implementation. 3. Indentifies system, software, hardware requirements to built and implement private Cloud open source way. 4. Uses this private cloud implementation for educational purposes 5. Gain knowledge of the technologies for setting up a private cloud with open source software. 6. Learn about the process for designing & implementing a private cloud solution.
Citation preview
4/26/2013
OPENNEBULA BUILDING PRIVATE CLOUD – PROTOTYPE AND
TEST WITH OPENNEBULA
A B M Moniruzzaman, M.Sc [email protected]
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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:
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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)
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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.
Building Private Cloud – Prototype and Test with OpenNebula
A B M Moniruzzaman, M.Sc Daffodil International University
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