You are on page 1of 9

UEC/PackageInstall - Community Ubuntu Documen...

https://help.ubuntu.com/community/UEC/PackageI...

LogintoEdit UbuntuDocumentation>CommunityDocumentation>UECPackageInstall

UECPackageInstall
Overview

Contents 1. Overview 2. Objective 3. Tutorial 1. STEP1:Prerequisites 2. STEP2:InstalltheCloud/Cluster /Storage/WalrusFrontEndServer(s) 3. STEP3:InstallandConfiguretheNode Controller(s) 4. STEP4:RegistertheWalrus,Cluster, Storage,andNodeControllers 5. STEP5:ObtainCredentials 6. STEP6:Installanimagefromthestore 7. STEP7:RunanImage 4. MoreInformation 5. Glossary

ThistutorialcoversUECinstallationbyaddingtheEucalyptuspackagesto previouslyinstalledUbuntu10.04servers. YoucanalsofindinstructionsonaddingEucalyptustoUbuntu9.10 Servers.

Objective
Fromthistutorial,youwilllearnhowtoinstall,configure,registerand performseveraloperationsonabasicUECsetupthatresultsinacloudwith aonecontroller"front-end"andonenodeforrunningVirtualMachine (VM)instances.

Tutorial
STEP1:Prerequisites

Todeployaminimalcloudinfrastructure,youllneedatleasttwodedicatedsystems: aFrontEnd oneormoreNode(s) Thefollowingarerecommendations,ratherthanfixedrequirements.However,ourexperienceindevelopingthisdocumentation indicatedthefollowingsuggestions. FrontEnd Usethefollowingtableforasystemthatwillrunoneormoreof: thecloudcontroller(clc) theclustercontroller(cc) walrus(theS3-likestorageservice) thestoragecontroller(sc) Hardware Minimum CPU Memory Disk 1GHz 2GB 5400rpm IDE Suggested 2x2GHz 4GB 7200rpm SATA 200GB 1000Mbps Notes foranall-in-onefrontend,ithelpstohaveatleastadualcoreprocessor theJavawebfrontendbenefitsfromlotsofavailablememory slowerdiskswillwork,butwillyieldmuchlongerinstancestartuptimes 40GBisonlyenoughspaceforonlyasingleimage,cache,etc.,Eucalyptusdoesnot liketorunoutofdiskspace machineimagesarehundredsofMB,andneedtobecopiedoverthenetworkto nodes

DiskSpace 40GB Networking 100Mbps

1 of 9

02/02/2011 04:33 PM

UEC/PackageInstall - Community Ubuntu Documen...


Node(s) Theothersystem(s)arenodes,whichwillrun: thenodecontroller(nc)

https://help.ubuntu.com/community/UEC/PackageI...

Thesesystemswillactuallyruntheinstances.Youwillneedoneormoresystemswith: Hardware Minimum CPU Memory Disk VT extensions 1GB 5400rpm IDE Suggested VT,64-bit, Multicore 4GB Notes 64-bitcanrunbothi386,andamd64instances;bydefault,Eucalyptuswillonly run1VMperCPUcoreonaNode additionalmemorymeansmore,andlargerguests

7200rpmSATAor Eucalyptusnodesaredisk-intensive;I/Owaitwilllikelybetheperformance SCSI bottleneck 100GB 1000Mbps imageswillbecachedlocally,Eucalyptusdoesnotliketorunoutofdiskspace machineimagesarehundredsofMB,andneedtobecopiedoverthenetwork tonodes

DiskSpace 40GB Networking 100Mbps

STEP2:InstalltheCloud/Cluster/Storage/WalrusFrontEndServer(s)
1. InstallUbuntu10.04Server 2. UpdatetothemostcurrentstateintheUbuntuarchive:
sudoapt-getupdate sudoapt-getdist-upgrade

3. Installtheeucalyptus-cloudandeucalyptus-ccpackagesontheFrontEnd:
sudoapt-getinstalleucalyptus-cloudeucalyptus-cceucalyptus-walruseucalyptus-sc

Answerdebconf'squestions: Configurepostfixforinternetdelivery Nameyourcluster e.g.cluster1 AddalistofavailableIPaddressesonyournetwork e.g.192.168.1.200-192.168.1.249 Note:Dependingonthenumberofsystemsyouwillbesettingup,youmaynotwanttoinstallalltheabovepackagesonthe samesystem.Forbestresults,havealookatsomerecommendedtopologies.

STEP3:InstallandConfiguretheNodeController(s)
InstallingtheEucalyptusNodeServiceonarunningUbuntusystemconsistsofdoingthefollowingononeormoresystems: 1. InstallUbuntu10.04Server 2. UpdatetothemostcurrentstateintheUbuntuarchive:
sudoapt-getupdate sudoapt-getdist-upgrade

3. Installtheeucalyptus-ncpackage
sudoapt-getinstalleucalyptus-nc

4. Configurethesystem'sprimaryethernetinterfaceasabridge.Thenodecontrollerwillattachvirtualnetworkinterfacestothis bridgeforVMthatisstartedbeforeittoenablenetworkconnectivity. Note:Rememberthenameofyournode'sbridgedevice(weassumethenameofyourbridgedeviceis"br0"forthe restofthisdocument).

2 of 9

02/02/2011 04:33 PM

UEC/PackageInstall - Community Ubuntu Documen...

https://help.ubuntu.com/community/UEC/PackageI...

Fordetailsonconfiguringabridge,see:http://doc.ubuntu.com/ubuntu/serverguide/C/network-configuration.html Thefollowingscriptshouldconfigureyourbridgecorrectlyinmostsetups:
interface=eth0 bridge=br0 sudosed-i"s/^iface$interfaceinet\(.*\)$/iface$interfaceinetmanual\n\nauto br0\niface$bridgeinet\1/"/etc/network/interfaces sudotee-a/etc/network/interfaces<<EOF bridge_ports$interface bridge_fd9 bridge_hello2 bridge_maxage12 bridge_stpoff EOF sudo/etc/init.d/networkingrestart

5. Configure/etc/eucalyptus/eucalyptus.confwiththenameofthebridge,andrestartthenodecontroller:
sudosed-i"s/^VNET_BRIDGE=.*$/VNET_BRIDGE=$bridge/"/etc/eucalyptus/eucalyptus.conf sudo/etc/init.d/eucalyptus-ncrestart

Notethatthereareseveralwaystoconfigureanodetohaveabridgeasitsprimaryinterface,dependingonthe configurationofyourmachine.Weshowanexamplesetofstepsherebutyouwillneedtotakecaretoensurethatthis exampleconfigurationdoesnotconflictwithyourlocalconfigurationifyouwishtouseit. 6. Finally,youneedtoinstalltheCloudController'seucalyptususer'spublicsshkeyintotheNodeController'seucalyptus user'sauthorized_keysfile.Theeasiestwaytodothis: OntheNodeController,temporarilysetapasswordfortheeucalyptususer:


sudopasswdeucalyptus

Then,ontheCloudController:
sudo-ueucalyptusssh-copy-id-i~eucalyptus/.ssh/id_rsa.pubeucalyptus@<IP_OF_NODE>

YoucannowremovethepasswordoftheeucalyptusaccountontheNode:
sudopasswd-deucalyptus

Thefollowingdiagramdepictswhatyoursetupshouldnowresemble:http://pompone.cs.ucsb.edu/~nurmi/images/euca-topo.png

STEP4:RegistertheWalrus,Cluster,Storage,andNodeControllers
AsofUbuntu10.04LTS,allcomponentregistrationshouldbeautomatic,assuming: a. b. c. d. e. PublicSSHkeyshavebeenexchangedproperly Theservicesareconfiguredproperly Theservicesarepublishingtheirexistence Theappropriateuec-component-listenerisrunning VerifyRegistration.

Stepsatoeshouldonlyberequiredifyou'reusingtheUEC/PackageInstallmethod.Otherwise,ifyouarefollowingthe UEC/CDInstallmethod,thesestepsshouldalreadybecompletedautomaticallyforyou,andthereforeyoucanskipatoe. a. ExchangePublicSSHKeys TheCloudController'seucalyptususerneedstohaveSSHaccesstotheWalrusController,ClusterController,andStorage Controllerastheeucalyptususer. InstalltheCloudController'seucalyptususer'spublicsshkeyby: Onthetargetcontroller,temporarilysetapasswordfortheeucalyptususer:

3 of 9

02/02/2011 04:33 PM

UEC/PackageInstall - Community Ubuntu Documen...

https://help.ubuntu.com/community/UEC/PackageI...

sudopasswdeucalyptus

Then,ontheCloudController:
sudo-ueucalyptusssh-copy-id-i/var/lib/eucalyptus/.ssh/id_rsa.pubeucalyptus@<IP_OF_NODE>

Youcannowremovethepasswordoftheeucalyptusaccountonthetargetcontroller,ifyouwish:
sudopasswd-deucalyptus

b. ConfiguretheServices OntheCloudController: FortheClusterControllerRegistration: DefinetheshellvariableCC_NAMEin/etc/eucalyptus/eucalyptus-cc.conf DefinetheshellvariableCC_IP_ADDRin/etc/eucalyptus/eucalyptus-ipaddr.conf,asaspace separatedlistofoneormoreIPaddresses. FortheWalrusControllerRegistration: DefinetheshellvariableWALRUS_IP_ADDRin/etc/eucalyptus/eucalyptus-ipaddr.conf,asa singleIPaddress. OntheClusterController: ForStorageControllerRegistration: DefinetheclusternameintheshellvariableCC_NAMEin/etc/eucalyptus/eucalyptus-cc.conf DefinetheshellvariableSC_IP_ADDRin/etc/eucalyptus/eucalyptus-ipaddr.conf,asaspace separatedlistofoneormoreIPaddresses. c. Publish Nowstartthepublicationservices. WalrusController:
sudostarteucalyptus-walrus-publication

ClusterController:
sudostarteucalyptus-cc-publication

StorageController:
sudostarteucalyptus-sc-publication

NodeController
sudostarteucalyptus-nc-publication

d. StarttheListener OntheCloudControllerandtheClusterController(s),run:

4 of 9

02/02/2011 04:33 PM

UEC/PackageInstall - Community Ubuntu Documen...

https://help.ubuntu.com/community/UEC/PackageI...

sudostartuec-component-listener

e. VerifyRegistration
cat/var/log/eucalyptus/registration.log 2010-04-0815:46:36-05:00|24243->Callingnodecluster1node10.1.1.75 2010-04-0815:46:36-05:00|24243->euca_conf--register-nodesreturned0 2010-04-0815:48:47-05:00|25858->CallingwalrusWalrus10.1.1.71 2010-04-0815:48:51-05:00|25858->euca_conf--register-walrusreturned0 2010-04-0815:49:04-05:00|26237->Callingclustercluster110.1.1.71 2010-04-0815:49:08-05:00|26237->euca_conf--register-clusterreturned0 2010-04-0815:49:17-05:00|26644->Callingstoragecluster1storage10.1.1.71 2010-04-0815:49:18-05:00|26644->euca_conf--register-screturned0

STEP5:ObtainCredentials
AfterinstallingandbootingtheCloudController,usersofthecloudwillneedtoretrievetheircredentials.Thiscanbedoneeither throughawebbrowser,oratthecommandline. FromaWebBrowser 1. Fromyourwebbrowser(eitherremotelyoronyourUbuntuserver)accessthefollowingURL:
https://<cloud-controller-ip-address>:8443/

Important!Youmustuseasecureconnection,somakesureyouuse"https"not"http"inyourURL.Youwillgeta securitycertificatewarning.Youwillhavetoaddanexceptiontoviewthepage.Ifyoudonotacceptityouwillnotbeable toviewtheEucalyptusconfigurationpage. 2. Useusername'admin'andpassword'admin'forthefirsttimelogin(youwillbepromptedtochangeyourpassword). 3. Thenfollowtheon-screeninstructionstoupdatetheadminpasswordandemailaddress. 4. Oncethefirsttimeconfigurationprocessiscompleted,clickthe'credentials'tablocatedinthetop-leftportionofthescreen. 5. Clickthe'DownloadCredentials'buttontogetyourcertificates 6. Savethemto~/.euca 7. Unzipthedownloadedzipfileintoasafelocation(~/.euca)


unzip-d~/.eucamycreds.zip

FromaCommandLine 1. Alternatively,ifyouareonthecommandlineoftheCloudController,youcanrun:
mkdir-p~/.euca chmod700~/.euca cd~/.euca sudoeuca_conf--get-credentialsmycreds.zip unzipmycreds.zip ln-s~/.euca/eucarc~/.eucarc cd-

ExtractingandUsingYourCredentials NowyouwillneedtosetupEC2APIandAMItoolsonyourserverusingX.509certificates. 1. Installtherequiredcloudusertools:


sudoapt-getinstalleuca2ools

2. Tovalidatethateverythingisworkingcorrectly,getthelocalclusteravailabilitydetails:
.~/.euca/eucarc

5 of 9

02/02/2011 04:33 PM

UEC/PackageInstall - Community Ubuntu Documen...

https://help.ubuntu.com/community/UEC/PackageI...

euca-describe-availability-zonesverbose AVAILABILITYZONEmyowncloud192.168.1.1 AVAILABILITYZONE|-vmtypesfree/maxcpuramdisk AVAILABILITYZONE|-m1.small0004/000411922 AVAILABILITYZONE|-c1.medium0004/000412565 AVAILABILITYZONE|-m1.large0002/0002251210 AVAILABILITYZONE|-m1.xlarge0002/00022102420 AVAILABILITYZONE|-c1.xlarge0001/00014204820

STEP6:Installanimagefromthestore
Thefollowingisbyfarthesimplestwaytoinstallanimage.However,advancedusersmaybeinterestedinlearninghowtoBundle theirownimage. ThesimplestwaytoaddanimagetoUECistoinstallitfromtheImageStoreontheUECwebinterface. 1. AccessthewebinterfaceatthefollowingURL(Makesureyouspecifyhttps):
https://<cloud-controller-ip-address>:8443/

2. Enteryourloginandpassword(ifrequested,asyoumaystillbeloggedinfromearlier) 3. ClickontheStoretab

4. Browseavailableimages 5. Clickoninstallfortheimageyouwant Oncetheimagehasbeendownloadedandinstalled,youcanclickon"Howtorun?"thatwillbedisplayedbelowtheimagebutton toviewthecommandtoexecutetoinstantiate(start)thisimage.TheimagewillalsoappearonthelistgivenontheImagetab.

6 of 9

02/02/2011 04:33 PM

UEC/PackageInstall - Community Ubuntu Documen...


STEP7:RunanImage
TherearemultiplewaystoinstantiateanimageinUEC:

https://help.ubuntu.com/community/UEC/PackageI...

Usethecommandline UseoneoftheUECcompatiblemanagementtoolssuchasLandscape UsetheElasticFoxextensiontoFirefox Herewewilldescribetheprocessfromthecommandline: 1. Beforerunninganinstanceofyourimage,youshouldfirstcreateakeypair(sshkey)thatyoucanusetologintoyour instanceasroot,onceitboots.Thekeyisstored,soyouwillonlyhavetodothisonce.Runthefollowingcommand:


if[!-e~/.euca/mykey.priv];then mkdir-p-m700~/.euca touch~/.euca/mykey.priv chmod0600~/.euca/mykey.priv euca-add-keypairmykey>~/.euca/mykey.priv fi

Note:Youcancallyourkeywhateveryoulike(inthisexample,thekeyiscalled'mykey'),butrememberwhatitiscalled. Ifyouforget,youcanalwaysruneuca-describe-keypairstogetalistofcreatedkeysstoredinthesystem. 2. Youmustmakesuretosource~/.euca/eucarcbeforeyourunanyoftheeucatools.Itisprobablybesttoaddthistothe bottomofyour.bashrcscript. 3. Youmustalsoallowaccesstoport22inyourinstances:


euca-authorizedefault-Ptcp-p22-s0.0.0.0/0

4. Next,youcancreateinstancesofyourregisteredimage:
euca-run-instances$EMI-kmykey-tm1.small

Note:Ifyoureceiveanerrorregardingimage_id,youmayfinditbyviewingImagespageorclick"HowtoRun"onthe Storepagetoseethesamplecommand. 5. Thefirsttimeyourunaninstance,thesystemwillbesettingupcachesfortheimagefromwhichitwillbecreated.Thiscan oftentakesometimethefirsttimeaninstanceisrungiventhatVMimagesareusuallyquitelarge.Tomonitorthestateof yourinstance,run:


watch-n5euca-describe-instances

Intheoutput,youshouldseeinformationabouttheinstance,includingitsstate.Whilefirst-timecachingisbeingperformed, theinstance'sstatewillbe'pending'. 6. Whentheinstanceisfullystarted,theabovestatewillbecome'running'.LookattheIPaddressassignedtoyourinstancein theoutput,thenconnecttoit:


IPADDR=$(euca-describe-instances|grep$EMI|greprunning|tail-n1|awk'{print$4}') ssh-i~/.euca/mykey.privubuntu@$IPADDR

7. Andwhenyouaredonewiththisinstance,exityourSSHconnection,thenterminateyourinstance:
INSTANCEID=$(euca-describe-instances|grep$EMI|greprunning|tail-n1|awk'{print$2}') euca-terminate-instances$INSTANCEID

YourUECcloudshouldnowlooksimilartothefollowinglogicaldiagram: http://pompone.cs.ucsb.edu/~nurmi/images/euca-topo-withinst.png

MoreInformation

7 of 9

02/02/2011 04:33 PM

UEC/PackageInstall - Community Ubuntu Documen...


HowtousetheStorageController Controllingeucalyptusservices:

https://help.ubuntu.com/community/UEC/PackageI...

sudoserviceeucalyptus[start|stop|restart](ontheCLC/CC/SC/Walrusside) sudoserviceeucalyptus-nc[start|stop|restart](ontheNodeside) Locationsofsomeimportantfiles: Logfiles: /var/log/eucalyptus Configurationfiles: /etc/eucalyptus Database: /var/lib/eucalyptus/db Keys /var/lib/eucalyptus /var/lib/eucalyptus/.ssh Notes: Don'tforgettosourceyour~/.euca/eucarcbeforerunningtheclienttools. Links: EucalyptusProjectSite(forums,documentation,downloads) EucalyptusonLaunchpad(bugs,code) EucalyptusTroubleshooting(1.5) RegisteryourcloudwithRightScale

Glossary
TheUbuntuEnterpriseClouddocumentationusesterminologythatmightbeunfamiliartosomereaders.Thispageisintendedto provideaglossaryofsuchtermsandacronyms. Cloud-Afederatedsetofphysicalmachinesthatoffercomputingresourcesthroughvirtualmachines,provisionedand recollecteddynamically. CloudController(CLC)-EucalyptuscomponentthatprovidesthewebUI(anhttpsserveronport8443),andimplements theAmazonEC2API.ThereshouldbeonlyoneCloudControllerinaninstallationofUEC.Thisserviceisprovidedbythe Ubuntueucalyptus-cloudpackage. Cluster-Acollectionofnodes,associatedwithaClusterController.TherecanbemorethanoneClusterinaninstallationof UEC.Clustersaresometimesphysicallyseparatesetsofnodes.(e.g.floor1,floor2,floor2). ClusterController(CC)-Eucalyptuscomponentthatmanagescollectionsofnoderesources.Thisserviceisprovidedby theUbuntueucalyptus-ccpackage. EBS-ElasticBlockStorage.http://aws.amazon.com/ebs/ EC2-ElasticComputeCloud.Amazon'spay-by-the-hour,pay-by-the-gigabytepubliccloudcomputingoffering. EKI-EucalyptusKernelImage. EMI-EucalyptusMachineImage. ERI-EucalyptusRamdiskImage. Eucalyptus-ElasticUtilityComputingArchitectureforLinkingYourProgramsToUsefulSystems.Anopensource projectoriginallyfromtheUniversityofCaliforniaatSantaBarbara,nowsupportedbyEucalyptusSystems,aCanonical Partner. Front-end-Physicalmachinehostingone(ormore)ofthehighlevelEucalyptuscomponents(cloud,walrus,storage controller,clustercontroller). Node-Anodeisaphysicalmachinethat'scapableofrunningvirtualmachines,runninganodecontroller.WithinUbuntu,

8 of 9

02/02/2011 04:33 PM

UEC/PackageInstall - Community Ubuntu Documen...

https://help.ubuntu.com/community/UEC/PackageI...

thisgenerallymeansthattheCPUhasVTextensions,andcanruntheKVMhypervisor. NodeController(NC)-Eucalyptuscomponentthatrunsonnodeswhichhostthevirtualmachinesthatcomprisethecloud. ThisserviceisprovidedbytheUbuntupackageeucalyptus-nc. S3-SimpleStorageService.Amazon'spay-by-the-gigabytepersistentstoragesolutionforEC2.http://aws.amazon.com/s3/ StorageController(SC)-Eucalyptuscomponentthatmanagesdynamicblockstorageservices(EBS).Each'cluster'ina EucalyptusinstallationcanhaveitsownStorageController.Thiscomponentisprovidedbythe'eucalyptus-sc'package. UEC-UbuntuEnterpriseCloud.Ubuntu'scloudcomputingsolution,basedonEucalyptus. VM-VirtualMachine. VT-VirtualizationTechnology.AnoptionalfeatureofsomemodernCPUs,allowingforacceleratedvirtualmachine hosting. Walrus-EucalyptuscomponentthatimplementstheAmazonS3API,usedforstoringVMimagesanduserstorageusing S3bucketput/getabstractions.
UEC/PackageInstall(lastedited2010-04-0822:11:30byhttps://login.launchpad.net/+id/stJytmk@ cpe-66-69-226-228.austin.res.rr.com[66.69.226.228]:DustinKirkland)

ParentPage PageHistory

9 of 9

02/02/2011 04:33 PM

You might also like