A technical whitepaper describing steps to setup a Private Cloud using the Eucalyptus Private Cloud Software and Xen hypervisor.



Similar documents
Building a Private Cloud Cloud Infrastructure Using Opensource

Ubuntu 下 的 云 计 算. UbuntuChin 互 动 社 区 王 大 亮

Private Cloud in Educational Institutions: An Implementation using UEC

Setting up of an Open Source based Private Cloud

Implementation of Private Cloud using Eucalyptus and an open source Operating System

IaaS Implementation of a Private Cloud using Open Source Technology

Eucalyptus Tutorial HPC and Cloud Computing Workshop

Installing and Scaling out Ubuntu Enterprise Cloud in Virtual Environment

Eucalyptus User Guide

MIFOS 2.2 ON CLOUD. Arun Philip Jacob Latha Madhuri Pratti

Eucalyptus User Guide

Eucalyptus Cloud Computing Platform User s Guide. Enterprise Edition 2.0

Installing Ubuntu Enterprise Cloud in a Physical Environment

Implementation of Database as a Service in a Private Cloud using EUCALYPTUS

Eucalyptus User Console Guide

FleSSR Project: Installing Eucalyptus Open Source Cloud Solution at Oxford e- Research Centre

Procedure to Create and Duplicate Master LiveUSB Stick

THE EUCALYPTUS OPEN-SOURCE PRIVATE CLOUD

Zend Server Amazon AMI Quick Start Guide

Creating a DUO MFA Service in AWS

DVS-100 Installation Guide

Virtualization & Cloud Computing (2W-VnCC)

Cloud.com CloudStack Community Edition 2.1 Beta Installation Guide

2) Xen Hypervisor 3) UEC

Edwin Guchu. Implementation of cloud infrastructure using open source software

Comodo MyDLP Software Version 2.0. Installation Guide Guide Version Comodo Security Solutions 1255 Broad Street Clifton, NJ 07013

Efficient Cloud Management for Parallel Data Processing In Private Cloud

Building a Penetration Testing Virtual Computer Laboratory

ULTEO OPEN VIRTUAL DESKTOP UBUNTU (PRECISE PANGOLIN) SUPPORT

Storage Sync for Hyper-V. Installation Guide for Microsoft Hyper-V

CDH installation & Application Test Report

Plexxi Control Installation Guide Release 2.1.0

DVS-100 Installation Guide

INUVIKA OVD INSTALLING INUVIKA OVD ON UBUNTU (TRUSTY TAHR)

About the VM-Series Firewall

Thinspace deskcloud. Quick Start Guide

INSTALLING KAAZING WEBSOCKET GATEWAY - HTML5 EDITION ON AN AMAZON EC2 CLOUD SERVER

insync Installation Guide

NSi Mobile Installation Guide. Version 6.2

Partek Flow Installation Guide

Acano solution. Virtualized Deployment R1.1 Installation Guide. Acano. February B

Development of Private Cloud

Create a virtual machine at your assigned virtual server. Use the following specs

Install Guide for JunosV Wireless LAN Controller

Installing an open source version of MateCat

Online Backup Guide for the Amazon Cloud: How to Setup your Online Backup Service using Vembu StoreGrid Backup Virtual Appliance on the Amazon Cloud

Virtual Appliance Setup Guide

If you re not using Citrix XenCenter 6.0, your screens may vary. Required Virtual Interface Maps to... mgmt0. virtual network = mgmt0 wan0

PHD Virtual Backup for Hyper-V

Required Virtual Interface Maps to... mgmt0. bridge network interface = mgmt0 wan0. bridge network interface = wan0 mgmt1

Running Knn Spark on EC2 Documentation

VMUnify EC2 Gateway Guide

Private Distributed Cloud Deployment in a Limited Networking Environment

Deploy XenApp 7.5 and 7.6 and XenDesktop 7.5 and 7.6 with Amazon VPC

How To Install Openstack On Ubuntu (Amd64)

System Administration Training Guide. S100 Installation and Site Management

Installing and Using the vnios Trial

Eucalyptus Hybrid Cloud Guide

Install and configure a Debian based UniFi controller

Verax Service Desk Installation Guide for UNIX and Windows

How To Install An Org Vm Server On A Virtual Box On An Ubuntu (Orchestra) On A Windows Box On A Microsoft Zephyrus (Orroster) 2.5 (Orner)

Getting Started with Amazon EC2 Management in Eclipse

Quick Start Guide for Parallels Virtuozzo

Intel Cloud Builders Guide to Cloud Design and Deployment on Intel Platforms

How to Create, Setup, and Configure an Ubuntu Router with a Transparent Proxy.

Rally Installation Guide

Module I-7410 Advanced Linux FS-11 Part1: Virtualization with KVM

Local Caching Servers (LCS): User Manual

VX 9000E WiNG Express Manager INSTALLATION GUIDE

Privileged Cloud Storage By MaaS JuJu

Assembling Cloud Infrastructures with Eucalyptus

Quick Start Guide. Citrix XenServer Hypervisor. Server Mode (Single-Interface Deployment) Before You Begin SUMMARY OF TASKS

Citrix XenServer 5.6 OpenSource Xen 2.6 on RHEL 5 OpenSource Xen 3.2 on Debian 5.0(Lenny)

Amazon Web Services EC2 & S3

VMTurbo Operations Manager 4.5 Installing and Updating Operations Manager

Quick Start Guide for VMware and Windows 7

Aspen Cloud Server Management Console

Cloud Computing For Bioinformatics. EC2 and AMIs

CommandCenter Secure Gateway

Extending Remote Desktop for Large Installations. Distributed Package Installs

TimeIPS Server. IPS256T Virtual Machine. Installation Guide

REQUIREMENTS AND INSTALLATION OF THE NEFSIS DEDICATED SERVER

SOA Software API Gateway Appliance 7.1.x Administration Guide

Sharp Remote Device Manager (SRDM) Server Software Setup Guide

Using The Hortonworks Virtual Sandbox

Intelligent Power Protector User manual extension for Microsoft Virtual architectures: Hyper-V 6.0 Manager Hyper-V Server (R1&R2)

INUVIKA OVD VIRTUAL DESKTOP ENTERPRISE

Single Node Hadoop Cluster Setup

Guide to the LBaaS plugin ver for Fuel

Dell UPS Local Node Manager USER'S GUIDE EXTENSION FOR MICROSOFT VIRTUAL ARCHITECTURES Dellups.com

NOC PS manual. Copyright Maxnet All rights reserved. Page 1/45 NOC-PS Manuel EN version 1.3

NoMachine Enterprise Products, Cloud Server Installation and Configuration Guide

Linux Terminal Server Project

EXPRESSCLUSTER X for Windows Quick Start Guide for Microsoft SQL Server Version 1

Appendix B Lab Setup Guide

Hadoop Data Warehouse Manual

Barracuda Message Archiver Vx Deployment. Whitepaper

Transcription:

A technical whitepaper describing steps to setup a Private Cloud using the Eucalyptus Private Cloud Software and Xen hypervisor. Vivek Juneja Cloud Computing COE Torry Harris Business Solutions INDIA

Contents Introduction to Private Cloud, Eucalyptus and Xen 3 Setting up Eucalyptus Cloud on Xen 4 Hardware and Software 5 Eucalyptus Front End 6 Eucalyptus Node Controller 7 Registering Node Controller on Front End 11 Adding VM Images 12 Configure Eucalyptus Tools 15 References 19 2

What is Private Cloud? A System in which Infrastructure is dedicatedly allocated to an individual or an enterprise and provides cloud based services : Dynamic Provision, Elastic Resources, Chargeback and Automation. A Private cloud provides shared hosting environment for multiple applications and environments owned or managed by an Enterprise or individual. It s a preferred platform for most enterprises who fear of security, compliance regulations and ownership of data problems with Public cloud and yet need the elastic power of computing to be available on-demand. What is Eucalyptus? Eucalyptus is an infrastructure software that enables enterprises and government agencies to establish their own cloud computing environments. With Eucalyptus, customers make more efficient use of their computing capacity, thus increasing productivity and innovation, deploying new applications faster, and protecting sensitive data, while reducing capital expenditure. It provides APIs compatible to the popular Amazon Web Services offerings : EC2, S3 and EBS, thus allowing access to wide variety of cloud tools and option of building hybrid clouds. What is Xen? Xen is the most popular Open Source Virtualization software that allows multiple OS to run on the same computer hardware concurrently, thereby improving the effective usage and efficiency of the underlying hardware. It benefits the enterprises with the power of consolidation, increased utilization and rapid provisioning. 3

Setting up Eucalyptus Cloud on Xen :- In any Eucalyptus Cloud Installation, there are 2 top-level components: Cloud Controller (CLC) and Walrus. These 2 components manage the various clusters, where cluster is a set of physical machines that host the Virtual Instances. In each cluster, there are 2 components that interact with the high level components : Cluster Controller (CC) and Storage Controller (SC). CC and SC are cluster level components. Each cluster is composed of various Nodes, or physical machines. Each Node will run a Node Controller (NC) that will control the hypervisor for managing the Virtual Instances. For this setup, We have implemented a Single-Cluster Installation, where all the components except NC are co-located on one machine. As per Eucalyptus documentation, this co-located system is called : front-end. So in a gist, We have 1 physical machine which hosts CLC, Walrus, CC, SC, and 5 other machines that hosts NC each. The Node Controller uses Xen as a hypervisor. The NC service runs on Domain-0 kernel in the Xen Setup. 4

Hardware :- We used 1 Admin Machine with the config : Intel Core 2 Duo Processor 1.8 GHz, with 1 GB RAM, 160 GB HDD, and 5 Node Controllers each with the config : Intel Core 2 Duo Processor 1.8 Ghz (VT enabled) with 2 GB RAM, 160 GB HDD. The recommended configuration for the Admin and the Node Controller machine can be obtained from the following link :- https://help.ubuntu.com/community/uec/cdinstall Software :- Eucalyptus 1.6.1 running on Ubuntu 9.04 (Jaunty), Xen 3.3 hypervisor. For dependencies, in case of installing from source, please follow the link :- http://open.eucalyptus.com/wiki/eucalyptusinstallationubuntujaunty_v1.6 The above link mentions the dependencies for both Admin and Node Controller environments. 5

Eucalyptus Front End :- The Eucalyptus Front End hosts the Cloud Controller, Storage Controller and the Cluster Controller services. It exposes AWS compatible WS (Web Services) interfaces. Add the following line in /etc/apt/sources.list file, deb http://www.eucalyptussoftware.com/downloads/repo/eucalyptus/1.6.1/ubuntu jaunty Then update it, using apt-get update We have setup a static IP address for the Front-end, and for reference, I have the network interfaces setting as following :- bash> cat /etc/network/interface # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.1.26 netmask 255.255.255.0 network 192.168.1.0 Then, We installed Eucalyptus CLC, CC, Walrus, SC using the following :- sudo apt-get install eucalyptus-cc eucalyptus-cloud eucalyptus-common eucalyptuswalrus eucalyptus-sc Install the euca2ools for managing the Cloud :- sudo apt-get install euca2ools 6

Eucalyptus Node Controller :- A Node Controller will host the Virtual Machines. Hence it must have a hypervisor installed into it. We first installed the Ubuntu 9.04 Server Edition on the bare machine. To this, we installed the Debian Domain 0 Kernel, Xen Hypervisor, and Xen utils. Installing Debian Domain 0 Kernel :- We were able to find the Debian Kernel for Domain 0 :- Kernel: http://packages.debian.org/lenny/i386/linux-image-2.6.26-2-xen-686/download Modules: http://packages.debian.org/lenny/i386/linux-modules-2.6.26-2-xen-686/download We installed it :- sudo dpkg -i linux-image-2.6.26-2-xen-686_2.6.26-15lenny2_i386.deb linux-modules- 2.6.26-2-xen-686_2.6.26-15lenny2_i386.deb Once the Domain 0 kernel is installed, the utility grub-update can automatically create the menu entry in the GRUB like as following :- bash> cat /boot/grub/menu.lst Xen 3.3 / Ubuntu 9.04, kernel 2.6.26-2-xen-686 23c57099-3cee-4c9c-ae22-579b6128bac3 /xen-3.3.gz /vmlinuz-2.6.26-2-xen-686 root=/dev/mapper/ubuntu--cloud-root ro con- /initrd.img-2.6.26-2-xen-686 title uuid kernel module sole=tty0 module quiet Installing Xen hypervisor and tools: sudo apt-get install xen-hypervisor-3.3 xen-utils-3.3 Now you should remove the Ubuntu Network Manager by : sudo apt-get remove network-manager update the /etc/network/interfaces with this :- auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp 7

The above settings are for individuals who have a DHCP server running like mine, but in case you are on a fixed IP, then you can go for something like this below :- auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.26 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 Now boot the machine and select the Xen Domain 0 kernel from the GRUB. Once the Xen Domain 0 kernel was installed, we rebooted the machine. On GRUB, we selected the new Dom 0 Kernel which got installed. In case the Xen Dom 0 kernel entry is not visible in the GRUB Menu, we need to boot into Ubuntu 9.04 and edit the menu.lst file to have the entry for the same. We then use grubupdate to update the GRUB which will take the new Menu listing. The last procedure differs in case you are using the GRUB 2. In this case then, we would need to change the grub.cfg file with the same changes. Once we have logged in the Xen Dom 0 kernel from the GRUB, we need to install the Eucalyptus Node Controller component on it. But before that, it is essential that we test that we are able to create a new Xen Domain from the Xen tools at the command prompt. Please install the xen tools to create a new domain :- Installing Xen tools: sudo apt-get install xen-tools Now, you can edit the file /etc/xend/xend-config.sxp and check if you have the following settings : (xend-http-server yes) (xend-unix-server yes) (xend-unix-path /var/lib/xend/xend-socket) (xend-address localhost) (network-script network-bridge) (vif-script vif-bridge) (dom0-min-mem 196) (dom0-cpus 0) 8

We can follow the below mentioned link to test the Xen tools and create a new test domain. If the domain is created successfully, and we are able to do console login to the running domain, we can confirm that Xen is working fine. Creating a Xen Domain U :- http://www.infohit.net/blog/post/installing-and-running-xen-domu-jaunty-on-dom0-ubuntujuanty.html After successful testing, stop the running domain, and remove it using the xen tools CLI. We can then check for the bridge setup, by issuing the following command. The output is as shown : bash> brctl show bridge name bridge id STP enabled interfaces eth0 8000.001a6b4684e5 no peth0 virbr0 8000.000000000000 yes Please note : Against the bridge name eth0, the interface is peth0 in the above console output. After this we must install the dependencies for the Eucalyptus Node Controller including Apache Axis2/c, Rampart, LibVirt etc. as per the documentation for the Eucalyptus Installation. Once the dependencies are installed, we must install the eucalyptus-nc service. Once the eucalyptus-nc service is installed, we must edit the file eucalyptus.conf usually located under /etc/eucalyptus folder. This file holds all the critical settings for the eucalyptus-nc to work correctly. We must first change the hypervisor setting, and set it to xen instead of KVM which comes by default. Also, we must set the INSTANCE_PATH setting to the convenient path where we want to have the Xen Domain Images stored. This folder must be allocated space that makes it sufficient to contain large Virtual Machine images. Next, we must configure the VNET_PRIVINTERFACE settings. In my environment, following was the assignment. Please refer to the section in this document where we mentioned about the xen bridge and interfaces. :- VNET_PRIVINTERFACE="peth0" The VNET_BRIDGE setting must be pointing to the name of the bridge that Xen has configured. In my case it was eth0. In my environment, the need was to have Eucalyptus not to manage the VM network. This was because the network in which Eucalyptus was installed was not isolated and self-contained. So, the VNET_MODE setting in the same file was set to SYSTEM. For more extensive details on the Eucalyptus Network settings, please refer to the Eucalyptus Documentation. 9

So, now the Eucalyptus configuration for the Node Controller is done. We will now start the node controller service. In my environment, the Eucalyptus Node Controller was started using the command :- /etc/init.d/eucalyptus-nc restart Please refer to the Eucalyptus Log files, usually located under /var/log/eucalyptus/ directory. The log file is nc.log. Check this file if the eucalyptus-nc service shows any failure. Remember as obvious, we must restart the eucalyptus-nc service on any changes done to the eucalyptus.conf file. 10

Registering Node Controller on Front End:- Now, we will start configuring the Cloud Controller, and allow it to register the new Node that we have setup. For this, we will login to the Eucalyptus Cloud Controller box, and use the euca_conf application to register the new Node. Use the following command :- euca_conf --register-nodes "192.168.1.101" The IP address mentioned in the above command refers to the machine that had the Eucalyptus Node Controller service running. Now we need to obtain the credentials from the command line of the Cloud Controller by doing the following:- mkdir -p ~/.euca chmod 700 ~/.euca cd ~/.euca sudo euca_conf --get-credentials mycreds.zip unzip mycreds.zip ln -s ~/.euca/eucarc ~/.eucarc cd - Eucalyptus Cloud Controller will attempt to register the new Node, and we can check for successful registration by following command :-. ~/.euca/eucarc euca-describe-availability-zones verbose The above command produces the following console output in my setup :- AVAILABILITYZONE - vm types free / max cpu ram disk AVAILABILITYZONE - m1.small 0002 / 0002 1 128 2 AVAILABILITYZONE - c1.medium 0002 / 0002 1 256 5 AVAILABILITYZONE - m1.large 0001 / 0001 1 512 20 AVAILABILITYZONE - m1.xlarge 0000 / 0000 2 1024 40 AVAILABILITYZONE - c1.xlarge 0000 / 0000 4 2048 60 If the above command works out properly, we are sure that Eucalyptus is working fine. Now we will proceed to run a new instance of the Cloud. 11

Adding VM Images :- Adding a VM image to the Eucalyptus Cloud requires :- a) Download a VM Image b) Add the root disk image, kernel / ramdisk pair to the Walrus (Storage Service) c) Register the image with Eucalyptus First, we downloaded an image from http://uec-images.ubuntu.com/releases/, which in this case is : http://uec-images.ubuntu.com/releases/9.10/rc/ubuntu-9.10-rcuec-i386.tar.gz We will now bundle the Kernel, Initrd and the OS Image :- 1) Unpack the Downloaded image from the tarball : tar -S -xzf ubuntu-9.10-rc-uec-i386.tar.gz 2) We bundle the kernel euca-bundle-image -i karmic-uec-i386-vmlinuz-virtual -r i386 --kernel 3) We upload the kernel bundle TIMESTAMP=$(date +%Y%m%d%H%M%S) BUCKET_KERNEL="k-$TIMESTAMP" euca-upload-bundle -b $BUCKET_KERNEL -m /tmp/karmic-uec-i386- vmlinuz-virtual.manifest.xml 4) Register the kernel bundle with Eucalyptus EKI=$(euca-register $BUCKET_KERNEL/$UEC_KERNEL.manifest.xml grep "^IMAGE" awk '{print $2}') && echo $EKI 5) We bundle the ramdisk BUCKET_INITRD="r-$TIMESTAMP" euca-bundle-image -i karmic-uec-i386-initrd-virtual -r i386 6) We upload the ramdisk bundle euca-upload-bundle -b $BUCKET_INITRD -m /tmp karmic-uec-i386-initrdvirtual.manifest.xml 7) Register the ramdisk bundle with Eucalyptus ERI=$(euca-register $BUCKET_INITRD/karmic-uec-i386-initrdvirtual.manifest.xml grep "^IMAGE" awk '{print $2}') && echo 12

8) We bundle the image BUCKET_IMAGE="i-$TIMESTAMP" euca-bundle-image -i karmic-uec-i386.img -r i386 --kernel $EKI ${ERI:+--ramdisk The above step will take a little time, depending on the size of the image. 9) Upload the image bundle BUCKET_IMAGE="i-$TIMESTAMP" euca-upload-bundle -b $BUCKET_IMAGE -m /tmp/$uec_img.img.manifest.xml 10) We register the image with Eucalyptus EMI=$(euca-register $BUCKET_IMAGE/karmic-uec-i386.img.manifest.xml grep "^IMAGE" awk '{print $2}') && echo $EMI Once the above steps have been performed, the image will be ready to run. Execute the following command to check if the image is available :- bash> euca-describe-image IMAGE emi-242711c0 i-20100322194920/karmic-uec-i386.img.manifest.xml admin available public i386 machine IMAGE eki-41a116d5 k-20100322194920/karmic-uec-i386-vmlinuzvirtual.manifest.xml admin available public i386 kernel IMAGE eri-24ea1645 r-20100322194920/karmic-uec-i386-initrdvirtual.manifest.xml admin available public i386 ramdisk Now, we need to create the keypair (ssh key) that can be used to log in to the new VM instance. if [! -e ~/.euca/cloud.priv ]; then mkdir -p -m 700 ~/.euca touch ~/.euca/cloud.priv chmod 0600 ~/.euca/cloud.priv euca-add-keypair cloud > ~/.euca/cloud.priv fi In the above command, cloud is the name of the keypair. We must also allow access to port 22 for FTP to the VM Instances : euca-authorize default -P tcp -p 22 -s 0.0.0.0/0 Now, we create instance of the image that we registered in the above instructions euca-run-instances $EMI -k mykey -t m1.small 13

It will take sometime for the instance to be ready, and we can use the below command to monitor the state of the instance : euca-describe-instances & Once the above command shows the image to be in running state, then we need to check for the IP Address of the new Instance : IPADDR=$(euca-describe-instances grep $EMI grep running tail -n1 awk Once the IP address is available, we can access the running instance, by using the below command : ssh -i ~/.euca/mykey.priv ubuntu@$ipaddr 14

Configure Eucalyptus Tools :- One of the popular tools to manage both Amazon and Eucalyptus EC2 instances is HybridFox. It is a Mozilla Firefox Plugin, and integrates well with the Eucalyptus Cloud. It allows to manage the EC2 instances and EBS Volumes. The user can create / stop/ start instances, attach EBS volumes and even take EBS snapshots. We have covered Hybrid- Fox in brief through the series of screenshots. We can download HybridFox from http://code.google.com/p/hybridfox/downloads/list To install, just drag and drop the HybridFox.xpi file into Mozilla Firefox browser. Once installed, the plugin can be accessed from the Tools menu of the browser. We will now cover the configuration part of the HybridFox. The user must click on the Regions button as shown below, and enter the Region Name and EndPoint URL. The End- Point URL must point to the IP address of the Cloud Controller. Region Name can be anything that the user likes. Once added, we must select the added region from the Regions Drop down. Now we need to get the credentials that are required for HybridFox to make secure Web Service calls to the Cloud Controller. For retrieving the Credentials, we must log in to the Eucalyptus Admin Tool as shown in the next screenshot. 15

We will use the Query ID and Secret Key available from the Credentials Tab of the Admin Console. The User must now get back to HybridFox, and click on Credentials button. The Query ID obtained from above will be the AWS Access Key, and the Secret Key will be the AWS Secret Access Key. The account name can be anything that the user wants. 16

Once the credentials are added, the user must select the added credentials from drop down, and hit refresh for the browser. This will allow HybridFox to access the Cloud Controller with the config. The screenshot below shows the list of Images available. The use can select any EMI and launch an instance for the same. Subsequent screenshot shows the running instance. 17

The following screenshot shows the security groups created, and the permission assigned to the groups. EBS Volumes and Snapshots management is shown below. 18

References :- http://www.ubuntu.com/cloud/private http://www.infohit.net/blog/post/running-xen-on-ubuntu-intrepid-and-jaunty.html http://xen.org/ 19