Hi
all,
i
am writing this blog for the installation of EUCALYPTUS-3.4.1 from
source.
WHY
i am writing this.?
You
can ask me this question.??? :) because i wasted my three golden days
with this installation alone. you may get(find) lot of installation
guides.
INSTALLTION
GUIDE which for single machine
Before
this you have installed XEN and LIBVIRT. And they have to work.
Build
Your OWN cloud:
ARCHITECTURE
(Design flow):
Eucalyptus
--> Libvirt --> Hypervisor
Eucalyptus
main dependency packages:
axis2-1.4
axis2c-1.6.0
rampart-1.3.0
Basic
Prerequisites
apt-get
install cdbs debhelper default-jdk libfuse-dev libfuse2
libcurl4-openssl-dev libssl-dev ant-optional zlib1g-dev pkg-config
swig python python-setuptools rsync wget open-iscsi libxslt1-dev
gengetopt ant groovy
postgresql-server-dev-9.1 python-boto
sudo (groovy
– not recommenede)
These
are all other dependency which you have to install in your system:
libc6,
adduser, openssh-server, openssh-client, postgresql-client-9.1,
python2.7, python, python-psutil, python-pygresql, lvm2,
libgetargs-long-perl, postgresql-9.1, vblade, dmsetup, velocity,
libpostgresql-jdbc-java, libjboss-common-java,
libhibernate-commons-annotations-java, python-pygresql, drbd8-utils,
open-iscsi, libcrypt-openssl-random-perl, libcrypt-openssl-rsa-perl,
libcrypt-x509-perl, lvm2, vblade, libcurl3, libssl1.0.0, apache2,
libapache2-mod-axis2c (not in repository, installed from wheezy
or squeeze
), bridge-utils, vlan, dhcp3-server, iptables, vtun, libpam-modules, libapr1-dev
libaprutil1-dev, apache2-threaded-dev ,
ivy, openntpd , tgt, parted
Eucalytpus
is recommending to have java-7-openjdk
In
debian i am recommending to install the tgt from the source because i
faced many problems and write your own service using the chkconfig.
Also
i recommend to check the dependencies from the eucalyptus INSTAll
guide.
You
can install LIBVIRT-xxx either from the repository or from the
source.
Download
axis2-1.4 from
Unzip
it in /opt, so /opt/axis2-1.4 exists
Download
the axis2c-1.6.0 from the source which is available in the following
link:
export
EUCALYPTUS="/opt/eucalyptus"
export
AXIS2C_HOME=/usr/lib/axis2/
export
APACHE_INCLUDES=/usr/include/apache2
export
APR_INCLUDES=/usr/include/apr-1.0
export
AXIS2C_HOME=$EUCALYPTUS/packages/axis2c-1.6.0
CFLAGS="-w"
./configure --prefix=${AXIS2C_HOME} --with- apache2=$APACHE_INCLUDES
--with-apr=$APR_INCLUDES --enable-multithread=no
make
If you face any error as axiom* means
Add this one in neethi/test/Makefile.am and Makefile also
../../axiom/src/parser/guththila/libaxis2_parser.la
\
make
install
Download
the rampart-1.3.0
Untar
the rampart source.(tar -zxvf rampart-XXXXX)
cd
rampartc-src-1.3.0
./configure
--prefix=${AXIS2C_HOME} --enable-static=no
--with-axis2=${AXIS2C_HOME}/include/axis2-1.6.0
make
make
install
Eucalyptus
Installation:
Untar
the Eucalyptus Source in the required locatuion.
cd
/opt/eucalyptus-version-src
export
JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64/"
export
JAVA="$JAVA_HOME/jre/bin/java"
./configure
--with-axis2c=/usr/lib/axis2
--with-axis2c-services=/usr/lib/axis2/services --prefix=$EUCALYPTUS
--with-apache2-module-dir=/usr/lib/apache2/modules
--with-axis2=/opt/axis2-1.4 –with-db-home=/usr/lib/postgresql/9.1
–with-libvirt=/opt/libvirt-1.2.0(if installed from the source)
If
libvirt you have installed from the repository just leave it.( Don't
add the tag)
make
clean
make
make
install
ln
-s /lib/udev/scsi_id /usr/bin/scsi_id
cp
-r /etc/eucalyptus/faults/en_US/*
/opt/eucalyptus_new_3.4.1/eucalyptus/etc/eucalyptus/faults/en_US/
chmod
+s /usr/lib/eucalyptus/euca_rootwrap -v
adduser
eucalyptus
sudo
adduser `id -un` libvirtd
sudo
adduser eucalyptus libvirtd
mkdir -p /var/lock/subsys
mkdir -p /var/lock/eucalyptus
chown -R eucalyptus:eucalyptus /var/lock/subsys /var/run/eucalyptus
Open the eucalyptus configuration file:
vi /opt/eucalyptus/etc/eucalyptus/eucalyptus.conf
Type :6 press Enter
Get into INSERT mode
Edit the value of Eucalyptus = "/opt/eucalyptus/"
save the file.
service postgresql restart
Then :
cd /opt/eucalyptus/
usr/sbin/euca_conf -d $EUCALYPTUS --hypervisor xen --instances /usr/local/eucalyptus --user eucalyptus --setup
ln -sf $EUCALYPTUS/etc/init.d/eucalyptus-cloud /etc/init.d/eucalyptus-cloud
ln -sf $EUCALYPTUS/etc/init.d/eucalyptus-cc /etc/init.d/eucalyptus-cc
ln -sf $EUCALYPTUS/etc/init.d/eucalyptus-nc /etc/init.d/eucalyptus-nc
usr/sbin/euca_conf --initialize
service openntpd restart
chmod 0777 /tmp
service eucalyptus-cloud start
service eucalyptus-cc start
service eucalyptus-nc start
Congratz successfully you installed the EUCALYPTUS cloud in your system.
Now open your browser then hit the following link:
https://localhost:8443/
You will see the portal:
Intially the password is "admin"
After successfull login you will ask for mail and new password. If you wish you can change it. :)
Now you have to get the credentials.For that:
usr/sbin/euca_conf --get-credentials admin.zip.
unzip admin.zip
source eucarc
Now we are able to access your portal using the euca2ools.
euca-describe-services -- to see all the services.
euca-describe-components -- to see the all components.
Now register your machine as Walrus, Cluster, SC, NC.
In my case i am having the single machine. so I am going to using same ip for all.
Registering Walrus
→/usr/sbin/euca_conf --register-walrus --partition walrus --host ip --component walrusname
Register Cluster
→ usr/sbin/euca_conf --register-cluster --partition clustername --host ip --component ccname
Registering Sc
→ usr/sbin/euca_conf --register-sc --partition clustername --host ip --component scname
walrusname,ccname, scname - to avoid confusion if you have multiple machine means
eucalyptus recommends to put the name with ip. for example: sc-ip
Registering Nodes
→ usr/sbin/euca_conf
--register-nodes "nodes-ip-address"
During
the registration it will show some error BlockStorage. (BROKEN).
For
this you
have run the follwoign command:
euca-modify-property
-p [clustername].storage.blockstoragemanager=overlay
Then
you can check with this one:
euca-describe-properties
| grep blockstorage
Now
you can check all the components with the following commands:
euca-describe-services
-- to see all the services.
euca-describe-components
-- to see the all components.
euca-describe-clouds
euca-describe-clusters
euca-describe-storage-controllers
euca-describe-nodes
Now
you have all the components in your machine. You can create the VM by
uploading image to eucalyptus.
Upload
some image to/from eucalyptus and launch the virtual machine.
Create
the Virtual machine and enjoy with your CLOUD..
These
steps are clubbed from following installation guides:
i
referred following links for my installation.
and
also i added my suggestions.
If
you have any queries means put it in comments.
Regards,
cooldharma06..
:)