Beruflich Dokumente
Kultur Dokumente
Eucalyptus Overview
Eucalyptus is a Linux-based software architecture that implements scalable private and hybrid
clouds within your existing IT infrastructure. Eucalyptus allows you to provision your own
collections of resources (hardware, storage, and network) using a self-service interface on an as-
needed basis.
Eucalyptus Components
Eucalyptus consists of the following distributed components:
- CLC: Cloud Controller (EC2 functionality)
- Walrus (S3 functionality)
- CC: Cluster Controller (middle-tier cluster management service)
- SC: Storage Controller (EBS functionality)
- NC: Node Controller (controls VM instances)
Hardware Requirements
You will need a minimum of two machines to host Eucalyptus components. All the node machines
should have multicore processor with virtualization Technology (VT) enable.
Frontend/Base (CLC, Walrus, CC, SC): Minimum 100GB HDD and 4-8GB RAM
Node (NC): Minimum 100GB HDD and 4-8GB RAM
Be sure that all machines are running the latest release of CentOS 5.7. Test that all systems allow
ssh login, and that root access is available (sudo is OK)
Network Requirements
1. You must have a DHCP server available (installed but not running).
2. You must have a range of available public IP addresses. These will be assigned to Virtual
Machines (instances).
3. You must have a large range of available private IP addresses. These will be used by a virtual
subnet. They cannot overlap or contain any part of a physical network IP address space.
Software Requirements
74
You must have access to the following:
- CentOS 5.7 install CD
- Eucalyptus Fast Start media (the same can be download from eucalyptus web site
http://open.eucalyptus.com )
B) Node Configuration
C) Frontend Configuration
E) FAQ
75
A) Install CentOS 5.7 on all machines
1- At the boot: prompt, press ENTER for the graphical installer. You can skip the media
verification if you like, then accept the defaults, with the following exceptions
1.1 For network interface configuration, select “Edit” and manually configure
I) IP address
II) Netmask
III) Hostname
IV) Gateway
V) DNS
For example:
IP address: 192.168.1.65
netmask: 255.255.255.0
hostname: node1.in
gateway: leave it blank
DNS: leave it blank
1.3 Choose install CentOS, click next choose select remove linux partitions on selected drives &
create default layout, click next
Tip: We recommend that you install your node controllers first so that you can register them with
the frontend/base server as part of that install.
76
B) Node Configuring
1- Now login as root on node machine insert the Eucalyptus Fast Start media (CD/DVD or
pendrive) and mount it for copy the cloud setup
mkdir /media/usb/
mount -t vfat /dev/sdb1 /media/usb
Note: the USB drive might appear as a device other than /dev/sdb1 depending on your hardware
configuration (i.e. /dev/sdc1, etc.). Use the command “fdisk –l” to see the devices.
3- Install ntp to update date and time of the other machines of the network.
4- For NC Configuring
cd /root/faststartusb
chmod +x *.sh
./fastinstall.sh
Answer n to the first question (this is not the front-end server).
Note: After the install completes, the machine will reboot automatically and be ready to use.
77
C) Frontend Configuring
1- Now login as root on node machine insert the Eucalyptus Fast Start media (CD/DVD or
pendrive) and mount it for copy the cloud setup
mkdir /media/usb/
mount -t vfat /dev/sdb1 /media/usb
Note: The USB drive might appear as a device other than /dev/sdb1 depending on your hardware
configuration (i.e. /dev/sdc1, etc.)
3- Synchronize the machine with NTP server running to any machine in the cluster install ntp
first and update the date and time by using “ntpdate <NODE-IP>” command. (NODE-IP is IP-
address of the machine where NTP server running)
4- Ensure from your front machine, node(s) should be accessible “ping NODE-IP” or “ssh
root@NODE-IP” (don't login only for testing weather it ask for password
cd /root/faststartusb
chmod +x *.sh
./fastinstall.sh
Answer y to the first question (this is the front-end server)
Services will now start and the script will wait for the CLC to run. The script registers components
(you will be asked about connecting to the server over ssh and to provide the root password).
As the last step on the frontend, you need to enter the IP address of each NC (you can have more
than one). Press ENTER (at the prompt) when you are done
6- Login as admin/admin
8- Configure dhcpd server to assign IP of virtual Machines copy below lines and paste in
dhcpd.conf save and exit. Start the dhcpd server
-------------------------------------------
option domain-name "lan.ltrc.org";
ddns-update-style none;
option subnet-mask 255.255.255.0;
default-lease-time 600;
max-lease-time 7200;
It will take some time to boot the instance, in the mean time run “euca-describe-instances”
command to see the status.
Once the status is running then you can login and work on the newly launched instance.
For more help, try,
euca-run-instances --help
Login to instance
ssh -i mykey.private root@<accessible-instance-ip>
80
1- SSH Key Management
euca-add-keypair <keypair-name>
A pair of keys is created; one public key, stored in Eucalyptus, and one private key stored in the
file mykey.private and printed to standard output. The ssh client requires strict permissions on
private keys:
chmod 0600 mykey.private
euca-delete-keypair <keypair-name>
81
2- Image Management
In order to use run instances from images that you have created (or downloaded), you need to
bundle the images with your cloud credentials, upload them and register them with the cloud.
Examples
Following is an example using the Ubuntu pre-packaged image that we provide using the included
KVM compatible kernel/ramdisk (a Xen compatible kernel/ramdisk is also included).
euca-bundle-image -i euca-ubuntu-9.04-x86_64/kvm-kernel/initrd.img-2.6.28-11-generic --
ramdisk true
euca-upload-bundle -b ubuntu-ramdisk-bucket -m /tmp/initrd.img-2.6.28-11-
generic.manifest.xml
euca-register ubuntu-ramdisk-bucket/initrd.img-2.6.28-11-generic.manifest.xml
(set the printed eri to $ERI)
82
euca-bundle-image -i euca-ubuntu-9.04-x86_64/ubuntu.9-04.x86-64.img --kernel $EKI --ramdisk
$ERI
euca-upload-bundle -b ubuntu-image-bucket -m /tmp/ubuntu.9-04.x86-64.img.manifest.xml
euca-register ubuntu-image-bucket/ubuntu.9-04.x86-64.img.manifest.xml
euca-deregister <emi-XXXXXXXX>
Then, you can remove the files stored in your bucket. Assuming you have sourced your 'eucarc' to
set up EC2 client tools
If you would like to remove the image and the bucket, add the '--clear' option
Bundled images that have been uploaded may also be downloaded or deleted from the cloud.
For instance, to download the image(s) that have been uploaded to the bucket "image-bucket"
you may use the following command
euca-download-bundle -b image-bucket
euca-download-bundle --help
83
3- Virtual Machine (VM) Instance Management
For instance, to run an instance of the image with id "emi-53444344" with the kernel "eki-
34323333" the ramdisk "eri-33344234" and the keypair "mykey" you can use the following
command,
To run more than one instances, you may use the "-n" or "--instance-count" option.
To get information about a specific instance, you can use the instance id as an argument to euca-
describe-instances. For example,
euca-describe-instances i-43035890
You can create dynamic block volumes, attach volumes to instances, detach volumes, deletes
volumes, create snapshots from volumes and create volumes from snapshots with your cloud.
Volumes are raw block devices. You can create a file system on top of an attached volume and
mount the volume inside a VM instance as a block device. You can also create instantaneous
snapshots from volumes and create volumes from snapshots.
You may also create a volume from an existing snapshot. For example, to create a volume from
the snapshot "snap-33453345" in the zone "myzone" tries the following command
euca-create-volume --help
You may attach block volumes to instances using "euca-attach-volume." You will need to specify
the local block device name (this will be used inside the instance) and the instance identified. For
instance, to attach a volume "vol-33534456" to the instance "i-99838888" at "/dev/sdb" use the
following command
To detach a previously attached volume, use "euca-detach-volume" For example, to detach the
volume "vol-33534456"
euca-detach-volume vol-33534456
85
You must detach a volume before terminating an instance or deleting a volume. If you fail to
detach a volume, it may leave the volume in an inconsistent state and you risk losing data.
To delete a volume, use "euca-delete-volume." For example, to delete the volume "vol-
33534456" use the following command
euca-delete-volume vol-33534456
You may only delete volumes that are not currently attached to instances.
You may create an instantaneous snapshot of a volume. A volume could be attached and in use
during a snapshot operation. For example, to create a snapshot of the volume "vol-33534456"
use the following command
euca-create-snapshot vol-33534456
To delete a snapshot, use "euca-delete-snapshot" for example, to delete the snapshot snap-
33453345, use the following command,
euca-delete-snapshot snap-33453345
86
5 How to rebuild or rebase the instance?
Login the Virtual Machine to which you want rebuild/rebase for future use. Ensure that
euca2tools should be installed on the instance and synchronize the clock with NTP server running
in your private network.
Copy cloud credential to the instance and sourced the eucarc file. Before do the following ensure
“euca-describe-availability-zone verbose” command should run properly?
87