From 5f431dddd72c379c1a1364d1f70732f442a0e954 Mon Sep 17 00:00:00 2001 From: juanpe Date: Mon, 3 Dec 2012 14:40:58 +0100 Subject: [PATCH 1/3] Let use you any username to connect by ssh using username parameter --- .../driver/provisioning/openstack2/OpenstackCloudDriver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/cloudifysource/esc/driver/provisioning/openstack2/OpenstackCloudDriver.java b/src/main/java/org/cloudifysource/esc/driver/provisioning/openstack2/OpenstackCloudDriver.java index 03c3996..6a74249 100644 --- a/src/main/java/org/cloudifysource/esc/driver/provisioning/openstack2/OpenstackCloudDriver.java +++ b/src/main/java/org/cloudifysource/esc/driver/provisioning/openstack2/OpenstackCloudDriver.java @@ -579,7 +579,7 @@ private MachineDetails newServer(final String token, final long endTime, final C md.setCloudifyInstalled(false); md.setInstallationDirectory(serverTemplate.getRemoteDirectory()); - md.setRemoteUsername("root"); + md.setRemoteUsername(serverTemplate.getUsername()); return md; } catch (final Exception e) { From 912325bfad548a9ec8430e39f3140b7a0366c0ab Mon Sep 17 00:00:00 2001 From: Juan Pedro Escalona Rueda Date: Mon, 3 Dec 2012 15:27:10 +0100 Subject: [PATCH 2/3] Let use you any username to connect by ssh using username parameter --- src/test/resources/sample-cloud.groovy | 14 +- .../resources/upload/bootstrap-management.sh | 202 ++++++++++++++++++ 2 files changed, 211 insertions(+), 5 deletions(-) create mode 100755 src/test/resources/upload/bootstrap-management.sh diff --git a/src/test/resources/sample-cloud.groovy b/src/test/resources/sample-cloud.groovy index 1b8c230..c3437a5 100755 --- a/src/test/resources/sample-cloud.groovy +++ b/src/test/resources/sample-cloud.groovy @@ -14,11 +14,10 @@ cloud { provider { // optional provider "openstack" - localDirectory "tools/cli/plugins/esc/sample/upload" - cloudifyUrl "http://repository.cloudifysource.org/org/cloudifysource/2.1.1/gigaspaces-cloudify-2.1.1-ga-b1400.zip" + cloudifyUrl "http://repository.cloudifysource.org/org/cloudifysource/2.2.0-RELEASE/gigaspaces-cloudify-2.2.0-ga-b2500" // create a archive with the driver in folder lib/plateform/esm - //cloudifyOverridesUrl "https://github.com/downloads/fastconnect/cloudify-openstack-driver/gigaspaces_overrides.zip" + //cloudifyOverridesUrl "https://github.com/downloads/fastconnect/cloudify-openstack-driver/gigaspaces_overrides" // warning: '.' is not allowed machineNamePrefix "cloudify-agent-" @@ -37,8 +36,7 @@ cloud { } user { user "LOGIN" - apiKey "PASSWORD" - keyFile "KEYPAIR.pem" + apiKey "PASSWORD" } templates ([ MEDIUM_LINUX : template{ @@ -48,12 +46,18 @@ cloud { // use "nova flavor-list" to find the id of the hardware hardwareId "RegionOne/3" remoteDirectory "/root/" + + localDirectory "upload" + + username="USERNAME" options ([ "openstack.securityGroup" : "default", "openstack.keyPair" : "KEYPAIR_NAME" ]) + //privileged true + } ]) diff --git a/src/test/resources/upload/bootstrap-management.sh b/src/test/resources/upload/bootstrap-management.sh new file mode 100755 index 0000000..8d3190b --- /dev/null +++ b/src/test/resources/upload/bootstrap-management.sh @@ -0,0 +1,202 @@ +#! /bin/bash + +############################################################################# +# This script starts a Gigaspaces agent for use with the Gigaspaces +# Cloudify. The agent will function as management depending on the value of $GSA_MODE +# +# Parameters the should be exported beforehand: +# $LUS_IP_ADDRESS - Ip of the head node that runs a LUS and ESM. May be my IP. (Required) +# $GSA_MODE - 'agent' if this node should join an already running node. Otherwise, any value. +# $NO_WEB_SERVICES - 'true' if web-services (rest, webui) should not be deployed (only if GSA_MODE != 'agent') +# $MACHINE_IP_ADDRESS - The IP of this server (Useful if multiple NICs exist) +# $MACHINE_ZONES - This is required if this is not a management machine +# $WORKING_HOME_DIRECTORY - This is where the files were copied to (cloudify installation, etc..) +# $CLOUDIFY_LINK - If this url is found, it will be downloaded to $WORKING_HOME_DIRECTORY/gigaspaces.zip +# $CLOUDIFY_OVERRIDES_LINK - If this url is found, it will be downloaded and unzipped into the same location as cloudify +# $CLOUD_FILE - Location of the cloud configuration file. Only available in bootstrap of management machines. +# $NO_WEB_SERVICES - If set to 'true', indicates that the rest and web-ui services should not be deployed in this machine. +# $CLOUDIFY_CLOUD_IMAGE_ID - If set, indicates the image ID for this machine. +# $CLOUDIFY_CLOUD_HARDWARE_ID - If set, indicates the hardware ID for this machine. +# $PASSWORD - the machine password +############################################################################# + +# args: +# $1 the error code of the last command (should be explicitly passed) +# $2 the message to print in case of an error +# +# an error message is printed and the script exists with the provided error code +function error_exit { + echo "$2 : error code: $1" + exit ${1} +} + +# args: +# $1 the error code of the last command (should be explicitly passed) +# $2 the message to print in case of an error +# $3 the threshold to exit on +# +# if (last_error_code [$1]) >= (threshold [$3]) the provided message[$2] is printed and the script +# exists with the provided error code ($1) +function error_exit_on_level { + if [ ${1} -ge ${3} ]; then + error_exit ${1} ${2} + fi +} + + +JAVA_32_URL="http://repository.cloudifysource.org/com/oracle/java/1.6.0_32/jdk-6u32-linux-i586.bin" +JAVA_64_URL="http://repository.cloudifysource.org/com/oracle/java/1.6.0_32/jdk-6u32-linux-x64.bin" + +# If not JDK specified, determine which JDK to install based on hardware architecture +if [ -z "$CLOUDIFY_AGENT_ENV_JAVA_URL" ]; then + ARCH=`uname -m` + echo Machine Architecture -- $ARCH + if [ "$ARCH" = "i686" ]; then + export CLOUDIFY_AGENT_ENV_JAVA_URL=$JAVA_32_URL + elif [ "$ARCH" = "x86_64" ]; then + export CLOUDIFY_AGENT_ENV_JAVA_URL=$JAVA_64_URL + else + echo Unknown architecture -- $ARCH -- defaulting to 32 bit JDK + export CLOUDIFY_AGENT_ENV_JAVA_URL=$JAVA_32_URL + fi + +fi + +if [ "$CLOUDIFY_AGENT_ENV_JAVA_URL" = "NO_INSTALL" ]; then + echo "JDK will not be installed" +else + echo Previous JAVA_HOME value -- $JAVA_HOME + export CLOUDIFY_ORIGINAL_JAVA_HOME=$JAVA_HOME + + echo Downloading JDK from $CLOUDIFY_AGENT_ENV_JAVA_URL + wget -q -O $WORKING_HOME_DIRECTORY/java.bin $CLOUDIFY_AGENT_ENV_JAVA_URL + chmod +x $WORKING_HOME_DIRECTORY/java.bin + echo -e "\n" > $WORKING_HOME_DIRECTORY/input.txt + mkdir ~/java + cd ~/java + + echo Installing JDK + $WORKING_HOME_DIRECTORY/java.bin < $WORKING_HOME_DIRECTORY/input.txt > /dev/null + mv ~/java/*/* ~/java || error_exit $? "Failed moving JDK installation" + rm -f $WORKING_HOME_DIRECTORY/input.txt + export JAVA_HOME=~/java +fi + +export EXT_JAVA_OPTIONS="-Dcom.gs.multicast.enabled=false" + +if [ ! -z "$CLOUDIFY_LINK" ]; then + echo Downloading cloudify installation from $CLOUDIFY_LINK.tar.gz + wget -q $CLOUDIFY_LINK.tar.gz -O $WORKING_HOME_DIRECTORY/gigaspaces.tar.gz || error_exit $? "Failed downloading cloudify installation" +fi + +if [ ! -z "$CLOUDIFY_OVERRIDES_LINK" ]; then + echo Downloading cloudify overrides from $CLOUDIFY_OVERRIDES_LINK.tar.gz + wget -q $CLOUDIFY_OVERRIDES_LINK.tar.gz -O $WORKING_HOME_DIRECTORY/gigaspaces_overrides.tar.gz || error_exit $? "Failed downloading cloudify overrides" +fi + +# Todo: Check this condition +if [ ! -d "~/gigaspaces" -o $WORKING_HOME_DIRECTORY/gigaspaces.tar.gz -nt ~/gigaspaces ]; then + rm -rf ~/gigaspaces || error_exit $? "Failed removing old gigaspaces directory" + mkdir ~/gigaspaces || error_exit $? "Failed creating gigaspaces directory" + + # 2 is the error level threshold. 1 means only warnings + # this is needed for testing purposes on zip files created on the windows platform + tar xfz $WORKING_HOME_DIRECTORY/gigaspaces.tar.gz -C ~/gigaspaces || error_exit_on_level $? "Failed extracting cloudify installation" 2 + + # Todo: consider removing this line + chmod -R 777 ~/gigaspaces || error_exit $? "Failed changing permissions in cloudify installion" + mv ~/gigaspaces/*/* ~/gigaspaces || error_exit $? "Failed moving cloudify installation" + + if [ ! -z "$CLOUDIFY_OVERRIDES_LINK" ]; then + echo Copying overrides into cloudify distribution + tar xfz $WORKING_HOME_DIRECTORY/gigaspaces_overrides.tar.gz -C ~/gigaspaces || error_exit_on_level $? "Failed extracting cloudify overrides" 2 + fi +fi + +# if an overrides directory exists, copy it into the cloudify distribution +if [ -d $WORKING_HOME_DIRECTORY/cloudify-overrides ]; then + cp -rf $WORKING_HOME_DIRECTORY/cloudify-overrides/* ~/gigaspaces +fi + +# UPDATE SETENV SCRIPT... +echo Updating environment script +cd ~/gigaspaces/bin || error_exit $? "Failed changing directory to bin directory" + +sed -i "1i export NIC_ADDR=$MACHINE_IP_ADDRESS" setenv.sh || error_exit $? "Failed updating setenv.sh" +sed -i "1i export LOOKUPLOCATORS=$LUS_IP_ADDRESS" setenv.sh || error_exit $? "Failed updating setenv.sh" +sed -i "1i export CLOUDIFY_CLOUD_IMAGE_ID=$CLOUDIFY_CLOUD_IMAGE_ID" setenv.sh || error_exit $? "Failed updating setenv.sh" +sed -i "1i export CLOUDIFY_CLOUD_HARDWARE_ID=$CLOUDIFY_CLOUD_HARDWARE_ID" setenv.sh || error_exit $? "Failed updating setenv.sh" +sed -i "1i export PATH=$JAVA_HOME/bin:$PATH" setenv.sh || error_exit $? "Failed updating setenv.sh" +sed -i "1i export JAVA_HOME=$JAVA_HOME" setenv.sh || error_exit $? "Failed updating setenv.sh" + +cd ~/gigaspaces/tools/cli || error_exit $? "Failed changing directory to cli directory" + +# START AGENT ALONE OR WITH MANAGEMENT +if [ -f nohup.out ]; then + rm nohup.out +fi + +if [ -f nohup.out ]; then + error_exit 1 "Failed to remove nohup.out Probably used by another process" +fi + +# Privileged mode handling +if [ "$CLOUDIFY_AGENT_ENV_PRIVILEGED" = "true" ]; then + # First check if sudo is allowed for current session + export CLOUDIFY_USER=`whoami` + if [ "$CLOUDIFY_USER" = "root" ]; then + # root is privileged by definition + echo Running as root + else + sudo -n ls > /dev/null || error_exit_on_level $? "Current user is not a sudoer, or requires a password for sudo" 1 + fi + + # now modify sudoers configuration to allow execution without tty + echo Checking for Ubuntu + grep -i ubuntu /proc/version > /dev/null + if [ "$?" -eq "0" ]; then + # ubuntu + echo Running on Ubuntu + if sudo grep -q -E '[^!]requiretty' /etc/sudoers; then + echo creating sudoers user file + echo "Defaults:`whoami` !requiretty" | sudo tee /etc/sudoers.d/`whoami` >/dev/null + sudo chmod 0440 /etc/sudoers.d/`whoami` + else + echo No requiretty directive found, nothing to do + fi + else + # other - modify sudoers file + if [ ! -f "/etc/sudoers" ]; then + error_exit 101 "Could not find sudoers file at expected location (/etc/sudoers)" + fi + echo Setting privileged mode + sudo sed -i 's/^Defaults.*requiretty/#&/g' /etc/sudoers || error_exit_on_level $? "Failed to edit sudoers file to disable requiretty directive" 1 + fi + +fi + +# Execute per-template command +if [ ! -z "$CLOUDIFY_AGENT_ENV_INIT_COMMAND" ]; then + echo Executing initialization command + $CLOUDIFY_AGENT_ENV_INIT_COMMAND +fi + +if [ "$GSA_MODE" = "agent" ]; then + ERRMSG="Failed starting agent" + nohup ./cloudify.sh start-agent -timeout 30 --verbose -zone $MACHINE_ZONES -auto-shutdown +else + ERRMSG="Failed starting management services" + if [ "$NO_WEB_SERVICES" = "true" ]; then + nohup ./cloudify.sh start-management -no-web-services -no-management-space -timeout 30 --verbose -auto-shutdown -cloud-file $CLOUD_FILE + else + nohup ./cloudify.sh start-management -timeout 30 --verbose -auto-shutdown -cloud-file $CLOUD_FILE + fi +fi + +RETVAL=$? +echo cat nohup.out +cat nohup.out +if [ $RETVAL -ne 0 ]; then + error_exit $RETVAL $ERRMSG +fi +exit 0 From 9802e1389bbdea260240447f033040eb05dc2a00 Mon Sep 17 00:00:00 2001 From: Juan Pedro Escalona Rueda Date: Tue, 4 Dec 2012 10:21:43 +0100 Subject: [PATCH 3/3] deleted groovy, not useful for the driver --- .../resources/upload/bootstrap-management.sh | 202 ------------------ 1 file changed, 202 deletions(-) delete mode 100755 src/test/resources/upload/bootstrap-management.sh diff --git a/src/test/resources/upload/bootstrap-management.sh b/src/test/resources/upload/bootstrap-management.sh deleted file mode 100755 index 8d3190b..0000000 --- a/src/test/resources/upload/bootstrap-management.sh +++ /dev/null @@ -1,202 +0,0 @@ -#! /bin/bash - -############################################################################# -# This script starts a Gigaspaces agent for use with the Gigaspaces -# Cloudify. The agent will function as management depending on the value of $GSA_MODE -# -# Parameters the should be exported beforehand: -# $LUS_IP_ADDRESS - Ip of the head node that runs a LUS and ESM. May be my IP. (Required) -# $GSA_MODE - 'agent' if this node should join an already running node. Otherwise, any value. -# $NO_WEB_SERVICES - 'true' if web-services (rest, webui) should not be deployed (only if GSA_MODE != 'agent') -# $MACHINE_IP_ADDRESS - The IP of this server (Useful if multiple NICs exist) -# $MACHINE_ZONES - This is required if this is not a management machine -# $WORKING_HOME_DIRECTORY - This is where the files were copied to (cloudify installation, etc..) -# $CLOUDIFY_LINK - If this url is found, it will be downloaded to $WORKING_HOME_DIRECTORY/gigaspaces.zip -# $CLOUDIFY_OVERRIDES_LINK - If this url is found, it will be downloaded and unzipped into the same location as cloudify -# $CLOUD_FILE - Location of the cloud configuration file. Only available in bootstrap of management machines. -# $NO_WEB_SERVICES - If set to 'true', indicates that the rest and web-ui services should not be deployed in this machine. -# $CLOUDIFY_CLOUD_IMAGE_ID - If set, indicates the image ID for this machine. -# $CLOUDIFY_CLOUD_HARDWARE_ID - If set, indicates the hardware ID for this machine. -# $PASSWORD - the machine password -############################################################################# - -# args: -# $1 the error code of the last command (should be explicitly passed) -# $2 the message to print in case of an error -# -# an error message is printed and the script exists with the provided error code -function error_exit { - echo "$2 : error code: $1" - exit ${1} -} - -# args: -# $1 the error code of the last command (should be explicitly passed) -# $2 the message to print in case of an error -# $3 the threshold to exit on -# -# if (last_error_code [$1]) >= (threshold [$3]) the provided message[$2] is printed and the script -# exists with the provided error code ($1) -function error_exit_on_level { - if [ ${1} -ge ${3} ]; then - error_exit ${1} ${2} - fi -} - - -JAVA_32_URL="http://repository.cloudifysource.org/com/oracle/java/1.6.0_32/jdk-6u32-linux-i586.bin" -JAVA_64_URL="http://repository.cloudifysource.org/com/oracle/java/1.6.0_32/jdk-6u32-linux-x64.bin" - -# If not JDK specified, determine which JDK to install based on hardware architecture -if [ -z "$CLOUDIFY_AGENT_ENV_JAVA_URL" ]; then - ARCH=`uname -m` - echo Machine Architecture -- $ARCH - if [ "$ARCH" = "i686" ]; then - export CLOUDIFY_AGENT_ENV_JAVA_URL=$JAVA_32_URL - elif [ "$ARCH" = "x86_64" ]; then - export CLOUDIFY_AGENT_ENV_JAVA_URL=$JAVA_64_URL - else - echo Unknown architecture -- $ARCH -- defaulting to 32 bit JDK - export CLOUDIFY_AGENT_ENV_JAVA_URL=$JAVA_32_URL - fi - -fi - -if [ "$CLOUDIFY_AGENT_ENV_JAVA_URL" = "NO_INSTALL" ]; then - echo "JDK will not be installed" -else - echo Previous JAVA_HOME value -- $JAVA_HOME - export CLOUDIFY_ORIGINAL_JAVA_HOME=$JAVA_HOME - - echo Downloading JDK from $CLOUDIFY_AGENT_ENV_JAVA_URL - wget -q -O $WORKING_HOME_DIRECTORY/java.bin $CLOUDIFY_AGENT_ENV_JAVA_URL - chmod +x $WORKING_HOME_DIRECTORY/java.bin - echo -e "\n" > $WORKING_HOME_DIRECTORY/input.txt - mkdir ~/java - cd ~/java - - echo Installing JDK - $WORKING_HOME_DIRECTORY/java.bin < $WORKING_HOME_DIRECTORY/input.txt > /dev/null - mv ~/java/*/* ~/java || error_exit $? "Failed moving JDK installation" - rm -f $WORKING_HOME_DIRECTORY/input.txt - export JAVA_HOME=~/java -fi - -export EXT_JAVA_OPTIONS="-Dcom.gs.multicast.enabled=false" - -if [ ! -z "$CLOUDIFY_LINK" ]; then - echo Downloading cloudify installation from $CLOUDIFY_LINK.tar.gz - wget -q $CLOUDIFY_LINK.tar.gz -O $WORKING_HOME_DIRECTORY/gigaspaces.tar.gz || error_exit $? "Failed downloading cloudify installation" -fi - -if [ ! -z "$CLOUDIFY_OVERRIDES_LINK" ]; then - echo Downloading cloudify overrides from $CLOUDIFY_OVERRIDES_LINK.tar.gz - wget -q $CLOUDIFY_OVERRIDES_LINK.tar.gz -O $WORKING_HOME_DIRECTORY/gigaspaces_overrides.tar.gz || error_exit $? "Failed downloading cloudify overrides" -fi - -# Todo: Check this condition -if [ ! -d "~/gigaspaces" -o $WORKING_HOME_DIRECTORY/gigaspaces.tar.gz -nt ~/gigaspaces ]; then - rm -rf ~/gigaspaces || error_exit $? "Failed removing old gigaspaces directory" - mkdir ~/gigaspaces || error_exit $? "Failed creating gigaspaces directory" - - # 2 is the error level threshold. 1 means only warnings - # this is needed for testing purposes on zip files created on the windows platform - tar xfz $WORKING_HOME_DIRECTORY/gigaspaces.tar.gz -C ~/gigaspaces || error_exit_on_level $? "Failed extracting cloudify installation" 2 - - # Todo: consider removing this line - chmod -R 777 ~/gigaspaces || error_exit $? "Failed changing permissions in cloudify installion" - mv ~/gigaspaces/*/* ~/gigaspaces || error_exit $? "Failed moving cloudify installation" - - if [ ! -z "$CLOUDIFY_OVERRIDES_LINK" ]; then - echo Copying overrides into cloudify distribution - tar xfz $WORKING_HOME_DIRECTORY/gigaspaces_overrides.tar.gz -C ~/gigaspaces || error_exit_on_level $? "Failed extracting cloudify overrides" 2 - fi -fi - -# if an overrides directory exists, copy it into the cloudify distribution -if [ -d $WORKING_HOME_DIRECTORY/cloudify-overrides ]; then - cp -rf $WORKING_HOME_DIRECTORY/cloudify-overrides/* ~/gigaspaces -fi - -# UPDATE SETENV SCRIPT... -echo Updating environment script -cd ~/gigaspaces/bin || error_exit $? "Failed changing directory to bin directory" - -sed -i "1i export NIC_ADDR=$MACHINE_IP_ADDRESS" setenv.sh || error_exit $? "Failed updating setenv.sh" -sed -i "1i export LOOKUPLOCATORS=$LUS_IP_ADDRESS" setenv.sh || error_exit $? "Failed updating setenv.sh" -sed -i "1i export CLOUDIFY_CLOUD_IMAGE_ID=$CLOUDIFY_CLOUD_IMAGE_ID" setenv.sh || error_exit $? "Failed updating setenv.sh" -sed -i "1i export CLOUDIFY_CLOUD_HARDWARE_ID=$CLOUDIFY_CLOUD_HARDWARE_ID" setenv.sh || error_exit $? "Failed updating setenv.sh" -sed -i "1i export PATH=$JAVA_HOME/bin:$PATH" setenv.sh || error_exit $? "Failed updating setenv.sh" -sed -i "1i export JAVA_HOME=$JAVA_HOME" setenv.sh || error_exit $? "Failed updating setenv.sh" - -cd ~/gigaspaces/tools/cli || error_exit $? "Failed changing directory to cli directory" - -# START AGENT ALONE OR WITH MANAGEMENT -if [ -f nohup.out ]; then - rm nohup.out -fi - -if [ -f nohup.out ]; then - error_exit 1 "Failed to remove nohup.out Probably used by another process" -fi - -# Privileged mode handling -if [ "$CLOUDIFY_AGENT_ENV_PRIVILEGED" = "true" ]; then - # First check if sudo is allowed for current session - export CLOUDIFY_USER=`whoami` - if [ "$CLOUDIFY_USER" = "root" ]; then - # root is privileged by definition - echo Running as root - else - sudo -n ls > /dev/null || error_exit_on_level $? "Current user is not a sudoer, or requires a password for sudo" 1 - fi - - # now modify sudoers configuration to allow execution without tty - echo Checking for Ubuntu - grep -i ubuntu /proc/version > /dev/null - if [ "$?" -eq "0" ]; then - # ubuntu - echo Running on Ubuntu - if sudo grep -q -E '[^!]requiretty' /etc/sudoers; then - echo creating sudoers user file - echo "Defaults:`whoami` !requiretty" | sudo tee /etc/sudoers.d/`whoami` >/dev/null - sudo chmod 0440 /etc/sudoers.d/`whoami` - else - echo No requiretty directive found, nothing to do - fi - else - # other - modify sudoers file - if [ ! -f "/etc/sudoers" ]; then - error_exit 101 "Could not find sudoers file at expected location (/etc/sudoers)" - fi - echo Setting privileged mode - sudo sed -i 's/^Defaults.*requiretty/#&/g' /etc/sudoers || error_exit_on_level $? "Failed to edit sudoers file to disable requiretty directive" 1 - fi - -fi - -# Execute per-template command -if [ ! -z "$CLOUDIFY_AGENT_ENV_INIT_COMMAND" ]; then - echo Executing initialization command - $CLOUDIFY_AGENT_ENV_INIT_COMMAND -fi - -if [ "$GSA_MODE" = "agent" ]; then - ERRMSG="Failed starting agent" - nohup ./cloudify.sh start-agent -timeout 30 --verbose -zone $MACHINE_ZONES -auto-shutdown -else - ERRMSG="Failed starting management services" - if [ "$NO_WEB_SERVICES" = "true" ]; then - nohup ./cloudify.sh start-management -no-web-services -no-management-space -timeout 30 --verbose -auto-shutdown -cloud-file $CLOUD_FILE - else - nohup ./cloudify.sh start-management -timeout 30 --verbose -auto-shutdown -cloud-file $CLOUD_FILE - fi -fi - -RETVAL=$? -echo cat nohup.out -cat nohup.out -if [ $RETVAL -ne 0 ]; then - error_exit $RETVAL $ERRMSG -fi -exit 0