
Transcription
International Journal of Computer Applications (0975 – 8887)Volume 70– No.20, May 2013IaaS Implementation of a Private Cloud using OpenSource TechnologyRajat KandpalVishal KumarBTech CSECollege of Engineering RoorkeeRoorkee, IndiaBTech CSECollege of Engineering RoorkeeRoorkee, IndiaABSTRACTCloud Computing is a field of IT that can revolutionize thetraditional computing facilities. Cloud Computing gives a newview to our hardware and software facilities by making themelastic rather than scalable. The system can be scaled up ordown according to a user’s need. The use of open sourcetechnology is a turning point in providing cloud computinginfrastructure to reduce the cost by a large magnitude. We canbuild our own private clouds and share resources viz.hardware and software without making any investment. Theaim of this paper is to provide open source solution to build aprivate cloud. Iaas(Infrastructure as a service) implementationmeans to implement a private cloud wherein we can sharehardware resources so as to reduce the cost of IT services ofan organization.with the clients but keep their data secured within a privatecloud [3].In this paper we will build a Private cloud using Open SourceSoftware Eucalyptus. The Eucalyptus package is bundledinside the UEC (Ubuntu Enterprise Cloud) which in turncomes inside Ubuntu Server 10.04. The private cloudimplemented renders its services as Iaas.KeywordsCloud Computing, IAAS, Private Cloud, Open SourceTechnology, Eucalyptus, Hypervisors.1. INTRODUCTIONCloud Computing is a computing model, where resourcessuch as computing power, storage, network and software areabstracted and provided as services on the internet in aremotely accessible fashion [5].In cloud computingeverything is used as a service. The services can be billed as apay-as-you-use basis. When we use open source technologywe can cut short of payment of services but we must have apool of resources to extract our computing requirements.Fig.1: Types of Cloud Services[1]2. IAASThe main concept behind cloud computing is providingservices. It provides various types of services, some of theimportant services are SaaS, PaaS and IaaS. Software as aservice is a model of software deployment whereby a providerlicenses an application to customers for use as a service ondemand. Platform as a service generates all facilities requiredto support the complete cycle of construction and delivery ofweb-based applications wholly available in Internet withoutthe need of downloading software or special installations bydevelopers and finally Infrastructure as a service providesinformatics resources, such as servers, connections, storageand other necessary tools to construct an application designprepared to meet different needs of multiple organizations,making it quick, easy and economically viable[8].In the most basic cloud-service model, providers of IaaS offercomputers - physical or (more often) virtual machines - andother resources. (A hypervisor, such as Xen or KVM, runs thevirtual machines as guests. Pools of hypervisors within thecloud operational support-system can support large numbersof virtual machines and the ability to scale services up anddown according to customers' varying requirements.) IaaSclouds often offer additional resources such as a virtualmachine disk image library, raw (block) and file-basedstorage, firewalls, load balancers, IP addresses, virtual localarea networks (VLANs), and software bundles. IaaS-cloudproviders supply these resources on-demand from their largepools installed in data centers. For wide-area connectivity,customers can use either the Internet or carrier clouds(dedicated virtual private networks).Cloud computing is mainly classified into three types basedon the deployment model; Public cloud, Private cloud andHybrid cloud. If the services are provided over the internetthen it is public cloud or external cloud and if it is providedwithin an organization through intranet then it is named asprivate cloud or internal cloud and Hybrid cloud is aninternal/external cloud which allows a public cloud to interactTo deploy their applications, cloud users install operatingsystem images and their application software on the cloudinfrastructure. In this model, the cloud user patches andmaintains the operating systems and the application software.Cloud providers typically bill IaaS services on a utilitycomputing basis: cost reflects the amount of resourcesallocated and consumed. Examples of IaaS providers include:30
International Journal of Computer Applications (0975 – 8887)Volume 70– No.20, May 2013Amazon EC2, Azure Services Platform, Google ComputeEngine, HP Cloud etc.[1]3. OPEN SOURCEGenerically, open source refers to a program or a software inwhich the source code is available to the general public foruse and/or modification from its original design free ofcharge, i.e., open to use and customize [12].Open source software is by definition software for whichusers have access to the source code. This distinguishes itfrom the recent common practice of commercial softwarepublishers by only releasing the binary executable versions ofthe software. Most open source software is also distributed atno cost with limited restrictions on how it can be used; hencethe term free when used to describe open source carries twomeanings: 1) free of cost and 2) free to do with the softwareas you wish (i.e., most importantly free to read and customizethe code).[6]Open source code is typically created as a collaborative effortin which programmers improve upon the code and share thechanges within the community. Software is protected usingthe copyright system. Relying on the same protection as onbooks, music or film, the buyer of software is licensed the useof a copy of the product.Open Source also allows free redistribution of software andallows us to customize it to meet our needs eg. UEC,EUCALYPTS, UBUNTU.4. UBUNTU ENETRPRISE CLOUD ANDITS ELEMENTSUbuntu Enterprise Cloud, UEC for short, is a stack ofapplications from Canonical included with Ubuntu ServerEdition. UEC includes Eucalyptus along with a number ofother open source software. UEC makes it very easy to installand configure the cloud. Canonical also provides commercialtechnical support for UEC[5].a research project under direction of Prof. Rich Wolski,Computer Science Department at the University of California,Santa Barbara, USA[7]. Eucalyptus is a software availableunder GPL that helps in creating and managing a private oreven a publicly accessible cloud. It provides an EC2compatible cloud computing platform and S3-compatiblecloud storage platform. The Eucalyptus Cloud maintains itscompatibility with the Amazon EC2 cloud. Node Controller controls the execution, inspection,andterminating of VM instances on the host where it runs. Cluster Controller gathers information about and schedulesVM execution on specific node controllers,as well as managesvirtual instance network. Storage Controller (Walrus) is a put/get storage servicethat implements Amazon’s S3 interface, providing amechanism for storing and accessing virtual machine imagesand user data. Cloud Controller is the entry-point into the cloud for usersand administrators. It queries node managers for informationabout resources, makes highlevel scheduling decisions, andimplements them by making requests to cluster controllers[2].A CLC manages the whole cloud and includes multiple CC’s.There will be a WS3 attached to a CLC.A CC can containmultiple NC’s and SC’s. Ultimately the VM’s will be runningin the NC making use of its physical resources.Eucalyptus is a platform for providing scalable internetservice [2]. Eucalyptus allows to scale the cluster to multiplemachines. Thus the resources can be easily added to the cloudeg. Node Controllers can be added to the cluster in the cloud.5. CONFIGURING AND INSTALLINGTHE PRIVATE CLOUDThe UEC setup in Includes two servers (Server 1 and Server2) which will run a Ubuntu 10.04 server version and the thirdsystem which will run a Lucid Desktop 64-bit version (Client1)[5].The figure shows a Private cloud implemented withEucalyptus.Fig.3: Private Cloud Setup Overview[13]5.1 Server 1 Install1. Insert ubuntu 10.04 server edition cd2. Select “Install ubuntu enterprise cloud”3. Configure the network: select “configure networkmanually”address 192.168.6.22Fig.2: Private Cloud based on Eucalyptus[5]gateway 192.168.0.14.1 Eucalyptusnetmask 255.255.255.0Eucalyptus stands for “Elastic Utility Computing Architecturefor Linking Your programs to Useful Systems”. Eucalyptus isname server 121.242.xxx.xxx4. Host name for this system: host131
International Journal of Computer Applications (0975 – 8887)Volume 70– No.20, May 20135. Cloud controller address: leave it blank6. Cloud installation mode:Select following Cloud controller, Walrus storage service,Note:1. we can also install KVM on Server1 to bundle ourimages.2.The Client1 is connected to CLC.Cluster controller, Storage controller5.4 Exchange of Public SSH Keys7. Partition disks select “Guided-use entries disk and set upLVM”Note: This is needed only when the node controller is notdiscovered in the cloud:8. Full name for new user and username for account : rajat1.On node controller set a temporary password9. Select no automatic updates sudo passwd eucalyptus10. Eucalyptus cluster name : cluster12.On cloud controller11. Pool of IP addresses that can be dynamically assigned as sudo -u eucalyptus ssh-copy-id -ipublic IP’s of virtual machines: id rsa.pub [email protected] Install grub boot loader to master boot loader: yes[4]3.On node controller remove temporary passwordMake sure you have latest version of eucalyptus sudo passwd -d eucalyptus sudo apt-get upgrade eucalyptus5.5 Get credentials5.2 Server 2 Install1.On cloud controller: install credentials which consist ofx.5091. Insert ubuntu 10.04 server edition cd2. Select “Install ubuntu enterprise cloud”3. Configure the network: select “configure networkmanually”address 192.168.6.23gateway 192.168.6.22 (IP of cloud controller)Certificates and environment variables.Open web browser and enter following url:https://192.168.6.22:8443/#login and click on credentials tabDownload the credentials euca2-admin-x509.zip on cloudcontroller.netmask 255.255.255.02.Alternatively, if you are on the command line of the CloudController, you can run:nameserver 121.242.xxx.xxxmkdir -p /.eucaHere Cloud controller is detected automaticallychmod 700 /.euca4. Host name for this system: host2cd /.euca5. Cloud installation mode: Node controllersudo euca conf --get-credentials mycreds.zip6. Partition disks select “Guided-use entire disk and set upLVM”unzip mycreds.zip7. Full name for new user and username for account : rajat8. Select no automatic updates9. Install grub boot loader to master boot loader: yes[4]5.3 Client 1 Installln -s /.euca/eucarc /.eucarccdIn the above steps we make a folder /.euca and download thecredentials and unzip the credentials after changing theirpermissions.The purpose of Client1 machine is to interact with the cloudTo validate that everything is working correctly, get the localcluster availability details:setup, for bundling and registering new Eucalyptus Machine. /.euca/eucarceuca-describe-availability-zones verbose[13]Images (EMI).1.Boot the Desktop off the Ubuntu Desktop 10.04 CD andinstall. The Desktop will be on the enterprise network andwill obtain an IP address through DHCP.2. Install KVM to help us to install images on KVM platformand bundle them: sudo apt-get install qemu kvm3.Install euca2ools to manage the cloud from it sudo apt-get install euca2ools[5].Fig.4 : Screenshot of available resources.32
International Journal of Computer Applications (0975 – 8887)Volume 70– No.20, May 2013If you see the free/max VCPUs as 0 in the above list, it meansthe node did not get registered automatically. Please use thefollowing on Server1 and approve when prompted to add192.168.6.23 as the Node Controller: sudo euca conf --discover-nodes [7].5.6 Installing ImagesAn Image in UEC is called a EMI (Eucalyptus MachineImage).A Eucalyptus Machine Image (EMI) is a combinationof a virtual disk image(s), kernel and ramdisk images as wellas an xml le containing metadata about the image. Theseimages reside on WS3 and are used as templates for creatinginstances on UEC. euca-upload-bundle -b mybucket -m /tmp/vmlinuz-2.6.2811-server.manifest.xml fest.xml IMAGE eki-681013032.Registering ramdisk image Execute the followingcommands to bundle and register the ramdisk image(initrd.img-2.6.28-11-server): euca-bundle-image -i initrd.img-2.6.28-11-server euca-upload-bundle -b mybucket -m /tmp/initrd.img-2.6.2811-server.manifest.xml euca-register mybucket/initrd.img-2.6.28-11-Each Linux EMI is a combination of the following:server.manifest.xml An XML le with a name like “jaunty.img.manifest.xml" withinformation about one or more hard disk images, a kernelimage and a ramdisk image (id - emi-65440E7E)IMAGE eri-A26613DD An XML le with a name like ationaboutthecorresponding kernel image (id - eki-39FC1244)bundle and register the disk image (centos.5-3.x86.img): An XML le with a name like ormationaboutthecorresponding ramdisk image (id - eri-71ED1322) site.[5] euca-upload-bundle -b mybucket -m /tmp/centos.5-3. Registering disk image Execute the following commands to euca-bundle-image -i centos.5-3.x86.img --kernel eki68101303 --ramdisk eri-A26613DD3.x86.img.manifest.xml euca-register mybucket/centos.5-3.x86.img.manifest.xmlIMAGE emi-F62F11004. The new images that have been uploaded can be seen byusing following command. euca-describe-images5.6.2 Install a Key Pair1. Create a new group called “wiki” and use it instead of thedefault group euca-add-group wiki -d wiki demo appliancesAlso allow access to port 22 in instances: euca-authorize wiki -P tcp -p 22 -s 0.0.0.0/02. Build a keypair that will be injected into theinstance(virtualFig.5 :Image of the Storemachine) allowing to access it via ssh.From the web interface of Eucalyptus, you can view a list ofEMIs in the “Store" tab of the web UI. These are the EMIslisted from Canonical or partners. You can choose todownload and install any of these images directly fromCanonical's site.The images can also be customized ,bundledand uploaded to the cloud. euca-add-keypair mykey /.euca/mykey.priv chmod 0600 /.euca/mykey.priv [4]5.7 Running Instances1. Now we are finally ready to begin running instances. We’llstart by creating an instance of our image and connections will5.6.1 Installing images in Server 1The Store tab provides list of images, also it can be installedusing following commands:Download images from Extras tab in UEC1. Registering kernel image Execute the following commandsto bundle and register the kernel image (vmlinuz-2.6.28-11server):be allowed on ports ssh and http: euca-run-instances -g wiki -k mykey -t c1.mediumemiF62F11002. After issuing the “euca-run-instances” command to run aninstance, we can track its progress from pending to runningstate by using the euca-describe-instances command. euca-bundle-image -i vmlinuz-2.6.28-11-server --kernel true33
International Journal of Computer Applications (0975 – 8887)Volume 70– No.20, May 2013outthecloudandaddNCs.Fig.6: Running instances in hybridfoxFig.7: Screenshot of Installing Node controllerAt launch, Instances are in pending state after some time theyare in running state at this state client can use the CentOSoperating system. An instance to get terminated it first entersinto shuttingdown state then it terminates[5]5.7.1 HybridfoxHybridFox (previously ElasticFox) is a web based GUI usedto manage instances and other related aspects in the UEC. It isan extension for Mozilla’s Firefox, and can be downloaded9and installed easily. HybridFox10 can connect to both public(Amazon) and private clouds (UEC) and providescompatibility between Amazon and UEC.Hybridfox can perform all the functions that can be done byelasticfox, on the Eucalyptus Computing environment likeManage Images, Raise and Stop Instances, Manage Instances,Manage Elastic IPs, Manage Security Groups, Manage Keypairs and Manage Elastic Block Storage[11,16].The NC are installed in the same way as done before andadded to the cloud.6. FUTURE SCOPEThe cloud can be integrated to other public clouds whichgives rise to hybrid cloud. The integration also enhances thescope of cloud computing as we will be able to use resourcesof other organizations. They services can also be metered andmade as pay-per-use basis. This kind of services are alsocalled Saas(Software as a service).The cloud is dependent oninternet and can be made to work in a lan.Further work can be done to manage the private cloud withbetter resource management and improving the efficiency ofthe system.7. CONCLUSION1. Authentication/Authorization of the user request to ensureCloud computing is a colossal field, with which we can shareour resources and couple them as in the private cloud. Wehave read many research papers, articles, web discussionabout configuring a private cloud in the form of IaaS andmanaged to find a way of building it using open sourcesoftwares like UEC, eucalyptus. In the cloud we can share thehardware and other resources of an organization. The use ofOpen Source Technology makes our move very economical.The various softwares and operating systems used are opensource and can be customized to meet our needs viz.Eucalyptus, Ubtuntu Server10.04 etc.that we have permission to launch the instance8. REFERENCES5.8 Life Cycle of InstanceWhen “euca-run-instances” command is invoked (or when runinstance is chosen from Hybridfox/Elasticfox), the runningprocess will be in a sequential manner as shown in Fig.7.Hereare some few things that happen on various components ofUEC:2. Identification of CC to take responsibility for deploying theinstance and identification of the NC for running the instance.[1] Cloud Computing,Wikipedia;en.wikipedia.org.3. Downloading the image from WS3 to NC (images arecached so that starting multiple instances of the same machineimage downloads that image only once)[5].5.9 Scaling out the cloudTo scale out the cloud we need to add NC(NodeControllers).We often get messages that the resources are notenough when we start an instance then there is a need to scale[2] Daniel Nurmi, Rich Wolski, Chris Grzegorczyk GrazianoObertelli, Sunil Soman, Lamia Youseff, DmitriiZagorodnov –The Eucalyptus Open-source Cloudcomputing System(2009)[3] paring-Public-Private-andHybridcloud- computing. Wiley Publishing, Inc.2009.[4] Louis Danuser (AT&T Labs, Inc.) Deploying an OpenSource Private Cloud On a Shoe String BudgetPresentation,http://www.oscon.com/,201034
International Journal of Computer Applications (0975 – 8887)Volume 70– No.20, May 2013[5] Eucalyptus Beginner’s Guide-UEC Edition (UbuntuServer 10.04-Lucid Lynx) v1.0 by Johnson D,KiranMurari,Murthy Raju Suseendran RB,Yogesh Girikumar,25 May 2010.[10] TechnicalPaper,Ubuntu Enterprise Cloud Architecture.[6] TheOpenSourceSoftwareDevelopmentPhenomenon:An Analysis Based On Social anConferenceonInformationSystems (2002)[12] Open Source, http://www.webopedia.com.[7] Dr G.R.Karpagam and J.Parkavi, Setting Up of an OpenSource Based Private Cloud,IJCSI,vol.8 ,Issue 3,May2011.[8] Glossary, (2010), MasterBase, www.en.masterbase.com/[9] Simon Wardley, Etienne Goyer and Nickbarcet;Technical White Paper: Ubuntu Enterprise CloudArchitecture(2009).NickWhite[11] Mitchell pronsc, Hybridfox: Elasticfox for Eucalyptus,2009[13] https://help.ubuntu.com/community/UEC[14] Zoran Pantic and Muhammed Ali Babar, Installing andScaling out Ubuntu Enterprise Cloud in VirtualEnvironment ;ISBN 978-87-7949-255-4 (2012).[15] Installing the Eucalyptus Cloud/Cluster/Storage Node onUbuntu Karmic 9.10 dustinkirkland, www.YouTube.com[16] Ezhil Arasan Babaraj, (2009), Driving TechnologyDirection on Cloud Computing Platform, Blog post;Hybridfox: Cross of Elasticfox and Imagination,ezhil.syscon. com.35
3. OPEN SOURCE Generically, open source refers to a program or a software in which the source code is available to the general public for use and/or modification from its original design free of charge, i.e., open to use and customize [12]. Open source software is by definition software for whi