X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Finclude-raw-integration-deploy-controller.sh;h=66028199355a90c2d78a7d36cff92087bb4b1036;hb=0a6d4e1296d7b79b663af00aff80ac8572494f09;hp=4b04c867e530144898aa88f2be4fef9772a15d79;hpb=d997d5a23917cd718f146639d52a946a6745be82;p=releng%2Fbuilder.git diff --git a/jjb/integration/include-raw-integration-deploy-controller.sh b/jjb/integration/include-raw-integration-deploy-controller.sh index 4b04c867e..660281993 100644 --- a/jjb/integration/include-raw-integration-deploy-controller.sh +++ b/jjb/integration/include-raw-integration-deploy-controller.sh @@ -1,132 +1,55 @@ echo "#################################################" -echo "## include-raw-integration-deploy-controller ##" +echo "## Install Distribution in Cluster ##" echo "#################################################" -set -x +CONTROLLERMEM="2048m" +if [ ${CONTROLLERSCOPE} == 'all' ]; then + ACTUALFEATURES="odl-integration-compatible-with-all,${CONTROLLERFEATURES}" + CONTROLLERMEM="3072m" +else + ACTUALFEATURES="${CONTROLLERFEATURES}" +fi cat > ${WORKSPACE}/deploy-controller-script.sh < \${CFG}.1 -cat \${CFG}.1 | sed "s%mvn:org.opendaylight.integration/features-integration-index/${BUNDLEVERSION}/xml/features%mvn:org.opendaylight.integration/features-integration-index/${BUNDLEVERSION}/xml/features,mvn:org.opendaylight.integration/features-integration-test/${BUNDLEVERSION}/xml/features%" > \${CFG} -cat \${CFG} +FEATURESCONF=/tmp/${BUNDLEFOLDER}/etc/org.apache.karaf.features.cfg +sed -ie "s/featuresBoot=.*/featuresBoot=config,standard,region,package,kar,ssh,management,${ACTUALFEATURES}/g" \${FEATURESCONF} +sed -ie "s%mvn:org.opendaylight.integration/features-integration-index/${BUNDLEVERSION}/xml/features%mvn:org.opendaylight.integration/features-integration-index/${BUNDLEVERSION}/xml/features,mvn:org.opendaylight.integration/features-integration-test/${BUNDLEVERSION}/xml/features%g" \${FEATURESCONF} +cat \${FEATURESCONF} echo "Configuring the log..." -LOG=org.ops4j.pax.logging.cfg -cp \${LOG} \${LOG}.bak -cat \${LOG}.bak | sed 's/log4j.appender.out.maxFileSize=1MB/log4j.appender.out.maxFileSize=20MB/' > \${LOG} -cat \${LOG} +LOGCONF=/tmp/${BUNDLEFOLDER}/etc/org.ops4j.pax.logging.cfg +sed -ie 's/log4j.appender.out.maxFileSize=1MB/log4j.appender.out.maxFileSize=20MB/g' \${LOGCONF} +cat \${LOGCONF} echo "Configure max memory..." -MEM=setenv -cd ../bin -cp \${MEM} \${MEM}.bak -cat \${MEM}.bak | sed 's/JAVA_MAX_MEM="2048m"/JAVA_MAX_MEM="${CONTROLLERMEM}"/' > \${MEM} -cat \${MEM} +MEMCONF=/tmp/${BUNDLEFOLDER}/bin/setenv +sed -ie 's/JAVA_MAX_MEM="2048m"/JAVA_MAX_MEM="${CONTROLLERMEM}"/g' \${MEMCONF} +cat \${MEMCONF} -echo "Starting deploy controller..." -./start +echo "Listing all open ports on controller system" +netstat -natu EOF -cat > ${WORKSPACE}/deploy-sanitytest-controller-script.sh < "600" )); then - echo Timeout Controller DOWN - - cd /tmp/${BUNDLEFOLDER}/data/ - cat karaf.log - exit 1 - else - COUNT=\$(( \${COUNT} + 5 )) - sleep 5 - echo waiting \$COUNT secs... - fi -done - - -cd /tmp/${BUNDLEFOLDER}/bin/ - -echo "Checking OSGi bundles..." -sshpass -p karaf ./client -u karaf 'bundle:list' - -pkill java - -set +x - -EOF - - -set +x - - - - -############################################################### -## Define a function to run controller-script on controller # -############################################################### - -function runcontrollerscript -{ - local CONTROLLERIP=$1 - echo "running controller $CONTROLLERIP" - scp ${WORKSPACE}/deploy-controller-script.sh $CONTROLLERIP:/tmp - ssh $CONTROLLERIP 'bash /tmp/deploy-controller-script.sh' -} - -function sanitytestcontroller -{ - local CONTROLLERIP=$1 - echo "sanity testing controller $CONTROLLERIP" - scp ${WORKSPACE}/deploy-sanitytest-controller-script.sh $CONTROLLERIP:/tmp - ssh $CONTROLLERIP 'bash /tmp/deploy-sanitytest-controller-script.sh' -} - -echo "##################################" -echo "## Loop through controller IPs #" -echo "##################################" - -declare CONTROLLERIPS=($(cat slave_addresses.txt | grep CONTROLLER | awk -F = '{print $2}')) - -for i in "${CONTROLLERIPS[@]}" +for i in `seq 1 ${NUM_ODL_SYSTEM}` do - echo "IP address is: $i" - runcontrollerscript $i + 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' done -for i in "${CONTROLLERIPS[@]}" -do - echo "IP address is: $i" - sanitytestcontroller $i -done - -echo "###################################################" -echo "## END include-raw-integration-deploy-controller ##" -echo "###################################################" - # vim: ts=4 sw=4 sts=4 et ft=sh :