If you want to install Eucalyptus on a Rocks cluster, you can now follow the regular CentOS RPM instructions. The Cloud Controller and the Cluster Controller will need to be installed on your Rocks front-end, and the Node Controller will need to be installed on any of your Rocks nodes that have been configured as 'VM Containers'.
Eucalyptus will not run on a Rocks virtual cluster!
If you have previously installed Eucalyptus on your Rocks cluster, you should disable the old Eucalyptus rolls:
rocks disable roll eucalyptus
rebuild the rocks distribution:
cd /home/install rocks-dist dist
and finally reinstall the nodes as 'VM Containers'. You can then follow the CentOS RPM instructions to install and configure Eucalyptus.
Keep in mind that the java roll in Rocks V (and V.I) includes JDK version 1.5 which is not enough to run Eucalyptus. You have to install the 1.6 JDK. For our testing we used Sun's JDK, which can be found at http://java.sun.com/javase/downloads/index.jsp.
Want to build a Rocks/Centos(RedHat Enterprise)/Eucalyptus Cloud - http://hackdaddy.wordpress.com/
Here is an example of my development and deployment of a Cloud Computing Cluster using Centos5.3x86_64, Rock V.Ix86_64 and Eucalyptus v1.5.1x86_64 on a AMD Opteron Dual x64 / HeadNode and Intel Core 2 Quad-Core / Compute Nodes. Please read this entire tutorial first because you may just need to run a script that would handle some configuration.
Requirements: (for 1 headnode and 2 compute node environment)
Intel or AMD Hyper-V Compatible multicore Processors x86_64
4gb + RAM
100 gb harddrive (/export mount point and / (root) must be atleast 40 gb)
HeadNode: Must have 2 network interface card (preferably gigabit ethernet)
ComputeNode: At Least 1 gigabit ethernet card
Gigabit Ethernet Switch
Resources:
* Rocks V.I x86_64 CD Set (Kernel/Boot Roll, Base Roll, WebServer Roll, Ganglia Roll)
* CentOS 5.3 x86_64 CD Set all discs (replace the Rocks OS set all Centos Discs)
* Eucalyptus v1.5.1 x86_64 (Get the generic package)
Components (some of these will be added as a part of the Rocks implementation)
* Package manager (Yum, Apt , RPM (synaptic or up2date optional))
* DHCP Server (dhcp3)
* Xen 3+ ( I recommend Xen 3.4)
* libvirt 6+ (the install comes with libvirt 3, plus there are issue with the one in the package on centos)
* Python 5 (not 6)
* Perl 1.8.5+
* Java 6+
* Apache 1.6+ ( I used 1.7.1)
* rsync
* Firewall (iptables)
* sshd
* Text Editor (nano, kedit, gedit)
* KVM
* Qemu
* vlan
* sendmail
* iproute
* ntp
* bridge-utils
* vblade
* aoetools
* lvm2
* nmap (to see what’s running on open ports)
* wget
* unzip
* Eucalyptus 1.5.1 (eucalyptus-1.5.1-centos-x86_64.tar.gz)
* Sample Image (euca-ttylinux.tgz)
* ec2-api-tools-1.3-30349
* ec2-ami-tools-1.3-26357
Configurations
check if hyper-v or paravirtualization compatible if no output not compatible:
Check on Physical Address Extensions – grep pae /proc/cpuinfo
Check Intel-VT or AMD-V for hardware virtualization.
Intel
grep vmx /proc/cpuinfo
AMD
grep svm /proc/cpuinfo
open ports: Headnode = 22, 25, 80, 443, 5900, 5901,8443, 8773, 8774
ComputeNode = 8775
also 5900, 5901 if you want to use vncviewer/vncserver there is also a
remote desktop utility for Centos, I believe vino.
Be sure selinux is disabled.
Use SYSTEM managed or default Networking configuration.
Instructions assume that you understand how to use linux and text editors. Also assumes that you understand networking, virtual machines and system configuration. Please do the configurations logged in with a root account. Please connect eth0 on internal lan to switch plus the nodes and eth1 on public wan. Be sure that the compute nodes can boot from network cards (PXE boot). * Don’t forget to turn off PXE Boot after you have installed a vm-container-X-X.
First: Install the headnode by using the rocks documentation (Please Read entirely). You will need to begin by inserting your boot/kernel roll. Then type (omit any < > seen in this tutorial, unless stated otherwise) Follow Rocks Documentation however replace the OS Rolls with the entire CD set for CentOS 5.3 x86_64. Record your information but keep it secure, normally the defaults are sufficient.
Plan your network configuration: I put a 192.168.42.95 for my static ip on eth1 (public wan) because this is in my network configuration talk to your network admin and get your info you will need the dns and gateway. I put 10.1.1.1 on eth0 (cloud lan) because this is what I want. If it recommends a default use it.
Use manual partition for the system with atleast:
Use ext3 file system.
40 gb / (force primary)
Ram * 3 swap (force primary)
40 gb /export
the rest if necessary as you see fit. By followng rocks documentation install should go by smoothly. Reboot into Rocks/Centos.
Share internet on compute nodes through your head node. You can put the following in a shell script and run it change your configurations to match your own.
linux-network-share.sh
#!/bin/bash
# Created by nixCraft – www.cyberciti.biz
# Edited by Micah Rowland
IPT=”/sbin/iptables”
MOD=”/sbin/modprobe”
# set wan interface such as eth1 or ppp0
SHARE_IF=”eth1″
# clean old fw
echo “Clearing old firewall rules…”
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
# Get some kernel modules
echo “Loading kernel modules…”
$MOD ip_tables
$MOD iptable_filter
$MOD iptable_nat
$MOD ip_conntrack
$MOD ipt_MASQUERADE
$MOD ip_nat_ftp
$MOD ip_nat_irc
$MOD ip_conntrack_ftp
$MOD ip_conntrack_irc
# Clean old rules if any, rhel specific but above will take care of everything
# service iptables stop
# unlimited traffic via loopback device
$IPT -A INPUT -i lo -j ACCEPT
$IPT -A OUTPUT -o lo -j ACCEPT
echo “Setting ${SHARE_IF} as router interface…”
$IPT –table nat –append POSTROUTING –out-interface ${SHARE_IF} -j MASQUERADE
# Start other custom rules
#$IPT
# End other custom rules
echo “*** Instructions on TCP/IP On The Windows / Mac / Linux Masqueraded Client ***”
echo “1. Login to your other LAN node computers”
echo “2. Use a text editor to modify your network setting with the info below modified
for your network.”
echo “3. Set DNS (NS1 and NS2) to 192.168.43.80 and 192.168.43.81″
echo “4. Create a route-eth0 file in /etc/sysconfig/network-scripts with appropriate permissions”
echo “5. Enter $(ifconfig ${SHARE_IF} | grep ‘inet addr:’| grep -v ’127.0.0.1′ | cut -d: -f2 | awk ‘{ print $1}’) as the default gateway.”
This adds a router for each subnet.
It goes via dev . Here is my route-eth0 file. change yours accordingly.
# Added by Micah 7/7/09
default 10.1.1.1 dev eth0
10.1.0.0/24 via 10.1.1.1 dev eth0
192.168.42.0/24 via 192.168.42.95 dev eth0
192.168.0.0/24 via 192.168.122.1 dev eth0
Second: Let’s begin by configuring our package managers. We will be adding apt support considering most of the documentation is written in hopes of using Ubuntu 9.04 Server
In your yum.conf file enter this:
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
#baseurl=http://ftp.riken.jp/Linux/dag/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
then run:
rpm –import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
rpm –import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
Then get the following repo file and add them here: /etc/yum.repos.d
CentOS-GITCO.repo
CentOS-GITCO_TESTING.repo
Now, yum install apt
After installation update the os.list file for apt for your CentOS Distro found here: /etc/apt/sources.list.d
edit os.list and add:
### CENTOS
repomd http://mirror.centos.org/ centos/$(VERSION)/os/$(ARCH)
repomd http://mirror.centos.org/ centos/$(VERSION)/updates/$(ARCH)
repomd http://mirror.centos.org/ centos/$(VERSION)/extras/$(ARCH)
also, uncomment any centos or redhat enterprise lines within reason. Modification may be needed. Please google.
I don’t update, but if you don’t have the version I mentioned above please update til you do. Please review the update components also.
Third: Eucalyptus pre-requisites. Now I used java.sun binary install for java 6 and apache foundation for ant 1.7.1 but Euclyptus team feels you should do this if using rocks then remove the <-y> cause you may have conflicts:
yum install -y java-1.6.0-openjdk-devel ant ant-nodeps libvirt-devel
curl-devel httpd httpd-devel apr-devel openssl-devel dhcp
This may not be necessary because you used rocks, but remember not to get rocks confused with what you are doing here which is a eucalyptus cloud, not rocks cluster, because you want the amazon tools. Try it couldn’t hurt.
Fourth: Installation of Eucalyptus
Verify all node clocks are synchronized with ntp. Verify all required ports previously mentioned are open, Headnode = 22, 25, 80, 443, 5900, 5901, 8443, 8773, 8774 ComputeNode = 8775. This can be done through iptables or use the utility in Centos unders: System > Administration > Security Level and Firewall. Since the Compute nodes have no gui then do the iptables commands. see iptables or google or try. Later we will do dns masquerading so that your compute nodes get internet access. So, you may want to revisit this later to add a new rule.
/etc/sysconfig/iptables (verify you iptables file it may be different than this one)
iptables -I INPUT -p tcp –dport 8775 –syn -j ACCEPT
/etc/rc.d/init.d/iptables restart
Verify Xen get’s network connectivity on the compute nodes by manual loading a xen image. Please see xen documentation or google.
All downloads should be in your /opt directory. Now run:
tar zxvf eucalyptus-1.5.1-*.tar.gz
cd eucalyptus-1.5.1-*
then
go into the created directory eucalyptus-1.5.1-* and go into deps
directory and run the rpms. Before running the deps or eucalyptus,
If you are upgrading or had a different version installed please see
the documentation at open.eucalyptus.com. Or is you installed a Eucalyptus roll.
Run your rpm’s in order such as dependencies then libraries. see eucalyptus documentation.
In your /opt directory run:
unzip ec2-api-tools-1.3-30349.zip
unzip ec2-ami-tools-1.3-26357.zip
Fifth: Add your System Paths for Eucalyptus to access resources. You add this to the end of the /etc/profile or /etc/bashrc file. Like so:
export JAVA_HOME=/usr/java/jdk1.6.0_14
export EC2_HOME=/opt/ec2-api-tools-1.3-30349
export EC2_AMITOOL_HOME=/opt/ec2-ami-tools-1.3-26357
export EUCALYPTUS=/opt/eucalyptus
export PATH=$PATH:$HOME/.euca:$EUCALYPTUS:$JAVA_HOME/bin:/opt/apache-ant-1.7.1/bin:$EC2_HOME/bin:$EC2_AMITOOL_HOME/bin
Reference Links:
Rocks Documentation – http://www.rocksclusters.org/wordpress/?page_id=4
LinuxStreet – http://www.linuxstreet.net/news/E/19987/Install-Xen-3-3-on-CentOS-5-2-vi...
Eucalyptus Doc – http://open.eucalyptus.com/wiki/EucalyptusPrerequisites_v1.5
Field Commander Wieers – http://dag.wieers.com/blog/using-apt-in-an-rpm-world
Gitco – http://www.gitco.de/linux/x86_64/centos/5/
CentOS / Redhat Linux Internet Connection Sharing – http://www.cyberciti.biz/faq/rhel-fedora-linux-internet-connection-shari...
Trouble Shoot and Support – http://forum.eucalyptus.com/forum/ (must sign up)
Downloads for this tutorial only.
wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.3-30349.zip
wget http://s3.amazonaws.com/ec2-downloads/ec2-ami-tools-1.3-26357.zip
Eucalyptus v1.5.1x86_64 Centos 5.3 – http://open.eucalyptus.com/downloads/90
euca-ttylinux – http://open.eucalyptus.com/downloads/3