Sei sulla pagina 1di 13

eucalyptus installation notes

1 Installing Eucalyptus EE on RHEL / CentOS 5.4


Prerequisites
1 ) If you start with a STANDARD CentOS installation, you will fed for all The prerequisites with the following steps: [Root _AT_ clc] # yum install-y the ntp [The root _AT_ clc] # ntpdate pool.ntp.org 2 ) Node has a fully installed and configured installation of Xen that allows controlling the the hypervisor via HTTP from localhost. ([Root @ node1] # yum install xen kernel-xen libvirt) [The root _AT_ node] # yum install-y the xen [The root _AT_ node] # sed - in-place 's / # (xend-http-server no) / (xend-http-server yes) /' / etc / xen / xendconfig.sxp The root _AT_ node] # sed - in-place 's / # (xend-address localhost) / (xend-address localhost) /' / etc / xen / xend-config.sxp [The root _AT_ node] # / etc / init.d / xend restart

1.1 get packages


http://www.eucalyptussoftware.com/downloads/products/eee/2.0/ tar zxvf eucalyptus-centos-x86_64-2.0.1eee.tar.gz tar zxvf eucalyptus-deps-centos-x86_64-2.0.1eee.tar.gz

1.2 installing OS dependencies


yum install-y java-1.6.0-openjdk-devel ant ant-nodeps libvirt-devel curl-devel httpd httpd-devel apr-devel openssldevel dhcp libxml2 libxml2-devel gnutls gnutls-devel xen-devel libgcrypt-devel zlib- devel mysql openldap-clients perlConvert-ASN1 chkfontpath scsi-target-utils fuse-libs libgcc.i386 bridge-utils

1.3 installing eucalyptus dependencies


install sun jdk: Go!: at http://java.sun.com/javase/downloads/index.jsp and the select the Java Platform JDK.

In the dropadown menu! Under "Platform:" select either Linux (for i386) or Linux x64 (for x86_64). The root _AT_ clc # chmod 0700 jdk *. bin [Root _AT_ clc] # . / jdk * bin

move all file in jdk1.6.0_20 to opt / packages / jdk [Root @ clc] # mkdir-p / opt / packages / jdk [Root @ clc] # mv jdk1.6.0_20 / * / opt / packages / jdk /

The root _AT_ clc # cd eucalyptus-deps * [Root _AT_ clc] # yum install-y *. rpm - nogpgcheck

The root _AT_ node1 # cd eucalyptus-deps * The rpm - nogpgcheck of [the root _AT_ node1 # yum install-y *

install VMware failed:


[Root @ localhost vmware-vix-disklib-distrib] #. / Vmware-install.pl You cannot install VMware VIX DiskLib API on a system running a xen kernel.Execution aborted.

1.4 Installing Eucalyptus Component Packages


1) install at front-end cd eucalyptus-centos-*. leee [The root _AT_ clc] # rpm-Uvh eucalyptus-2.0.1eee-1 *. x86_64.rpm eucalyptus-common-java-2.0.1eee-1 *. x86_64.rpm eucalyptus-cloud-2.0.1eee-1. * x86_64.rpm eucalyptus-walrus-2.0.1eee-1 *. x86_64.rpm eucalyptussc-2.0.1eee-1 *. x86_64.rpm eucalyptus-cc-2.0.1eee-1 *. x86_64.rpm eucalyptus -gl-2.0.1eee-1. *. x86_64.rpm

2) install at node cd eucalyptus-centos-*. leee [The root _AT_ node1] # rpm-Uvh eucalyptus-2.0.1eee-1 *. x86_64.rpm eucalyptus-nc-2.0.1eee-1 *. x86_64.rpm eucalyptus-gl-2.0.1eee-1 *. x86_64 . rpm

1.5 Installing and Configuring Hypervisors (Xen)

1) configuring grub and reboot : vi / etc / grub.conf default = 0 timeout = 5 splashimage = (hd0, 0) / grub / splash.xpm.gz hiddenmenu title CentOS (2.6.18-194.17.4.el5xen) root (hd0, 0) kernel / xen.gz-2.6.18-194.17.4.el5 module / vmlinuz-2.6.18-194.17.4.el5xen ro root = LABEL = / 1 rhgb quiet module / initrd-2.6.18-194.17.4.el5xen.img title CentOS (2.6.18-164.el5) root (hd0, 0) kernel / vmlinuz-2.6.18-164.el5 ro root = LABEL = / 1 rhgb quiet initrd / initrd-2.6.18-164.el5.img note : default = 0 , 0 stands for the kernel for xen 's title

2) configuration xen . make sure that your xend-config.sxp file is setup correctly. Go to: / Etc / xen / xend-config.sxp

These are the recommended settings: (bold need to be modified, the other non-default)

(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) (Vncpasswd'')

2) Configuring ibvirt vi / etc / libvirt / libvirtd.conf

unix_sock_group = "libvirt" unix_sock_ro_perms = "0777" unix_sock_rw_perms = "0770"

[The root _AT_ node1] # / etc / init.d / libvirtd start

1 .6 start
1) Startup your Eucalyptus services. On the front end, enter [Root @ clc] # / etc / init.d / eucalyptus-cloud start [Root @ clc] # / etc / init.d / eucalyptus-cc start

2) On! The! Node machine, start! The node controller: [Root @ node1] # / etc / init.d / eucalyptus-nc start

Node failed to start: [Root @ localhost ~] # / etc / init.d / eucalyptus-nc start You should have at least 32 loop devices Starting Eucalyptus services: Node Controller cannot be started: errors in / / var / log / eucalyptus / euca_test_nc.log

Node startup error log: dom0-min-mem = 256 libvir: Xen Daemon error: internal error failed to connect to xend libvir: Xen Daemon error: unable to connect to 'localhost: 8000': Connection refused libvirt error: unable to connect to 'localhost: 8000': Connection refused (code = 38) error: failed to connect to hypervisor

View node information: ( need to modify the grub and restart, reference of 1.5 installing and configuring Hypervisors ) [Root @ localhost ~] # su eucalyptus-c "virsh list" Id the Name State

----------------------------------

[Root @ localhost ~] # brctl show bridge name virbr0 is bridge id 8000.000000000000 STP enabled TOP yes the interfaces

[Root @ localhost ~] # / etc / xen / scripts / network-bridge start

Link veth0 is missing. This may be because you have reached the limit of the number of interfaces that the loopback driver the supports. If the loopback driver is a module, you may raise this limit by passing it as a parameter (nloopbacks = <N>); if the driver is compiled statically into the kernel, then you may set the parameter using loopback.nloopbacks = <N> on the domain 0 kernel command line.

Start the front-end node , the following error may occur: You should have at least 32 loop devices Starting Eucalyptus services: (13) Permission denied: make_sock: could not bind to address [::]: 8775 (13) Permission denied: make_sock: could not bind to address 0.0.0.0:8775 no listening sockets available, shutting down Unable to open logs The Solution: vnc Login to centos graphical interface settings are as follows, System> Administration> Security Level and Firewall Both Firewall and SElinux set to Disabled.

The ( run system-config-securitylevel command can also be realized )

1 , Registering Eucalyptu s EE COMPONENTS


[Root @ localhost ~] # euca_conf - register-walrus 192.168.18.201 [Root @ localhost ~] # euca_conf - register-cluster cloudServer 192.168.18.201 [Root @ localhost ~] # euca_conf - register-sc cloudServer 192.168.18.201 [Root @ localhost ~] # euca_conf - register-nodes 192.168.18.202

2 , deregistering NODES

euca_conf - deregister-nodes 192.168.18.202

Enterprise Edition do not have to be installed separately Euca2ools

1 , download the certificate and install the client

[Root @ localhost credentials] # mkdir ~ /. Euca [Root @ localhost credentials] # unzip euca2-guopeng-x509.zip-d ~ /. Euca /

[Root @ localhost credentials] # cd ~ /. Euca / [Root @ localhost. Euca] # chmod 755 eucarc [Root @ localhost. Euca] #. / Eucarc

2 , set the environment variable

[Root @ localhost. Euca] # euca-describe-images EC2_ACCESS_KEY environment variable must be set. Connection failed [Root @ localhost. Euca] # source ~ / .euca / eucarc (Note source =.)

1 , a prepare images
eg download from http://open.eucalyptus.com/wiki/EucalyptusUserImageCreatorGuide_v2.0

2 , a bundle kernel
euca-bundle-image [-d] [-c]-i The-i Name of the image file to the bundle.

-D the Destination directory for bundled image (default Directory is / tmp). The-c The-k Path to user's PEM encoded CERTIFICATE. Path to the user's PEM encoded private key.

[Root @ localhost images] # cd euca-ubuntu-9.04-x86_64 [Root @ localhost euca-ubuntu-9.04-x86_64] # euca-bundle-image-i kvm-kernel/vmlinuz-2.6.28-11-generic - kernel true Checking image

Tarring image Encrypting image Splitting image ... Part: vmlinuz-2.6.28-11-generic.part.0 Generating manifest / tmp/vmlinuz-2.6.28-11-generic.manifest.xml / Tmp/vmlinuz-2.6.28-11-generic.manifest.xml

3 , uploading kernel
euca-upload-bundle -b bucket-m manifest_path The-b Name of the the bucket to upload to (The bucket i created if it does not yet exist, but in. all cases a

bucket name must be specified). -M Path to the manifest file for the bundled image.

[Root @ localhost euca-ubuntu-9.04-x86_64] # euca-upload-bundle-b ubuntu-kernel-bucket-m / tmp/vmlinuz-2.6.2811-generic.manifest.xml Checking bucket: ubuntu-kernel-bucket Creating bucket: ubuntu-kernel-bucket Uploading manifest file Uploading part: vmlinuz-2.6.28-11-generic.part.0 Uploaded image as ubuntu-kernel-bucket/vmlinuz-2.6.28-11-generic.manifest.xml

4 , registering kernel
euca-register image_location image location Path to the uploaded image The (bucket / manifest)

[Root @ localhost euca-ubuntu-9.04-x86_64] # euca-register ubuntu-kernel-bucket/vmlinuz-2.6.28-11generic.manifest.xml IMAGE eki-AEBB17DB

5 , uploading and registering ramdisk ( Non-essential )

[Root @ localhost euca-ubuntu-9.04-x86_64] # euca-bundle-image-i kvm-kernel/initrd.img-2.6.28-11-generic ramdisk true

[Root @ localhost euca-ubuntu-9.04-x86_64] # euca-upload-bundle-b ubuntu-ramdisk-bucket-m / tmp/initrd.img2.6.28-11-generic.manifest.xml [Root @ localhost euca-ubuntu-9.04-x86_64] # euca-register ubuntu-ramdisk-bucket/initrd.img-2.6.28-11generic.manifest.xml IMAGE eri-17,771,939

For, uploading and registering image The

[Root _AT_ localhost euca-ubuntu-9.04-x86_64] # euca-bundle-image-i ubuntu.9-04.x86-64.img - the the kernel ekiAEBB17DB - ramdisk eri-17,771,939 Checking image Tarring image Encrypting image Splitting image ... Part: ubuntu.9-04.x86-64.img.part.0 Part: ubuntu.9-04.x86-64.img.part.1 Part: ubuntu.9-04.x86-64.img.part.2 Part: ubuntu.9-04.x86-64.img.part.3 Part: ubuntu.9-04.x86-64.img.part.4 Part: ubuntu.9-04.x86-64.img.part.5 Part: ubuntu.9-04.x86-64.img.part.6 Part: ubuntu.9-04.x86-64.img.part.7 Part: ubuntu.9-04.x86-64.img.part.8 Part: ubuntu.9-04.x86-64.img.part.9 Part: ubuntu.9-04.x86-64.img.part.10 Part: ubuntu.9-04.x86-64.img.part.11 Part: ubuntu.9-04.x86-64.img.part.12 Part: ubuntu.9-04.x86-64.img.part.13 Generating manifest / tmp/ubuntu.9-04.x86-64.img.manifest.xml / Tmp/ubuntu.9-04.x86-64.img.manifest.xml (can not specify ramdisk )

[Root @ localhost euca-ubuntu-9.04-x86_64] # euca-upload-bundle-b ubuntu-image-bucket-m / tmp/ubuntu.904.x86-64.img.manifest.xml

Checking bucket: ubuntu-image-bucket Creating bucket: ubuntu-image-bucket Uploading manifest file Uploading part: ubuntu.9-04.x86-64.img.part.0 Uploading part: ubuntu.9-04.x86-64.img.part.1 Uploading part: ubuntu.9-04.x86-64.img.part.2 Uploading part: ubuntu.9-04.x86-64.img.part.3 Uploading part: ubuntu.9-04.x86-64.img.part.4 Uploading part: ubuntu.9-04.x86-64.img.part.5 Uploading part: ubuntu.9-04.x86-64.img.part.6 Uploading part: ubuntu.9-04.x86-64.img.part.7 Uploading part: ubuntu.9-04.x86-64.img.part.8 Uploading part: ubuntu.9-04.x86-64.img.part.9 Uploading part: ubuntu.9-04.x86-64.img.part.10 Uploading part: ubuntu.9-04.x86-64.img.part.11 Uploading part: ubuntu.9-04.x86-64.img.part.12 Uploading part: ubuntu.9-04.x86-64.img.part.13 Uploaded image as ubuntu-image-bucket/ubuntu.9-04.x86-64.img.manifest.xml

[Root @ localhost euca-ubuntu-9.04-x86_64] # euca-register ubuntu-image-bucket/ubuntu.9-04.x8664.img.manifest.xml IMAGE emi-39DB160A

6 , delete image and bundle


1 ) delete image [Root @ localhost xen-kernel] # euca-deregister emi-39DB160A EC2_ACCESS_KEY environment variable must be set. Connection failed [Root @ localhost xen-kernel] # source ~ / .euca / eucarc [Root @ localhost xen-kernel] # euca-deregister emi-39DB160A IMAGE emi-39DB160A

[Root @ localhost xen-kernel] # euca-delete-bundle-b ubuntu-image-bucket-p ubuntu.9-04.x86-64.img - clear

2 ) delete ramdisk the bundle

[Root @ localhost xen-kernel] # euca-deregister eki-17771939 IMAGE eki-17,771,939

[Root @ localhost xen-kernel] # euca-delete-bundle-b ubuntu-ramdisk-bucket

3 ) the delete kernel bundle

[Root @ localhost xen-kernel] # euca-deregister eki-AEBB17DB IMAGE eki-AEBB17DB

[Root @ localhost xen-kernel] # euca-delete-bundle-b ubuntu-kernel-bucket

[Root @ localhost euca-ubuntu-9.04-x86_64] # euca-describe-images ( need to run this command, the web interface images , bundles disappear before )

1, add key before run a VM instance

[Root @ localhost euca-ubuntu-9.04-x86_64] # euca-add-keypair mykey> mykey.private [Root @ localhost ~] # chmod 0600 mykey.private

2, run instance

euca-run-instances [-k] [-n] image id The image id Identifier of the image The to the run.

An-k

Name of keypair instance to associate with.

-N

Number of instances to run.

[Root @ localhost euca-ubuntu-9.04-x86_64] # euca-run-instances-k mykey emi-39C21609 The RESERVATION the INSTANCE 942116FE r-42BA079F guopeng guopeng-default emi-39C21609 0.0.0.0 0.0.0.0 Pending mykey202010-10-29T03: 11:02.237 Z eki-

i-30B50604 None

[Root @ localhost euca-ubuntu-9.04-x86_64] # euca-describe-instances RESERVATION INSTANCE Pending r-42BA079F i-30B50604 mykey 0 guopeng default is emi-39C21609 m1.small 0.0.0.0 0.0.0.0 cloudServer eki-942116FE

2010-10-29T03: 11:02.237 Z

euca-run-instances-k mykey202 emi-39C21609

Run instance error log (nc.log): Fri Oct 29 16:21:19 2010] [006207] [EUCADEBUG] doDescribeResource () invoked [Fri Oct 29 16:21:19 2010] [006207] [EUCADEBUG] doDescribeInstances () invoked [Fri Oct 29 16:21:19 2010] [006207] [EUCADEBUG] doDescribeInstances (): instanceId = i-417506F8 publicIp = 0.0.0.0 privateIp = 0.0.0.0 mac = d0: 0d: 41:75:06: F8 vlan = -1 networkIndex = -1 platform = linux [Fri Oct 29 16:21:20 2010] [006207] [EUCADEBUG] system_output (): [/ / usr / lib / eucalyptus / euca_rootwrap / / usr / share / eucalyptus / gen_libvirt_xml - kernel - ephemeral] [Fri Oct 29 16:21:20 2010] [006 207] [EUCAINFO ] currently running / booting: i-417506F8 [Fri Oct 29 16:21:21 2010] [006 207] [EUCAINFO ] booting the VM instance i-417506F8 [Fri Oct 29 16:21:21 2010] [006207] [EUCADEBUG] state change for instance i-417506F8: Staging -> Booting (Pending) [Fri Oct 29 16:21:22 2010] [006207] [EUCAERROR] libvirt: cannot read directory / etc / xen: Permission denied (code = 38) [Fri Oct 29 16:21:22 2010] [006207] [EUCAERROR] libvirt: Domain not found: xenUnifiedDomainLookupByName (code = 42) [Fri Oct 29 16:21:25 2010] [006207] [EUCADEBUG] doDescribeResource () invoked [Fri Oct 29 16:21:25 2010] [006207] [EUCADEBUG] doDescribeInstances () invoked [Fri Oct 29 16:21:25 2010] [006207] [EUCADEBUG] doDescribeInstances (): instanceId = i-417506F8 publicIp = 0.0.0.0 privateIp = 0.0.0.0 mac = d0: 0d: 41:75:06: F8 vlan = -1 networkIndex = -1 platform = linux

[Fri Oct 29 16:21:27 2010] [006207] [EUCAERROR] libvirt: Domain not found: xenUnifiedDomainLookupByName (code = 42) [Fri Oct 29 16:21:31 2010] [006207] [EUCADEBUG] doDescribeResource () invoked [Fri Oct 29 16:21:31 2010] [006207] [EUCADEBUG] doDescribeInstances () invoked [Fri Oct 29 16:21:31 2010] [006207] [EUCADEBUG] doDescribeInstances (): instanceId = i-417506F8 publicIp = 0.0.0.0 privateIp = 0.0.0.0 mac = d0: 0d: 41:75:06: F8 vlan = -1 networkIndex = -1 platform = linux [Fri Oct 29 16:21:32 2010] [006207] [EUCAERROR] libvirt: cannot read directory / etc / xen: Permission denied (code = 38) [Fri Oct 29 16:21:32 2010] [006207] [EUCAERROR] libvirt: Domain not found: xenUnifiedDomainLookupByName (code = 42)

Potrebbero piacerti anche