From 6fceb133d57708d76105c1449b899a673acefa91 Mon Sep 17 00:00:00 2001 From: sripathi Date: Tue, 9 Dec 2014 08:18:09 +0530 Subject: [PATCH 01/24] Added logs --- scripts/centos_prepare_ovpl.sh | 114 ++++++++++++++++++++++++------- scripts/centos_prepare_ovpl.sh~ | 56 +++++++++++++++ scripts/config.sh | 4 +- scripts/config.sh~ | 10 +++ scripts/install_dependencies.sh | 18 +++-- scripts/install_dependencies.sh~ | 15 ++++ scripts/install_mongodb.sh | 27 +++++--- scripts/install_mongodb.sh~ | 19 ++++++ scripts/install_openvz.sh | 64 +++++++++++------ scripts/install_openvz.sh~ | 59 ++++++++++++++++ scripts/install_ovpl.sh | 41 +++++++---- scripts/install_ovpl.sh~ | 22 ++++++ 12 files changed, 374 insertions(+), 75 deletions(-) create mode 100755 scripts/centos_prepare_ovpl.sh~ create mode 100755 scripts/config.sh~ create mode 100755 scripts/install_dependencies.sh~ create mode 100755 scripts/install_mongodb.sh~ create mode 100755 scripts/install_openvz.sh~ create mode 100755 scripts/install_ovpl.sh~ diff --git a/scripts/centos_prepare_ovpl.sh b/scripts/centos_prepare_ovpl.sh index 94003a2..220be34 100755 --- a/scripts/centos_prepare_ovpl.sh +++ b/scripts/centos_prepare_ovpl.sh @@ -2,6 +2,21 @@ # Script to setup a fresh installation of CentOS to run OVPL # Installs: Dependencies: python-devel, git, pip; mongodb; openvz. + +LOGGFILE="setup-ovpl.log" +DATE=$(date) + +if [[ -f $LOGGFILE ]];then + echo "=============================================" + echo "logpath = setup-ovpl-centos/scripts/$LOGGFILE" + echo "==============================================" +else + touch $LOGGFILE + echo "=============================================" + echo "logpath = setup-ovpl-centos/scripts/$LOGGFILE" + echo "=============================================" +fi + # check if script is run as root if [[ $UID -ne 0 ]]; then echo "" @@ -17,40 +32,89 @@ if [[ ! -d "../meta" ]]; then echo "Please contact the author of the script." exit 1 fi - # read proxy settings from config file -source ./config.sh +if [[ -f "config.sh" ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Reading config.sh file for proxy settings" 2>&1 | tee -a $LOGGFILE + source ./config.sh + if [[ -n $http_proxy ]]; then + + export http_proxy=$http_proxy + echo "[[$DATE:: $0 :: Line $LINENO::]] export http_proxy = $http_proxy" 2>&1 | tee -a $LOGGFILE + fi + if [[ -n $https_proxy ]]; then + export https_proxy=$https_proxy + echo "[[$DATE:: $0 :: Line $LINENO::]] export https_proxy = $https_proxy" 2>&1 | tee -a $LOGGFILE + fi +else + echo "[[$DATE:: $0 :: Line $LINENO::]] config.sh file not exist" 2>&1 | tee -a $LOGGFILE + exit 1 +fi -if [[ -n $http_proxy ]]; then - echo $http_proxy - export http_proxy=$http_proxy +#updating system +echo "" +echo "========================== UPDATING SYSTEM ================================" +echo "[[$DATE:: $0 :: Line $LINENO::]] Updating System...." 2>&1 | tee -a $LOGGFILE +yum update -y +if [[ $? -ne 0 ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in updating system " 2>&1 | tee -a $LOGGFILE + exit 1 +else + echo "" + echo "[[$DATE:: $0 :: Line $LINENO::]] System updation complete.." 2>&1 | tee -a $LOGGFILE + echo "" fi -if [[ -n $https_proxy ]]; then - export https_proxy=$https_proxy + + +if [[ -f "install_dependencies.sh" ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_dependencies.sh" 2>&1 | tee -a $LOGGFILE + ./install_dependencies.sh + if [ $? -ne 0 ]; then + echo "" + echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing dependencies. Quitting!" 2>&1 | tee -a $LOGGFILE + exit 1 + fi +else + echo "[[$DATE:: $0 :: Line $LINENO::]] install_dependencies.sh file not exist" 2>&1 | tee -a $LOGGFILE + exit 1 fi -echo "Invoking install_dependencies.sh" -./install_dependencies.sh -if [ $? -ne 0 ]; then - echo "" - echo "Error installing dependencies. Quitting!" - exit 1 +if [[ -f "install_openvz.sh" ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_openvz.sh" 2>&1 | tee -a $LOGGFILE + ./install_openvz.sh + if [ $? -ne 0 ]; then + echo "" + echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing openvz. Quitting! See log file" 2>&1 | tee -a $LOGGFILE + exit 1 + fi +else + echo "[[$DATE:: $0:: Line $LINENO::]] install_openvz.sh file not exist" 2>&1 | tee -a $LOGGFILE + exit 1 fi -echo "Invoking install_openvz.sh" -./install_openvz.sh -if [ $? -ne 0 ]; then - echo "" - echo "Error installing OpenVZ. Quitting!" - exit 1 +if [[ -f "install_mongodb.sh" ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_mongodb.sh" 2>&1 | tee -a $LOGGFILE + ./install_mongodb.sh + if [ $? -ne 0 ]; then + echo "" + echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing mongodb. Quitting! " 2>&1 | tee -a $LOGGFILE + exit 1 + fi +else + echo "[[$DATE:: $0 :: Line $LINENO::]] install_mongodb.sh file not exist" 2>&1 | tee -a $LOGGFILE + exit 1 fi -echo "Invoking install_mongodb.sh" -./install_mongodb.sh -if [ $? -ne 0 ]; then - echo "" - echo "Error installing MongoDB. Quitting!" - exit 1 +if [[ -f "install_ovpl.sh" ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_ovpl.sh" 2>&1 | tee -a $LOGGFILE + ./install_ovpl.sh + if [ $? -ne 0 ]; then + echo "" + echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing ovpl. Quitting! " 2>&1 | tee -a $LOGGFILE + exit 1 + fi +else + echo "[[$DATE:: $0 :: Line $LINENO::]] install_ovpl.sh file not exist" 2>&1 | tee -a $LOGGFILE + exit 1 fi exit 0 diff --git a/scripts/centos_prepare_ovpl.sh~ b/scripts/centos_prepare_ovpl.sh~ new file mode 100755 index 0000000..94003a2 --- /dev/null +++ b/scripts/centos_prepare_ovpl.sh~ @@ -0,0 +1,56 @@ +#!/bin/bash +# Script to setup a fresh installation of CentOS to run OVPL +# Installs: Dependencies: python-devel, git, pip; mongodb; openvz. + +# check if script is run as root +if [[ $UID -ne 0 ]]; then + echo "" + echo "$0 must be run as root!" + echo "Exiting.." + exit 1 +fi + +# check if meta directory exists +if [[ ! -d "../meta" ]]; then + echo "" + echo "You don't have the necessary files." + echo "Please contact the author of the script." + exit 1 +fi + +# read proxy settings from config file +source ./config.sh + +if [[ -n $http_proxy ]]; then + echo $http_proxy + export http_proxy=$http_proxy +fi +if [[ -n $https_proxy ]]; then + export https_proxy=$https_proxy +fi + +echo "Invoking install_dependencies.sh" +./install_dependencies.sh +if [ $? -ne 0 ]; then + echo "" + echo "Error installing dependencies. Quitting!" + exit 1 +fi + +echo "Invoking install_openvz.sh" +./install_openvz.sh +if [ $? -ne 0 ]; then + echo "" + echo "Error installing OpenVZ. Quitting!" + exit 1 +fi + +echo "Invoking install_mongodb.sh" +./install_mongodb.sh +if [ $? -ne 0 ]; then + echo "" + echo "Error installing MongoDB. Quitting!" + exit 1 +fi + +exit 0 diff --git a/scripts/config.sh b/scripts/config.sh index 68f2415..605053f 100755 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -4,7 +4,7 @@ # E.g., # Note the port number after the second (:). -export http_proxy="" +export http_proxy="http://proxy.iiit.ac.in:8080" #set your https proxy. Similar to the above. -export https_proxy="" +export https_proxy="http://proxy.iiit.ac.in:8080" diff --git a/scripts/config.sh~ b/scripts/config.sh~ new file mode 100755 index 0000000..68f2415 --- /dev/null +++ b/scripts/config.sh~ @@ -0,0 +1,10 @@ +# set your http proxy based on your network's configuration. +# Ask your network administrator if you are unsure about the +# value + +# E.g., +# Note the port number after the second (:). +export http_proxy="" + +#set your https proxy. Similar to the above. +export https_proxy="" diff --git a/scripts/install_dependencies.sh b/scripts/install_dependencies.sh index c36cf6f..9f48e15 100755 --- a/scripts/install_dependencies.sh +++ b/scripts/install_dependencies.sh @@ -1,15 +1,21 @@ #!/bin/bash meta_dir="../meta" +DATE=$(date) +LOGGFILE="setup-ovpl.log" -echo "" -echo "Setting up EPEL repo.." #wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm +echo "[[$DATE:: $0 :: Line $LINENO::]] Setting up EPEL repo.." 2>&1 | tee -a $LOGGFILE rpm -ivh $meta_dir/epel-release-6-8.noarch.rpm -#rm epel-release-6.8.noarch.rpm -echo "" -echo "Installing dependencies.. yum -y install gcc python-devel.x86_64 python-pip ssh git" -yum -y install gcc python-devel.x86_64 python-pip ssh git +echo "[[$DATE:: $0 :: Line $LINENO::]] Installing dependencies.. " 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Running yum -y install gcc python-devel.x86_64 python-pip openssh-clients openssh-server git" 2>&1 | tee -a $LOGGFILE +yum -y install gcc python-devel.x86_64 python-pip openssh-clients openssh-server git +if [[ $? -ne 0 ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in installing dependencies.." 2>&1 | tee -a $LOGGFILE + exit 1 +else + echo "[[$DATE:: $0 :: Line $LINENO::]] Completed installation of gcc python-devel.x86_64 python-pip openssh-clients openssh-server git" 2>&1 | tee -a $LOGGFILE +fi exit 0 diff --git a/scripts/install_dependencies.sh~ b/scripts/install_dependencies.sh~ new file mode 100755 index 0000000..c36cf6f --- /dev/null +++ b/scripts/install_dependencies.sh~ @@ -0,0 +1,15 @@ +#!/bin/bash + +meta_dir="../meta" + +echo "" +echo "Setting up EPEL repo.." +#wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm +rpm -ivh $meta_dir/epel-release-6-8.noarch.rpm +#rm epel-release-6.8.noarch.rpm + +echo "" +echo "Installing dependencies.. yum -y install gcc python-devel.x86_64 python-pip ssh git" +yum -y install gcc python-devel.x86_64 python-pip ssh git + +exit 0 diff --git a/scripts/install_mongodb.sh b/scripts/install_mongodb.sh index a612310..2afee6c 100755 --- a/scripts/install_mongodb.sh +++ b/scripts/install_mongodb.sh @@ -2,18 +2,29 @@ # Script to setup repo and install MongoDB meta_dir="../meta" +DATE=$(date) +LOGGFILE="setup-ovpl.log" -echo "" -echo "Setting up MongoDB repo.." +echo "[[$DATE:: $0 :: Line $LINENO::]] Setting up MongoDB repo...." 2>&1 | tee -a $LOGGFILE cp $meta_dir/mongodb.repo /etc/yum.repos.d/mongodb.repo - -echo "" -echo "Installing MongoDB.." +echo "[[$DATE:: $0 :: Line $LINENO::]] Installing MongoDB......" 2>&1 | tee -a $LOGGFILE yum -y install mongodb-org +if [[ $? -ne 0 ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in installing mongodb.." 2>&1 | tee -a $LOGGFILE + exit 1 +fi -echo "" -echo "Starting mongod service.." +echo "[[$DATE:: $0 :: Line $LINENO::]] Starting mongod service.." 2>&1 | tee -a $LOGGFILE service mongod start - +if [ $? -eq 0 ];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Mongodb service started.." 2>&1 | tee -a $LOGGFILE +elif [ $? -eq 1 ];then + service mongod restart + +else + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in starting Mongodb service.." 2>&1 | tee -a $LOGGFILE + exit 1 + +fi exit 0 diff --git a/scripts/install_mongodb.sh~ b/scripts/install_mongodb.sh~ new file mode 100755 index 0000000..a612310 --- /dev/null +++ b/scripts/install_mongodb.sh~ @@ -0,0 +1,19 @@ +#!/bin/bash +# Script to setup repo and install MongoDB + +meta_dir="../meta" + +echo "" +echo "Setting up MongoDB repo.." +cp $meta_dir/mongodb.repo /etc/yum.repos.d/mongodb.repo + + +echo "" +echo "Installing MongoDB.." +yum -y install mongodb-org + +echo "" +echo "Starting mongod service.." +service mongod start + +exit 0 diff --git a/scripts/install_openvz.sh b/scripts/install_openvz.sh index 9d0c52b..e318ef9 100755 --- a/scripts/install_openvz.sh +++ b/scripts/install_openvz.sh @@ -1,59 +1,79 @@ #!/bin/bash # Script to setup OpenVZ repo, install and configure OpenVZ + +DATE=$(date) +LOGGFILE="setup-ovpl.log" meta_dir="../meta" vz_template_file="ubuntu-12.04-custom-x86_64.tar.gz" +cd $meta_dir +echo "[[$DATE:: $0 :: Line $LINENO::]] Downloading $vz_template_file file to $meta_dir directory" 2>&1 | tee -a $LOGGFILE echo "" -echo "Setting up OpenVZ repo.." +wget community.virtual-labs.ac.in/downloads/ubuntu-12.04-custom-x86_64.tar.gz +if [[ $? -ne 0 ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Downloading $vz_template_file file to $meta_dir directory.." 2>&1 | tee -a $LOGGFILE +fi + #wget -P /etc/yum.repos.d/ http://ftp.openvz.org/openvz.repo +echo "[$DATE:: $0 :: Line $LINENO::]] copying openvz.repo into /etc/yum/repos.d/" 2>&1 | tee -a $LOGGFILE cp $meta_dir/openvz.repo /etc/yum.repos.d/openvz.repo + +echo "[$DATE:: $0 :: Line $LINENO::]] Importing RPM-GPG-Key for openvz.." 2>&1 | tee -a $LOGGFILE rpm --import http://ftp.openvz.org/RPM-GPG-Key-OpenVZ -echo "" -echo "Installing the OpenVZ kernel.." +echo "[[$DATE:: $0 :: Line $LINENO::]] Installing the OpenVZ kernel.." 2>&1 | tee -a $LOGGFILE yum -y install vzkernel +if [[ $? -ne 0 ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Installing the OpenVZ kernel...." 2>&1 | tee -a $LOGGFILE + exit 1 +fi -echo "" -echo "Configuring OpenVZ.." +echo "[[$DATE:: $0 :: Line $LINENO::]] Configuring OpenVZ.." 2>&1 | tee -a $LOGGFILE cat $meta_dir/updated_sysctl.conf >> /etc/sysctl.conf echo "SELINUX=disabled" > /etc/sysconfig/selinux +echo "[[$DATE:: $0 :: Line $LINENO::]] Disabled SELINUX.." 2>&1 | tee -a $LOGGFILE -echo "" -echo "Installing OpenVZ tools.." +echo "[[$DATE:: $0 :: Line $LINENO::]] Installing OpenVZ tools.." 2>&1 | tee -a $LOGGFILE yum -y install vzctl vzquota ploop vzstats +if [[ $? -ne 0 ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Installing the OpenVZ tools...." 2>&1 | tee -a $LOGGFILE + exit 1 +fi if [[ ! -f $meta_dir/$vz_template_file ]]; then echo "" - echo "VZ OS template file not found!" + echo "[[$DATE:: $0 :: Line $LINENO::]] VZ OS template file not found!" 2>&1 | tee -a $LOGGFILE echo "Please obtain an VZ OS template image and manually" echo "copy that into /vz/template/cache folder." echo "Failing the above step will result in OVPL not working." echo "Please contact VLEAD for further clarifications." else - echo "" - echo "Copying the default OS template for containers.." + + echo "[[$DATE:: $0 :: Line $LINENO::]] Copying the default OS template for containers....." 2>&1 | tee -a $LOGGFILE cp $meta_dir/$vz_template_file /vz/template/cache fi # Not needed!? Not sure. -#echo "Allowing multiple subnets to reside on the same network interface.." -#sed -i 's/#NEIGHBOUR_DEVS=all/NEIGHBOUR_DEVS=all/g' /etc/vz/vz.conf -#sed -i 's/NEIGHBOUR_DEVS=detect/NEIGHBOUR_DEVS=all/g' /etc/vz/vz.conf -# -#echo "Setting container layout to default to ploop (VM in a file).." -#sed -i 's/#VE_LAYOUT=ploop/VE_LAYOUT=ploop/g' /etc/vz/vz.conf -# -#echo "Setting Ubuntu 12.04 64bit to be the default template.." -#sed -i 's/centos-6-x86/ubuntu-12.04-x86_64/g' /etc/vz/vz.conf +echo "[[$DATE:: $0 :: Line $LINENO::]] Allowing multiple subnets to reside on the same network interface.." 2>&1 | tee -a $LOGGFILE +sed -i 's/#NEIGHBOUR_DEVS=all/NEIGHBOUR_DEVS=all/g' /etc/vz/vz.conf +sed -i 's/#NEIGHBOUR_DEVS=detect/NEIGHBOUR_DEVS=all/g' /etc/vz/vz.conf + +echo "[[$DATE:: $0 :: Line $LINENO::]] Setting container layout to default to ploop (VM in a file).." 2>&1 | tee -a $LOGGFILE +sed -i 's/VE_LAYOUT=simfs/VE_LAYOUT=ploop/g' /etc/vz/vz.conf + +echo "[[$DATE:: $0 :: Line $LINENO::]] Setting Ubuntu 12.04 64bit to be the default template.." 2>&1 | tee -a $LOGGFILE +sed -i 's/centos-6-x86/ubuntu-12.04-x86_64/g' /etc/vz/vz.conf # #sysctl -p # #echo "Disabling iptables.." #/etc/init.d/iptables stop && chkconfig iptables off - -echo "" -echo "Finished installing OpenVZ" +echo "[[$DATE:: $0 :: Line $LINENO::]] Setting iptables" 2>&1 | tee -a $LOGGFILE +iptables -F FORWARD +echo "[[$DATE:: $0 :: Line $LINENO::]] Saving iptables" 2>&1 | tee -a $LOGGFILE +service iptables save +echo "[[$DATE:: $0 :: Line $LINENO::]] Finished installing OpenVZ" 2>&1 | tee -a $LOGGFILE exit 0 diff --git a/scripts/install_openvz.sh~ b/scripts/install_openvz.sh~ new file mode 100755 index 0000000..9d0c52b --- /dev/null +++ b/scripts/install_openvz.sh~ @@ -0,0 +1,59 @@ +#!/bin/bash +# Script to setup OpenVZ repo, install and configure OpenVZ + +meta_dir="../meta" +vz_template_file="ubuntu-12.04-custom-x86_64.tar.gz" + + +echo "" +echo "Setting up OpenVZ repo.." +#wget -P /etc/yum.repos.d/ http://ftp.openvz.org/openvz.repo +cp $meta_dir/openvz.repo /etc/yum.repos.d/openvz.repo +rpm --import http://ftp.openvz.org/RPM-GPG-Key-OpenVZ + +echo "" +echo "Installing the OpenVZ kernel.." +yum -y install vzkernel + +echo "" +echo "Configuring OpenVZ.." +cat $meta_dir/updated_sysctl.conf >> /etc/sysctl.conf +echo "SELINUX=disabled" > /etc/sysconfig/selinux + +echo "" +echo "Installing OpenVZ tools.." +yum -y install vzctl vzquota ploop vzstats + +if [[ ! -f $meta_dir/$vz_template_file ]]; then + echo "" + echo "VZ OS template file not found!" + echo "Please obtain an VZ OS template image and manually" + echo "copy that into /vz/template/cache folder." + echo "Failing the above step will result in OVPL not working." + echo "Please contact VLEAD for further clarifications." +else + echo "" + echo "Copying the default OS template for containers.." + cp $meta_dir/$vz_template_file /vz/template/cache +fi + +# Not needed!? Not sure. +#echo "Allowing multiple subnets to reside on the same network interface.." +#sed -i 's/#NEIGHBOUR_DEVS=all/NEIGHBOUR_DEVS=all/g' /etc/vz/vz.conf +#sed -i 's/NEIGHBOUR_DEVS=detect/NEIGHBOUR_DEVS=all/g' /etc/vz/vz.conf +# +#echo "Setting container layout to default to ploop (VM in a file).." +#sed -i 's/#VE_LAYOUT=ploop/VE_LAYOUT=ploop/g' /etc/vz/vz.conf +# +#echo "Setting Ubuntu 12.04 64bit to be the default template.." +#sed -i 's/centos-6-x86/ubuntu-12.04-x86_64/g' /etc/vz/vz.conf +# +#sysctl -p +# +#echo "Disabling iptables.." +#/etc/init.d/iptables stop && chkconfig iptables off + +echo "" +echo "Finished installing OpenVZ" + +exit 0 diff --git a/scripts/install_ovpl.sh b/scripts/install_ovpl.sh index f16336a..155e6d4 100755 --- a/scripts/install_ovpl.sh +++ b/scripts/install_ovpl.sh @@ -1,22 +1,39 @@ #!/bin/bash -echo "" -echo "Fetching OVPL from GitHub.." +DATE=$(date) +LOGGFILE="setup-ovpl.log" cd /root -git clone https://github.com/vlead/ovpl.git -cd ovpl -echo "changed to OVPL directory.." -echo "Checking out version v1.0.0 .." -git checkout tags/v1.0.0 -echo "" +if [ ! -d "ovpl" ];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE + git clone https://github.com/vlead/ovpl.git + if [ $? -eq 0 ] + then + echo "[[$DATE:: $0 :: Line $LINENO::]] Finished Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE + else + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE + exit 1 + fi +else + echo "[[$DATE:: $0 :: Line $LINENO::]] Pulling ovpl from origin master" 2>&1 | tee -a $LOGGFILE + cd ovpl/ + git pull origin master + echo "[[$DATE:: $0 :: Line $LINENO::]] finished pulling https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Checking out version v1.0.0 .." 2>&1 | tee -a $LOGGFILE + git checkout tags/v1.0.0 -echo "Installing OVPL.." -python setup.py install +fi -echo "" -echo "Congrats! You have setup OVPL successfully!!! :-)" +echo "[[$DATE:: $0 :: Line $LINENO::]] Running 'python setup.py install' to install pre-requisites for run ovpl " 2>&1 | tee -a $LOGGFILE +python setup.py install +if [[ $? -ne 0 ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in installing 'python setup.py install' " 2>&1 | tee -a $LOGGFILE + exit 1 +fi +echo "==========================================================================================================" +echo "[[$DATE:: $0 :: Line $LINENO::]] Congrats! You have setup OVPL successfully!!! :-)" 2>&1 | tee -a $LOGGFILE echo "Now run 'make' from inside the src directory" echo " of OVPL to start the services." +echo "==========================================================================================================" exit 0 diff --git a/scripts/install_ovpl.sh~ b/scripts/install_ovpl.sh~ new file mode 100755 index 0000000..f16336a --- /dev/null +++ b/scripts/install_ovpl.sh~ @@ -0,0 +1,22 @@ +#!/bin/bash + +echo "" +echo "Fetching OVPL from GitHub.." +cd /root +git clone https://github.com/vlead/ovpl.git + +cd ovpl +echo "changed to OVPL directory.." +echo "Checking out version v1.0.0 .." +git checkout tags/v1.0.0 +echo "" + +echo "Installing OVPL.." +python setup.py install + +echo "" +echo "Congrats! You have setup OVPL successfully!!! :-)" +echo "Now run 'make' from inside the src directory" +echo " of OVPL to start the services." + +exit 0 From 53e487014558eb0a1be898f6cd1ef4dd896adbe1 Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 9 Dec 2014 20:19:20 +0530 Subject: [PATCH 02/24] Delete centos_prepare_ovpl.sh~ --- scripts/centos_prepare_ovpl.sh~ | 56 --------------------------------- 1 file changed, 56 deletions(-) delete mode 100755 scripts/centos_prepare_ovpl.sh~ diff --git a/scripts/centos_prepare_ovpl.sh~ b/scripts/centos_prepare_ovpl.sh~ deleted file mode 100755 index 94003a2..0000000 --- a/scripts/centos_prepare_ovpl.sh~ +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -# Script to setup a fresh installation of CentOS to run OVPL -# Installs: Dependencies: python-devel, git, pip; mongodb; openvz. - -# check if script is run as root -if [[ $UID -ne 0 ]]; then - echo "" - echo "$0 must be run as root!" - echo "Exiting.." - exit 1 -fi - -# check if meta directory exists -if [[ ! -d "../meta" ]]; then - echo "" - echo "You don't have the necessary files." - echo "Please contact the author of the script." - exit 1 -fi - -# read proxy settings from config file -source ./config.sh - -if [[ -n $http_proxy ]]; then - echo $http_proxy - export http_proxy=$http_proxy -fi -if [[ -n $https_proxy ]]; then - export https_proxy=$https_proxy -fi - -echo "Invoking install_dependencies.sh" -./install_dependencies.sh -if [ $? -ne 0 ]; then - echo "" - echo "Error installing dependencies. Quitting!" - exit 1 -fi - -echo "Invoking install_openvz.sh" -./install_openvz.sh -if [ $? -ne 0 ]; then - echo "" - echo "Error installing OpenVZ. Quitting!" - exit 1 -fi - -echo "Invoking install_mongodb.sh" -./install_mongodb.sh -if [ $? -ne 0 ]; then - echo "" - echo "Error installing MongoDB. Quitting!" - exit 1 -fi - -exit 0 From 9ef1f950468ddfca7a10f032243e05337c3885b9 Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 9 Dec 2014 20:19:26 +0530 Subject: [PATCH 03/24] Delete config.sh~ --- scripts/config.sh~ | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100755 scripts/config.sh~ diff --git a/scripts/config.sh~ b/scripts/config.sh~ deleted file mode 100755 index 68f2415..0000000 --- a/scripts/config.sh~ +++ /dev/null @@ -1,10 +0,0 @@ -# set your http proxy based on your network's configuration. -# Ask your network administrator if you are unsure about the -# value - -# E.g., -# Note the port number after the second (:). -export http_proxy="" - -#set your https proxy. Similar to the above. -export https_proxy="" From fd83285d60f261bcad239e881c5a81447c9c19c1 Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 9 Dec 2014 20:19:33 +0530 Subject: [PATCH 04/24] Delete install_dependencies.sh~ --- scripts/install_dependencies.sh~ | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100755 scripts/install_dependencies.sh~ diff --git a/scripts/install_dependencies.sh~ b/scripts/install_dependencies.sh~ deleted file mode 100755 index c36cf6f..0000000 --- a/scripts/install_dependencies.sh~ +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -meta_dir="../meta" - -echo "" -echo "Setting up EPEL repo.." -#wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm -rpm -ivh $meta_dir/epel-release-6-8.noarch.rpm -#rm epel-release-6.8.noarch.rpm - -echo "" -echo "Installing dependencies.. yum -y install gcc python-devel.x86_64 python-pip ssh git" -yum -y install gcc python-devel.x86_64 python-pip ssh git - -exit 0 From 1420e399cad74a065bdb8657e470014221c818ef Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 9 Dec 2014 20:19:39 +0530 Subject: [PATCH 05/24] Delete install_mongodb.sh~ --- scripts/install_mongodb.sh~ | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100755 scripts/install_mongodb.sh~ diff --git a/scripts/install_mongodb.sh~ b/scripts/install_mongodb.sh~ deleted file mode 100755 index a612310..0000000 --- a/scripts/install_mongodb.sh~ +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# Script to setup repo and install MongoDB - -meta_dir="../meta" - -echo "" -echo "Setting up MongoDB repo.." -cp $meta_dir/mongodb.repo /etc/yum.repos.d/mongodb.repo - - -echo "" -echo "Installing MongoDB.." -yum -y install mongodb-org - -echo "" -echo "Starting mongod service.." -service mongod start - -exit 0 From 357ed62faaabc8510b2fbee7401ecb00a500f776 Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 9 Dec 2014 20:19:45 +0530 Subject: [PATCH 06/24] Delete install_openvz.sh~ --- scripts/install_openvz.sh~ | 59 -------------------------------------- 1 file changed, 59 deletions(-) delete mode 100755 scripts/install_openvz.sh~ diff --git a/scripts/install_openvz.sh~ b/scripts/install_openvz.sh~ deleted file mode 100755 index 9d0c52b..0000000 --- a/scripts/install_openvz.sh~ +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -# Script to setup OpenVZ repo, install and configure OpenVZ - -meta_dir="../meta" -vz_template_file="ubuntu-12.04-custom-x86_64.tar.gz" - - -echo "" -echo "Setting up OpenVZ repo.." -#wget -P /etc/yum.repos.d/ http://ftp.openvz.org/openvz.repo -cp $meta_dir/openvz.repo /etc/yum.repos.d/openvz.repo -rpm --import http://ftp.openvz.org/RPM-GPG-Key-OpenVZ - -echo "" -echo "Installing the OpenVZ kernel.." -yum -y install vzkernel - -echo "" -echo "Configuring OpenVZ.." -cat $meta_dir/updated_sysctl.conf >> /etc/sysctl.conf -echo "SELINUX=disabled" > /etc/sysconfig/selinux - -echo "" -echo "Installing OpenVZ tools.." -yum -y install vzctl vzquota ploop vzstats - -if [[ ! -f $meta_dir/$vz_template_file ]]; then - echo "" - echo "VZ OS template file not found!" - echo "Please obtain an VZ OS template image and manually" - echo "copy that into /vz/template/cache folder." - echo "Failing the above step will result in OVPL not working." - echo "Please contact VLEAD for further clarifications." -else - echo "" - echo "Copying the default OS template for containers.." - cp $meta_dir/$vz_template_file /vz/template/cache -fi - -# Not needed!? Not sure. -#echo "Allowing multiple subnets to reside on the same network interface.." -#sed -i 's/#NEIGHBOUR_DEVS=all/NEIGHBOUR_DEVS=all/g' /etc/vz/vz.conf -#sed -i 's/NEIGHBOUR_DEVS=detect/NEIGHBOUR_DEVS=all/g' /etc/vz/vz.conf -# -#echo "Setting container layout to default to ploop (VM in a file).." -#sed -i 's/#VE_LAYOUT=ploop/VE_LAYOUT=ploop/g' /etc/vz/vz.conf -# -#echo "Setting Ubuntu 12.04 64bit to be the default template.." -#sed -i 's/centos-6-x86/ubuntu-12.04-x86_64/g' /etc/vz/vz.conf -# -#sysctl -p -# -#echo "Disabling iptables.." -#/etc/init.d/iptables stop && chkconfig iptables off - -echo "" -echo "Finished installing OpenVZ" - -exit 0 From 9321f375740f01995054ba1564836e38c67039d5 Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 9 Dec 2014 20:19:51 +0530 Subject: [PATCH 07/24] Delete install_ovpl.sh~ --- scripts/install_ovpl.sh~ | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100755 scripts/install_ovpl.sh~ diff --git a/scripts/install_ovpl.sh~ b/scripts/install_ovpl.sh~ deleted file mode 100755 index f16336a..0000000 --- a/scripts/install_ovpl.sh~ +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -echo "" -echo "Fetching OVPL from GitHub.." -cd /root -git clone https://github.com/vlead/ovpl.git - -cd ovpl -echo "changed to OVPL directory.." -echo "Checking out version v1.0.0 .." -git checkout tags/v1.0.0 -echo "" - -echo "Installing OVPL.." -python setup.py install - -echo "" -echo "Congrats! You have setup OVPL successfully!!! :-)" -echo "Now run 'make' from inside the src directory" -echo " of OVPL to start the services." - -exit 0 From 90d7047a62258be7638eb2f34c4ef962184878d3 Mon Sep 17 00:00:00 2001 From: sripathi Date: Thu, 11 Dec 2014 10:06:53 +0530 Subject: [PATCH 08/24] added logs --- scripts/centos_prepare_ovpl.sh | 21 ++++++++++++++++----- scripts/install_openvz.sh | 1 - 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/scripts/centos_prepare_ovpl.sh b/scripts/centos_prepare_ovpl.sh index 220be34..cee98fa 100755 --- a/scripts/centos_prepare_ovpl.sh +++ b/scripts/centos_prepare_ovpl.sh @@ -2,7 +2,6 @@ # Script to setup a fresh installation of CentOS to run OVPL # Installs: Dependencies: python-devel, git, pip; mongodb; openvz. - LOGGFILE="setup-ovpl.log" DATE=$(date) @@ -71,6 +70,9 @@ if [[ -f "install_dependencies.sh" ]];then if [ $? -ne 0 ]; then echo "" echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing dependencies. Quitting!" 2>&1 | tee -a $LOGGFILE + echo "======================" + echo "See logs at $LOGGFILE" + echo "=====================" exit 1 fi else @@ -83,8 +85,11 @@ if [[ -f "install_openvz.sh" ]];then ./install_openvz.sh if [ $? -ne 0 ]; then echo "" - echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing openvz. Quitting! See log file" 2>&1 | tee -a $LOGGFILE - exit 1 + echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing openvz. Quitting!" 2>&1 | tee -a $LOGGFILE + echo "======================" + echo "See logs at $LOGGFILE" + echo "=====================" + exit 1 fi else echo "[[$DATE:: $0:: Line $LINENO::]] install_openvz.sh file not exist" 2>&1 | tee -a $LOGGFILE @@ -97,7 +102,10 @@ if [[ -f "install_mongodb.sh" ]];then if [ $? -ne 0 ]; then echo "" echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing mongodb. Quitting! " 2>&1 | tee -a $LOGGFILE - exit 1 + echo "======================" + echo "See logs at $LOGGFILE" + echo "=====================" + exit 1 fi else echo "[[$DATE:: $0 :: Line $LINENO::]] install_mongodb.sh file not exist" 2>&1 | tee -a $LOGGFILE @@ -110,7 +118,10 @@ if [[ -f "install_ovpl.sh" ]];then if [ $? -ne 0 ]; then echo "" echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing ovpl. Quitting! " 2>&1 | tee -a $LOGGFILE - exit 1 + echo "======================" + echo "See logs at $LOGGFILE" + echo "=====================" + exit 1 fi else echo "[[$DATE:: $0 :: Line $LINENO::]] install_ovpl.sh file not exist" 2>&1 | tee -a $LOGGFILE diff --git a/scripts/install_openvz.sh b/scripts/install_openvz.sh index e318ef9..92e9845 100755 --- a/scripts/install_openvz.sh +++ b/scripts/install_openvz.sh @@ -1,7 +1,6 @@ #!/bin/bash # Script to setup OpenVZ repo, install and configure OpenVZ - DATE=$(date) LOGGFILE="setup-ovpl.log" meta_dir="../meta" From f2b85c7e7ed7e1c35e33007c048baf5ba0131ea0 Mon Sep 17 00:00:00 2001 From: sripathi Date: Tue, 16 Dec 2014 10:47:25 +0530 Subject: [PATCH 09/24] added cd ovpl command --- meta/setup-ovpl.log | 45 +++++++++++++++++++++++++++ scripts/centos_prepare_ovpl.sh | 54 +++++++++++++++++++++------------ scripts/config.sh | 4 +++ scripts/install_dependencies.sh | 2 -- scripts/install_mongodb.sh | 1 + scripts/install_openvz.sh | 4 +-- scripts/install_ovpl.sh | 14 +++------ scripts/install_ovpl.sh~ | 35 +++++++++++++++++++++ scripts/output.txt | 0 scripts/setup-ovpl.log | 20 ++++++++++++ 10 files changed, 146 insertions(+), 33 deletions(-) create mode 100644 meta/setup-ovpl.log create mode 100644 scripts/install_ovpl.sh~ create mode 100644 scripts/output.txt create mode 100644 scripts/setup-ovpl.log diff --git a/meta/setup-ovpl.log b/meta/setup-ovpl.log new file mode 100644 index 0000000..03fbdaf --- /dev/null +++ b/meta/setup-ovpl.log @@ -0,0 +1,45 @@ +[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 11::]] Downloading ubuntu-12.04-custom-x86_64.tar.gz file to ../meta directory +[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 15::]] Error in Downloading ubuntu-12.04-custom-x86_64.tar.gz file to ../meta directory.. +[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 19::]] copying openvz.repo into /etc/yum/repos.d/ +[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 22::]] Importing RPM-GPG-Key for openvz.. +[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 25::]] Installing the OpenVZ kernel.. +[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 32::]] Configuring OpenVZ.. +[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 35::]] Disabled SELINUX.. +[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 37::]] Installing OpenVZ tools.. +[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 46::]] VZ OS template file not found! +[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 58::]] Allowing multiple subnets to reside on the same network interface.. +[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 62::]] Setting container layout to default to ploop (VM in a file).. +[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 65::]] Setting Ubuntu 12.04 64bit to be the default template.. +[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 72::]] Setting iptables +[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 74::]] Saving iptables +[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 76::]] Finished installing OpenVZ +[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 11::]] Downloading ubuntu-12.04-custom-x86_64.tar.gz file to ../meta directory +[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 15::]] Error in Downloading ubuntu-12.04-custom-x86_64.tar.gz file to ../meta directory.. +[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 19::]] copying openvz.repo into /etc/yum/repos.d/ +[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 22::]] Importing RPM-GPG-Key for openvz.. +[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 25::]] Installing the OpenVZ kernel.. +[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 32::]] Configuring OpenVZ.. +[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 35::]] Disabled SELINUX.. +[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 37::]] Installing OpenVZ tools.. +[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 46::]] VZ OS template file not found! +[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 58::]] Allowing multiple subnets to reside on the same network interface.. +[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 62::]] Setting container layout to default to ploop (VM in a file).. +[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 65::]] Setting Ubuntu 12.04 64bit to be the default template.. +[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 72::]] Setting iptables +[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 74::]] Saving iptables +[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 76::]] Finished installing OpenVZ +[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 9::]] Downloading ubuntu-12.04-custom-x86_64.tar.gz file to ../meta directory +[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 13::]] Error in Downloading ubuntu-12.04-custom-x86_64.tar.gz file to ../meta directory.. +[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 17::]] copying openvz.repo into /etc/yum/repos.d/ +[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 20::]] Importing RPM-GPG-Key for openvz.. +[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 23::]] Installing the OpenVZ kernel.. +[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 30::]] Configuring OpenVZ.. +[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 33::]] Disabled SELINUX.. +[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 35::]] Installing OpenVZ tools.. +[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 44::]] VZ OS template file not found! +[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 56::]] Allowing multiple subnets to reside on the same network interface.. +[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 60::]] Setting container layout to default to ploop (VM in a file).. +[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 63::]] Setting Ubuntu 12.04 64bit to be the default template.. +[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 70::]] Setting iptables +[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 72::]] Saving iptables +[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 74::]] Finished installing OpenVZ diff --git a/scripts/centos_prepare_ovpl.sh b/scripts/centos_prepare_ovpl.sh index cee98fa..b9bb7dd 100755 --- a/scripts/centos_prepare_ovpl.sh +++ b/scripts/centos_prepare_ovpl.sh @@ -2,8 +2,23 @@ # Script to setup a fresh installation of CentOS to run OVPL # Installs: Dependencies: python-devel, git, pip; mongodb; openvz. -LOGGFILE="setup-ovpl.log" -DATE=$(date) +# read proxy settings from config file +if [[ -f "config.sh" ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Reading config.sh file for proxy settings" 2>&1 | tee -a $LOGGFILE + source ./config.sh + if [[ -n $http_proxy ]]; then + + export http_proxy=$http_proxy + echo "[[$DATE:: $0 :: Line $LINENO::]] export http_proxy = $http_proxy" 2>&1 | tee -a $LOGGFILE + fi + if [[ -n $https_proxy ]]; then + export https_proxy=$https_proxy + echo "[[$DATE:: $0 :: Line $LINENO::]] export https_proxy = $https_proxy" 2>&1 | tee -a $LOGGFILE + fi +else + echo "[[$DATE:: $0 :: Line $LINENO::]] config.sh file not exist" 2>&1 | tee -a $LOGGFILE + exit 1 +fi if [[ -f $LOGGFILE ]];then echo "=============================================" @@ -31,23 +46,6 @@ if [[ ! -d "../meta" ]]; then echo "Please contact the author of the script." exit 1 fi -# read proxy settings from config file -if [[ -f "config.sh" ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Reading config.sh file for proxy settings" 2>&1 | tee -a $LOGGFILE - source ./config.sh - if [[ -n $http_proxy ]]; then - - export http_proxy=$http_proxy - echo "[[$DATE:: $0 :: Line $LINENO::]] export http_proxy = $http_proxy" 2>&1 | tee -a $LOGGFILE - fi - if [[ -n $https_proxy ]]; then - export https_proxy=$https_proxy - echo "[[$DATE:: $0 :: Line $LINENO::]] export https_proxy = $https_proxy" 2>&1 | tee -a $LOGGFILE - fi -else - echo "[[$DATE:: $0 :: Line $LINENO::]] config.sh file not exist" 2>&1 | tee -a $LOGGFILE - exit 1 -fi #updating system echo "" @@ -74,6 +72,9 @@ if [[ -f "install_dependencies.sh" ]];then echo "See logs at $LOGGFILE" echo "=====================" exit 1 + else + echo "[[$DATE:: $0 :: Line $LINENO::]] successfully installed dependencies..." 2>&1 | tee -a $LOGGFILE + fi else echo "[[$DATE:: $0 :: Line $LINENO::]] install_dependencies.sh file not exist" 2>&1 | tee -a $LOGGFILE @@ -90,6 +91,10 @@ if [[ -f "install_openvz.sh" ]];then echo "See logs at $LOGGFILE" echo "=====================" exit 1 + else + echo "[[$DATE:: $0 :: Line $LINENO::]] successfully installed openvz..." 2>&1 | tee -a $LOGGFILE + + fi else echo "[[$DATE:: $0:: Line $LINENO::]] install_openvz.sh file not exist" 2>&1 | tee -a $LOGGFILE @@ -106,6 +111,10 @@ if [[ -f "install_mongodb.sh" ]];then echo "See logs at $LOGGFILE" echo "=====================" exit 1 + + else + echo "[[$DATE:: $0 :: Line $LINENO::]] successfully installed mongodb..." 2>&1 | tee -a $LOGGFILE + fi else echo "[[$DATE:: $0 :: Line $LINENO::]] install_mongodb.sh file not exist" 2>&1 | tee -a $LOGGFILE @@ -122,6 +131,13 @@ if [[ -f "install_ovpl.sh" ]];then echo "See logs at $LOGGFILE" echo "=====================" exit 1 + else + + echo "==========================================================================================================" + echo "[[$DATE:: $0 :: Line $LINENO::]] Congrats! You have setup OVPL successfully!!! :-)" 2>&1 | tee -a $LOGGFILE + echo "Now run 'make' from inside the src directory" + echo " of OVPL to start the services." + echo "==========================================================================================================" fi else echo "[[$DATE:: $0 :: Line $LINENO::]] install_ovpl.sh file not exist" 2>&1 | tee -a $LOGGFILE diff --git a/scripts/config.sh b/scripts/config.sh index 605053f..e5ede13 100755 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -8,3 +8,7 @@ export http_proxy="http://proxy.iiit.ac.in:8080" #set your https proxy. Similar to the above. export https_proxy="http://proxy.iiit.ac.in:8080" + +#Loggfile path +export LOGGFILE="setup-ovpl.log" +export DATE=$(date) \ No newline at end of file diff --git a/scripts/install_dependencies.sh b/scripts/install_dependencies.sh index 9f48e15..e25f107 100755 --- a/scripts/install_dependencies.sh +++ b/scripts/install_dependencies.sh @@ -1,8 +1,6 @@ #!/bin/bash meta_dir="../meta" -DATE=$(date) -LOGGFILE="setup-ovpl.log" #wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm echo "[[$DATE:: $0 :: Line $LINENO::]] Setting up EPEL repo.." 2>&1 | tee -a $LOGGFILE diff --git a/scripts/install_mongodb.sh b/scripts/install_mongodb.sh index 2afee6c..50e80b5 100755 --- a/scripts/install_mongodb.sh +++ b/scripts/install_mongodb.sh @@ -20,6 +20,7 @@ service mongod start if [ $? -eq 0 ];then echo "[[$DATE:: $0 :: Line $LINENO::]] Mongodb service started.." 2>&1 | tee -a $LOGGFILE elif [ $? -eq 1 ];then + sed 's/.*deamon.*/new/g' /etc/init.d/mongod service mongod restart else diff --git a/scripts/install_openvz.sh b/scripts/install_openvz.sh index 92e9845..e2fa659 100755 --- a/scripts/install_openvz.sh +++ b/scripts/install_openvz.sh @@ -1,8 +1,6 @@ #!/bin/bash -# Script to setup OpenVZ repo, install and configure OpenVZ +# Script to setup OpenVZ repo, install and configure -DATE=$(date) -LOGGFILE="setup-ovpl.log" meta_dir="../meta" vz_template_file="ubuntu-12.04-custom-x86_64.tar.gz" diff --git a/scripts/install_ovpl.sh b/scripts/install_ovpl.sh index 155e6d4..4396865 100755 --- a/scripts/install_ovpl.sh +++ b/scripts/install_ovpl.sh @@ -1,7 +1,5 @@ #!/bin/bash -DATE=$(date) -LOGGFILE="setup-ovpl.log" cd /root if [ ! -d "ovpl" ];then @@ -23,17 +21,15 @@ else git checkout tags/v1.0.0 fi - +cd ovpl echo "[[$DATE:: $0 :: Line $LINENO::]] Running 'python setup.py install' to install pre-requisites for run ovpl " 2>&1 | tee -a $LOGGFILE python setup.py install if [[ $? -ne 0 ]];then echo "[[$DATE:: $0 :: Line $LINENO::]] Error in installing 'python setup.py install' " 2>&1 | tee -a $LOGGFILE exit 1 -fi -echo "==========================================================================================================" -echo "[[$DATE:: $0 :: Line $LINENO::]] Congrats! You have setup OVPL successfully!!! :-)" 2>&1 | tee -a $LOGGFILE -echo "Now run 'make' from inside the src directory" -echo " of OVPL to start the services." -echo "==========================================================================================================" +else + echo "[[$DATE:: $0 :: Line $LINENO::]] Finished installing ovpl" 2>&1 | tee -a $LOGGFILE + +fi exit 0 diff --git a/scripts/install_ovpl.sh~ b/scripts/install_ovpl.sh~ new file mode 100644 index 0000000..970e7e3 --- /dev/null +++ b/scripts/install_ovpl.sh~ @@ -0,0 +1,35 @@ +#!/bin/bash + +cd /root + +if [ ! -d "ovpl" ];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE + git clone https://github.com/vlead/ovpl.git + if [ $? -eq 0 ] + then + echo "[[$DATE:: $0 :: Line $LINENO::]] Finished Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE + else + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE + exit 1 + fi +else + echo "[[$DATE:: $0 :: Line $LINENO::]] Pulling ovpl from origin master" 2>&1 | tee -a $LOGGFILE + cd ovpl/ + git pull origin master + echo "[[$DATE:: $0 :: Line $LINENO::]] finished pulling https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Checking out version v1.0.0 .." 2>&1 | tee -a $LOGGFILE + git checkout tags/v1.0.0 + +fi + +echo "[[$DATE:: $0 :: Line $LINENO::]] Running 'python setup.py install' to install pre-requisites for run ovpl " 2>&1 | tee -a $LOGGFILE +python setup.py install +if [[ $? -ne 0 ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in installing 'python setup.py install' " 2>&1 | tee -a $LOGGFILE + exit 1 + +else + echo "[[$DATE:: $0 :: Line $LINENO::]] Finished installing ovpl" 2>&1 | tee -a $LOGGFILE + +fi +exit 0 diff --git a/scripts/output.txt b/scripts/output.txt new file mode 100644 index 0000000..e69de29 diff --git a/scripts/setup-ovpl.log b/scripts/setup-ovpl.log new file mode 100644 index 0000000..f5a8bbd --- /dev/null +++ b/scripts/setup-ovpl.log @@ -0,0 +1,20 @@ +[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 12::]] export http_proxy = http://proxy.iiit.ac.in:8080 +[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 16::]] export https_proxy = http://proxy.iiit.ac.in:8080 +[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 53::]] Updating System.... +[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 60::]] System updation complete.. +[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 66::]] Invoking install_dependencies.sh +[[Mon Dec 15 09:25:25 IST 2014:: ./install_dependencies.sh :: Line 6::]] Setting up EPEL repo.. +[[Mon Dec 15 09:25:25 IST 2014:: ./install_dependencies.sh :: Line 9::]] Installing dependencies.. +[[Mon Dec 15 09:25:25 IST 2014:: ./install_dependencies.sh :: Line 10::]] Running yum -y install gcc python-devel.x86_64 python-pip openssh-clients openssh-server git +[[Mon Dec 15 09:25:25 IST 2014:: ./install_dependencies.sh :: Line 16::]] Completed installation of gcc python-devel.x86_64 python-pip openssh-clients openssh-server git +[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 76::]] successfully installed dependencies... +[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 85::]] Invoking install_openvz.sh +[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 95::]] successfully installed openvz... +[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 105::]] Invoking install_mongodb.sh +[[Mon Dec 15 09:26:25 IST 2014:: ./install_mongodb.sh :: Line 8::]] Setting up MongoDB repo.... +[[Mon Dec 15 09:26:25 IST 2014:: ./install_mongodb.sh :: Line 11::]] Installing MongoDB...... +[[Mon Dec 15 09:26:25 IST 2014:: ./install_mongodb.sh :: Line 18::]] Starting mongod service.. +[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 116::]] successfully installed mongodb... +[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 125::]] Invoking install_ovpl.sh +[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 135::]] successfully installed ovpl... +[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 136::]] Finished... From a7241303e1c4d0c1009d87903dc6f15ffb99c656 Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 16 Dec 2014 10:53:25 +0530 Subject: [PATCH 10/24] Delete install_ovpl.sh~ --- scripts/install_ovpl.sh~ | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 scripts/install_ovpl.sh~ diff --git a/scripts/install_ovpl.sh~ b/scripts/install_ovpl.sh~ deleted file mode 100644 index 970e7e3..0000000 --- a/scripts/install_ovpl.sh~ +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -cd /root - -if [ ! -d "ovpl" ];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE - git clone https://github.com/vlead/ovpl.git - if [ $? -eq 0 ] - then - echo "[[$DATE:: $0 :: Line $LINENO::]] Finished Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE - else - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE - exit 1 - fi -else - echo "[[$DATE:: $0 :: Line $LINENO::]] Pulling ovpl from origin master" 2>&1 | tee -a $LOGGFILE - cd ovpl/ - git pull origin master - echo "[[$DATE:: $0 :: Line $LINENO::]] finished pulling https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE - echo "[[$DATE:: $0 :: Line $LINENO::]] Checking out version v1.0.0 .." 2>&1 | tee -a $LOGGFILE - git checkout tags/v1.0.0 - -fi - -echo "[[$DATE:: $0 :: Line $LINENO::]] Running 'python setup.py install' to install pre-requisites for run ovpl " 2>&1 | tee -a $LOGGFILE -python setup.py install -if [[ $? -ne 0 ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in installing 'python setup.py install' " 2>&1 | tee -a $LOGGFILE - exit 1 - -else - echo "[[$DATE:: $0 :: Line $LINENO::]] Finished installing ovpl" 2>&1 | tee -a $LOGGFILE - -fi -exit 0 From 85145445faddc73947bd058e161439f3725ed612 Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 16 Dec 2014 10:53:34 +0530 Subject: [PATCH 11/24] Delete output.txt --- scripts/output.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 scripts/output.txt diff --git a/scripts/output.txt b/scripts/output.txt deleted file mode 100644 index e69de29..0000000 From 03ccae15a05855bb940c3f0944216864ea8d327e Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 16 Dec 2014 10:53:47 +0530 Subject: [PATCH 12/24] Delete setup-ovpl.log --- scripts/setup-ovpl.log | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 scripts/setup-ovpl.log diff --git a/scripts/setup-ovpl.log b/scripts/setup-ovpl.log deleted file mode 100644 index f5a8bbd..0000000 --- a/scripts/setup-ovpl.log +++ /dev/null @@ -1,20 +0,0 @@ -[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 12::]] export http_proxy = http://proxy.iiit.ac.in:8080 -[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 16::]] export https_proxy = http://proxy.iiit.ac.in:8080 -[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 53::]] Updating System.... -[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 60::]] System updation complete.. -[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 66::]] Invoking install_dependencies.sh -[[Mon Dec 15 09:25:25 IST 2014:: ./install_dependencies.sh :: Line 6::]] Setting up EPEL repo.. -[[Mon Dec 15 09:25:25 IST 2014:: ./install_dependencies.sh :: Line 9::]] Installing dependencies.. -[[Mon Dec 15 09:25:25 IST 2014:: ./install_dependencies.sh :: Line 10::]] Running yum -y install gcc python-devel.x86_64 python-pip openssh-clients openssh-server git -[[Mon Dec 15 09:25:25 IST 2014:: ./install_dependencies.sh :: Line 16::]] Completed installation of gcc python-devel.x86_64 python-pip openssh-clients openssh-server git -[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 76::]] successfully installed dependencies... -[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 85::]] Invoking install_openvz.sh -[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 95::]] successfully installed openvz... -[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 105::]] Invoking install_mongodb.sh -[[Mon Dec 15 09:26:25 IST 2014:: ./install_mongodb.sh :: Line 8::]] Setting up MongoDB repo.... -[[Mon Dec 15 09:26:25 IST 2014:: ./install_mongodb.sh :: Line 11::]] Installing MongoDB...... -[[Mon Dec 15 09:26:25 IST 2014:: ./install_mongodb.sh :: Line 18::]] Starting mongod service.. -[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 116::]] successfully installed mongodb... -[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 125::]] Invoking install_ovpl.sh -[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 135::]] successfully installed ovpl... -[[Mon Dec 15 09:25:25 IST 2014:: ./centos_prepare_ovpl.sh :: Line 136::]] Finished... From 9bf17132fd30ecdf10767bff069b3045720a8549 Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 16 Dec 2014 10:56:13 +0530 Subject: [PATCH 13/24] Update config.sh removed proxy and added loggfile and date variables --- scripts/config.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/config.sh b/scripts/config.sh index e5ede13..cb46a44 100755 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -4,11 +4,11 @@ # E.g., # Note the port number after the second (:). -export http_proxy="http://proxy.iiit.ac.in:8080" +export http_proxy="" #set your https proxy. Similar to the above. -export https_proxy="http://proxy.iiit.ac.in:8080" +export https_proxy="" -#Loggfile path +#Loggfile name export LOGGFILE="setup-ovpl.log" -export DATE=$(date) \ No newline at end of file +export DATE=$(date) From 45efaf476615446dfebdcff3931226b0535d8372 Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 16 Dec 2014 10:57:05 +0530 Subject: [PATCH 14/24] Delete setup-ovpl.log --- meta/setup-ovpl.log | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 meta/setup-ovpl.log diff --git a/meta/setup-ovpl.log b/meta/setup-ovpl.log deleted file mode 100644 index 03fbdaf..0000000 --- a/meta/setup-ovpl.log +++ /dev/null @@ -1,45 +0,0 @@ -[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 11::]] Downloading ubuntu-12.04-custom-x86_64.tar.gz file to ../meta directory -[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 15::]] Error in Downloading ubuntu-12.04-custom-x86_64.tar.gz file to ../meta directory.. -[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 19::]] copying openvz.repo into /etc/yum/repos.d/ -[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 22::]] Importing RPM-GPG-Key for openvz.. -[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 25::]] Installing the OpenVZ kernel.. -[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 32::]] Configuring OpenVZ.. -[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 35::]] Disabled SELINUX.. -[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 37::]] Installing OpenVZ tools.. -[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 46::]] VZ OS template file not found! -[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 58::]] Allowing multiple subnets to reside on the same network interface.. -[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 62::]] Setting container layout to default to ploop (VM in a file).. -[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 65::]] Setting Ubuntu 12.04 64bit to be the default template.. -[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 72::]] Setting iptables -[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 74::]] Saving iptables -[[Thu Dec 11 10:09:35 IST 2014:: ./install_openvz.sh :: Line 76::]] Finished installing OpenVZ -[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 11::]] Downloading ubuntu-12.04-custom-x86_64.tar.gz file to ../meta directory -[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 15::]] Error in Downloading ubuntu-12.04-custom-x86_64.tar.gz file to ../meta directory.. -[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 19::]] copying openvz.repo into /etc/yum/repos.d/ -[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 22::]] Importing RPM-GPG-Key for openvz.. -[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 25::]] Installing the OpenVZ kernel.. -[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 32::]] Configuring OpenVZ.. -[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 35::]] Disabled SELINUX.. -[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 37::]] Installing OpenVZ tools.. -[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 46::]] VZ OS template file not found! -[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 58::]] Allowing multiple subnets to reside on the same network interface.. -[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 62::]] Setting container layout to default to ploop (VM in a file).. -[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 65::]] Setting Ubuntu 12.04 64bit to be the default template.. -[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 72::]] Setting iptables -[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 74::]] Saving iptables -[[Thu Dec 11 10:21:08 IST 2014:: ./install_openvz.sh :: Line 76::]] Finished installing OpenVZ -[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 9::]] Downloading ubuntu-12.04-custom-x86_64.tar.gz file to ../meta directory -[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 13::]] Error in Downloading ubuntu-12.04-custom-x86_64.tar.gz file to ../meta directory.. -[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 17::]] copying openvz.repo into /etc/yum/repos.d/ -[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 20::]] Importing RPM-GPG-Key for openvz.. -[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 23::]] Installing the OpenVZ kernel.. -[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 30::]] Configuring OpenVZ.. -[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 33::]] Disabled SELINUX.. -[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 35::]] Installing OpenVZ tools.. -[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 44::]] VZ OS template file not found! -[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 56::]] Allowing multiple subnets to reside on the same network interface.. -[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 60::]] Setting container layout to default to ploop (VM in a file).. -[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 63::]] Setting Ubuntu 12.04 64bit to be the default template.. -[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 70::]] Setting iptables -[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 72::]] Saving iptables -[[Mon Dec 15 09:25:25 IST 2014:: ./install_openvz.sh :: Line 74::]] Finished installing OpenVZ From 43580e9e924fe099b4b891eff13b3590bb1a3b84 Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 16 Dec 2014 11:07:10 +0530 Subject: [PATCH 15/24] Update install_openvz.sh --- scripts/install_openvz.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install_openvz.sh b/scripts/install_openvz.sh index e2fa659..bb509ac 100755 --- a/scripts/install_openvz.sh +++ b/scripts/install_openvz.sh @@ -8,7 +8,7 @@ vz_template_file="ubuntu-12.04-custom-x86_64.tar.gz" cd $meta_dir echo "[[$DATE:: $0 :: Line $LINENO::]] Downloading $vz_template_file file to $meta_dir directory" 2>&1 | tee -a $LOGGFILE echo "" -wget community.virtual-labs.ac.in/downloads/ubuntu-12.04-custom-x86_64.tar.gz +wget http://community.virtual-labs.ac.in/downloads/ubuntu-12.04-custom-x86_64.tar.gz if [[ $? -ne 0 ]];then echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Downloading $vz_template_file file to $meta_dir directory.." 2>&1 | tee -a $LOGGFILE fi From fb52299ba40059032a4d49f99d22801eee1f54e9 Mon Sep 17 00:00:00 2001 From: sripathi Date: Tue, 16 Dec 2014 11:21:24 +0530 Subject: [PATCH 16/24] renamed loggfile name to logfile --- scripts/centos_prepare_ovpl.sh | 70 +++++++-------- scripts/centos_prepare_ovpl.sh~ | 147 +++++++++++++++++++++++++++++++ scripts/config.sh | 6 +- scripts/config.sh~ | 14 +++ scripts/install_dependencies.sh | 10 +-- scripts/install_dependencies.sh~ | 19 ++++ scripts/install_mongodb.sh | 12 +-- scripts/install_mongodb.sh~ | 31 +++++++ scripts/install_openvz.sh | 38 ++++---- scripts/install_openvz.sh~ | 76 ++++++++++++++++ scripts/install_ovpl.sh | 18 ++-- scripts/install_ovpl.sh~ | 35 ++++++++ scripts/setup-ovpl.log | 36 ++++++++ 13 files changed, 435 insertions(+), 77 deletions(-) create mode 100644 scripts/centos_prepare_ovpl.sh~ create mode 100644 scripts/config.sh~ create mode 100644 scripts/install_dependencies.sh~ create mode 100644 scripts/install_mongodb.sh~ create mode 100644 scripts/install_openvz.sh~ create mode 100644 scripts/install_ovpl.sh~ create mode 100644 scripts/setup-ovpl.log diff --git a/scripts/centos_prepare_ovpl.sh b/scripts/centos_prepare_ovpl.sh index b9bb7dd..f01b035 100755 --- a/scripts/centos_prepare_ovpl.sh +++ b/scripts/centos_prepare_ovpl.sh @@ -4,31 +4,31 @@ # read proxy settings from config file if [[ -f "config.sh" ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Reading config.sh file for proxy settings" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Reading config.sh file for proxy settings" 2>&1 | tee -a $LOGFILE source ./config.sh if [[ -n $http_proxy ]]; then export http_proxy=$http_proxy - echo "[[$DATE:: $0 :: Line $LINENO::]] export http_proxy = $http_proxy" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] export http_proxy = $http_proxy" 2>&1 | tee -a $LOGFILE fi if [[ -n $https_proxy ]]; then export https_proxy=$https_proxy - echo "[[$DATE:: $0 :: Line $LINENO::]] export https_proxy = $https_proxy" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] export https_proxy = $https_proxy" 2>&1 | tee -a $LOGFILE fi else - echo "[[$DATE:: $0 :: Line $LINENO::]] config.sh file not exist" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] config.sh file not exist" 2>&1 | tee -a $LOGFILE exit 1 fi -if [[ -f $LOGGFILE ]];then - echo "=============================================" - echo "logpath = setup-ovpl-centos/scripts/$LOGGFILE" - echo "==============================================" +if [[ -f $LOGFILE ]];then + echo "=================================================" + echo "logfilepath = setup-ovpl-centos/scripts/$LOGFILE" + echo "=================================================" else - touch $LOGGFILE - echo "=============================================" - echo "logpath = setup-ovpl-centos/scripts/$LOGGFILE" - echo "=============================================" + touch $LOGFILE + echo "=================================================" + echo "logfilepath = setup-ovpl-centos/scripts/$LOGFILE" + echo "=================================================" fi # check if script is run as root @@ -50,97 +50,97 @@ fi #updating system echo "" echo "========================== UPDATING SYSTEM ================================" -echo "[[$DATE:: $0 :: Line $LINENO::]] Updating System...." 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Updating System...." 2>&1 | tee -a $LOGFILE yum update -y if [[ $? -ne 0 ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in updating system " 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in updating system " 2>&1 | tee -a $LOGFILE exit 1 else echo "" - echo "[[$DATE:: $0 :: Line $LINENO::]] System updation complete.." 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] System updation complete.." 2>&1 | tee -a $LOGFILE echo "" fi if [[ -f "install_dependencies.sh" ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_dependencies.sh" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_dependencies.sh" 2>&1 | tee -a $LOGFILE ./install_dependencies.sh if [ $? -ne 0 ]; then echo "" - echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing dependencies. Quitting!" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing dependencies. Quitting!" 2>&1 | tee -a $LOGFILE echo "======================" - echo "See logs at $LOGGFILE" + echo "See logs at $LOGFILE" echo "=====================" exit 1 else - echo "[[$DATE:: $0 :: Line $LINENO::]] successfully installed dependencies..." 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] successfully installed dependencies..." 2>&1 | tee -a $LOGFILE fi else - echo "[[$DATE:: $0 :: Line $LINENO::]] install_dependencies.sh file not exist" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] install_dependencies.sh file not exist" 2>&1 | tee -a $LOGFILE exit 1 fi if [[ -f "install_openvz.sh" ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_openvz.sh" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_openvz.sh" 2>&1 | tee -a $LOGFILE ./install_openvz.sh if [ $? -ne 0 ]; then echo "" - echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing openvz. Quitting!" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing openvz. Quitting!" 2>&1 | tee -a $LOGFILE echo "======================" - echo "See logs at $LOGGFILE" + echo "See logs at $LOGFILE" echo "=====================" exit 1 else - echo "[[$DATE:: $0 :: Line $LINENO::]] successfully installed openvz..." 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] successfully installed openvz..." 2>&1 | tee -a $LOGFILE fi else - echo "[[$DATE:: $0:: Line $LINENO::]] install_openvz.sh file not exist" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0:: Line $LINENO::]] install_openvz.sh file not exist" 2>&1 | tee -a $LOGFILE exit 1 fi if [[ -f "install_mongodb.sh" ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_mongodb.sh" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_mongodb.sh" 2>&1 | tee -a $LOGFILE ./install_mongodb.sh if [ $? -ne 0 ]; then echo "" - echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing mongodb. Quitting! " 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing mongodb. Quitting! " 2>&1 | tee -a $LOGFILE echo "======================" - echo "See logs at $LOGGFILE" + echo "See logs at $LOGFILE" echo "=====================" exit 1 else - echo "[[$DATE:: $0 :: Line $LINENO::]] successfully installed mongodb..." 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] successfully installed mongodb..." 2>&1 | tee -a $LOGFILE fi else - echo "[[$DATE:: $0 :: Line $LINENO::]] install_mongodb.sh file not exist" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] install_mongodb.sh file not exist" 2>&1 | tee -a $LOGFILE exit 1 fi if [[ -f "install_ovpl.sh" ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_ovpl.sh" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_ovpl.sh" 2>&1 | tee -a $LOGFILE ./install_ovpl.sh if [ $? -ne 0 ]; then echo "" - echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing ovpl. Quitting! " 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing ovpl. Quitting! " 2>&1 | tee -a $LOGFILE echo "======================" - echo "See logs at $LOGGFILE" + echo "See logs at $LOGFILE" echo "=====================" exit 1 else echo "==========================================================================================================" - echo "[[$DATE:: $0 :: Line $LINENO::]] Congrats! You have setup OVPL successfully!!! :-)" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Congrats! You have setup OVPL successfully!!! :-)" 2>&1 | tee -a $LOGFILE echo "Now run 'make' from inside the src directory" echo " of OVPL to start the services." echo "==========================================================================================================" fi else - echo "[[$DATE:: $0 :: Line $LINENO::]] install_ovpl.sh file not exist" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] install_ovpl.sh file not exist" 2>&1 | tee -a $LOGFILE exit 1 fi diff --git a/scripts/centos_prepare_ovpl.sh~ b/scripts/centos_prepare_ovpl.sh~ new file mode 100644 index 0000000..cea973f --- /dev/null +++ b/scripts/centos_prepare_ovpl.sh~ @@ -0,0 +1,147 @@ +#!/bin/bash +# Script to setup a fresh installation of CentOS to run OVPL +# Installs: Dependencies: python-devel, git, pip; mongodb; openvz. + +# read proxy settings from config file +if [[ -f "config.sh" ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Reading config.sh file for proxy settings" 2>&1 | tee -a $LOGGFILE + source ./config.sh + if [[ -n $http_proxy ]]; then + + export http_proxy=$http_proxy + echo "[[$DATE:: $0 :: Line $LINENO::]] export http_proxy = $http_proxy" 2>&1 | tee -a $LOGGFILE + fi + if [[ -n $https_proxy ]]; then + export https_proxy=$https_proxy + echo "[[$DATE:: $0 :: Line $LINENO::]] export https_proxy = $https_proxy" 2>&1 | tee -a $LOGGFILE + fi +else + echo "[[$DATE:: $0 :: Line $LINENO::]] config.sh file not exist" 2>&1 | tee -a $LOGGFILE + exit 1 +fi + +if [[ -f $LOGGFILE ]];then + echo "=================================================" + echo "logfilepath = setup-ovpl-centos/scripts/$LOGGFILE" + echo "=================================================" +else + touch $LOGGFILE + echo "=================================================" + echo "logfilepath = setup-ovpl-centos/scripts/$LOGGFILE" + echo "=================================================" +fi + +# check if script is run as root +if [[ $UID -ne 0 ]]; then + echo "" + echo "$0 must be run as root!" + echo "Exiting.." + exit 1 +fi + +# check if meta directory exists +if [[ ! -d "../meta" ]]; then + echo "" + echo "You don't have the necessary files." + echo "Please contact the author of the script." + exit 1 +fi + +#updating system +echo "" +echo "========================== UPDATING SYSTEM ================================" +echo "[[$DATE:: $0 :: Line $LINENO::]] Updating System...." 2>&1 | tee -a $LOGGFILE +yum update -y +if [[ $? -ne 0 ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in updating system " 2>&1 | tee -a $LOGGFILE + exit 1 +else + echo "" + echo "[[$DATE:: $0 :: Line $LINENO::]] System updation complete.." 2>&1 | tee -a $LOGGFILE + echo "" +fi + + +if [[ -f "install_dependencies.sh" ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_dependencies.sh" 2>&1 | tee -a $LOGGFILE + ./install_dependencies.sh + if [ $? -ne 0 ]; then + echo "" + echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing dependencies. Quitting!" 2>&1 | tee -a $LOGGFILE + echo "======================" + echo "See logs at $LOGGFILE" + echo "=====================" + exit 1 + else + echo "[[$DATE:: $0 :: Line $LINENO::]] successfully installed dependencies..." 2>&1 | tee -a $LOGGFILE + + fi +else + echo "[[$DATE:: $0 :: Line $LINENO::]] install_dependencies.sh file not exist" 2>&1 | tee -a $LOGGFILE + exit 1 +fi + +if [[ -f "install_openvz.sh" ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_openvz.sh" 2>&1 | tee -a $LOGGFILE + ./install_openvz.sh + if [ $? -ne 0 ]; then + echo "" + echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing openvz. Quitting!" 2>&1 | tee -a $LOGGFILE + echo "======================" + echo "See logs at $LOGGFILE" + echo "=====================" + exit 1 + else + echo "[[$DATE:: $0 :: Line $LINENO::]] successfully installed openvz..." 2>&1 | tee -a $LOGGFILE + + + fi +else + echo "[[$DATE:: $0:: Line $LINENO::]] install_openvz.sh file not exist" 2>&1 | tee -a $LOGGFILE + exit 1 +fi + +if [[ -f "install_mongodb.sh" ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_mongodb.sh" 2>&1 | tee -a $LOGGFILE + ./install_mongodb.sh + if [ $? -ne 0 ]; then + echo "" + echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing mongodb. Quitting! " 2>&1 | tee -a $LOGGFILE + echo "======================" + echo "See logs at $LOGGFILE" + echo "=====================" + exit 1 + + else + echo "[[$DATE:: $0 :: Line $LINENO::]] successfully installed mongodb..." 2>&1 | tee -a $LOGGFILE + + fi +else + echo "[[$DATE:: $0 :: Line $LINENO::]] install_mongodb.sh file not exist" 2>&1 | tee -a $LOGGFILE + exit 1 +fi + +if [[ -f "install_ovpl.sh" ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_ovpl.sh" 2>&1 | tee -a $LOGGFILE + ./install_ovpl.sh + if [ $? -ne 0 ]; then + echo "" + echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing ovpl. Quitting! " 2>&1 | tee -a $LOGGFILE + echo "======================" + echo "See logs at $LOGGFILE" + echo "=====================" + exit 1 + else + + echo "==========================================================================================================" + echo "[[$DATE:: $0 :: Line $LINENO::]] Congrats! You have setup OVPL successfully!!! :-)" 2>&1 | tee -a $LOGGFILE + echo "Now run 'make' from inside the src directory" + echo " of OVPL to start the services." + echo "==========================================================================================================" + fi +else + echo "[[$DATE:: $0 :: Line $LINENO::]] install_ovpl.sh file not exist" 2>&1 | tee -a $LOGGFILE + exit 1 +fi + +exit 0 diff --git a/scripts/config.sh b/scripts/config.sh index cb46a44..fa79592 100755 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -4,11 +4,11 @@ # E.g., # Note the port number after the second (:). -export http_proxy="" +export http_proxy="proxy.iiit.ac.in:8080" #set your https proxy. Similar to the above. -export https_proxy="" +export https_proxy="proxy.iiit.ac.in:8080" #Loggfile name -export LOGGFILE="setup-ovpl.log" +export LOGFILE="setup-ovpl.log" export DATE=$(date) diff --git a/scripts/config.sh~ b/scripts/config.sh~ new file mode 100644 index 0000000..d0cda0b --- /dev/null +++ b/scripts/config.sh~ @@ -0,0 +1,14 @@ +# set your http proxy based on your network's configuration. +# Ask your network administrator if you are unsure about the +# value + +# E.g., +# Note the port number after the second (:). +export http_proxy="proxy.iiit.ac.in:8080" + +#set your https proxy. Similar to the above. +export https_proxy="proxy.iiit.ac.in:8080" + +#Loggfile name +export LOGGFILE="setup-ovpl.log" +export DATE=$(date) diff --git a/scripts/install_dependencies.sh b/scripts/install_dependencies.sh index e25f107..694ccca 100755 --- a/scripts/install_dependencies.sh +++ b/scripts/install_dependencies.sh @@ -3,17 +3,17 @@ meta_dir="../meta" #wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm -echo "[[$DATE:: $0 :: Line $LINENO::]] Setting up EPEL repo.." 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Setting up EPEL repo.." 2>&1 | tee -a $LOGFILE rpm -ivh $meta_dir/epel-release-6-8.noarch.rpm -echo "[[$DATE:: $0 :: Line $LINENO::]] Installing dependencies.. " 2>&1 | tee -a $LOGGFILE -echo "[[$DATE:: $0 :: Line $LINENO::]] Running yum -y install gcc python-devel.x86_64 python-pip openssh-clients openssh-server git" 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Installing dependencies.. " 2>&1 | tee -a $LOGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Running yum -y install gcc python-devel.x86_64 python-pip openssh-clients openssh-server git" 2>&1 | tee -a $LOGFILE yum -y install gcc python-devel.x86_64 python-pip openssh-clients openssh-server git if [[ $? -ne 0 ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in installing dependencies.." 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in installing dependencies.." 2>&1 | tee -a $LOGFILE exit 1 else - echo "[[$DATE:: $0 :: Line $LINENO::]] Completed installation of gcc python-devel.x86_64 python-pip openssh-clients openssh-server git" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Completed installation of gcc python-devel.x86_64 python-pip openssh-clients openssh-server git" 2>&1 | tee -a $LOGFILE fi exit 0 diff --git a/scripts/install_dependencies.sh~ b/scripts/install_dependencies.sh~ new file mode 100644 index 0000000..e25f107 --- /dev/null +++ b/scripts/install_dependencies.sh~ @@ -0,0 +1,19 @@ +#!/bin/bash + +meta_dir="../meta" + +#wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm +echo "[[$DATE:: $0 :: Line $LINENO::]] Setting up EPEL repo.." 2>&1 | tee -a $LOGGFILE +rpm -ivh $meta_dir/epel-release-6-8.noarch.rpm + +echo "[[$DATE:: $0 :: Line $LINENO::]] Installing dependencies.. " 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Running yum -y install gcc python-devel.x86_64 python-pip openssh-clients openssh-server git" 2>&1 | tee -a $LOGGFILE +yum -y install gcc python-devel.x86_64 python-pip openssh-clients openssh-server git +if [[ $? -ne 0 ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in installing dependencies.." 2>&1 | tee -a $LOGGFILE + exit 1 +else + echo "[[$DATE:: $0 :: Line $LINENO::]] Completed installation of gcc python-devel.x86_64 python-pip openssh-clients openssh-server git" 2>&1 | tee -a $LOGGFILE +fi + +exit 0 diff --git a/scripts/install_mongodb.sh b/scripts/install_mongodb.sh index 50e80b5..59883d9 100755 --- a/scripts/install_mongodb.sh +++ b/scripts/install_mongodb.sh @@ -5,26 +5,26 @@ meta_dir="../meta" DATE=$(date) LOGGFILE="setup-ovpl.log" -echo "[[$DATE:: $0 :: Line $LINENO::]] Setting up MongoDB repo...." 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Setting up MongoDB repo...." 2>&1 | tee -a $LOGFILE cp $meta_dir/mongodb.repo /etc/yum.repos.d/mongodb.repo -echo "[[$DATE:: $0 :: Line $LINENO::]] Installing MongoDB......" 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Installing MongoDB......" 2>&1 | tee -a $LOGFILE yum -y install mongodb-org if [[ $? -ne 0 ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in installing mongodb.." 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in installing mongodb.." 2>&1 | tee -a $LOGFILE exit 1 fi -echo "[[$DATE:: $0 :: Line $LINENO::]] Starting mongod service.." 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Starting mongod service.." 2>&1 | tee -a $LOGFILE service mongod start if [ $? -eq 0 ];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Mongodb service started.." 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Mongodb service started.." 2>&1 | tee -a $LOGFILE elif [ $? -eq 1 ];then sed 's/.*deamon.*/new/g' /etc/init.d/mongod service mongod restart else - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in starting Mongodb service.." 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in starting Mongodb service.." 2>&1 | tee -a $LOGFILE exit 1 fi diff --git a/scripts/install_mongodb.sh~ b/scripts/install_mongodb.sh~ new file mode 100644 index 0000000..50e80b5 --- /dev/null +++ b/scripts/install_mongodb.sh~ @@ -0,0 +1,31 @@ +#!/bin/bash +# Script to setup repo and install MongoDB + +meta_dir="../meta" +DATE=$(date) +LOGGFILE="setup-ovpl.log" + +echo "[[$DATE:: $0 :: Line $LINENO::]] Setting up MongoDB repo...." 2>&1 | tee -a $LOGGFILE +cp $meta_dir/mongodb.repo /etc/yum.repos.d/mongodb.repo + +echo "[[$DATE:: $0 :: Line $LINENO::]] Installing MongoDB......" 2>&1 | tee -a $LOGGFILE +yum -y install mongodb-org +if [[ $? -ne 0 ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in installing mongodb.." 2>&1 | tee -a $LOGGFILE + exit 1 +fi + +echo "[[$DATE:: $0 :: Line $LINENO::]] Starting mongod service.." 2>&1 | tee -a $LOGGFILE +service mongod start +if [ $? -eq 0 ];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Mongodb service started.." 2>&1 | tee -a $LOGGFILE +elif [ $? -eq 1 ];then + sed 's/.*deamon.*/new/g' /etc/init.d/mongod + service mongod restart + +else + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in starting Mongodb service.." 2>&1 | tee -a $LOGGFILE + exit 1 + +fi +exit 0 diff --git a/scripts/install_openvz.sh b/scripts/install_openvz.sh index e2fa659..0e3ba48 100755 --- a/scripts/install_openvz.sh +++ b/scripts/install_openvz.sh @@ -6,71 +6,71 @@ vz_template_file="ubuntu-12.04-custom-x86_64.tar.gz" cd $meta_dir -echo "[[$DATE:: $0 :: Line $LINENO::]] Downloading $vz_template_file file to $meta_dir directory" 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Downloading $vz_template_file file to $meta_dir directory" 2>&1 | tee -a $LOGFILE echo "" -wget community.virtual-labs.ac.in/downloads/ubuntu-12.04-custom-x86_64.tar.gz +wget http://community.virtual-labs.ac.in/downloads/ubuntu-12.04-custom-x86_64.tar.gz if [[ $? -ne 0 ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Downloading $vz_template_file file to $meta_dir directory.." 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Downloading $vz_template_file file to $meta_dir directory.." 2>&1 | tee -a $LOGFILE fi #wget -P /etc/yum.repos.d/ http://ftp.openvz.org/openvz.repo -echo "[$DATE:: $0 :: Line $LINENO::]] copying openvz.repo into /etc/yum/repos.d/" 2>&1 | tee -a $LOGGFILE +echo "[$DATE:: $0 :: Line $LINENO::]] copying openvz.repo into /etc/yum/repos.d/" 2>&1 | tee -a $LOGFILE cp $meta_dir/openvz.repo /etc/yum.repos.d/openvz.repo -echo "[$DATE:: $0 :: Line $LINENO::]] Importing RPM-GPG-Key for openvz.." 2>&1 | tee -a $LOGGFILE +echo "[$DATE:: $0 :: Line $LINENO::]] Importing RPM-GPG-Key for openvz.." 2>&1 | tee -a $LOGFILE rpm --import http://ftp.openvz.org/RPM-GPG-Key-OpenVZ -echo "[[$DATE:: $0 :: Line $LINENO::]] Installing the OpenVZ kernel.." 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Installing the OpenVZ kernel.." 2>&1 | tee -a $LOGFILE yum -y install vzkernel if [[ $? -ne 0 ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Installing the OpenVZ kernel...." 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Installing the OpenVZ kernel...." 2>&1 | tee -a $LOGFILE exit 1 fi -echo "[[$DATE:: $0 :: Line $LINENO::]] Configuring OpenVZ.." 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Configuring OpenVZ.." 2>&1 | tee -a $LOGFILE cat $meta_dir/updated_sysctl.conf >> /etc/sysctl.conf echo "SELINUX=disabled" > /etc/sysconfig/selinux -echo "[[$DATE:: $0 :: Line $LINENO::]] Disabled SELINUX.." 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Disabled SELINUX.." 2>&1 | tee -a $LOGFILE -echo "[[$DATE:: $0 :: Line $LINENO::]] Installing OpenVZ tools.." 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Installing OpenVZ tools.." 2>&1 | tee -a $LOGFILE yum -y install vzctl vzquota ploop vzstats if [[ $? -ne 0 ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Installing the OpenVZ tools...." 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Installing the OpenVZ tools...." 2>&1 | tee -a $LOGFILE exit 1 fi if [[ ! -f $meta_dir/$vz_template_file ]]; then echo "" - echo "[[$DATE:: $0 :: Line $LINENO::]] VZ OS template file not found!" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] VZ OS template file not found!" 2>&1 | tee -a $LOGFILE echo "Please obtain an VZ OS template image and manually" echo "copy that into /vz/template/cache folder." echo "Failing the above step will result in OVPL not working." echo "Please contact VLEAD for further clarifications." else - echo "[[$DATE:: $0 :: Line $LINENO::]] Copying the default OS template for containers....." 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Copying the default OS template for containers....." 2>&1 | tee -a $LOGFILE cp $meta_dir/$vz_template_file /vz/template/cache fi # Not needed!? Not sure. -echo "[[$DATE:: $0 :: Line $LINENO::]] Allowing multiple subnets to reside on the same network interface.." 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Allowing multiple subnets to reside on the same network interface.." 2>&1 | tee -a $LOGFILE sed -i 's/#NEIGHBOUR_DEVS=all/NEIGHBOUR_DEVS=all/g' /etc/vz/vz.conf sed -i 's/#NEIGHBOUR_DEVS=detect/NEIGHBOUR_DEVS=all/g' /etc/vz/vz.conf -echo "[[$DATE:: $0 :: Line $LINENO::]] Setting container layout to default to ploop (VM in a file).." 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Setting container layout to default to ploop (VM in a file).." 2>&1 | tee -a $LOGFILE sed -i 's/VE_LAYOUT=simfs/VE_LAYOUT=ploop/g' /etc/vz/vz.conf -echo "[[$DATE:: $0 :: Line $LINENO::]] Setting Ubuntu 12.04 64bit to be the default template.." 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Setting Ubuntu 12.04 64bit to be the default template.." 2>&1 | tee -a $LOGFILE sed -i 's/centos-6-x86/ubuntu-12.04-x86_64/g' /etc/vz/vz.conf # #sysctl -p # #echo "Disabling iptables.." #/etc/init.d/iptables stop && chkconfig iptables off -echo "[[$DATE:: $0 :: Line $LINENO::]] Setting iptables" 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Setting iptables" 2>&1 | tee -a $LOGFILE iptables -F FORWARD -echo "[[$DATE:: $0 :: Line $LINENO::]] Saving iptables" 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Saving iptables" 2>&1 | tee -a $LOGFILE service iptables save -echo "[[$DATE:: $0 :: Line $LINENO::]] Finished installing OpenVZ" 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Finished installing OpenVZ" 2>&1 | tee -a $LOGFILE exit 0 diff --git a/scripts/install_openvz.sh~ b/scripts/install_openvz.sh~ new file mode 100644 index 0000000..bb509ac --- /dev/null +++ b/scripts/install_openvz.sh~ @@ -0,0 +1,76 @@ +#!/bin/bash +# Script to setup OpenVZ repo, install and configure + +meta_dir="../meta" +vz_template_file="ubuntu-12.04-custom-x86_64.tar.gz" + + +cd $meta_dir +echo "[[$DATE:: $0 :: Line $LINENO::]] Downloading $vz_template_file file to $meta_dir directory" 2>&1 | tee -a $LOGGFILE +echo "" +wget http://community.virtual-labs.ac.in/downloads/ubuntu-12.04-custom-x86_64.tar.gz +if [[ $? -ne 0 ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Downloading $vz_template_file file to $meta_dir directory.." 2>&1 | tee -a $LOGGFILE +fi + +#wget -P /etc/yum.repos.d/ http://ftp.openvz.org/openvz.repo +echo "[$DATE:: $0 :: Line $LINENO::]] copying openvz.repo into /etc/yum/repos.d/" 2>&1 | tee -a $LOGGFILE +cp $meta_dir/openvz.repo /etc/yum.repos.d/openvz.repo + +echo "[$DATE:: $0 :: Line $LINENO::]] Importing RPM-GPG-Key for openvz.." 2>&1 | tee -a $LOGGFILE +rpm --import http://ftp.openvz.org/RPM-GPG-Key-OpenVZ + +echo "[[$DATE:: $0 :: Line $LINENO::]] Installing the OpenVZ kernel.." 2>&1 | tee -a $LOGGFILE +yum -y install vzkernel +if [[ $? -ne 0 ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Installing the OpenVZ kernel...." 2>&1 | tee -a $LOGGFILE + exit 1 +fi + +echo "[[$DATE:: $0 :: Line $LINENO::]] Configuring OpenVZ.." 2>&1 | tee -a $LOGGFILE +cat $meta_dir/updated_sysctl.conf >> /etc/sysctl.conf +echo "SELINUX=disabled" > /etc/sysconfig/selinux +echo "[[$DATE:: $0 :: Line $LINENO::]] Disabled SELINUX.." 2>&1 | tee -a $LOGGFILE + +echo "[[$DATE:: $0 :: Line $LINENO::]] Installing OpenVZ tools.." 2>&1 | tee -a $LOGGFILE +yum -y install vzctl vzquota ploop vzstats +if [[ $? -ne 0 ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Installing the OpenVZ tools...." 2>&1 | tee -a $LOGGFILE + exit 1 +fi + +if [[ ! -f $meta_dir/$vz_template_file ]]; then + echo "" + echo "[[$DATE:: $0 :: Line $LINENO::]] VZ OS template file not found!" 2>&1 | tee -a $LOGGFILE + echo "Please obtain an VZ OS template image and manually" + echo "copy that into /vz/template/cache folder." + echo "Failing the above step will result in OVPL not working." + echo "Please contact VLEAD for further clarifications." +else + + echo "[[$DATE:: $0 :: Line $LINENO::]] Copying the default OS template for containers....." 2>&1 | tee -a $LOGGFILE + cp $meta_dir/$vz_template_file /vz/template/cache +fi + +# Not needed!? Not sure. +echo "[[$DATE:: $0 :: Line $LINENO::]] Allowing multiple subnets to reside on the same network interface.." 2>&1 | tee -a $LOGGFILE +sed -i 's/#NEIGHBOUR_DEVS=all/NEIGHBOUR_DEVS=all/g' /etc/vz/vz.conf +sed -i 's/#NEIGHBOUR_DEVS=detect/NEIGHBOUR_DEVS=all/g' /etc/vz/vz.conf + +echo "[[$DATE:: $0 :: Line $LINENO::]] Setting container layout to default to ploop (VM in a file).." 2>&1 | tee -a $LOGGFILE +sed -i 's/VE_LAYOUT=simfs/VE_LAYOUT=ploop/g' /etc/vz/vz.conf + +echo "[[$DATE:: $0 :: Line $LINENO::]] Setting Ubuntu 12.04 64bit to be the default template.." 2>&1 | tee -a $LOGGFILE +sed -i 's/centos-6-x86/ubuntu-12.04-x86_64/g' /etc/vz/vz.conf +# +#sysctl -p +# +#echo "Disabling iptables.." +#/etc/init.d/iptables stop && chkconfig iptables off +echo "[[$DATE:: $0 :: Line $LINENO::]] Setting iptables" 2>&1 | tee -a $LOGGFILE +iptables -F FORWARD +echo "[[$DATE:: $0 :: Line $LINENO::]] Saving iptables" 2>&1 | tee -a $LOGGFILE +service iptables save +echo "[[$DATE:: $0 :: Line $LINENO::]] Finished installing OpenVZ" 2>&1 | tee -a $LOGGFILE + +exit 0 diff --git a/scripts/install_ovpl.sh b/scripts/install_ovpl.sh index 4396865..c0528fa 100755 --- a/scripts/install_ovpl.sh +++ b/scripts/install_ovpl.sh @@ -3,33 +3,33 @@ cd /root if [ ! -d "ovpl" ];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGFILE git clone https://github.com/vlead/ovpl.git if [ $? -eq 0 ] then - echo "[[$DATE:: $0 :: Line $LINENO::]] Finished Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Finished Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGFILE else - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGFILE exit 1 fi else - echo "[[$DATE:: $0 :: Line $LINENO::]] Pulling ovpl from origin master" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Pulling ovpl from origin master" 2>&1 | tee -a $LOGFILE cd ovpl/ git pull origin master - echo "[[$DATE:: $0 :: Line $LINENO::]] finished pulling https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE - echo "[[$DATE:: $0 :: Line $LINENO::]] Checking out version v1.0.0 .." 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] finished pulling https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Checking out version v1.0.0 .." 2>&1 | tee -a $LOGFILE git checkout tags/v1.0.0 fi cd ovpl -echo "[[$DATE:: $0 :: Line $LINENO::]] Running 'python setup.py install' to install pre-requisites for run ovpl " 2>&1 | tee -a $LOGGFILE +echo "[[$DATE:: $0 :: Line $LINENO::]] Running 'python setup.py install' to install pre-requisites for run ovpl " 2>&1 | tee -a $LOGFILE python setup.py install if [[ $? -ne 0 ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in installing 'python setup.py install' " 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in installing 'python setup.py install' " 2>&1 | tee -a $LOGFILE exit 1 else - echo "[[$DATE:: $0 :: Line $LINENO::]] Finished installing ovpl" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Finished installing ovpl" 2>&1 | tee -a $LOGFILE fi exit 0 diff --git a/scripts/install_ovpl.sh~ b/scripts/install_ovpl.sh~ new file mode 100644 index 0000000..4396865 --- /dev/null +++ b/scripts/install_ovpl.sh~ @@ -0,0 +1,35 @@ +#!/bin/bash + +cd /root + +if [ ! -d "ovpl" ];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE + git clone https://github.com/vlead/ovpl.git + if [ $? -eq 0 ] + then + echo "[[$DATE:: $0 :: Line $LINENO::]] Finished Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE + else + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE + exit 1 + fi +else + echo "[[$DATE:: $0 :: Line $LINENO::]] Pulling ovpl from origin master" 2>&1 | tee -a $LOGGFILE + cd ovpl/ + git pull origin master + echo "[[$DATE:: $0 :: Line $LINENO::]] finished pulling https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE + echo "[[$DATE:: $0 :: Line $LINENO::]] Checking out version v1.0.0 .." 2>&1 | tee -a $LOGGFILE + git checkout tags/v1.0.0 + +fi +cd ovpl +echo "[[$DATE:: $0 :: Line $LINENO::]] Running 'python setup.py install' to install pre-requisites for run ovpl " 2>&1 | tee -a $LOGGFILE +python setup.py install +if [[ $? -ne 0 ]];then + echo "[[$DATE:: $0 :: Line $LINENO::]] Error in installing 'python setup.py install' " 2>&1 | tee -a $LOGGFILE + exit 1 + +else + echo "[[$DATE:: $0 :: Line $LINENO::]] Finished installing ovpl" 2>&1 | tee -a $LOGGFILE + +fi +exit 0 diff --git a/scripts/setup-ovpl.log b/scripts/setup-ovpl.log new file mode 100644 index 0000000..d0f7ee4 --- /dev/null +++ b/scripts/setup-ovpl.log @@ -0,0 +1,36 @@ +[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 53::]] Updating System.... +[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 60::]] System updation complete.. +[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 66::]] Invoking install_dependencies.sh +[[Tue Dec 16 10:59:51 IST 2014:: ./install_dependencies.sh :: Line 6::]] Setting up EPEL repo.. +[[Tue Dec 16 10:59:51 IST 2014:: ./install_dependencies.sh :: Line 9::]] Installing dependencies.. +[[Tue Dec 16 10:59:51 IST 2014:: ./install_dependencies.sh :: Line 10::]] Running yum -y install gcc python-devel.x86_64 python-pip openssh-clients openssh-server git +[[Tue Dec 16 10:59:51 IST 2014:: ./install_dependencies.sh :: Line 16::]] Completed installation of gcc python-devel.x86_64 python-pip openssh-clients openssh-server git +[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 76::]] successfully installed dependencies... +[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 85::]] Invoking install_openvz.sh +[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 95::]] successfully installed openvz... +[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 105::]] Invoking install_mongodb.sh +[[Tue Dec 16 11:01:15 IST 2014:: ./install_mongodb.sh :: Line 8::]] Setting up MongoDB repo.... +[[Tue Dec 16 11:01:15 IST 2014:: ./install_mongodb.sh :: Line 11::]] Installing MongoDB...... +[[Tue Dec 16 11:01:15 IST 2014:: ./install_mongodb.sh :: Line 18::]] Starting mongod service.. +[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 116::]] successfully installed mongodb... +[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 125::]] Invoking install_ovpl.sh +[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 137::]] Congrats! You have setup OVPL successfully!!! :-) +[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 12::]] export http_proxy = proxy.iiit.ac.in:8080 +[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 16::]] export https_proxy = proxy.iiit.ac.in:8080 +[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 53::]] Updating System.... +[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 60::]] System updation complete.. +[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 66::]] Invoking install_dependencies.sh +[[Tue Dec 16 11:03:38 IST 2014:: ./install_dependencies.sh :: Line 6::]] Setting up EPEL repo.. +[[Tue Dec 16 11:03:38 IST 2014:: ./install_dependencies.sh :: Line 9::]] Installing dependencies.. +[[Tue Dec 16 11:03:38 IST 2014:: ./install_dependencies.sh :: Line 10::]] Running yum -y install gcc python-devel.x86_64 python-pip openssh-clients openssh-server git +[[Tue Dec 16 11:03:38 IST 2014:: ./install_dependencies.sh :: Line 16::]] Completed installation of gcc python-devel.x86_64 python-pip openssh-clients openssh-server git +[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 76::]] successfully installed dependencies... +[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 85::]] Invoking install_openvz.sh +[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 95::]] successfully installed openvz... +[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 105::]] Invoking install_mongodb.sh +[[Tue Dec 16 11:04:37 IST 2014:: ./install_mongodb.sh :: Line 8::]] Setting up MongoDB repo.... +[[Tue Dec 16 11:04:37 IST 2014:: ./install_mongodb.sh :: Line 11::]] Installing MongoDB...... +[[Tue Dec 16 11:04:37 IST 2014:: ./install_mongodb.sh :: Line 18::]] Starting mongod service.. +[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 116::]] successfully installed mongodb... +[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 125::]] Invoking install_ovpl.sh +[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 137::]] Congrats! You have setup OVPL successfully!!! :-) From 7cbc0b3040f074508da27eeafeb18b6c988402ab Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 16 Dec 2014 11:23:08 +0530 Subject: [PATCH 17/24] Delete centos_prepare_ovpl.sh~ --- scripts/centos_prepare_ovpl.sh~ | 147 -------------------------------- 1 file changed, 147 deletions(-) delete mode 100644 scripts/centos_prepare_ovpl.sh~ diff --git a/scripts/centos_prepare_ovpl.sh~ b/scripts/centos_prepare_ovpl.sh~ deleted file mode 100644 index cea973f..0000000 --- a/scripts/centos_prepare_ovpl.sh~ +++ /dev/null @@ -1,147 +0,0 @@ -#!/bin/bash -# Script to setup a fresh installation of CentOS to run OVPL -# Installs: Dependencies: python-devel, git, pip; mongodb; openvz. - -# read proxy settings from config file -if [[ -f "config.sh" ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Reading config.sh file for proxy settings" 2>&1 | tee -a $LOGGFILE - source ./config.sh - if [[ -n $http_proxy ]]; then - - export http_proxy=$http_proxy - echo "[[$DATE:: $0 :: Line $LINENO::]] export http_proxy = $http_proxy" 2>&1 | tee -a $LOGGFILE - fi - if [[ -n $https_proxy ]]; then - export https_proxy=$https_proxy - echo "[[$DATE:: $0 :: Line $LINENO::]] export https_proxy = $https_proxy" 2>&1 | tee -a $LOGGFILE - fi -else - echo "[[$DATE:: $0 :: Line $LINENO::]] config.sh file not exist" 2>&1 | tee -a $LOGGFILE - exit 1 -fi - -if [[ -f $LOGGFILE ]];then - echo "=================================================" - echo "logfilepath = setup-ovpl-centos/scripts/$LOGGFILE" - echo "=================================================" -else - touch $LOGGFILE - echo "=================================================" - echo "logfilepath = setup-ovpl-centos/scripts/$LOGGFILE" - echo "=================================================" -fi - -# check if script is run as root -if [[ $UID -ne 0 ]]; then - echo "" - echo "$0 must be run as root!" - echo "Exiting.." - exit 1 -fi - -# check if meta directory exists -if [[ ! -d "../meta" ]]; then - echo "" - echo "You don't have the necessary files." - echo "Please contact the author of the script." - exit 1 -fi - -#updating system -echo "" -echo "========================== UPDATING SYSTEM ================================" -echo "[[$DATE:: $0 :: Line $LINENO::]] Updating System...." 2>&1 | tee -a $LOGGFILE -yum update -y -if [[ $? -ne 0 ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in updating system " 2>&1 | tee -a $LOGGFILE - exit 1 -else - echo "" - echo "[[$DATE:: $0 :: Line $LINENO::]] System updation complete.." 2>&1 | tee -a $LOGGFILE - echo "" -fi - - -if [[ -f "install_dependencies.sh" ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_dependencies.sh" 2>&1 | tee -a $LOGGFILE - ./install_dependencies.sh - if [ $? -ne 0 ]; then - echo "" - echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing dependencies. Quitting!" 2>&1 | tee -a $LOGGFILE - echo "======================" - echo "See logs at $LOGGFILE" - echo "=====================" - exit 1 - else - echo "[[$DATE:: $0 :: Line $LINENO::]] successfully installed dependencies..." 2>&1 | tee -a $LOGGFILE - - fi -else - echo "[[$DATE:: $0 :: Line $LINENO::]] install_dependencies.sh file not exist" 2>&1 | tee -a $LOGGFILE - exit 1 -fi - -if [[ -f "install_openvz.sh" ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_openvz.sh" 2>&1 | tee -a $LOGGFILE - ./install_openvz.sh - if [ $? -ne 0 ]; then - echo "" - echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing openvz. Quitting!" 2>&1 | tee -a $LOGGFILE - echo "======================" - echo "See logs at $LOGGFILE" - echo "=====================" - exit 1 - else - echo "[[$DATE:: $0 :: Line $LINENO::]] successfully installed openvz..." 2>&1 | tee -a $LOGGFILE - - - fi -else - echo "[[$DATE:: $0:: Line $LINENO::]] install_openvz.sh file not exist" 2>&1 | tee -a $LOGGFILE - exit 1 -fi - -if [[ -f "install_mongodb.sh" ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_mongodb.sh" 2>&1 | tee -a $LOGGFILE - ./install_mongodb.sh - if [ $? -ne 0 ]; then - echo "" - echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing mongodb. Quitting! " 2>&1 | tee -a $LOGGFILE - echo "======================" - echo "See logs at $LOGGFILE" - echo "=====================" - exit 1 - - else - echo "[[$DATE:: $0 :: Line $LINENO::]] successfully installed mongodb..." 2>&1 | tee -a $LOGGFILE - - fi -else - echo "[[$DATE:: $0 :: Line $LINENO::]] install_mongodb.sh file not exist" 2>&1 | tee -a $LOGGFILE - exit 1 -fi - -if [[ -f "install_ovpl.sh" ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Invoking install_ovpl.sh" 2>&1 | tee -a $LOGGFILE - ./install_ovpl.sh - if [ $? -ne 0 ]; then - echo "" - echo "[[$DATE:: $0 :: Line $LINENO::]] Error installing ovpl. Quitting! " 2>&1 | tee -a $LOGGFILE - echo "======================" - echo "See logs at $LOGGFILE" - echo "=====================" - exit 1 - else - - echo "==========================================================================================================" - echo "[[$DATE:: $0 :: Line $LINENO::]] Congrats! You have setup OVPL successfully!!! :-)" 2>&1 | tee -a $LOGGFILE - echo "Now run 'make' from inside the src directory" - echo " of OVPL to start the services." - echo "==========================================================================================================" - fi -else - echo "[[$DATE:: $0 :: Line $LINENO::]] install_ovpl.sh file not exist" 2>&1 | tee -a $LOGGFILE - exit 1 -fi - -exit 0 From 58674ecfaf5e795e376cdf83061bdb945dbd1e86 Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 16 Dec 2014 11:23:15 +0530 Subject: [PATCH 18/24] Delete config.sh~ --- scripts/config.sh~ | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 scripts/config.sh~ diff --git a/scripts/config.sh~ b/scripts/config.sh~ deleted file mode 100644 index d0cda0b..0000000 --- a/scripts/config.sh~ +++ /dev/null @@ -1,14 +0,0 @@ -# set your http proxy based on your network's configuration. -# Ask your network administrator if you are unsure about the -# value - -# E.g., -# Note the port number after the second (:). -export http_proxy="proxy.iiit.ac.in:8080" - -#set your https proxy. Similar to the above. -export https_proxy="proxy.iiit.ac.in:8080" - -#Loggfile name -export LOGGFILE="setup-ovpl.log" -export DATE=$(date) From ef73799696da77476f7f4e55221ea126669ef7bb Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 16 Dec 2014 11:23:21 +0530 Subject: [PATCH 19/24] Delete install_dependencies.sh~ --- scripts/install_dependencies.sh~ | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 scripts/install_dependencies.sh~ diff --git a/scripts/install_dependencies.sh~ b/scripts/install_dependencies.sh~ deleted file mode 100644 index e25f107..0000000 --- a/scripts/install_dependencies.sh~ +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -meta_dir="../meta" - -#wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm -echo "[[$DATE:: $0 :: Line $LINENO::]] Setting up EPEL repo.." 2>&1 | tee -a $LOGGFILE -rpm -ivh $meta_dir/epel-release-6-8.noarch.rpm - -echo "[[$DATE:: $0 :: Line $LINENO::]] Installing dependencies.. " 2>&1 | tee -a $LOGGFILE -echo "[[$DATE:: $0 :: Line $LINENO::]] Running yum -y install gcc python-devel.x86_64 python-pip openssh-clients openssh-server git" 2>&1 | tee -a $LOGGFILE -yum -y install gcc python-devel.x86_64 python-pip openssh-clients openssh-server git -if [[ $? -ne 0 ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in installing dependencies.." 2>&1 | tee -a $LOGGFILE - exit 1 -else - echo "[[$DATE:: $0 :: Line $LINENO::]] Completed installation of gcc python-devel.x86_64 python-pip openssh-clients openssh-server git" 2>&1 | tee -a $LOGGFILE -fi - -exit 0 From 5e92dfcd4ea31b0e8562feffdd7ed6e9057eec05 Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 16 Dec 2014 11:23:29 +0530 Subject: [PATCH 20/24] Delete install_mongodb.sh~ --- scripts/install_mongodb.sh~ | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 scripts/install_mongodb.sh~ diff --git a/scripts/install_mongodb.sh~ b/scripts/install_mongodb.sh~ deleted file mode 100644 index 50e80b5..0000000 --- a/scripts/install_mongodb.sh~ +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# Script to setup repo and install MongoDB - -meta_dir="../meta" -DATE=$(date) -LOGGFILE="setup-ovpl.log" - -echo "[[$DATE:: $0 :: Line $LINENO::]] Setting up MongoDB repo...." 2>&1 | tee -a $LOGGFILE -cp $meta_dir/mongodb.repo /etc/yum.repos.d/mongodb.repo - -echo "[[$DATE:: $0 :: Line $LINENO::]] Installing MongoDB......" 2>&1 | tee -a $LOGGFILE -yum -y install mongodb-org -if [[ $? -ne 0 ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in installing mongodb.." 2>&1 | tee -a $LOGGFILE - exit 1 -fi - -echo "[[$DATE:: $0 :: Line $LINENO::]] Starting mongod service.." 2>&1 | tee -a $LOGGFILE -service mongod start -if [ $? -eq 0 ];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Mongodb service started.." 2>&1 | tee -a $LOGGFILE -elif [ $? -eq 1 ];then - sed 's/.*deamon.*/new/g' /etc/init.d/mongod - service mongod restart - -else - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in starting Mongodb service.." 2>&1 | tee -a $LOGGFILE - exit 1 - -fi -exit 0 From 68ba2e244a25307a7f9f0e03cfe59d9d212b9440 Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 16 Dec 2014 11:23:39 +0530 Subject: [PATCH 21/24] Delete install_openvz.sh~ --- scripts/install_openvz.sh~ | 76 -------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 scripts/install_openvz.sh~ diff --git a/scripts/install_openvz.sh~ b/scripts/install_openvz.sh~ deleted file mode 100644 index bb509ac..0000000 --- a/scripts/install_openvz.sh~ +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# Script to setup OpenVZ repo, install and configure - -meta_dir="../meta" -vz_template_file="ubuntu-12.04-custom-x86_64.tar.gz" - - -cd $meta_dir -echo "[[$DATE:: $0 :: Line $LINENO::]] Downloading $vz_template_file file to $meta_dir directory" 2>&1 | tee -a $LOGGFILE -echo "" -wget http://community.virtual-labs.ac.in/downloads/ubuntu-12.04-custom-x86_64.tar.gz -if [[ $? -ne 0 ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Downloading $vz_template_file file to $meta_dir directory.." 2>&1 | tee -a $LOGGFILE -fi - -#wget -P /etc/yum.repos.d/ http://ftp.openvz.org/openvz.repo -echo "[$DATE:: $0 :: Line $LINENO::]] copying openvz.repo into /etc/yum/repos.d/" 2>&1 | tee -a $LOGGFILE -cp $meta_dir/openvz.repo /etc/yum.repos.d/openvz.repo - -echo "[$DATE:: $0 :: Line $LINENO::]] Importing RPM-GPG-Key for openvz.." 2>&1 | tee -a $LOGGFILE -rpm --import http://ftp.openvz.org/RPM-GPG-Key-OpenVZ - -echo "[[$DATE:: $0 :: Line $LINENO::]] Installing the OpenVZ kernel.." 2>&1 | tee -a $LOGGFILE -yum -y install vzkernel -if [[ $? -ne 0 ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Installing the OpenVZ kernel...." 2>&1 | tee -a $LOGGFILE - exit 1 -fi - -echo "[[$DATE:: $0 :: Line $LINENO::]] Configuring OpenVZ.." 2>&1 | tee -a $LOGGFILE -cat $meta_dir/updated_sysctl.conf >> /etc/sysctl.conf -echo "SELINUX=disabled" > /etc/sysconfig/selinux -echo "[[$DATE:: $0 :: Line $LINENO::]] Disabled SELINUX.." 2>&1 | tee -a $LOGGFILE - -echo "[[$DATE:: $0 :: Line $LINENO::]] Installing OpenVZ tools.." 2>&1 | tee -a $LOGGFILE -yum -y install vzctl vzquota ploop vzstats -if [[ $? -ne 0 ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Installing the OpenVZ tools...." 2>&1 | tee -a $LOGGFILE - exit 1 -fi - -if [[ ! -f $meta_dir/$vz_template_file ]]; then - echo "" - echo "[[$DATE:: $0 :: Line $LINENO::]] VZ OS template file not found!" 2>&1 | tee -a $LOGGFILE - echo "Please obtain an VZ OS template image and manually" - echo "copy that into /vz/template/cache folder." - echo "Failing the above step will result in OVPL not working." - echo "Please contact VLEAD for further clarifications." -else - - echo "[[$DATE:: $0 :: Line $LINENO::]] Copying the default OS template for containers....." 2>&1 | tee -a $LOGGFILE - cp $meta_dir/$vz_template_file /vz/template/cache -fi - -# Not needed!? Not sure. -echo "[[$DATE:: $0 :: Line $LINENO::]] Allowing multiple subnets to reside on the same network interface.." 2>&1 | tee -a $LOGGFILE -sed -i 's/#NEIGHBOUR_DEVS=all/NEIGHBOUR_DEVS=all/g' /etc/vz/vz.conf -sed -i 's/#NEIGHBOUR_DEVS=detect/NEIGHBOUR_DEVS=all/g' /etc/vz/vz.conf - -echo "[[$DATE:: $0 :: Line $LINENO::]] Setting container layout to default to ploop (VM in a file).." 2>&1 | tee -a $LOGGFILE -sed -i 's/VE_LAYOUT=simfs/VE_LAYOUT=ploop/g' /etc/vz/vz.conf - -echo "[[$DATE:: $0 :: Line $LINENO::]] Setting Ubuntu 12.04 64bit to be the default template.." 2>&1 | tee -a $LOGGFILE -sed -i 's/centos-6-x86/ubuntu-12.04-x86_64/g' /etc/vz/vz.conf -# -#sysctl -p -# -#echo "Disabling iptables.." -#/etc/init.d/iptables stop && chkconfig iptables off -echo "[[$DATE:: $0 :: Line $LINENO::]] Setting iptables" 2>&1 | tee -a $LOGGFILE -iptables -F FORWARD -echo "[[$DATE:: $0 :: Line $LINENO::]] Saving iptables" 2>&1 | tee -a $LOGGFILE -service iptables save -echo "[[$DATE:: $0 :: Line $LINENO::]] Finished installing OpenVZ" 2>&1 | tee -a $LOGGFILE - -exit 0 From 5c7599d465c9c81b2f324907013d21bf04811e3d Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 16 Dec 2014 11:23:50 +0530 Subject: [PATCH 22/24] Delete install_ovpl.sh~ --- scripts/install_ovpl.sh~ | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 scripts/install_ovpl.sh~ diff --git a/scripts/install_ovpl.sh~ b/scripts/install_ovpl.sh~ deleted file mode 100644 index 4396865..0000000 --- a/scripts/install_ovpl.sh~ +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -cd /root - -if [ ! -d "ovpl" ];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE - git clone https://github.com/vlead/ovpl.git - if [ $? -eq 0 ] - then - echo "[[$DATE:: $0 :: Line $LINENO::]] Finished Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE - else - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in Cloning https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE - exit 1 - fi -else - echo "[[$DATE:: $0 :: Line $LINENO::]] Pulling ovpl from origin master" 2>&1 | tee -a $LOGGFILE - cd ovpl/ - git pull origin master - echo "[[$DATE:: $0 :: Line $LINENO::]] finished pulling https://github.com/vlead/ovpl.git into /root/" 2>&1 | tee -a $LOGGFILE - echo "[[$DATE:: $0 :: Line $LINENO::]] Checking out version v1.0.0 .." 2>&1 | tee -a $LOGGFILE - git checkout tags/v1.0.0 - -fi -cd ovpl -echo "[[$DATE:: $0 :: Line $LINENO::]] Running 'python setup.py install' to install pre-requisites for run ovpl " 2>&1 | tee -a $LOGGFILE -python setup.py install -if [[ $? -ne 0 ]];then - echo "[[$DATE:: $0 :: Line $LINENO::]] Error in installing 'python setup.py install' " 2>&1 | tee -a $LOGGFILE - exit 1 - -else - echo "[[$DATE:: $0 :: Line $LINENO::]] Finished installing ovpl" 2>&1 | tee -a $LOGGFILE - -fi -exit 0 From adee372fb086607d1b4f9d13acc7c1aad1028854 Mon Sep 17 00:00:00 2001 From: ksripathi Date: Tue, 16 Dec 2014 11:24:24 +0530 Subject: [PATCH 23/24] Update config.sh --- scripts/config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/config.sh b/scripts/config.sh index fa79592..1d46944 100755 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -4,10 +4,10 @@ # E.g., # Note the port number after the second (:). -export http_proxy="proxy.iiit.ac.in:8080" +export http_proxy="" #set your https proxy. Similar to the above. -export https_proxy="proxy.iiit.ac.in:8080" +export https_proxy="" #Loggfile name export LOGFILE="setup-ovpl.log" From c84d6ede8af20e482f7cf7cdaafa64b3915e6187 Mon Sep 17 00:00:00 2001 From: sripathi Date: Tue, 16 Dec 2014 11:48:14 +0530 Subject: [PATCH 24/24] addef few lines to centos_prepare_ovpl.sh file --- scripts/centos_prepare_ovpl.sh | 12 ++++++-- scripts/setup-ovpl.log | 53 +++++++++++----------------------- 2 files changed, 26 insertions(+), 39 deletions(-) diff --git a/scripts/centos_prepare_ovpl.sh b/scripts/centos_prepare_ovpl.sh index f01b035..6449a6d 100755 --- a/scripts/centos_prepare_ovpl.sh +++ b/scripts/centos_prepare_ovpl.sh @@ -35,16 +35,22 @@ fi if [[ $UID -ne 0 ]]; then echo "" echo "$0 must be run as root!" - echo "Exiting.." + echo "[[$DATE:: $0 :: Line $LINENO::]] $0 must be run as root...." 2>&1 | tee -a $LOGFILE + echo "check log file exiting...." exit 1 + +else + echo "[[$DATE:: $0 :: Line $LINENO::]] Started Invoking centos_prepare_ovpl.sh...." 2>&1 | tee -a $LOGFILE + fi # check if meta directory exists if [[ ! -d "../meta" ]]; then echo "" - echo "You don't have the necessary files." - echo "Please contact the author of the script." + echo "[[$DATE:: $0 :: Line $LINENO::]] You don't have the necessary files please contact the author of the script...." 2>&1 | tee -a $LOGFILE + echo "Check log file exiting...." exit 1 + fi #updating system diff --git a/scripts/setup-ovpl.log b/scripts/setup-ovpl.log index d0f7ee4..119efee 100644 --- a/scripts/setup-ovpl.log +++ b/scripts/setup-ovpl.log @@ -1,36 +1,17 @@ -[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 53::]] Updating System.... -[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 60::]] System updation complete.. -[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 66::]] Invoking install_dependencies.sh -[[Tue Dec 16 10:59:51 IST 2014:: ./install_dependencies.sh :: Line 6::]] Setting up EPEL repo.. -[[Tue Dec 16 10:59:51 IST 2014:: ./install_dependencies.sh :: Line 9::]] Installing dependencies.. -[[Tue Dec 16 10:59:51 IST 2014:: ./install_dependencies.sh :: Line 10::]] Running yum -y install gcc python-devel.x86_64 python-pip openssh-clients openssh-server git -[[Tue Dec 16 10:59:51 IST 2014:: ./install_dependencies.sh :: Line 16::]] Completed installation of gcc python-devel.x86_64 python-pip openssh-clients openssh-server git -[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 76::]] successfully installed dependencies... -[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 85::]] Invoking install_openvz.sh -[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 95::]] successfully installed openvz... -[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 105::]] Invoking install_mongodb.sh -[[Tue Dec 16 11:01:15 IST 2014:: ./install_mongodb.sh :: Line 8::]] Setting up MongoDB repo.... -[[Tue Dec 16 11:01:15 IST 2014:: ./install_mongodb.sh :: Line 11::]] Installing MongoDB...... -[[Tue Dec 16 11:01:15 IST 2014:: ./install_mongodb.sh :: Line 18::]] Starting mongod service.. -[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 116::]] successfully installed mongodb... -[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 125::]] Invoking install_ovpl.sh -[[Tue Dec 16 10:59:51 IST 2014:: ./centos_prepare_ovpl.sh :: Line 137::]] Congrats! You have setup OVPL successfully!!! :-) -[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 12::]] export http_proxy = proxy.iiit.ac.in:8080 -[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 16::]] export https_proxy = proxy.iiit.ac.in:8080 -[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 53::]] Updating System.... -[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 60::]] System updation complete.. -[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 66::]] Invoking install_dependencies.sh -[[Tue Dec 16 11:03:38 IST 2014:: ./install_dependencies.sh :: Line 6::]] Setting up EPEL repo.. -[[Tue Dec 16 11:03:38 IST 2014:: ./install_dependencies.sh :: Line 9::]] Installing dependencies.. -[[Tue Dec 16 11:03:38 IST 2014:: ./install_dependencies.sh :: Line 10::]] Running yum -y install gcc python-devel.x86_64 python-pip openssh-clients openssh-server git -[[Tue Dec 16 11:03:38 IST 2014:: ./install_dependencies.sh :: Line 16::]] Completed installation of gcc python-devel.x86_64 python-pip openssh-clients openssh-server git -[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 76::]] successfully installed dependencies... -[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 85::]] Invoking install_openvz.sh -[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 95::]] successfully installed openvz... -[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 105::]] Invoking install_mongodb.sh -[[Tue Dec 16 11:04:37 IST 2014:: ./install_mongodb.sh :: Line 8::]] Setting up MongoDB repo.... -[[Tue Dec 16 11:04:37 IST 2014:: ./install_mongodb.sh :: Line 11::]] Installing MongoDB...... -[[Tue Dec 16 11:04:37 IST 2014:: ./install_mongodb.sh :: Line 18::]] Starting mongod service.. -[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 116::]] successfully installed mongodb... -[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 125::]] Invoking install_ovpl.sh -[[Tue Dec 16 11:03:38 IST 2014:: ./centos_prepare_ovpl.sh :: Line 137::]] Congrats! You have setup OVPL successfully!!! :-) +[[Tue Dec 16 11:25:53 IST 2014:: ./centos_prepare_ovpl.sh :: Line 53::]] Updating System.... +[[Tue Dec 16 11:25:53 IST 2014:: ./centos_prepare_ovpl.sh :: Line 60::]] System updation complete.. +[[Tue Dec 16 11:25:53 IST 2014:: ./centos_prepare_ovpl.sh :: Line 66::]] Invoking install_dependencies.sh +[[Tue Dec 16 11:25:53 IST 2014:: ./install_dependencies.sh :: Line 6::]] Setting up EPEL repo.. +[[Tue Dec 16 11:25:53 IST 2014:: ./install_dependencies.sh :: Line 9::]] Installing dependencies.. +[[Tue Dec 16 11:25:53 IST 2014:: ./install_dependencies.sh :: Line 10::]] Running yum -y install gcc python-devel.x86_64 python-pip openssh-clients openssh-server git +[[Tue Dec 16 11:25:53 IST 2014:: ./install_dependencies.sh :: Line 16::]] Completed installation of gcc python-devel.x86_64 python-pip openssh-clients openssh-server git +[[Tue Dec 16 11:25:53 IST 2014:: ./centos_prepare_ovpl.sh :: Line 76::]] successfully installed dependencies... +[[Tue Dec 16 11:25:53 IST 2014:: ./centos_prepare_ovpl.sh :: Line 85::]] Invoking install_openvz.sh +[[Tue Dec 16 11:25:53 IST 2014:: ./centos_prepare_ovpl.sh :: Line 95::]] successfully installed openvz... +[[Tue Dec 16 11:25:53 IST 2014:: ./centos_prepare_ovpl.sh :: Line 105::]] Invoking install_mongodb.sh +[[Tue Dec 16 11:27:22 IST 2014:: ./install_mongodb.sh :: Line 8::]] Setting up MongoDB repo.... +[[Tue Dec 16 11:27:22 IST 2014:: ./install_mongodb.sh :: Line 11::]] Installing MongoDB...... +[[Tue Dec 16 11:27:22 IST 2014:: ./install_mongodb.sh :: Line 18::]] Starting mongod service.. +[[Tue Dec 16 11:25:53 IST 2014:: ./centos_prepare_ovpl.sh :: Line 116::]] successfully installed mongodb... +[[Tue Dec 16 11:25:53 IST 2014:: ./centos_prepare_ovpl.sh :: Line 125::]] Invoking install_ovpl.sh +[[Tue Dec 16 11:25:53 IST 2014:: ./centos_prepare_ovpl.sh :: Line 137::]] Congrats! You have setup OVPL successfully!!! :-)