diff --git a/build/deploy/branding/default/images/favicon.ico b/build/deploy/branding/default/images/favicon.ico new file mode 100644 index 00000000000..97a1e14bd3c Binary files /dev/null and b/build/deploy/branding/default/images/favicon.ico differ diff --git a/build/deploy/branding/default/images/header_logo.gif b/build/deploy/branding/default/images/header_logo.gif new file mode 100644 index 00000000000..a1eb06dbf8f Binary files /dev/null and b/build/deploy/branding/default/images/header_logo.gif differ diff --git a/build/deploy/branding/godaddy/images/header_logo.gif b/build/deploy/branding/godaddy/images/header_logo.gif new file mode 100644 index 00000000000..c1e7dd1e8d0 Binary files /dev/null and b/build/deploy/branding/godaddy/images/header_logo.gif differ diff --git a/build/deploy/branding/nframe/images/header_logo.gif b/build/deploy/branding/nframe/images/header_logo.gif new file mode 100644 index 00000000000..d1ac0e0e8ca Binary files /dev/null and b/build/deploy/branding/nframe/images/header_logo.gif differ diff --git a/build/deploy/branding/superb/images/header_logo.gif b/build/deploy/branding/superb/images/header_logo.gif new file mode 100644 index 00000000000..4dee91633ac Binary files /dev/null and b/build/deploy/branding/superb/images/header_logo.gif differ diff --git a/build/deploy/db/deploy-db.sh b/build/deploy/db/deploy-db.sh new file mode 100755 index 00000000000..dc479850e10 --- /dev/null +++ b/build/deploy/db/deploy-db.sh @@ -0,0 +1,103 @@ +#!/usr/bin/env bash +# deploy-db.sh -- deploys the database configuration. + +# set -x + +if [ "$1" == "" ]; then + printf "Usage: %s [path to additional sql] [root password]\n" $(basename $0) >&2 + exit 1; +fi + +if [ ! -f $1 ]; then + echo "Error: Unable to find $1" + exit 2 +fi + +if [ "$2" != "" ]; then + if [ ! -f $2 ]; then + echo "Error: Unable to find $2" + exit 3 + fi +fi + +if [ ! -f create-database.sql ]; then + printf "Error: Unable to find create-database.sql\n" + exit 4 +fi + +if [ ! -f create-schema.sql ]; then + printf "Error: Unable to find create-schema.sql\n" + exit 5 +fi + +if [ ! -f create-index-fk.sql ]; then + printf "Error: Unable to find create-index-fk.sql\n" + exit 6; +fi + +PATHSEP=':' +if [[ $OSTYPE == "cygwin" ]] ; then + export CATALINA_HOME=`cygpath -m $CATALINA_HOME` + PATHSEP=';' +else + mysql="mysql" + service mysql status > /dev/null 2>/dev/null + if [ $? -eq 1 ]; then + mysql="mysqld" + service mysqld status > /dev/null 2>/dev/null + if [ $? -ne 0 ]; then + printf "Unable to find mysql daemon\n" + exit 7 + fi + fi + + echo "Starting mysql" + service $mysql start > /dev/null 2>/dev/null + +fi + +echo "Recreating Database." +mysql --user=root --password=$3 < create-database.sql > /dev/null 2>/dev/null +mysqlout=$? +if [ $mysqlout -eq 1 ]; then + printf "Please enter root password for MySQL.\n" + mysql --user=root --password < create-database.sql + if [ $? -ne 0 ]; then + printf "Error: Cannot execute create-database.sql\n" + exit 10 + fi +elif [ $mysqlout -ne 0 ]; then + printf "Error: Cannot execute create-database.sql\n" + exit 11 +fi + +mysql --user=cloud --password=cloud cloud < create-schema.sql +if [ $? -ne 0 ]; then + printf "Error: Cannot execute create-schema.sql\n" + exit 11 +fi + +if [ "$1" != "" ]; then + mysql --user=cloud --password=cloud cloud < $1 + if [ $? -ne 0 ]; then + printf "Error: Cannot execute $1\n" + exit 12 + fi +fi + +if [ "$2" != "" ]; then + echo "Adding Templates" + mysql --user=cloud --password=cloud cloud < $2 + if [ $? -ne 0 ]; then + printf "Error: Cannot execute $2\n" + exit 12 + fi +fi + + +echo "Creating Indice and Foreign Keys" +mysql --user=cloud --password=cloud cloud < create-index-fk.sql +if [ $? -ne 0 ]; then + printf "Error: Cannot execute create-index-fk.sql\n" + exit 13 +fi diff --git a/build/deploy/db/log4j.properties b/build/deploy/db/log4j.properties new file mode 100644 index 00000000000..2cf1f24d2fc --- /dev/null +++ b/build/deploy/db/log4j.properties @@ -0,0 +1,7 @@ +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.Target=System.out +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n +log4j.appender.stdout.threshold=ERROR +log4j.rootLogger=INFO, stdout +log4j.category.org.apache=INFO, stdout diff --git a/build/deploy/deploy-agent.sh b/build/deploy/deploy-agent.sh new file mode 100755 index 00000000000..4faa4cb8516 --- /dev/null +++ b/build/deploy/deploy-agent.sh @@ -0,0 +1,217 @@ +#!/usr/bin/env bash +# install.sh -- installs an agent +# +# + +usage() { + printf "Usage: %s: -d [directory to deploy to] -t [routing|storage|computing] -z [zip file] -h [host] -p [pod] -c [data center] -m [expert|novice|setup]\n" $(basename $0) >&2 +} + +mode= +host= +pod= +zone= + +deploydir= +confdir= +zipfile= +typ= + +#set -x + +while getopts 'd:z:t:x:m:h:p:c:' OPTION +do + case "$OPTION" in + d) deploydir="$OPTARG" + ;; + z) zipfile="$OPTARG" + ;; + t) typ="$OPTARG" + ;; + m) mode="$OPTARG" + ;; + h) host="$OPTARG" + ;; + p) pod="$OPTARG" + ;; + c) zone="$OPTARG" + ;; + ?) usage + exit 2 + ;; + esac +done + +printf "NOTE: You must have root privileges to install and run this program.\n" + +if [ "$typ" == "" ]; then + if [ "$mode" != "expert" ] + then + printf "Type of agent to install [routing|computing|storage]: " + read typ + fi +fi +if [ "$typ" != "computing" ] && [ "$typ" != "routing" ] && [ "$typ" != "storage" ] +then + printf "ERROR: The choices are computing, routing, or storage.\n" + exit 4 +fi + +if [ "$host" == "" ]; then + if [ "$mode" != "expert" ] + then + printf "Host name or ip address of management server [Required]: " + read host + if [ "$host" == "" ]; then + printf "ERROR: Host is required\n" + exit 23; + fi + fi +fi + +port= +if [ "$mode" != "expert" ] +then + printf "Port number of management server [defaults to 8250]: " + read port +fi +if [ "$port" == "" ] +then + port=8250 +fi + +if [ "$zone" == "" ]; then + if [ "$mode" != "expert" ]; then + printf "Availability Zone [Required]: " + read zone + if [ "$zone" == "" ]; then + printf "ERROR: Zone is required\n"; + exit 21; + fi + fi +fi + +if [ "$pod" == "" ]; then + if [ "$mode" != "expert" ]; then + printf "Pod [Required]: " + read pod + if [ "$pod" == "" ]; then + printf "ERROR: Pod is required\n"; + exit 22; + fi + fi +fi + +workers= +if [ "$mode" != "expert" ]; then + printf "# of workers to start [defaults to 3]: " + read workers +fi +if [ "$workers" == "" ]; then + workers=3 +fi + +if [ "$deploydir" == "" ]; then + if [ "$mode" != "expert" ]; then + printf "Directory to deploy to [defaults to /usr/local/vmops/agent]: " + read deploydir + fi + if [ "$deploydir" == "" ]; then + deploydir="/usr/local/vmops/agent" + fi +fi +if ! mkdir -p $deploydir +then + printf "ERROR: Unable to create $deploydir\n" + exit 5 +fi + +if [ "$zipfile" == "" ]; then + if [ "$mode" != "expert" ]; then + printf "Path of the zip file [defaults to agent.zip]: " + read zipfile + fi + if [ "$zipfile" == "" ]; then + zipfile="agent.zip" + fi + +fi +if ! unzip -o $zipfile -d $deploydir +then + printf "ERROR: Unable to unzip $zipfile to $deploydir\n" + exit 6 +fi + +#if ! chmod -R +x $deploydir/scripts/*.sh +#then +# printf "ERROR: Unable to change scripts to executable.\n" +# exit 7 +#fi +#if ! chmod -R +x $deploydir/scripts/iscsi/*.sh +#then +# printf "ERROR: Unable to change scripts to executable.\n" +# exit 8 +#fi +#if ! chmod -R +x $deploydir/*.sh +#then +# printf "ERROR: Unable to change scripts to executable.\n" +# exit 9 +#fi + +if [ "$mode" == "setup" ]; then + mode="expert" + deploydir="/usr/local/vmops/agent" + confdir="/etc/vmops" + /bin/cp -f $deploydir/conf/agent.properties $confdir/agent.properties + if [ $? -gt 0 ]; then + printf "ERROR: Failed to copy the agent.properties file into the right place." + exit 10; + fi +else + confdir="$deploydir/conf" +fi + +if [ "$typ" != "" ]; then + sed s/@TYPE@/"$typ"/ $confdir/agent.properties > $confdir/tmp + /bin/mv -f $confdir/tmp $confdir/agent.properties +else + printf "INFO: Type is not set\n" +fi + +if [ "$host" != "" ]; then + sed s/@HOST@/"$host"/ $confdir/agent.properties > $confdir/tmp + /bin/mv -f $confdir/tmp $confdir/agent.properties +else + printf "INFO: host is not set\n" +fi + +if [ "$port" != "" ]; then + sed s/@PORT@/"$port"/ $confdir/agent.properties > $confdir/tmp + /bin/mv -f $confdir/tmp $confdir/agent.properties +else + printf "INFO: Port is not set\n" +fi + +if [ "$pod" != "" ]; then + sed s/@POD@/"$pod"/ $confdir/agent.properties > $confdir/tmp + /bin/mv -f $confdir/tmp $confdir/agent.properties +else + printf "INFO: Pod is not set\n" +fi + +if [ "$zone" != "" ]; then + sed s/@ZONE@/"$zone"/ $confdir/agent.properties > $confdir/tmp + /bin/mv -f $confdir/tmp $confdir/agent.properties +else + printf "INFO: Zone is not set\n" +fi + +if [ "$workers" != "" ]; then + sed s/@WORKERS@/"$workers"/ $confdir/agent.properties > $confdir/tmp + /bin/mv -f $confdir/tmp $confdir/agent.properties +else + printf "INFO: Workers is not set\n" +fi + +printf "SUCCESS: Installation is now complete. If you like to make changes, edit $confdir/agent.properties\n" +exit 0 diff --git a/build/deploy/deploy-console-proxy.sh b/build/deploy/deploy-console-proxy.sh new file mode 100644 index 00000000000..fe8caf9d09f --- /dev/null +++ b/build/deploy/deploy-console-proxy.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash +# Deploy console proxy package to an existing VM template +# +usage() { + printf "Usage: %s: -d [work directory to deploy to] -z [zip file]" $(basename $0) >&2 +} + +deploydir= +zipfile= + +#set -x + +while getopts 'd:z:' OPTION +do + case "$OPTION" in + d) deploydir="$OPTARG" + ;; + z) zipfile="$OPTARG" + ;; + ?) usage + exit 2 + ;; + esac +done + +printf "NOTE: You must have root privileges to install and run this program.\n" + +if [ "$deploydir" == "" ]; then + printf "ERROR: Unable to find deployment work directory $deploydir\n" + exit 3; +fi +if [ ! -f $deploydir/consoleproxy.tar.gz ] +then + printf "ERROR: Unable to find existing console proxy template file (consoleproxy.tar.gz) to work on at $deploydir\n" + exit 5 +fi + +if [ "$zipfile" == "" ]; then + zipfile="console-proxy.zip" +fi + +if ! mkdir -p /mnt/consoleproxy +then + printf "ERROR: Unable to create /mnt/consoleproxy for mounting template image\n" + exit 5 +fi + +tar xvfz $deploydir/consoleproxy.tar.gz -C $deploydir +mount -o loop $deploydir/vmi-root-fc8-x86_64-domP /mnt/consoleproxy + +if ! unzip -o $zipfile -d /mnt/consoleproxy/usr/local/vmops/consoleproxy +then + printf "ERROR: Unable to unzip $zipfile to $deploydir\n" + exit 6 +fi + +umount /mnt/consoleproxy + +pushd $deploydir +tar cvf consoleproxy.tar vmi-root-fc8-x86_64-domP + +mv -f consoleproxy.tar.gz consoleproxy.tar.gz.old +gzip consoleproxy.tar +popd + +if [ ! -f $deploydir/consoleproxy.tar.gz ] +then + mv consoleproxy.tar.gz.old consoleproxy.tar.gz + printf "ERROR: failed to deploy and recreate the template at $deploydir\n" +fi + +printf "SUCCESS: Installation is now complete. please go to $deploydir to review it\n" +exit 0 diff --git a/build/deploy/deploy-server.sh b/build/deploy/deploy-server.sh new file mode 100755 index 00000000000..1ee9addb3cc --- /dev/null +++ b/build/deploy/deploy-server.sh @@ -0,0 +1,106 @@ +#!/usr/bin/env bash +# deploy.sh -- deploys a management server +# +# + +usage() { + printf "Usage: %s: -d [tomcat directory to deploy to] -z [zip file to use]\n" $(basename $0) >&2 +} + +dflag= +zflag= +tflag= +iflag= + +deploydir= +zipfile="client.zip" +typ= + +#set -x + +while getopts 'd:z:x:h:' OPTION +do + case "$OPTION" in + d) dflag=1 + deploydir="$OPTARG" + ;; + z) zflag=1 + zipfile="$OPTARG" + ;; + h) iflag="$OPTARG" + ;; + ?) usage + exit 2 + ;; + esac +done + +if [ "$deploydir" == "" ] +then + if [ "$CATALINA_HOME" == "" ] + then + printf "Tomcat Directory to deploy to: " + read deploydir + else + deploydir="$CATALINA_HOME" + fi +fi + +if [ "$deploydir" == "" ] +then + printf "Tomcat directory was not specified\n"; + exit 15; +fi + +printf "Check to see if the Tomcat directory exist: $deploydir\n" +if [ ! -d $deploydir ] +then + printf "Tomcat directory does not exist\n"; + exit 16; +fi + +if [ "$zipfile" == "" ] +then + printf "Path of the zip file [defaults to client.zip]: " + read zipfile + if [ "$zipfile" == "" ] + then + zipfile="client.zip" + fi +fi +if ! unzip -o $zipfile client.war +then + exit 6 +fi + +rm -fr $deploydir/webapps/client + +if ! unzip -o ./client.war -d $deploydir/webapps/client +then + exit 10; +fi + +rm -f ./client.war + +if ! unzip -o $zipfile lib/* -d $deploydir +then + exit 11; +fi + +if ! unzip -o $zipfile conf/* -d $deploydir +then + exit 12; +fi + +if ! unzip -o $zipfile bin/* -d $deploydir +then + exit 13; +fi + +printf "Adding the conf directory to the class loader for tomcat\n" +sed 's/shared.loader=$/shared.loader=\$\{catalina.home\},\$\{catalina.home\}\/conf\ +/' $deploydir/conf/catalina.properties > $deploydir/conf/catalina.properties.tmp +mv $deploydir/conf/catalina.properties.tmp $deploydir/conf/catalina.properties + +printf "Installation is now complete\n" +exit 0 diff --git a/build/deploy/deploy-simulator.sh b/build/deploy/deploy-simulator.sh new file mode 100644 index 00000000000..f956d64e91a --- /dev/null +++ b/build/deploy/deploy-simulator.sh @@ -0,0 +1,185 @@ +#!/usr/bin/env bash +# install.sh -- installs an agent +# +# + +usage() { + printf "Usage: %s: -d [directory to deploy to] -z [zip file] -h [host] -p [pod] -c [data center] -m [expert|novice|setup]\n" $(basename $0) >&2 +} + +mode= +host= +pod= +zone= + +deploydir= +confdir= +zipfile= +typ= + +#set -x + +while getopts 'd:z:x:m:h:p:c:' OPTION +do + case "$OPTION" in + d) deploydir="$OPTARG" + ;; + z) zipfile="$OPTARG" + ;; + m) mode="$OPTARG" + ;; + h) host="$OPTARG" + ;; + p) pod="$OPTARG" + ;; + c) zone="$OPTARG" + ;; + ?) usage + exit 2 + ;; + esac +done + +printf "NOTE: You must have root privileges to install and run this program.\n" + +if [ "$mode" == "setup" ]; then + mode="expert" + deploydir="/usr/local/vmops/agent-simulator" + confdir="/etc/vmops" + /bin/cp -f $deploydir/conf/agent.properties $confdir/agent.properties + if [ $? -gt 0 ]; then + printf "ERROR: Failed to copy the agent.properties file into the right place." + exit 10; + fi +else + confdir="$deploydir/conf" +fi + +if [ "$host" == "" ]; then + if [ "$mode" != "expert" ] + then + printf "Host name or ip address of management server [Required]: " + read host + if [ "$host" == "" ]; then + printf "ERROR: Host is required\n" + exit 23; + fi + fi +fi + +port= +if [ "$mode" != "expert" ] +then + printf "Port number of management server [defaults to 8250]: " + read port +fi +if [ "$port" == "" ] +then + port=8250 +fi + +if [ "$zone" == "" ]; then + if [ "$mode" != "expert" ]; then + printf "Availability Zone [Required]: " + read zone + if [ "$zone" == "" ]; then + printf "ERROR: Zone is required\n"; + exit 21; + fi + fi +fi + +if [ "$pod" == "" ]; then + if [ "$mode" != "expert" ]; then + printf "Pod [Required]: " + read pod + if ["$pod" == ""]; then + printf "ERROR: Pod is required\n"; + exit 22; + fi + fi +fi + +workers= +if [ "$mode" != "expert" ]; then + printf "# of workers to start [defaults to 3]: " + read workers +fi +if [ "$workers" == "" ]; then + workers=3 +fi + +if [ "$deploydir" == "" ]; then + if [ "$mode" != "expert" ]; then + printf "Directory to deploy to [defaults to /usr/local/vmops/agent-simulator]: " + read deploydir + fi + if [ "$deploydir" == "" ]; then + deploydir="/usr/local/vmops/agent-simulator" + fi +fi +if ! mkdir -p $deploydir +then + printf "ERROR: Unable to create $deploydir\n" + exit 5 +fi + +if [ "$zipfile" == "" ]; then + if [ "$mode" != "expert" ]; then + printf "Path of the zip file [defaults to agent-simulator.zip]: " + read zipfile + fi + if [ "$zipfile" == "" ]; then + zipfile="agent-simulator.zip" + fi + +fi +if ! unzip -o $zipfile -d $deploydir +then + printf "ERROR: Unable to unzip $zipfile to $deploydir\n" + exit 6 +fi + +if ! chmod +x $deploydir/*.sh +then + printf "ERROR: Unable to change scripts to executable.\n" + exit 9 +fi + +if [ "$host" != "" ]; then + sed s/@HOST@/"$host"/ $confdir/agent.properties > $confdir/tmp + /bin/mv -f $confdir/tmp $confdir/agent.properties +else + printf "INFO: host is not set\n" +fi + +if [ "$port" != "" ]; then + sed s/@PORT@/"$port"/ $confdir/agent.properties > $confdir/tmp + /bin/mv -f $confdir/tmp $confdir/agent.properties +else + printf "INFO: Port is not set\n" +fi + +if [ "$pod" != "" ]; then + sed s/@POD@/"$pod"/ $confdir/agent.properties > $confdir/tmp + /bin/mv -f $confdir/tmp $confdir/agent.properties +else + printf "INFO: Pod is not set\n" +fi + +if [ "$zone" != "" ]; then + sed s/@ZONE@/"$zone"/ $confdir/agent.properties > $confdir/tmp + /bin/mv -f $confdir/tmp $confdir/agent.properties +else + printf "INFO: Zone is not set\n" +fi + +if [ "$workers" != "" ]; then + sed s/@WORKERS@/"$workers"/ $confdir/agent.properties > $confdir/tmp + /bin/mv -f $confdir/tmp $confdir/agent.properties +else + printf "INFO: Workers is not set\n" +fi + +printf "SUCCESS: Installation is now complete. If you like to make changes, edit $confdir/agent.properties\n" +exit 0 diff --git a/build/deploy/install-storage-server.sh b/build/deploy/install-storage-server.sh new file mode 100755 index 00000000000..62d16737961 --- /dev/null +++ b/build/deploy/install-storage-server.sh @@ -0,0 +1,133 @@ +#!/usr/bin/env bash +# install-storage-server.sh: Installs a VMOps Storage Server +# + +choose_correct_filename() { + local default_filename=$1 + local user_specified_filename=$2 + + if [ -f "$user_specified_filename" ] + then + echo $user_specified_filename + return 0 + else + if [ -f "$default_filename" ] + then + echo $default_filename + return 0 + else + echo "" + return 1 + fi + fi +} + +install_opensolaris_package() { + pkg_name=$1 + + pkg info $pkg_name >> /dev/null + + if [ $? -gt 0 ] + then + # The package is not installed, so install it + pkg install $pkg_name + return $? + else + # The package is already installed + return 0 + fi +} + +exit_if_error() { + return_code=$1 + msg=$2 + + if [ $return_code -gt 0 ] + then + echo $msg + exit 1 + fi +} + +usage() { + printf "Usage: ./install-storage-server.sh " +} + +AGENT_FILE=$(choose_correct_filename "./agent.zip" $1) +exit_if_error $? "Please download agent.zip to your Storage Server." + +TEMPLATES_FILE=$(choose_correct_filename "./templates.tar.gz" $2) +exit_if_error $? "Please download templates.tar.gz to your Storage Server." + +VMOPS_DIR="/usr/local/vmops" +AGENT_DIR="/usr/local/vmops/agent" +CONF_DIR="/etc/vmops" +TEMPLATES_DIR="/root/template" + +# Make all the necessary directories if they don't already exist + +echo "Creating VMOps directories..." +for dir in $VMOPS_DIR $CONF_DIR $TEMPLATES_DIR +do + mkdir -p $dir +done + +# Unzip agent.zip to $AGENT_DIR + +echo "Uncompressing and installing VMOps Storage Agent..." +unzip -o $AGENT_FILE -d $AGENT_DIR >> /dev/null + +# Remove agent/conf/agent.properties, since we should use the file in the real configuration directory + +rm $AGENT_DIR/conf/agent.properties + +# Backup any existing VMOps configuration files, if there aren't any backups already + +if [ ! -d $CONF_DIR/BACKUP ] +then + echo "Backing up existing configuration files..." + mkdir -p $CONF_DIR/BACKUP + cp $CONF_DIR/*.properties $CONF_DIR/BACKUP >> /dev/null +fi + +# Copy all the files in storagehdpatch to their proper places + +echo "Installing system files..." +(cd $AGENT_DIR/storagehdpatch; tar cf - .) | (cd /; tar xf -) +exit_if_error $? "There was a problem with installing system files. Please contact VMOps Support." + +# Make vsetup executable +chmod +x /usr/sbin/vsetup + +# Make vmops executable +chmod +x /lib/svc/method/vmops + +# Uncompress the templates and copy them to the templates directory + +echo "Uncompressing templates..." +tar -xzf $TEMPLATES_FILE -C $TEMPLATES_DIR >> /dev/null +exit_if_error $? "There was a problem with uncompressing templates. Please contact VMOps Support." + +# Install the storage-server package, if it is not already installed +echo "Installing OpenSolaris storage server package..." +install_opensolaris_package "storage-server" +exit_if_error $? "There was a problem with installing the storage server package. Please contact VMOps Support." + +echo "Installing COMSTAR..." +install_opensolaris_package "SUNWiscsit" +exit_if_error $? "Unable to install COMSTAR iscsi target. Please contact VMOps Support." + +# Install the SUNWinstall-test package, if it is not already installed + +echo "Installing OpenSolaris test tools package..." +install_opensolaris_package "SUNWinstall-test" +exit_if_error $? "There was a problem with installing the test tools package. Please contact VMOps Support." + +# Print a success message +printf "\nSuccessfully installed the VMOps Storage Server.\n" +printf "Please complete the following steps to configure your networking settings and storage pools:\n\n" +printf "1. Specify networking settings in /etc/vmops/network.properties\n" +printf "2. Run \"vsetup networking\" and then specify disk settings in /etc/vmops/disks.properties\n" +printf "3. Run \"vsetup zpool\" and reboot the machine when prompted.\n\n" + + diff --git a/build/deploy/install.sh b/build/deploy/install.sh new file mode 100644 index 00000000000..450a32bbf04 --- /dev/null +++ b/build/deploy/install.sh @@ -0,0 +1,139 @@ +#!/bin/bash + +# install.sh -- installs MySQL, Java, Tomcat, and the VMOps server + +#set -x +set -e + +EX_NOHOSTNAME=15 +EX_SELINUX=16 + +function usage() { + printf "Usage: %s [path to server-setup.xml]\n" $(basename $0) >&2 + exit 64 +} + +function checkhostname() { + if hostname | grep -qF . ; then true ; else + echo "You need to have a fully-qualified host name for the setup to work." > /dev/stderr + echo "Please use your operating system's network setup tools to set one." > /dev/stderr + exit $EX_NOHOSTNAME + fi +} + +function checkselinux() { +#### before checking arguments, make sure SELINUX is "permissible" in /etc/selinux/config + if /usr/sbin/getenforce | grep -qi enforcing ; then borked=1 ; fi + if grep -i SELINUX=enforcing /etc/selinux/config ; then borked=1 ; fi + if [ "$borked" == "1" ] ; then + echo "SELINUX is set to enforcing, please set it to permissive in /etc/selinux/config" > /dev/stderr + echo "then reboot the machine, after which you can run the install script again." > /dev/stderr + exit $EX_SELINUX + fi +} + +checkhostname +checkselinux + +if [ "$1" == "" ]; then + usage +fi + +if [ ! -f $1 ]; then + echo "Error: Unable to find $1" > /dev/stderr + exit 2 +fi + +#### check that all files exist +if [ ! -f apache-tomcat-6.0.18.tar.gz ]; then + printf "Error: Unable to find apache-tomcat-6.0.18.tar.gz\n" > /dev/stderr + exit 3 +fi + +if [ ! -f MySQL-client-5.1.30-0.glibc23.x86_64.rpm ]; then + printf "Error: Unable to find MySQL-client-5.1.30-0.glibc23.x86_64.rpm\n" > /dev/stderr + exit 4 +fi + +if [ ! -f MySQL-server-5.1.30-0.glibc23.x86_64.rpm ]; then + printf "Error: Unable to find MySQL-server-5.1.30-0.glibc23.x86_64.rpm\n" > /dev/stderr + exit 5 +fi + +if [ ! -f jdk-6u13-linux-amd64.rpm.bin ]; then + printf "Error: Unable to find jdk-6u13-linux-amd64.rpm.bin\n" > /dev/stderr + exit 6 +fi + +#if [ ! -f osol.tar.bz2 ]; then +# printf "Error: Unable to find osol.tar.bz2\n" +# exit 7 +#fi + +if [ ! -f apache-tomcat-6.0.18.tar.gz ]; then + printf "Error: Unable to find apache-tomcat-6.0.18.tar.gz\n" > /dev/stderr + exit 8 +fi + +if [ ! -f vmops-*.zip ]; then + printf "Error: Unable to find vmops install file\n" > /dev/stderr + exit 9 +fi + +if [ ! -f catalina ] ; then + printf "Error: Unable to find catalina initscript\n" > /dev/stderr + exit 10 +fi + +if [ ! -f usageserver ] ; then + printf "Error: Unable to find usageserver initscript\n" > /dev/stderr + exit 11 +fi + +###### install Apache +# if [ ! -d /usr/local/tomcat ] ; then + echo "installing Apache..." + mkdir -p /usr/local/tomcat + tar xfz apache-tomcat-6.0.18.tar.gz -C /usr/local/tomcat + ln -s /usr/local/tomcat/apache-tomcat-6.0.18 /usr/local/tomcat/current +# fi +# if [ ! -f /etc/profile.d/catalinahome.sh ] ; then +# echo "export CATALINA_HOME=/usr/local/tomcat/current" >> /etc/profile.d/catalinahome.sh +# fi +source /etc/profile.d/catalinahome.sh +# if [ ! -f /etc/init.d/catalina ] ; then + cp -f catalina /etc/init.d + /sbin/chkconfig catalina on +# fi + +####### set up usage server as a service +if [ ! -f /ec/init.d/usageserver ] ; then + cp -f usageserver /etc/init.d + /sbin/chkconfig usageserver on +fi + +##### set up mysql +if rpm -q MySQL-server MySQL-client > /dev/null 2>&1 ; then true ; else + echo "installing MySQL..." + yum localinstall --nogpgcheck -y MySQL-*.rpm +fi + +#### install JDK +echo "installing JDK..." +sh jdk-6u13-linux-amd64.rpm.bin +rm -rf /usr/bin/java +ln -s /usr/java/default/bin/java /usr/bin/java + +#### setting up OSOL image +#mkdir -p $CATALINA_HOME/webapps/images +#echo "copying Open Solaris image, this may take a few moments..." +#cp osol.tar.bz2 $CATALINA_HOME/webapps/images + +#### deploying database +unzip -o vmops-*.zip +cd vmops-* +sh deploy-server.sh -d "$CATALINA_HOME" +cd db +sh deploy-db.sh "../../$1" templates.sql + +exit 0 diff --git a/build/deploy/production/agent/storagehdpatch/etc/default/init b/build/deploy/production/agent/storagehdpatch/etc/default/init new file mode 100644 index 00000000000..4ae34767422 --- /dev/null +++ b/build/deploy/production/agent/storagehdpatch/etc/default/init @@ -0,0 +1,38 @@ +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +#ident "%Z%%M% %I% %E% SMI" +# +# This file is /etc/default/init. /etc/TIMEZONE is a symlink to this file. +# This file looks like a shell script, but it is not. To maintain +# compatibility with old versions of /etc/TIMEZONE, some shell constructs +# (i.e., export commands) are allowed in this file, but are ignored. +# +# Lines of this file should be of the form VAR=value, where VAR is one of +# TZ, LANG, CMASK, or any of the LC_* environment variables. value may +# be enclosed in double quotes (") or single quotes ('). +# +TZ=GMT +CMASK=022 +LANG=en_US.UTF-8 diff --git a/build/deploy/production/agent/storagehdpatch/etc/inet/ntp.conf b/build/deploy/production/agent/storagehdpatch/etc/inet/ntp.conf new file mode 100644 index 00000000000..98fce148097 --- /dev/null +++ b/build/deploy/production/agent/storagehdpatch/etc/inet/ntp.conf @@ -0,0 +1,6 @@ +driftfile /var/lib/ntp/ntp.drift + +server 0.pool.ntp.org +server 1.pool.ntp.org +server 2.pool.ntp.org +server 3.pool.ntp.org diff --git a/build/deploy/production/agent/storagehdpatch/etc/nsswitch.conf b/build/deploy/production/agent/storagehdpatch/etc/nsswitch.conf new file mode 100644 index 00000000000..918d8f37e62 --- /dev/null +++ b/build/deploy/production/agent/storagehdpatch/etc/nsswitch.conf @@ -0,0 +1,70 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +# +# /etc/nsswitch.dns: +# +# An example file that could be copied over to /etc/nsswitch.conf; it uses +# DNS for hosts lookups, otherwise it does not use any other naming service. +# +# "hosts:" and "services:" in this file are used only if the +# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports. + +# DNS service expects that an instance of svc:/network/dns/client be +# enabled and online. + +passwd: files +group: files + +# You must also set up the /etc/resolv.conf file for DNS name +# server lookup. See resolv.conf(4). For lookup via mdns +# svc:/network/dns/multicast:default must also be enabled. See mdnsd(1M) +hosts: files dns + +# Note that IPv4 addresses are searched for in all of the ipnodes databases +# before searching the hosts databases. +ipnodes: files dns + +networks: files +protocols: files +rpc: files +ethers: files +netmasks: files +bootparams: files +publickey: files +# At present there isn't a 'files' backend for netgroup; the system will +# figure it out pretty quickly, and won't use netgroups at all. +netgroup: files +automount: files +aliases: files +services: files +printers: user files + +auth_attr: files +prof_attr: files +project: files + +tnrhtp: files +tnrhdb: files diff --git a/build/deploy/production/agent/storagehdpatch/etc/ssh/sshd_config b/build/deploy/production/agent/storagehdpatch/etc/ssh/sshd_config new file mode 100644 index 00000000000..2eb6853336a --- /dev/null +++ b/build/deploy/production/agent/storagehdpatch/etc/ssh/sshd_config @@ -0,0 +1,154 @@ +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# Configuration file for sshd(1m) + +# Protocol versions supported +# +# The sshd shipped in this release of Solaris has support for major versions +# 1 and 2. It is recommended due to security weaknesses in the v1 protocol +# that sites run only v2 if possible. Support for v1 is provided to help sites +# with existing ssh v1 clients/servers to transition. +# Support for v1 may not be available in a future release of Solaris. +# +# To enable support for v1 an RSA1 key must be created with ssh-keygen(1). +# RSA and DSA keys for protocol v2 are created by /etc/init.d/sshd if they +# do not already exist, RSA1 keys for protocol v1 are not automatically created. + +# Uncomment ONLY ONE of the following Protocol statements. + +# Only v2 (recommended) +Protocol 2 + +# Both v1 and v2 (not recommended) +#Protocol 2,1 + +# Only v1 (not recommended) +#Protocol 1 + +# Listen port (the IANA registered port number for ssh is 22) +Port 22 + +# The default listen address is all interfaces, this may need to be changed +# if you wish to restrict the interfaces sshd listens on for a multi homed host. +# Multiple ListenAddress entries are allowed. + +# IPv4 only +#ListenAddress 0.0.0.0 +# IPv4 & IPv6 +ListenAddress :: + +# Port forwarding +AllowTcpForwarding no + +# If port forwarding is enabled, specify if the server can bind to INADDR_ANY. +# This allows the local port forwarding to work when connections are received +# from any remote host. +GatewayPorts no + +# X11 tunneling options +X11Forwarding yes +X11DisplayOffset 10 +X11UseLocalhost yes + +# The maximum number of concurrent unauthenticated connections to sshd. +# start:rate:full see sshd(1) for more information. +# The default is 10 unauthenticated clients. +#MaxStartups 10:30:60 + +# Banner to be printed before authentication starts. +#Banner /etc/issue + +# Should sshd print the /etc/motd file and check for mail. +# On Solaris it is assumed that the login shell will do these (eg /etc/profile). +PrintMotd no + +# KeepAlive specifies whether keep alive messages are sent to the client. +# See sshd(1) for detailed description of what this means. +# Note that the client may also be sending keep alive messages to the server. +KeepAlive yes + +# Syslog facility and level +SyslogFacility auth +LogLevel info + +# +# Authentication configuration +# + +# Host private key files +# Must be on a local disk and readable only by the root user (root:sys 600). +HostKey /etc/ssh/ssh_host_rsa_key +HostKey /etc/ssh/ssh_host_dsa_key + +# Length of the server key +# Default 768, Minimum 512 +ServerKeyBits 768 + +# sshd regenerates the key every KeyRegenerationInterval seconds. +# The key is never stored anywhere except the memory of sshd. +# The default is 1 hour (3600 seconds). +KeyRegenerationInterval 3600 + +# Ensure secure permissions on users .ssh directory. +StrictModes yes + +# Length of time in seconds before a client that hasn't completed +# authentication is disconnected. +# Default is 600 seconds. 0 means no time limit. +LoginGraceTime 600 + +# Maximum number of retries for authentication +# Default is 6. Default (if unset) for MaxAuthTriesLog is MaxAuthTries / 2 +MaxAuthTries 6 +MaxAuthTriesLog 3 + +# Are logins to accounts with empty passwords allowed. +# If PermitEmptyPasswords is no, pass PAM_DISALLOW_NULL_AUTHTOK +# to pam_authenticate(3PAM). +PermitEmptyPasswords no + +# To disable tunneled clear text passwords, change PasswordAuthentication to no. +PasswordAuthentication yes + +# Use PAM via keyboard interactive method for authentication. +# Depending on the setup of pam.conf(4) this may allow tunneled clear text +# passwords even when PasswordAuthentication is set to no. This is dependent +# on what the individual modules request and is out of the control of sshd +# or the protocol. +PAMAuthenticationViaKBDInt yes + +# Are root logins permitted using sshd. +# Note that sshd uses pam_authenticate(3PAM) so the root (or any other) user +# maybe denied access by a PAM module regardless of this setting. +# Valid options are yes, without-password, no. +PermitRootLogin yes + +# sftp subsystem +Subsystem sftp /usr/lib/ssh/sftp-server + + +# SSH protocol v1 specific options +# +# The following options only apply to the v1 protocol and provide +# some form of backwards compatibility with the very weak security +# of /usr/bin/rsh. Their use is not recommended and the functionality +# will be removed when support for v1 protocol is removed. + +# Should sshd use .rhosts and .shosts for password less authentication. +IgnoreRhosts yes +RhostsAuthentication no + +# Rhosts RSA Authentication +# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts. +# If the user on the client side is not root then this won't work on +# Solaris since /usr/bin/ssh is not installed setuid. +RhostsRSAAuthentication no + +# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication. +#IgnoreUserKnownHosts yes + +# Is pure RSA authentication allowed. +# Default is yes +RSAAuthentication yes diff --git a/build/deploy/production/agent/storagehdpatch/etc/system b/build/deploy/production/agent/storagehdpatch/etc/system new file mode 100644 index 00000000000..0ede11570c3 --- /dev/null +++ b/build/deploy/production/agent/storagehdpatch/etc/system @@ -0,0 +1,101 @@ +*ident "%Z%%M% %I% %E% SMI" /* SVR4 1.5 */ +* +* CDDL HEADER START +* +* The contents of this file are subject to the terms of the +* Common Development and Distribution License, Version 1.0 only +* (the "License"). You may not use this file except in compliance +* with the License. +* +* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +* or http://www.opensolaris.org/os/licensing. +* See the License for the specific language governing permissions +* and limitations under the License. +* +* When distributing Covered Code, include this CDDL HEADER in each +* file and include the License file at usr/src/OPENSOLARIS.LICENSE. +* If applicable, add the following below this CDDL HEADER, with the +* fields enclosed by brackets "[]" replaced with your own identifying +* information: Portions Copyright [yyyy] [name of copyright owner] +* +* CDDL HEADER END +* +* +* SYSTEM SPECIFICATION FILE +* + +* moddir: +* +* Set the search path for modules. This has a format similar to the +* csh path variable. If the module isn't found in the first directory +* it tries the second and so on. The default is /kernel /usr/kernel +* +* Example: +* moddir: /kernel /usr/kernel /other/modules + + + +* root device and root filesystem configuration: +* +* The following may be used to override the defaults provided by +* the boot program: +* +* rootfs: Set the filesystem type of the root. +* +* rootdev: Set the root device. This should be a fully +* expanded physical pathname. The default is the +* physical pathname of the device where the boot +* program resides. The physical pathname is +* highly platform and configuration dependent. +* +* Example: +* rootfs:ufs +* rootdev:/sbus@1,f8000000/esp@0,800000/sd@3,0:a +* +* (Swap device configuration should be specified in /etc/vfstab.) + + + +* exclude: +* +* Modules appearing in the moddir path which are NOT to be loaded, +* even if referenced. Note that `exclude' accepts either a module name, +* or a filename which includes the directory. +* +* Examples: +* exclude: win +* exclude: sys/shmsys + + + +* forceload: +* +* Cause these modules to be loaded at boot time, (just before mounting +* the root filesystem) rather than at first reference. Note that +* forceload expects a filename which includes the directory. Also +* note that loading a module does not necessarily imply that it will +* be installed. +* +* Example: +* forceload: drv/foo + + + +* set: +* +* Set an integer variable in the kernel or a module to a new value. +* This facility should be used with caution. See system(4). +* +* Examples: +* +* To set variables in 'unix': +* +* set nautopush=32 +* set maxusers=40 +* +* To set a variable named 'debug' in the module named 'test_module' +* +* set test_module:debug = 0x13 + +* set zfs:zfs_arc_max=0x4002000 +set zfs:zfs_vdev_cache_size=0 diff --git a/build/deploy/production/agent/storagehdpatch/etc/vmops/disks.properties b/build/deploy/production/agent/storagehdpatch/etc/vmops/disks.properties new file mode 100644 index 00000000000..a7f77b3ee85 --- /dev/null +++ b/build/deploy/production/agent/storagehdpatch/etc/vmops/disks.properties @@ -0,0 +1,7 @@ +# Specify disks in this file +# D: Data +# C: Cache +# L: Intent Log +# S: Spare +# U: Unused + diff --git a/build/deploy/production/agent/storagehdpatch/etc/vmops/network.properties b/build/deploy/production/agent/storagehdpatch/etc/vmops/network.properties new file mode 100644 index 00000000000..8e61bdc8e2f --- /dev/null +++ b/build/deploy/production/agent/storagehdpatch/etc/vmops/network.properties @@ -0,0 +1,35 @@ +# Host Settings +hostname= +domain= +dns1= +dns2= + +# Private/Storage Network Settings (required) +storage.ip= +storage.netmask= +storage.gateway= + +# Second Storage Network Settings (optional) +storage.ip.2= +storage.netmask.2= +storage.gateway.2= + +# Datacenter Settings +pod= +zone= +host= +port= + +# Storage Appliance Settings (optional) +# Specify if you would like to use this Storage Server with an external storage appliance) +iscsi.iqn= +iscsi.ip= +iscsi.port= + +# VMOps IQN (optional) +# Specify if you would like to manually change the IQN of the Storage Server's iSCSI target +vmops.iqn= + +# MTU (optional) +mtu= + diff --git a/build/deploy/production/agent/storagehdpatch/lib/svc/method/vmops b/build/deploy/production/agent/storagehdpatch/lib/svc/method/vmops new file mode 100755 index 00000000000..db9fba1dae3 --- /dev/null +++ b/build/deploy/production/agent/storagehdpatch/lib/svc/method/vmops @@ -0,0 +1,106 @@ +#!/bin/bash +# +# vmops Script to start and stop the VMOps Agent. +# +# Author: Chiradeep Vittal +# chkconfig: 2345 99 01 +# description: Start up the VMOps agent + +# Source function library. +if [ -f /etc/init.d/functions ] +then + . /etc/init.d/functions +fi + +_success() { + if [ -f /etc/init.d/functions ] + then + success + else + echo "Success" + fi +} + +_failure() { + if [ -f /etc/init.d/functions ] + then + failure + else + echo "Failed" + fi +} +RETVAL=$? +VMOPS_HOME="/usr/local/vmops" + +mkdir -p /var/log/vmops + +get_pids() { + local i + for i in $(ps -ef | grep agent.sh | grep -v grep | awk '{print $2}'); + do + echo $(pwdx $i) | grep "$VMOPS_HOME" | grep agent | awk -F: '{print $1}'; + done +} + +start() { + local pid=$(get_pids) + echo -n "Starting VMOps agent: " + if [ -f $VMOPS_HOME/agent/agent.sh ]; + then + if [ "$pid" == "" ] + then + (cd $VMOPS_HOME/agent; nohup ./agent.sh > /var/log/vmops/vmops.out 2>&1 & ) + pid=$(get_pids) + echo $pid > /var/run/vmops.pid + fi + _success + else + _failure + fi + echo +} + +stop() { + local pid + echo -n "Stopping VMOps agent: " + for pid in $(get_pids) + do + pgid=$(ps -o pgid -p $pid | tr '\n' ' ' | awk '{print $2}') + pgid=${pgid## } + pgid=${pgid%% } + kill -- -$pgid + done + rm /var/run/vmops.pid + _success + echo +} + +status() { + local pids=$(get_pids) + if [ "$pids" == "" ] + then + echo "VMOps agent is not running" + return 1 + fi + echo "VMOps agent (pid $pids) is running" + return 0 +} + + +case "$1" in + start) start + ;; + stop) stop + ;; + status) status + ;; + restart) stop + sleep 1.5 + start + ;; + *) echo $"Usage: $0 {start|stop|status|restart}" + exit 1 + ;; +esac + +exit $RETVAL diff --git a/build/deploy/production/agent/storagehdpatch/usr/sbin/vsetup b/build/deploy/production/agent/storagehdpatch/usr/sbin/vsetup new file mode 100755 index 00000000000..dbe8a4b014c --- /dev/null +++ b/build/deploy/production/agent/storagehdpatch/usr/sbin/vsetup @@ -0,0 +1,44 @@ +#! /bin/bash + +stage=$1 +option=$2 + +export VMOPS_HOME=/usr/local/vmops + +usage() { + echo "Usage: vsetup [networking|zpool]" + echo " networking: probe NICs, configure networking, and detect disks" + echo " zpool: create ZFS storage pool" +} + +if [ "$stage" != "networking" ] && [ "$stage" != "zpool" ] && [ "$stage" != "detectdisks" ] +then + usage + exit 1 +fi + +if [ "$option" != "" ] && [ "$option" != "-listonly" ] +then + usage + exit 1 +fi + +$VMOPS_HOME/agent/scripts/installer/run_installer.sh storage $stage $option + +if [ $? -eq 0 ] +then + if [ "$stage" == "networking" ] + then + echo "Please edit /etc/vmops/disks.properties and then run \"vsetup zpool\"." + else + if [ "$stage" == "zpool" ] + then + echo "Press enter to reboot the computer..." + read + reboot + fi + fi +fi + + + diff --git a/build/deploy/production/agent/storagehdpatch/var/svc/manifest/application/cloud.xml b/build/deploy/production/agent/storagehdpatch/var/svc/manifest/application/cloud.xml new file mode 100644 index 00000000000..858bb16c7e3 --- /dev/null +++ b/build/deploy/production/agent/storagehdpatch/var/svc/manifest/application/cloud.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/deploy/production/consoleproxy/conf/consoleproxy.properties b/build/deploy/production/consoleproxy/conf/consoleproxy.properties new file mode 100644 index 00000000000..743db37ce54 --- /dev/null +++ b/build/deploy/production/consoleproxy/conf/consoleproxy.properties @@ -0,0 +1,6 @@ +consoleproxy.tcpListenPort=0 +consoleproxy.httpListenPort=80 +consoleproxy.httpCmdListenPort=8001 +consoleproxy.jarDir=./applet/ +consoleproxy.viewerLinger=180 +consoleproxy.reconnectMaxRetry=5 diff --git a/build/deploy/production/db/server-setup-dev.xml b/build/deploy/production/db/server-setup-dev.xml new file mode 100644 index 00000000000..429764a6e3e --- /dev/null +++ b/build/deploy/production/db/server-setup-dev.xml @@ -0,0 +1,532 @@ + + + 2.0 + + + 1 + AH + 72.52.126.11 + 72.52.126.12 + 192.168.10.253 + 192.168.10.254 + 100-199 + 10.1.1.0/24 + + + 2 + KM + 72.52.126.11 + 72.52.126.12 + 192.168.10.253 + 192.168.10.254 + 200-299 + 10.1.1.0/24 + + + 3 + KY + 72.52.126.11 + 72.52.126.12 + 192.168.10.253 + 192.168.10.254 + 300-399 + 10.1.1.0/24 + + + 4 + WC + 72.52.126.11 + 72.52.126.12 + 192.168.10.253 + 192.168.10.254 + 400-499 + 10.1.1.0/24 + + + 5 + CV + 72.52.126.11 + 72.52.126.12 + 192.168.10.253 + 192.168.10.254 + 500-599 + 10.1.1.0/24 + + + 6 + KS + 72.52.126.11 + 72.52.126.12 + 192.168.10.253 + 192.168.10.254 + 600-699 + 10.1.1.0/24 + + + 7 + ES + 72.52.126.11 + 72.52.126.12 + 192.168.10.253 + 192.168.10.254 + 700-799 + 10.1.1.0/24 + + + 8 + RC + 72.52.126.11 + 72.52.126.12 + 192.168.10.253 + 192.168.10.254 + 800-899 + 10.1.1.0/24 + + + 9 + AX + 72.52.126.11 + 72.52.126.12 + 192.168.10.253 + 192.168.10.254 + 900-999 + 10.1.1.0/24 + + + 10 + JW + 72.52.126.11 + 72.52.126.12 + 192.168.10.253 + 192.168.10.254 + 900-999 + 10.1.1.0/24 + + + 11 + AJ + 72.52.126.11 + 72.52.126.12 + 192.168.10.253 + 192.168.10.254 + 1000-1099 + 10.1.1.0/24 + + + + + + + 1 + 31 + VirtualNetwork + 192.168.31.1 + 255.255.255.0 + 192.168.31.150-192.168.31.159 + + + 2 + 32 + VirtualNetwork + 192.168.32.1 + 255.255.255.0 + 192.168.32.150-192.168.32.159 + + + 3 + 33 + VirtualNetwork + 192.168.33.1 + 255.255.255.0 + 192.168.33.150-192.168.33.159 + + + 4 + 34 + VirtualNetwork + 192.168.34.1 + 255.255.255.0 + 192.168.34.150-192.168.34.159 + + + 5 + 35 + VirtualNetwork + 192.168.35.1 + 255.255.255.0 + 192.168.35.150-192.168.35.159 + + + 6 + 36 + VirtualNetwork + 192.168.36.1 + 255.255.255.0 + 192.168.36.150-192.168.36.159 + + + 7 + 37 + VirtualNetwork + 192.168.37.1 + 255.255.255.0 + 192.168.37.150-192.168.37.159 + + + 8 + 38 + VirtualNetwork + 192.168.38.1 + 255.255.255.0 + 192.168.38.150-192.168.38.159 + + + 9 + 39 + VirtualNetwork + 192.168.39.1 + 255.255.255.0 + 192.168.39.150-192.168.39.159 + + + 10 + 40 + VirtualNetwork + 192.168.40.1 + 255.255.255.0 + 192.168.40.150-192.168.40.159 + + + 11 + 41 + VirtualNetwork + 192.168.41.1 + 255.255.255.0 + 192.168.41.150-192.168.41.159 + + + + + + 1 + AH + 1 + 192.168.10.20-192.168.10.24 + 192.168.10.0/24 + + + 2 + KM + 2 + 192.168.10.25-192.168.10.29 + 192.168.10.0/24 + + + 3 + KY + 3 + 192.168.10.30-192.168.10.34 + 192.168.10.0/24 + + + 4 + WC + 4 + 192.168.10.35-192.168.10.39 + 192.168.10.0/24 + + + 5 + CV + 5 + 192.168.10.40-192.168.10.44 + 192.168.10.0/24 + + + 6 + KS + 6 + 192.168.10.45-192.168.10.49 + 192.168.10.0/24 + + + 7 + ES + 7 + 192.168.10.50-192.168.10.54 + 192.168.10.0/24 + + + 8 + RC + 8 + 192.168.10.55-192.168.10.59 + 192.168.10.0/24 + + + 9 + AX + 9 + 192.168.10.62-192.168.10.64 + 192.168.10.0/24 + + + 10 + JW + 10 + 192.168.10.65-192.168.10.69 + 192.168.10.0/24 + + + 11 + AJ + 11 + 192.168.10.70-192.168.10.74 + 192.168.10.0/24 + + + + + + + 1 + Small Instance + Small Instance [500MHZ CPU, 512MB MEM, 16GB Disk] - $0.10 per hour + 1 + 512 + 500 + false + + + 2 + Medium Instance + Medium Instance [500MHZ CPU, 1GB MEM, 32GB Disk] - $0.20 per hour + 1 + 1024 + 512 + + + 3 + Large Instance + Large Instance [2GHZ CPU, 4GB MEM, 64GB Disk] - $0.30 per hour + 2 + 4096 + 2000 + + + + + + 1 + 1 + Small Disk + Small Disk [16GB Disk] + 16000 + + + 2 + 1 + Medium Disk + Medium Disk [32GB Disk] + 32000 + + + 3 + 1 + Large Disk + Large Disk [64GB Disk] + 64000 + + + + + + + 2 + admin + password + Admin + User + admin@mailprovider.com + + + + + + default.zone + AH + + + domain.suffix + cloud-test.cloud.com + + + instance.name + AH + + + consoleproxy.ram.size + 256 + + + host.stats.interval + 3600000 + + + storage.stats.interval + 120000 + + + volume.stats.interval + -1 + + + ping.interval + 60 + + + alert.wait + 1800 + + + expunge.interval + 86400 + + + usage.aggregation.timezone + GMT + + + + ssh.privatekey + -----BEGIN RSA PRIVATE KEY-----\nMIIEoQIBAAKCAQEAnNUMVgQS87EzAQN9ufGgH3T1kOpqcvTmUrp8RVZyeA5qwptS\nrZxONRbhLK709pZFBJLmeFqiqciWoA/srVIFk+rPmBlVsMw8BK53hTGoax7iSe8s\nLFCAATm6vp0HnZzYqNfrzR2by36ET5aQD/VAyA55u+uUgAlxQuhKff2xjyahEHs+\nUiRlReiAgItygm9g3co3+8fJDOuRse+s0TOip1D0jPdo2AJFscyxrG9hWqQH86R/\nZlLJ7DqsiaAcUmn52u6Nsmd3BkRmGVx/D35Mq6upJqrk/QDfug9LF66yiIP/BEIn\n08N/wQ6m/O37WUtqqyl3rRKqs5TJ9ZnhsqeO9QIBIwKCAQA6QIDsv69EkkYk8qsK\njPJU06uq2rnS7T+bEhDmjdK+4MiRbOQx2vh6HnDktgM3BJ1K13oss/NGYHJ190lH\nsMA+QUXKx5TbRItSMixkrAta/Ne1D7FSScklBtBVbYZ8XtQhdMVML5GjWuCv2NZs\nU8eaw4xNHPyklcr7mBurI7b6p13VK5BNUWR/VNuigT4U89YzRcoEZ/sTlR+4ACYr\nxbUJJGBA03+NhdSAe2vodlMh5lGflD0JmHMFqqg9BcAtVb73JsOsxFQArbXwRd/q\nNckdoAvgJfhTOvXF5GMPLI0lGb6skJkS229F4GaBB2Iz4A9O0aHZob8I8zsWUbiu\npvBrAoGBAMjUDfF2x13NjH1cFHietO5O1oM0nZaAxKodxoAUvHVMUd5DIY50tqYw\n7ecKi2Cw43ONpdj0nP9Nc2NV3NDRqLopwkKUsTtq9AKQ2cIuw3+uS5vm0VZBzmTP\nuF04Qo4bXh/jFRA62u9bXsmIFtaehKxE1Gp6zi393GcbWP4HX/3dAoGBAMfq0KD3\ngeU1PHi9uI3Ss89nXzJsiGcwC5Iunu1aTzJCYhMlJkfmRcXYMAqSfg0nGWnfvlDh\nuOO26CHKjG182mTwYXdgQzIPpBc8suvgUWDBTrIzJI+zuyBLtPbd9DJEVrZkRVQX\nXrOV3Y5oOWsba4F+b20jaaHFAiY7s6OtrX/5AoGBAMMXI3zZyPwJgSlSIoPNX03m\nL3gke9QID4CvNduB26UlkVuRq5GzNRZ4rJdMEl3tqcC1fImdKswfWiX7o06ChqY3\nMb0FePfkPX7V2tnkSOJuzRsavLoxTCdqsxi6T0g318c0XZq81K4A/P5Jr8ksRl40\nPA+qfyVdAf3Cy3ptkHLzAoGASkFGLSi7N+CSzcLPhSJgCzUGGgsOF7LCeB/x4yGL\nIUvbSPCKj7vuB6gR2AqGlyvHnFprQpz7h8eYDI0PlmGS8kqn2+HtEpgYYGcAoMEI\nSIJQbhL+84vmaxTOL87IanEnhZL1LdzLZ0ZK+mE55fQ936P9gE77WVfNmSweJtob\n3xMCgYAl0aLeGf4oUZbI56eEaCbu8U7dEe6MF54VbozyiXqbp455QnUpuBrRn5uf\nc079dNcqTNDuk1+hYX9qNn1aXsvWeuofBXqWoFXu/c4yoWxJAPhEVhzZ9xrXI76I\nBKiPCyKrOa7bSLvs6SQPpuf5AQ8+NJrOxkEB9hbMuaAr2N5rCw==\n-----END RSA PRIVATE KEY----- + + Hidden + + + ssh.publickey + + ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAnNUMVgQS87EzAQN9ufGgH3T1kOpqcvTmUrp8RVZyeA5qwptSrZxONRbhLK709pZFBJLmeFqiqciWoA/srVIFk+rPmBlVsMw8BK53hTGoax7iSe8sLFCAATm6vp0HnZzYqNfrzR2by36ET5aQD/VAyA55u+uUgAlxQuhKff2xjyahEHs+UiRlReiAgItygm9g3co3+8fJDOuRse+s0TOip1D0jPdo2AJFscyxrG9hWqQH86R/ZlLJ7DqsiaAcUmn52u6Nsmd3BkRmGVx/D35Mq6upJqrk/QDfug9LF66yiIP/BEIn08N/wQ6m/O37WUtqqyl3rRKqs5TJ9ZnhsqeO9Q== root@test2.lab.vmops.com + + Hidden + + + + + memory.capacity.threshold + 0.85 + + + cpu.capacity.threshold + 0.85 + + + storage.capacity.threshold + 0.85 + + + storage.allocated.capacity.threshold + 0.85 + + + capacity.check.period + 3600000 + + + wait + 240 + + + network.throttling.rate + 200 + + + multicast.throttling.rate + 10 + + + + + + + diff --git a/build/deploy/production/db/templates-dev.sql b/build/deploy/production/db/templates-dev.sql new file mode 100644 index 00000000000..a12d5e14bbe --- /dev/null +++ b/build/deploy/production/db/templates-dev.sql @@ -0,0 +1,14 @@ +INSERT INTO `vmops`.`vm_template` (id, unique_name, name, public, path, created, type, hvm, bits, created_by, url, checksum, ready, display_text, enable_password) + VALUES (1, 'routing', 'DomR Template', 0, 'tank/volumes/demo/template/private/u000000/os/routing', now(), 'ext3', 0, 64, 1, 'http://vmopsserver.lab.vmops.com/images/routing/vmi-root-fc8-x86_64-domR.img.bz2', 'd00927f863a23b98cc6df6e377c9d0c6', 0, 'DomR Template', 0); +INSERT INTO `vmops`.`vm_template` (id, unique_name, name, public, path, created, type, hvm, bits, created_by, url, checksum, ready, display_text, enable_password) + VALUES (3, 'centos53-x86_64', 'Centos 5.3(x86_64) no GUI', 1, 'tank/volumes/demo/template/public/os/centos53-x86_64', now(), 'ext3', 0, 64, 1, 'http://vmopsserver.lab.vmops.com/images/centos52-x86_64/vmi-root-centos.5-2.64.pv.img.gz', 'd4ca80825d936db00eedf26620f13d69', 0, 'Centos 5.3(x86_64) no GUI', 0); +#INSERT INTO `vmops`.`vm_template` (id, unique_name, name, public, path, created, type, hvm, bits, created_by, url, checksum, ready, display_text, enable_password) +# VALUES (4, 'centos52-x86_64-gui', 'Centos 5.2(x86_64) GUI', 1, 'tank/volumes/demo/template/public/os/centos52-x86_64-gui', now(), 'ext3', 0, 64, 1, 'http://vmopsserver.lab.vmops.com/images/centos52-x86_64/vmi-root-centos.5-2.64.pv.img.gz', 'd4ca80825d936db00eedf26620f13d69', 0, 'Centos 5.2(x86_64) GUI', 0); +INSERT INTO `vmops`.`vm_template` (id, unique_name, name, public, path, created, type, hvm, bits, created_by, url, checksum, ready, display_text, enable_password) + VALUES (5, 'winxpsp3', 'Windows XP SP3 (32-bit)', 1, 'tank/volumes/demo/template/public/os/winxpsp3', now(), 'ntfs', 1, 32, 1, 'http://vmopsserver.lab.vmops.com/images/fedora10-x86_64/vmi-root-fedora10.64.img.gz', 'c76d42703f14108b15acc9983307c759', 0, 'Windows XP SP3 (32-bit)', 0); +INSERT INTO `vmops`.`vm_template` (id, unique_name, name, public, path, created, type, hvm, bits, created_by, url, checksum, ready, display_text, enable_password) + VALUES (7, 'win2003sp2', 'Windows 2003 SP2 (32-bit)', 1, 'tank/volumes/demo/template/public/os/win2003sp2', now(), 'ntfs', 1, 32, 1, 'http://vmopsserver.lab.vmops.com/images/win2003sp2/vmi-root-win2003sp2.img.gz', '4d2cc51898d05c0f7a2852c15bcdc77b', 0, 'Windows 2003 SP2 (32-bit)', 0); +INSERT INTO `vmops`.`vm_template` (id, unique_name, name, public, path, created, type, hvm, bits, created_by, url, checksum, ready, display_text, enable_password) + VALUES (8, 'win2003sp2-x64', 'Windows 2003 SP2 (64-bit)', 1, 'tank/volumes/demo/template/public/os/win2003sp2-x64', now(), 'ntfs', 1, 64, 1, 'http://vmopsserver.lab.vmops.com/images/win2003sp2-x86_64/vmi-root-win2003sp2-x64.img.gz', '35d4de1c38eb4fb9d81a31c1d989c482', 0, 'Windows 2003 SP2 (64-bit)', 0); +INSERT INTO `vmops`.`vm_template` (id, unique_name, name, public, path, created, type, hvm, bits, created_by, url, checksum, ready, display_text, enable_password) + VALUES (9, 'fedora12-GUI-x86_64', 'Fedora 12 Desktop(64-bit)', 1, 'tank/volumes/demo/template/public/os/fedora12-GUI-x86_64', now(), 'ext3', 1, 64, 1, 'http://vmopsserver.lab.vmops.com/images/fedora12-GUI-x86_64/vmi-root-fedora12-GUI-x86_64.qcow2.gz', '', 0, 'Fedora 12 Desktop (with httpd,java and mysql)', 0); diff --git a/build/deploy/production/server/conf/agent-update.properties b/build/deploy/production/server/conf/agent-update.properties new file mode 100644 index 00000000000..6b42aa8b6f5 --- /dev/null +++ b/build/deploy/production/server/conf/agent-update.properties @@ -0,0 +1 @@ +agent.minimal.version=@agent.min.version@ diff --git a/build/deploy/production/server/conf/cloud-localhost.pk12 b/build/deploy/production/server/conf/cloud-localhost.pk12 new file mode 100644 index 00000000000..79dfc4d7aa6 Binary files /dev/null and b/build/deploy/production/server/conf/cloud-localhost.pk12 differ diff --git a/build/deploy/production/server/conf/components.xml b/build/deploy/production/server/conf/components.xml new file mode 100755 index 00000000000..a40c3456ad3 --- /dev/null +++ b/build/deploy/production/server/conf/components.xml @@ -0,0 +1,185 @@ + + + + + + + + + + 50 + -1 + + + + + 50 + -1 + + + 50 + -1 + + + + + + + 50 + -1 + routing + + + 5000 + 300 + + + + 50 + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + 2 + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + diff --git a/build/deploy/production/server/conf/ehcache.xml b/build/deploy/production/server/conf/ehcache.xml new file mode 100755 index 00000000000..c65deeacdb9 --- /dev/null +++ b/build/deploy/production/server/conf/ehcache.xml @@ -0,0 +1,527 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/deploy/production/server/conf/log4j-cloud.xml b/build/deploy/production/server/conf/log4j-cloud.xml new file mode 100755 index 00000000000..2142d81eaaa --- /dev/null +++ b/build/deploy/production/server/conf/log4j-cloud.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/deploy/production/server/conf/log4j-cloud.xml.template b/build/deploy/production/server/conf/log4j-cloud.xml.template new file mode 100644 index 00000000000..5e1e6598884 --- /dev/null +++ b/build/deploy/production/server/conf/log4j-cloud.xml.template @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/deploy/production/server/conf/server.xml b/build/deploy/production/server/conf/server.xml new file mode 100755 index 00000000000..99ea003791c --- /dev/null +++ b/build/deploy/production/server/conf/server.xml @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +