natapp project jenkins builder jobs
[releng/builder.git] / jjb / integration / include-raw-integration-deploy-controller.sh
index bfda122f8c6efef55ec76fe8fa5e0f997f8cbb8a..8db436d954e2404e82385a9379bccf59482c037c 100644 (file)
@@ -23,7 +23,7 @@ echo "Downloading the distribution from ${ACTUALBUNDLEURL}"
 wget --no-verbose  '${ACTUALBUNDLEURL}'
 
 echo "Extracting the new controller..."
-unzip -o -q ${BUNDLE}
+unzip -q ${BUNDLE}
 
 echo "Configuring the startup features..."
 FEATURESCONF=/tmp/${BUNDLEFOLDER}/etc/org.apache.karaf.features.cfg
@@ -38,8 +38,9 @@ sed -ie 's/log4j.appender.out.maxBackupIndex=10/log4j.appender.out.maxBackupInde
 sed -ie 's/log4j.appender.out.maxFileSize=1MB/log4j.appender.out.maxFileSize=100GB/g' \${LOGCONF}
 cat \${LOGCONF}
 
-echo "Configure max memory..."
+echo "Configure java home and max memory..."
 MEMCONF=/tmp/${BUNDLEFOLDER}/bin/setenv
+sed -ie 's%^# export JAVA_HOME%export JAVA_HOME="\${JAVA_HOME:-${JAVA_HOME}}"%g' \${MEMCONF}
 sed -ie 's/JAVA_MAX_MEM="2048m"/JAVA_MAX_MEM="${CONTROLLERMEM}"/g' \${MEMCONF}
 cat \${MEMCONF}
 
@@ -47,7 +48,7 @@ EOF
 
 for i in `seq 1 ${NUM_ODL_SYSTEM}`
 do
-    CONTROLLERIP=ODL_SYSTEM_${i}_IP 
+    CONTROLLERIP=ODL_SYSTEM_${i}_IP
     echo "Installing distribution in member-${i} with IP address ${!CONTROLLERIP}"
     scp ${WORKSPACE}/deploy-controller-script.sh ${!CONTROLLERIP}:/tmp
     ssh ${!CONTROLLERIP} 'bash /tmp/deploy-controller-script.sh'