eucaimp9
-
Upload
saravanaraajaa -
Category
Documents
-
view
217 -
download
0
Transcript of eucaimp9
-
7/27/2019 eucaimp9
1/5
http://blog.prakharsrivastava.com/2011/04/eucalyptus-private-cloud-setup.html
Eucalyptus Private Cloud SetupI t is not always poss ible for an organizat ion to m ove into the pu bl ic cloud. Most organizat ionsdo n ot want to or hesi tate moving their organization's data into the cloud. However, cloud
deployments can signi f icant ly bring do wn the operat ion costs o f an organizat ions.
To ful ly ut i l ize the resources, organizat ions h ave started dr i f t ing towards the private clous.
Acco rding to a Gartener Research, the market for p rivate clouds w i l l double by year 2015
leading to more private cloud deployments in organizat ion facing ineff ic ient and
underut i l izat ion o f resources.
There are already a num ber of open s ource cloud platforms that can con vertany datacenter into a private cloud withou t any expenses. Opensource projects l ike
Eucalyptus, Opennebula an Openstack are among th e most p romising open
source ini t iat ives bringing the industry s tandard cloud standards to the private cloud.Whi le
sett ing up p rivate clouds is not ro cket science, migrat ion from datatcenter to a private cloud
is a complex task.
In this post, I wi l l provide the setup for Eucaluptus Commmuntiy Edi t i ion , one of the most
popu lar open-source cloud computing framework.
The instal lat ion step fo r eucalyptus are brief ly described b elow.
Eucalyptus Front-end Installation
Installation from source: On a linux distribution, eucalyptus can be
easily installed from source.(Assuming eucalyptus source and dependencies
package are in home directory)
export VERSION=2.0.1
##### Install the eucalyptus dependencies.
apt-get install gcc make apache2-threaded-dev ant openjdk-6-jdklibvirt-dev libcurl4-dev dhcp3-server vblade apache2 unzip curlvlan bridge-utils libvirt-bin kvm sudo vtun##### Untar eucalyptus-source
tar zvxf eucalyptus-$VERSION-src-offline.tar.gz
http://blog.prakharsrivastava.com/2011/04/eucalyptus-private-cloud-http://blog.prakharsrivastava.com/2011/04/eucalyptus-private-cloud-http://blog.prakharsrivastava.com/2011/04/eucalyptus-private-cloud-setup.htmlhttp://blog.prakharsrivastava.com/2011/04/eucalyptus-private-cloud-setup.htmlhttp://blog.prakharsrivastava.com/2011/04/eucalyptus-private-cloud- -
7/27/2019 eucaimp9
2/5
cd eucalyptus-$VERSION
export EUCALYPTUS_SRC=`pwd`
export EUCALYPTUS=/opt/eucalyptus
##### Untar eucalytus-deps
cd $EUCALYPTUS_SRC
tar zvxf ../eucalyptus-$VERSION-src-deps.tar.gz
mkdir -p $EUCALYPTUS/packages/
####Build and install the dependencies
cd $EUCALYPTUS/packages
tar zxvf $EUCALYPTUS_SRC/eucalyptus-src-deps/axis2-1.4.tgz
export APACHE_INCLUDES=/usr/include/apache2
export APR_INCLUDES=/usr/include/apr-1.0
####Build Axis2Cexport AXIS2C_HOME=$EUCALYPTUS/packages/axis2c-1.6.0
cd $EUCALYPTUS_SRC/eucalyptus-src-deps/
tar zvxf axis2c-src-1.6.0.tar.gz
cd axis2c-src-1.6.0
CFLAGS="-w" ./configure --prefix=${AXIS2C_HOME} --with-
apache2=$APACHE_INCLUDES --with-apr=$APR_INCLUDES --enable-multi-thread=no
make
make install
####Build Rampart
export AXIS2C_HOME=$EUCALYPTUS/packages/axis2c-1.6.0
export LD_LIBRARY_PATH=${AXIS2C_HOME}/lib:$LD_LIBRARY_PATH
cd $EUCALYPTUS_SRC/eucalyptus-src-deps/
tar zvxf rampartc-src-1.3.0-0euca1.tar.gz
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
#####Modify axis2.xml
nano $AXIS2C_HOME/axis2.xml
###Uncomment Security tag
in both inflow and outflow section
####Set JAVA_HOME and JAVA
export JAVA_HOME="/usr/lib/jvm/java-6-openjdk"
-
7/27/2019 eucaimp9
3/5
export JAVA="$JAVA_HOME/jre/bin/java"
####Build Eucalyptus Components
cd $EUCALYPTUS_SRC
./configure --with-axis2=$EUCALYPTUS/packages/axis2-1.4 --with-
axis2c=$EUCALYPTUS/packages/axis2c-1.6.0 --enable-debug --prefix=$EUCALYPTUS
make
make install
##### Enable services on the front-end
useradd eucalyptus
$EUCALYPTUS/usr/sbin/euca_conf -d $EUCALYPTUS --setup
$EUCALYPTUS/usr/sbin/euca_conf -d $EUCALYPTUS --enable cloud --enable
walrus --enable sc
####iSCSI (SCSI over IP)apt-get install tgt
# Start enabled front-end services$EUCALYPTUS/etc/init.d/eucalyptus-cloud start
# Start the cluster controller
$EUCALYPTUS/etc/init.d/eucalyptus-cc status####Regiter Eucalyptus Components (Cluster, Walrus and Storage )
$EUCALYPTUS/usr/sbin/euca_conf --register-walrus 192.168.145.102
$EUCALYPTUS/usr/sbin/euca_conf --register-cluster iCloudCluster1
192.168.145.102
$EUCALYPTUS/usr/sbin/euca_conf --register-sc iCloudCluster1
192.168.145.102
####Set Eucalyptus to start at boot time
$EUCALYPTUS/etc/init.d/eucalyptus-cloud /etc/init.d/eucalyptus-cloud
$EUCALYPTUS/etc/init.d/eucalyptus-cc /etc/init.d/eucalyptus-cc
update-rc.d eucalyptus-cloud defaults
Eucalyptus Node Controller Installation
To install from source, follow the steps used for installing eucalyptus.(or use the installation script for installation eucalyptus)
$EUCALYPTUS/usr/sbin/euca_conf -d $EUCALYPTUS --setup#Modify /etc/libvirt/qemu.conf
user = "eucalyptus"
-
7/27/2019 eucaimp9
4/5
#Modify /etc/libvirt/libvirtd.conf
Line 1. #unix_sock_group = "libvirt" => unix_sock_group ="libvirt"Line 2. #unix_sock_ro_perms = "0777" => unix_sock_ro_perms ="0777"
Line 3. #unix_sock_rw_perms = "0770" => unix_sock_rw_perms ="0770"Line 4. #auth_unix_ro = "none" => auth_unix_ro = "none"Line 5. #auth_unix_rw = "none" => auth_unix_rw = "none"#Restart libvirtd
/etc/init.d/libvirt-bin stop/etc/init.d/libvirt-bin startchown root:libvirt /var/run/libvirt/libvirt-sockchown root:libvirt /var/run/libvirt/libvirt-sock-ro#brctl show
Modify /etc/network/interface
Modify eth0 entry toand add bridge-ports
#Modify /etc/network/interfaces
Add bridge_ports all for dhcp and bridge_ports eth0 for static#Restart Networking
/etc/init.d/networking restart
#Modify /etc/eucalyptus/eucalyptus.conf
VNET_BRIDGE=""
HYPERVISOR="xen"
#Restart eucalyptus-nc
/etc/init.d/eucalyptus-nc restart
Tail the /var/log/eucalyptus/nc.log file to check if the eucalyptus-nc is
communicating with the eucalyptus-cc. The nc.log file updates continuously
with each line added when Eucalyptus-CC invokes describeResources() on the
Eucalyptus-NC.
At this point, the machine is configured with Xen and Eucalyptus NodeController.
Using Euca2ools to interact with Eucalyptus
Log in into the Eucalyptus at
-
7/27/2019 eucaimp9
5/5
https://192.168.0.1:8443
For administrator:
The default user id and password is admin. Log in and change the password
and provide a valid email address at which you want to receive the
approval mails. Download the credentials file to the local machine. The
name of the file should be euca2-admin-x509.zip.
Source the .eucarc file from the zip.
mkdir $HOME/.eucaunzip euca2-admin-x509.zip -d $HOME/.euca. $HOME/.euca/eucarcObtaining Xen Kernel Images
1. Xen kernel images can be downloaded from Eucalyptus Webite.However it is always possible to use the Dom0 kernel as DomUkernel.Generating the key
euca-add-keypair mykey | tee mykey.privatechmod 0600 mykey.private(Remember the location of the key as this will be the directory from where
you will be able to ssh into your instances.)
Registering the kerneleuca-bundle-image -i --kernel trueeuca-upload-bundle -b -m /tmp/.manifest.xmleuca-register /.manifest.xmlRegistering the ramdiskeuca-bundle-image -i --ramdisk trueeuca-upload-bundle -b -m /tmp/.manifest.xmleuca-register /.manifest.xmlRegistering the Virtual Machine Imageeuca-bundle-image -i
euca-upload-bundle -b -m /tmp/.manifest.xml
euca-register /.manifest.xmlRun the instanceeuca-run-instances -k mykey -n -t --kernel --ramdisk
euca-describe-instance
Displaying the running Instanceeuca-describe-instancesDisplaying the stored imageseuca-describe-imagesTo display the availabilty zoneseuca-describe-availabilty-zones verbose
https://192.168.145.102:8443/https://192.168.145.102:8443/https://192.168.145.102:8443/