Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

initial cento6/E3-devel faststart

  • Loading branch information...
commit 2c13e5769ff975d377dd577c45b46428d404ce49 1 parent 2d1a52d
@dkavanagh dkavanagh authored
View
0  centos/cloudvalidator.sh → centos5/cloudvalidator.sh
File renamed without changes
View
0  centos/eucalyptus.conf → centos5/eucalyptus.conf
File renamed without changes
View
0  centos/fastinstall.sh → centos5/fastinstall.sh
File renamed without changes
View
0  centos/imageinstall.sh → centos5/imageinstall.sh
File renamed without changes
View
0  centos/libvirtd.conf → centos5/libvirtd.conf
File renamed without changes
View
0  centos/stdpackages.tar.gz → centos5/stdpackages.tar.gz
File renamed without changes
View
112 centos6/cloudvalidator.sh
@@ -0,0 +1,112 @@
+#!/bin/bash
+#
+# Copyright (c) 2011 Eucalyptus Systems, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, only version 3 of the License.
+#
+#
+# This file is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Please contact Eucalyptus Systems, Inc., 6755 Hollister Ave.
+# Goleta, CA 93117 USA or visit <http://www.eucalyptus.com/licenses/>
+# if you need additional information or have any questions.
+#
+
+export LOGFILE=/var/log/cloudvalidator.log
+
+function error_check {
+ count=`grep -i 'error\|fail\|exception' $LOGFILE|wc -l`
+ if [ $count -gt "0" ]
+ then
+ echo "An error occured in the last step, look at $LOGFILE for more details"
+ exit -1;
+ fi
+}
+
+#save old log file
+if [ -f $LOGFILE ]
+then
+ if [ -f $LOGFILE.bak ]
+ then
+ rm $LOGFILE.bak
+ fi
+ mv $LOGFILE $LOGFILE.bak
+ touch $LOGFILE
+fi
+
+count=`$EUCALYPTUS/usr/sbin/euca_conf --list-walruses|wc -l`
+if [ $count -eq "0" ]
+then
+ echo "No walrus registered!"
+ fail=true
+fi
+
+count=`$EUCALYPTUS/usr/sbin/euca_conf --list-clusters|wc -l`
+if [ $count -eq "0" ]
+then
+ echo "No cluster controllers registered!"
+ fail=true
+fi
+
+count=`$EUCALYPTUS/usr/sbin/euca_conf --list-scs|wc -l`
+if [ $count -eq "0" ]
+then
+ echo "No storage controllers registered!"
+ fail=true
+fi
+
+# because the cc doesn't always see the ncs right away, we'll do a retry loop
+# till we do, or a time elapses (5 minutes seems safe)
+retries=0;
+while [ `$EUCALYPTUS/usr/sbin/euca_conf --list-nodes|wc -l` -eq "0" ]
+do
+ echo "No node controllers found, retrying."
+ sleep 15
+ retries=$(($retries + 1))
+ if [ $retries -eq 20 ]
+ then
+ fail=true
+ break
+ fi
+done
+
+INSTALL_DIR=`pwd`
+cd /root
+echo "$(date)- Downloading admin credentials and checking configuration" |tee -a $LOGFILE
+euca_conf --get-credentials credentials.zip >>$LOGFILE 2>&1
+jar xf credentials.zip >>$LOGFILE 2>&1
+source eucarc >>$LOGFILE 2>&1
+# loop and retry on this as well. compute resources should come on-line in a minute or less
+retries=0;
+while [ `euca-describe-availability-zones verbose |grep m1.small | awk '{ print $4; }'` -eq "0" ]
+do
+ echo "No compute resource, retrying."
+ sleep 15
+ retries=$(($retries + 1))
+ if [ $retries -eq 20 ]
+ then
+ fail=true
+ break
+ fi
+done
+
+if [ $fail ]
+then
+ echo "A configuration problem was detected. Please investigate and to re-run"
+ echo "this check and to load a default image, run "./cloudvalidator.sh" from"
+ echo "the usb drive."
+ exit -1
+fi
+
+echo "$(date)- Configuration checks out!" |tee -a $LOGFILE
+echo "$(date)- Loading default image" |tee -a $LOGFILE
+$INSTALL_DIR/imageinstall.sh $INSTALL_DIR/euca-centos-2012.1.14-x86_64.tgz admin
+echo "$(date)- Loaded default image" |tee -a $LOGFILE
View
38 centos6/elrepo.repo
@@ -0,0 +1,38 @@
+### Name: ELRepo.org Community Enterprise Linux Repository for el6
+### URL: http://elrepo.org/
+
+[elrepo]
+name=ELRepo.org Community Enterprise Linux Repository - el6
+baseurl=http://elrepo.org/linux/elrepo/el6/$basearch/
+mirrorlist=http://elrepo.org/mirrors-elrepo.el6
+enabled=1
+gpgcheck=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org
+protect=0
+
+[elrepo-testing]
+name=ELRepo.org Community Enterprise Linux Testing Repository - el6
+baseurl=http://elrepo.org/linux/testing/el6/$basearch/
+mirrorlist=http://elrepo.org/mirrors-elrepo-testing.el6
+enabled=0
+gpgcheck=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org
+protect=0
+
+[elrepo-kernel]
+name=ELRepo.org Community Enterprise Linux Kernel Repository - el6
+baseurl=http://elrepo.org/linux/kernel/el6/$basearch/
+mirrorlist=http://elrepo.org/mirrors-elrepo-kernel.el6
+enabled=0
+gpgcheck=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org
+protect=0
+
+[elrepo-extras]
+name=ELRepo.org Community Enterprise Linux Repository - el6
+baseurl=http://elrepo.org/linux/extras/el6/$basearch/
+mirrorlist=http://elrepo.org/mirrors-elrepo-extras.el6
+enabled=0
+gpgcheck=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org
+protect=0
View
26 centos6/epel-testing.repo
@@ -0,0 +1,26 @@
+[epel-testing]
+name=Extra Packages for Enterprise Linux 6 - Testing - $basearch
+#baseurl=http://download.fedoraproject.org/pub/epel/testing/6/$basearch
+mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-epel6&arch=$basearch
+failovermethod=priority
+enabled=0
+gpgcheck=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
+
+[epel-testing-debuginfo]
+name=Extra Packages for Enterprise Linux 6 - Testing - $basearch - Debug
+#baseurl=http://download.fedoraproject.org/pub/epel/testing/6/$basearch/debug
+mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-debug-epel6&arch=$basearch
+failovermethod=priority
+enabled=0
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
+gpgcheck=1
+
+[epel-testing-source]
+name=Extra Packages for Enterprise Linux 6 - Testing - $basearch - Source
+#baseurl=http://download.fedoraproject.org/pub/epel/testing/6/SRPMS
+mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-source-epel6&arch=$basearch
+failovermethod=priority
+enabled=0
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
+gpgcheck=1
View
26 centos6/epel.repo
@@ -0,0 +1,26 @@
+[epel]
+name=Extra Packages for Enterprise Linux 6 - $basearch
+#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
+mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
+failovermethod=priority
+enabled=1
+gpgcheck=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
+
+[epel-debuginfo]
+name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
+#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
+mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch
+failovermethod=priority
+enabled=0
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
+gpgcheck=1
+
+[epel-source]
+name=Extra Packages for Enterprise Linux 6 - $basearch - Source
+#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS
+mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
+failovermethod=priority
+enabled=0
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
+gpgcheck=1
View
14 centos6/euca.repo
@@ -0,0 +1,14 @@
+[eucalyptus-devel]
+name=Eucalyptus Devel
+baseurl=http://downloads.eucalyptus.com/devel/packages/3-devel/nightly/centos/$releasever/$basearch
+gpgcheck=0
+
+[eucalyptus-deps]
+name=Eucalyptus deps
+baseurl=http://downloads.eucalyptus.com/devel/packages/3-devel/centos/6/x86_64/
+gpgcheck=0
+
+[eucalyptus-deps2]
+name=Eucalyptus deps2
+baseurl=http://yum.pgrpms.org/9.1/redhat/rhel-6-x86_64/
+gpgcheck=0
View
237 centos6/eucalyptus.conf
@@ -0,0 +1,237 @@
+# supplied by fastinstall.sh
+###########################################################################
+# GLOBAL CONFIGURATION
+###########################################################################
+
+# Where Eucalyptus is installed
+EUCALYPTUS="/"
+
+# This is the username that you would like eucalyptus to run as
+EUCA_USER="eucalyptus"
+
+# Extra options to pass to the eucalyptus-cloud process, such as log
+# levels, heap size, or other JVM flags.
+CLOUD_OPTS=""
+
+###########################################################################
+# STORAGE CONTROLLER (SC) CONFIGURATION
+###########################################################################
+
+# The number of loop devices to make available at SC startup time.
+# The default is 256. If you supply "max_loop" to the loop driver
+# then this setting must be equal to that number.
+CREATE_SC_LOOP_DEVICES=256
+
+###########################################################################
+# CLUSTER CONTROLLER (CC) / NODE CONTROLLER (NC) SHARED CONFIGURATION
+###########################################################################
+
+# The level of logging output. Valid settings are, in descending order of
+# verbosity, DEBUG, INFO, WARN, ERROR, and FATAL. The default is DEBUG.
+LOGLEVEL="DEBUG"
+
+# The number of old log files to keep when rotating logs. The default
+# is 4.
+#LOGROLLNUMBER="4"
+
+# On a NC, this defines the TCP port on which the NC will listen.
+# On a CC, this defines the TCP port on which the CC will contact NCs.
+NC_PORT="8775"
+
+###########################################################################
+# CLUSTER CONTROLLER (CC) CONFIGURATION
+###########################################################################
+
+# The TCP port on which the CC will listen.
+CC_PORT="8774"
+
+# The scheduling policy that the CC uses to choose the NC on which to
+# run each new instance. Valid settings include GREEDY and ROUNDROBIN.
+# The default scheduling policy is ROUNDROBIN.
+SCHEDPOLICY="ROUNDROBIN"
+
+# A space-separated list of IP addresses for all the NCs that this CC
+# should communicate with. The ``euca_conf --register-nodes'' command
+# manipulates this setting.
+NODES=""
+
+# When multiple CCs reside in the same layer 2 broadcast domain, change
+# this setting to "Y" to disable tunneling. This setting has no effect
+# in Static or System modes.
+#DISABLE_TUNNELING="N"
+
+# The location of the NC service. The default is
+# axis2/services/EucalyptusNC
+NC_SERVICE="axis2/services/EucalyptusNC"
+
+# Set this to make the CC cache images, kernels and ramdisks. NCs must
+# be able to reach the CC with the specified value.
+#CC_IMAGE_PROXY="ip_of_cc"
+
+# Set this to the location where the CC image proxy should store cached
+# images. The default is /var/lib/eucalyptus/dynserv/
+#CC_IMAGE_PROXY_PATH="/var/lib/eucalyptus/dynserv/"
+
+# Set this to the maximum size (in megabytes) of the CC image proxy cache.
+# The default is 32768, or 32 gigabytes.
+#CC_IMAGE_PROXY_CACHE_SIZE="32768"
+
+###########################################################################
+# NODE CONTROLLER (NC) CONFIGURATION
+###########################################################################
+
+# The hypervisor that the NC will interact with in order to manage
+# virtual machines. Supported values include "kvm" and "xen".
+HYPERVISOR="kvm"
+
+# The following three options determine whether KVM uses Virtio for
+# specific types of I/O with instances. These options only affect the
+# KVM hypervisor.
+
+# If "1", use Virtio for the root file system
+USE_VIRTIO_ROOT="0"
+
+# If "1", use Virtio for dynamic block volumes
+USE_VIRTIO_DISK="1"
+
+# If "1", use Virtio for the network card
+USE_VIRTIO_NET="1"
+
+# The amount of memory, in megabytes, that Eucalyptus is allowed to
+# allocate to instances running on this system. The default value of
+# 0 allows Eucalyptus to use all available memory for instances.
+#MAX_MEM="0"
+
+# The number of virtual CPU cores that Eucalyptus is allowed to allocate
+# to instances. The default value of 0 allows Eucalyptus to use all
+# CPU cores on the system.
+#MAX_CORES="0"
+
+# The amount of disk space, in megabytes, that the NC is allowed to use
+# in its work directory ($INSTANCE_PATH/eucalyptus/work). By default
+# the NC chooses automatically. Values below 10 are ignored.
+#NC_WORK_SIZE=50000
+
+# The amount of disk space, in megabytes, that the NC is allowed to use in
+# its image cache directory ($INSTANCE_PATH/eucalyptus/cache). By default
+# the NC chooses automatically. A value below 10 will disable caching.
+#NC_CACHE_SIZE=50000
+
+# The number of disk-intensive operations that the NC is allowed to
+# perform at once. A value of 1 serializes all disk-intensive operations.
+# The default value is 4.
+#CONCURRENT_DISK_OPS=4
+
+# By default, a NC attempts to write the SSH public key associated to
+# the instance's filesystem before the instance starts. A value of 1
+# disables this behavior.
+#DISABLE_KEY_INJECTION="0"
+
+# The number of loop devices to make available at NC startup time.
+# The default is 256. If you supply "max_loop" to the loop driver then
+# this setting must be equal to that number.
+CREATE_NC_LOOP_DEVICES=256
+
+# The directory where the NC will store instances' root filesystems,
+# ephemeral storage, and cached copies of images.
+INSTANCE_PATH="/opt/eucalyptus/instances"
+
+# If euca-bundle-upload, euca-check-bucket, or euca-delete-bundle do
+# not appear in the NC's search PATH then specify their locations here.
+#NC_BUNDLE_UPLOAD_PATH="/usr/bin/euca-bundle-upload"
+#NC_CHECK_BUCKET_PATH="/usr/bin/euca-check-bucket"
+#NC_DELETE_BUNDLE_PATH="/usr/bin/euca-delete-bundle"
+
+###########################################################################
+# NETWORKING CONFIGURATION
+#
+# The set of networking settings that apply to a cloud varies based on
+# its networking mode. Each setting in this section lists the modes in
+# which it applies. Unless otherwise noted, all of these settings apply
+# only to CCs. All settings that lack default values must be specified
+# in the networking modes that use them.
+###########################################################################
+
+# The networking mode in which to run. The same mode must be specified
+# on all CCs and NCs in the entire cloud. Valid values include SYSTEM,
+# STATIC, MANAGED, and MANAGED-NOVLAN.
+#VNET_MODE="SYSTEM"
+
+# The name of the network interface that is on the same network as
+# the NCs. In Managed and Managed (No VLAN) modes this may need to be
+# a bridge. The default is "eth0".
+# Networking modes: Static, Managed, Managed (No VLAN)
+VNET_PRIVINTERFACE="em1"
+
+# On a CC, this is the name of the network interface that is connected
+# to the "public" network. The default is "eth0".
+# Networking modes: Managed, Managed (No VLAN)
+#
+# On an NC, this is the name of the network interface that is connected
+# to the same network as the CC. Depending on the hypervisor's
+# configuration, this may be a bridge or a physical interface that is
+# attached to the bridge. The default is "eth0".
+# Networking modes: Managed
+VNET_PUBINTERFACE="em1"
+
+# On an NC, this is the name of the bridge interface to which instances'
+# network interfaces should attach. A physical interface that can reach
+# the CC must be attached to this bridge.
+# Networking modes: System, Static, Managed (No VLAN)
+VNET_BRIDGE="br0"
+
+# A map of MAC addresses to IP addresses that Eucalyptus should allocate
+# to instances when running in Static mode. Separate MAC addresses and
+# IP addresses with '=' characters. Separate pairs with spaces.
+# Networking modes: Static
+#VNET_MACMAP="AA:DD:11:CE:FF:ED=192.168.1.2 AA:DD:11:CE:FF:EE=192.168.1.3"
+
+# A space-separated list of individual and/or hyphenated ranges of public
+# IP addresses to assign to instances.
+# Networking modes: Managed, Managed (No VLAN)
+#VNET_PUBLICIPS="your-free-public-ip-1 your-free-public-ip-2 ..."
+
+# The address and network mask of the network the cloud should use for
+# instances' private IP addresses.
+# Networking modes: Static, Managed, Managed (No VLAN)
+#VNET_SUBNET="192.168.0.0"
+#VNET_NETMASK="255.255.0.0"
+
+# The number of IP addresses to allocate to each security group.
+# Specify a power of 2 between 16 and 2048.
+# Networking modes: Managed, Managed (No VLAN)
+#VNET_ADDRSPERNET="32"
+
+# The address of the DNS server to supply to instances in DHCP responses.
+# Networking modes: Static, Managed, Managed (No VLAN)
+#VNET_DNS="your-dns-server-ip"
+
+# The network broadcast address and default gateway to supply to instances
+# in DHCP responses.
+# Networking modes: Static
+#VNET_BROADCAST="192.168.1.255"
+#VNET_ROUTER="192.168.1.1"
+
+# Set this to the IP address that other CCs can use to reach this CC
+# if layer 2 tunneling between CCs does not work. It is not normally
+# necessary to change this setting.
+# Networking modes: Managed, Managed (No VLAN)
+#VNET_LOCALIP="your-public-interface's-ip"
+
+# The ISC DHCP server executable to use. The default is
+# "/usr/sbin/dhcpd3".
+# Networking modes: Static, Managed, Managed (No VLAN)
+VNET_DHCPDAEMON="/usr/sbin/dhcpd41"
+
+# The user as which the DHCP daemon runs on your distribution.
+# The default is "dhcpd".
+# Networking modes: Static, Managed, Managed (No VLAN)
+#VNET_DHCPUSER="dhcpd"
+
+VNET_MODE="MANAGED-NOVLAN"
+VNET_SUBNET="192.168.0.0"
+VNET_NETMASK="255.255.0.0"
+VNET_DNS="?.?.?.?"
+VNET_ADDRSPERNET="32"
+VNET_PUBLICIPS="?.?.?.?-?.?.?.?"
+
View
341 centos6/fastinstall.sh
@@ -0,0 +1,341 @@
+#!/bin/bash
+#
+# Copyright (c) 2011 Eucalyptus Systems, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, only version 3 of the License.
+#
+#
+# This file is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Please contact Eucalyptus Systems, Inc., 6755 Hollister Ave.
+# Goleta, CA 93117 USA or visit <http://www.eucalyptus.com/licenses/>
+# if you need additional information or have any questions.
+#
+
+export VERSION=3-devel
+export ARCH=x86_64
+export CLUSTER_NAME=PARTI00
+export LOGFILE=/var/log/fastinstall.log
+
+function error_check {
+ count=`grep -i 'error\|fail\|exception' $LOGFILE|wc -l`
+ if [ $count -gt "0" ]
+ then
+ echo "An error occured in the last step, look at $LOGFILE for more details"
+ exit -1;
+ fi
+}
+
+# params: prop_name, prompt, file, optional-regex
+function edit_prop {
+ prop_line=`grep $1 $3|tail -1`
+ prop_value=`echo $prop_line |cut -d '=' -f 2|tr -d "\""`
+ new_value=$prop_value
+ done="n"
+ while [ $done = "n" ]
+ do
+ read -p "$2 [$prop_value] " value
+ if [ $value ]
+ then
+ if [ $4 ]
+ then
+ if [ `echo $value |grep $4` ]
+ then
+ new_value=$value
+ else
+ echo \"$value\" doesn\'t match the pattern, please refer to the previous value for input format.
+ fi
+ else
+ new_value=$value
+ fi
+ if [ $new_value = $value ]
+ then
+ sed -i.bak "s/$1=\"$prop_value\"/$1=\"$new_value\"/g" $3
+ done="y"
+ fi
+ else
+ done="y"
+ fi
+ done
+}
+
+main="y"
+
+echo "Welcome to the Euclayptus 3.1 Installer"
+echo ""
+read -p "Will this be the front-end server in your cloud? [Y|n]" main_node
+if [ $main_node -a $main_node = "n" ]
+then
+ main="n"
+ echo "A node controller will be installed"
+else
+ echo "A cloud controller, cluster controller, walrus and storage controller will be installed"
+fi
+
+#save old log file
+if [ -f $LOGFILE ]
+then
+ if [ -f $LOGFILE.bak ]
+ then
+ rm $LOGFILE.bak
+ fi
+ mv $LOGFILE $LOGFILE.bak
+ touch $LOGFILE
+fi
+
+#for all
+echo "$(date)- Installing ntp and other regular packages" |tee -a $LOGFILE
+#create local yum repo
+INSTALL_DIR=`pwd`
+cd /tmp
+tar zxvf $INSTALL_DIR/eucalyptus3.tgz >>$LOGFILE 2>&1
+cd $INSTALL_DIR
+mkdir /etc/yum.repos.d/bak >>$LOGFILE 2>&1
+mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak/ >>$LOGFILE 2>&1
+cat <<EOF> /etc/yum.repos.d/localfiles.repo
+[euca-itself]
+name=Eucalyptus Standard Packages
+baseurl=file:///tmp/pkgs/
+enabled=1
+gpgcheck=0
+EOF
+
+yum install -y ntp >>$LOGFILE 2>&1
+ntpdate pool.ntp.org >>$LOGFILE 2>&1
+# loop devices now handled by sc
+#echo "options loop max_loop=256" >> /etc/modprobe.d/loop.conf 2>$LOGFILE
+#rmmod loop ; modprobe loop max_loop=256 >>$LOGFILE 2>&1
+#yum install -y java-1.6.0-openjdk dhcp bridge-utils perl-Convert-ASN1.noarch scsi-target-utils httpd rsync vconfig wget which iptables curl swig >>$LOGFILE 2>&1
+error_check
+echo "$(date)- Installed ntp and other regular packages" |tee -a $LOGFILE
+
+#if NC
+if [ $main = "n" ]
+then
+ echo "$(date)- Installing kvm" |tee -a $LOGFILE
+# yum install -y kvm >>$LOGFILE 2>&1
+# sed --in-place 's/#(xend-http-server no)/(xend-http-server yes)/' /etc/xen/xend-config.sxp >>$LOGFILE 2>&1
+# sed --in-place 's/#(xend-address localhost)/(xend-address localhost)/' /etc/xen/xend-config.sxp >>$LOGFILE 2>&1
+# /etc/init.d/xend restart >>$LOGFILE 2>&1
+# error_check
+ echo "$(date)- Installed kvm" |tee -a $LOGFILE
+fi
+
+#for all
+# disable selinux
+echo "$(date)- Disabling selinux" |tee -a $LOGFILE
+if [ -f /etc/sysconfig/system-config-securitylevel ]
+then
+ sed --in-place=.bak 's/enabled/disabled/g' /etc/sysconfig/system-config-securitylevel >>$LOGFILE 2>&1
+else
+ FILE=/etc/sysconfig/system-config-securitylevel
+ echo # Configuration file for system-config-securitylevel > $FILE
+ echo --disabled >> $FILE
+ echo --port=8773:tcp >> $FILE
+ echo --port=8443:tcp >> $FILE
+ echo --port=8774:tcp >> $FILE
+ echo --port=22:tcp >> $FILE
+ echo --port=80:tcp >> $FILE
+ echo --port=443:tcp >> $FILE
+fi
+sed --in-place=.bak 's/enforcing/disabled/g' /etc/sysconfig/selinux >>$LOGFILE 2>&1
+setenforce 0 >>$LOGFILE 2>&1
+error_check
+echo "$(date)- Disabled selinux" |tee -a $LOGFILE
+
+#if front end
+if [ $main = "y" ]
+then
+ echo "$(date)- Installing front-end server packages" |tee -a $LOGFILE
+# service tgtd start >>$LOGFILE 2>&1
+# chkconfig tgtd on
+ yum install -y eucalyptus-cloud eucalyptus-walrus eucalyptus-cc eucalyptus-sc euca2ools >>$LOGFILE 2>&1
+ error_check
+ echo "$(date)- Installed front-end server packages" |tee -a $LOGFILE
+fi
+
+#if NC
+if [ $main = "n" ]
+then
+ echo "$(date)- Installing compute node packages" |tee -a $LOGFILE
+ yum install -y eucalyptus-nc >>$LOGFILE 2>&1
+ error_check
+ echo "$(date)- Installed compute node packages" |tee -a $LOGFILE
+fi
+
+#set std yum repos back
+rm /etc/yum.repos.d/*.repo
+mv /etc/yum.repos.d/bak/*.repo /etc/yum.repos.d/
+# copy repo files to allow users to upgrade euca after install
+cp $INSTALL_DIR/*.repo /etc/yum.repos.d
+
+cd $INSTALL_DIR
+
+#if NC, configure libvirt
+if [ $main = "n" ]
+then
+ echo "$(date)- Configuring libvirt " |tee -a $LOGFILE
+# shouldn't need this anymore
+# echo "y" | cp -f libvirtd.conf /etc/libvirt/ >>$LOGFILE 2>&1
+ # add libvirt group
+ echo "libvirt:x:201:" >> /etc/group
+# won't see running domain with KVM
+# is_running=`su eucalyptus -c "virsh list" |grep Domain |awk '{ print $3 };'`
+# if [ $is_running ]
+# then
+# echo "libvirt configured" |tee -a $LOGFILE
+# else
+# echo "unable to find running virtual domain. check $LOGFILE" |tee -a $LOGFILE
+# exit -1;
+# fi
+#disable dnsmasq
+ service dnsmasq stop
+ chkconfig dnsmasq off
+ error_check
+ echo "$(date)- Configured libvirt " |tee -a $LOGFILE
+fi
+
+# copy our default eucalyptus.con
+# only copy if we haven't done this already. We'll take default value from there in case this
+# script is run a 2nd or 3rd time.
+count=`grep fastinstall /etc/eucalyptus/eucalyptus.conf|wc -l`
+if [ $count -eq "0" ]
+then
+ echo "y" | cp -f eucalyptus.conf /etc/eucalyptus/ >>$LOGFILE 2>&1
+fi
+
+#if front end
+if [ $main = "y" ]
+then
+ echo "We need some network information"
+ EUCACONFIG=/etc/eucalyptus/eucalyptus.conf
+ edit_prop VNET_PUBINTERFACE "The public ethernet interface" $EUCACONFIG
+ edit_prop VNET_PRIVINTERFACE "The private ethernet interface" $EUCACONFIG
+ edit_prop VNET_SUBNET "Eucalyptus-only dedicated subnet" $EUCACONFIG "[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}"
+ edit_prop VNET_NETMASK "Eucalyptus subnet netmask" $EUCACONFIG "[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}"
+ edit_prop VNET_DNS "The DNS server address" $EUCACONFIG "[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}"
+ SUBNET_VAL=`grep VNET_NETMASK $EUCACONFIG|tail -1|cut -d '=' -f 2|tr -d "\""`
+ ZERO_OCTETS=`echo $SUBNET_VAL |tr "." "\n" |grep 0 |wc -l`
+ ADDRSPER_REC=16
+ if [ $ZERO_OCTETS -eq "3" ] # class A subnet
+ then
+ ADDRSPER_REC=64
+ elif [ $ZERO_OCTETS -eq "2" ] # class B subnet
+ then
+ ADDRSPER_REC=32
+ elif [ $ZERO_OCTETS -eq "1" ] # class C subnet
+ then
+ ADDRSPER_REC=16
+ fi
+ echo "Based on the size of your private subnet, we recommend the next value be set to $ADDRSPER_REC"
+ edit_prop VNET_ADDRSPERNET "How many addresses per net?" $EUCACONFIG "[0-9]*"
+ edit_prop VNET_PUBLICIPS "The range of public IPs" $EUCACONFIG "[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}-[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}"
+ echo "$(date)- Initializing" |tee -a $LOGFILE
+ $EUCALYPTUS/usr/sbin/euca_conf --initialize
+ echo "$(date)- Starting services " |tee -a $LOGFILE
+ /etc/init.d/eucalyptus-cloud start >>$LOGFILE 2>&1
+ error_check
+ echo "$(date)- Started services " |tee -a $LOGFILE
+fi
+
+#if NC
+if [ $main = "n" ]
+then
+ # setup br0
+ cp ifcfg-br0 /etc/sysconfig/network-scripts
+ count=`grep BRIDGE /etc/sysconfig/network-sripts/ifcfg-em1|wc -l`
+ if [ $count -eq "0" ]
+ then
+ echo "BRIDGE=br0" >> /etc/sysconfig/network-scripts/ifcfg-em1
+ fi
+ service network restart
+ /etc/init.d/eucalyptus-nc start >>$LOGFILE 2>&1
+ error_check
+ /sbin/chkconfig eucalyptus-nc on >>$LOGFILE 2>&1
+ error_check
+ echo "This machines is running as a node controller."
+ echo "Now, you can install the front end or another node controller."
+fi
+
+if [ $main = "y" ]
+then
+ echo "$(date)- Registering components " |tee -a $LOGFILE
+ curl http://localhost:8443/ >/dev/null 2>&1
+ while [ $? -ne 0 ]
+ do
+ echo "waiting for cloud controller to start"
+ sleep 5
+ curl http://localhost:8443/ >/dev/null 2>&1
+ done
+ export EUCALYPTUS=/
+ export PUBLIC_IP_ADDRESS=`ip addr show em1 |grep inet |grep global|awk -F"[\t /]*" '{ print $3 }'`
+ #prompt for ip confirm
+ read -p "Public IP for this node [$PUBLIC_IP_ADDRESS]" public_ip
+ if [ $public_ip ]
+ then
+ export PUBLIC_IP_ADDRESS=$public_ip
+ fi
+ echo "using $PUBLIC_IP_ADDRESS to register components" |tee -a $LOGFILE
+# for i in `$EUCALYPTUS/usr/sbin/euca_conf --list-walruses|tail -n+2`
+# do
+# SVC_IP=`echo $i |awk '{ print $2 }'`
+# $EUCALYPTUS/usr/sbin/euca_conf --deregister-walrus $SVC_IP >>$LOGFILE 2>&1
+# done
+ if [ `$EUCALYPTUS/usr/sbin/euca_conf --list-walruses|tail -n+2|wc -l` -eq '0' ]
+ then
+ $EUCALYPTUS/usr/sbin/euca_conf --register-walrus -H $PUBLIC_IP_ADDRESS -C walrus -P walrus |tee -a $LOGFILE
+ else
+ echo "Walrus already registered. Will not re-register walrus" |tee -a $LOGFILE
+ fi
+
+ # deregister scs before clusters
+ for i in `$EUCALYPTUS/usr/sbin/euca_conf --list-scs|tail -n+2`
+ do
+ SVC_IP=`echo $i |awk '{ print $1 }'`
+ $EUCALYPTUS/usr/sbin/euca_conf --deregister-sc -H $SVC_IP >>$LOGFILE 2>&1
+ done
+ for i in `$EUCALYPTUS/usr/sbin/euca_conf --list-clusters|tail -n+2`
+ do
+ SVC_IP=`echo $i |awk '{ print $1 }'`
+ $EUCALYPTUS/usr/sbin/euca_conf --deregister-cluster -H $SVC_IP >>$LOGFILE 2>&1
+ done
+
+ # now register clusters before scs
+ $EUCALYPTUS/usr/sbin/euca_conf --register-cluster -P $CLUSTER_NAME -H $PUBLIC_IP_ADDRESS -C cc_01 |tee -a $LOGFILE
+
+ $EUCALYPTUS/usr/sbin/euca_conf --register-sc -P $CLUSTER_NAME -H $PUBLIC_IP_ADDRESS -C sc_01 |tee -a $LOGFILE
+ error_check
+
+ /etc/init.d/eucalyptus-cc start >>$LOGFILE 2>&1
+ for i in `$EUCALYPTUS/usr/sbin/euca_conf --list-nodes|tail -n+2`
+ do
+ SVC_IP=`echo $i |awk '{ print $2 }'`
+ $EUCALYPTUS/usr/sbin/euca_conf --deregister-nodes $SVC_IP >>$LOGFILE 2>&1
+ done
+ echo "Ready to register node controllers. Once they are installed, enter their IP addresses here, one by one (ENTER when done)"
+ done="not"
+ while [ $done != "done" ]
+ do
+ read -p "Node IP :" node
+ if [ ! $node ]
+ then
+ done="done"
+ else
+ $EUCALYPTUS/usr/sbin/euca_conf --register-nodes $node |tee -a $LOGFILE
+ fi
+ done
+ error_check
+ echo "$(date)- Registered components " |tee -a $LOGFILE
+ ./cloudvalidator.sh
+ echo "Please visit https://$PUBLIC_IP_ADDRESS:8443/ to start using your cluster!"
+fi
+
+
View
8 centos6/ifcfg-br0
@@ -0,0 +1,8 @@
+DEVICE=br0
+TYPE=Bridge
+BOOTPROTO=static
+NETWORK=10.20.30.0
+IPADDR=10.20.30.203
+NETMASK=255.255.255.0
+GATEWAY=10.20.30.1
+ONBOOT=yes
View
80 centos6/imageinstall.sh
@@ -0,0 +1,80 @@
+#!/bin/bash
+#
+# Copyright (c) 2011 Eucalyptus Systems, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, only version 3 of the License.
+#
+#
+# This file is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Please contact Eucalyptus Systems, Inc., 6755 Hollister Ave.
+# Goleta, CA 93117 USA or visit <http://www.eucalyptus.com/licenses/>
+# if you need additional information or have any questions.
+#
+
+export HYPERVISOR=xen
+export LOGFILE=/var/log/imageinstall.log
+
+function error_check {
+ count=`grep -i 'error\|fail\|exception' $LOGFILE|wc -l`
+ if [ $count -gt "0" ]
+ then
+ echo "An error occured in the last step, look at $LOGFILE for more details"
+ exit -1;
+ fi
+}
+
+if [ $# -ne 2 ]
+then
+ echo "Usage: `basename $0` [image.tgz] [bucketname]"
+ exit 65;
+fi
+
+#save old log file
+if [ -f $LOGFILE ]
+then
+ if [ -f $LOGFILE.bak ]
+ then
+ rm $LOGFILE.bak
+ fi
+ mv $LOGFILE $LOGFILE.bak
+ touch $LOGFILE
+fi
+
+echo "$(date)- Unpacking image bundle" |tee -a $LOGFILE
+cd /tmp
+tar xvzf $1 >>$LOGFILE 2>&1
+
+imagedir=`basename $1 .tgz`
+echo "$(date)- Uploading kernel" |tee -a $LOGFILE
+kernelname=`basename $imagedir/$HYPERVISOR-kernel/vmli*`
+euca-bundle-image -i $imagedir/$HYPERVISOR-kernel/vmlin* --kernel true -p $kernelname >>$LOGFILE 2>&1
+euca-upload-bundle -b $2 -m /tmp/$kernelname.manifest.xml >>$LOGFILE 2>&1
+kernelid=`euca-register $2/$kernelname.manifest.xml|awk '{ print $2 }'`
+echo $kernelid >> $LOGFILE
+error_check
+
+echo "$(date)- Uploading ramdisk" |tee -a $LOGFILE
+ramdiskname=`basename $imagedir/$HYPERVISOR-kernel/initrd*`
+euca-bundle-image -i $imagedir/$HYPERVISOR-kernel/initrd* --ramdisk true -p $ramdiskname >>$LOGFILE 2>&1
+euca-upload-bundle -b $2 -m /tmp/$ramdiskname.manifest.xml >>$LOGFILE 2>&1
+ramdiskid=`euca-register $2/$ramdiskname.manifest.xml|awk '{ print $2 }'`
+echo $ramdiskid >> $LOGFILE
+error_check
+
+echo "$(date)- Uploading image" |tee -a $LOGFILE
+imagename=`basename $imagedir/*img .img`
+euca-bundle-image -i $imagedir/*img -p $imagename --kernel $kernelid --ramdisk $ramdiskid >>$LOGFILE 2>&1
+euca-upload-bundle -b $2 -m /tmp/$imagename.manifest.xml >>$LOGFILE 2>&1
+euca-register $2/$imagename.manifest.xml >>$LOGFILE 2>&1
+error_check
+
+echo "$(date)- Done!" |tee -a $LOGFILE
Please sign in to comment.
Something went wrong with that request. Please try again.