X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Fintegration-configure-clustering.sh;h=619f3c311853fefca6fd877d764e1eacb9f1ec39;hb=0321e2dc502ca9481278bdc43567bd3f9d38defd;hp=27a9d2447c103762d2e640d1e942378f0d665ffb;hpb=5a1559f253c173a7c0a02fb3c8adc695b4e8de98;p=releng%2Fbuilder.git diff --git a/jjb/integration/integration-configure-clustering.sh b/jjb/integration/integration-configure-clustering.sh index 27a9d2447..619f3c311 100644 --- a/jjb/integration/integration-configure-clustering.sh +++ b/jjb/integration/integration-configure-clustering.sh @@ -4,25 +4,15 @@ # script. # shellcheck source=${ROBOT_VENV}/bin/activate disable=SC1091 source ${ROBOT_VENV}/bin/activate +source /tmp/common-functions.sh ${BUNDLEFOLDER} echo "#################################################" echo "## Configure Cluster and Start ##" echo "#################################################" -AKKACONF=/tmp/${BUNDLEFOLDER}/configuration/initial/akka.conf -MODULESCONF=/tmp/${BUNDLEFOLDER}/configuration/initial/modules.conf -MODULESHARDSCONF=/tmp/${BUNDLEFOLDER}/configuration/initial/module-shards.conf -MAVENCONF=/tmp/${BUNDLEFOLDER}/etc/org.ops4j.pax.url.mvn.cfg -FEATURESCONF=/tmp/${BUNDLEFOLDER}/etc/org.apache.karaf.features.cfg -CUSTOMPROP=/tmp/${BUNDLEFOLDER}/etc/custom.properties -LOGCONF=/tmp/${BUNDLEFOLDER}/etc/org.ops4j.pax.logging.cfg -MEMCONF=/tmp/${BUNDLEFOLDER}/bin/setenv -CONTROLLERMEM="2048m" - - if [ ${CONTROLLERSCOPE} == 'all' ]; then ACTUALFEATURES="odl-integration-compatible-with-all,${CONTROLLERFEATURES}" - CONTROLLERMEM="3072m" + export CONTROLLERMEM="3072m" else ACTUALFEATURES="odl-infrautils-ready,${CONTROLLERFEATURES}" fi @@ -52,20 +42,12 @@ nodes_list=$(join "${nodes[@]}") echo ${nodes_list} -# Run script plan in case it exists -if [ -f ${WORKSPACE}/test/csit/scriptplans/${TESTPLAN} ]; then - echo "scriptplan exists!!!" - echo "Reading the scriptplan:" - cat ${WORKSPACE}/test/csit/scriptplans/${TESTPLAN} | sed "s:integration:${WORKSPACE}:" > scriptplan.txt - cat scriptplan.txt - for line in $( egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' scriptplan.txt ); do - echo "Executing ${line}..." - source ${line} - done -fi +run_plan "script" # Create the configuration script to be run on controllers. cat > ${WORKSPACE}/configuration-script.sh <> \${LOGCONF} - fi - done +FEATURE_TEST_STRING="features-integration-test" +if [[ "$KARAF_VERSION" == "karaf4" ]]; then + FEATURE_TEST_STRING="features-test" fi -cat ${LOGCONF} -if [ "${ODL_ENABLE_L3_FWD}" == "yes" ]; then - echo "Enable the l3.fwd in custom.properties.." - echo "ovsdb.l3.fwd.enabled=yes" >> ${CUSTOMPROP} - cat ${CUSTOMPROP} +sed -ie "s%\(featuresRepositories=\|featuresRepositories =\)%featuresRepositories = mvn:org.opendaylight.integration/\${FEATURE_TEST_STRING}/${BUNDLE_VERSION}/xml/features,mvn:org.apache.karaf.decanter/apache-karaf-decanter/1.0.0/xml/features,%g" ${FEATURESCONF} +if [[ ! -z "${REPO_URL}" ]]; then + sed -ie "s%featuresRepositories =%featuresRepositories = ${REPO_URL},%g" ${FEATURESCONF} fi +cat ${FEATURESCONF} -echo "Configure java home and max memory..." -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} - -echo "Set Java version" -sudo /usr/sbin/alternatives --install /usr/bin/java java ${JAVA_HOME}/bin/java 1 -sudo /usr/sbin/alternatives --set java ${JAVA_HOME}/bin/java -echo "JDK default version ..." -java -version +configure_karaf_log "${KARAF_VERSION}" "${CONTROLLERDEBUGMAP}" -echo "Set JAVA_HOME" -export JAVA_HOME="${JAVA_HOME}" -# Did you know that in HERE documents, single quote is an ordinary character, but backticks are still executing? -JAVA_RESOLVED=\`readlink -e "\${JAVA_HOME}/bin/java"\` -echo "Java binary pointed at by JAVA_HOME: \${JAVA_RESOLVED}" +set_java_vars "${JAVA_HOME}" "${CONTROLLERMEM}" "${MEMCONF}" # Copy shard file if exists if [ -f /tmp/custom_shard_config.txt ]; then @@ -153,6 +106,7 @@ cat > ${WORKSPACE}/startup-script.sh < configplan.txt - cat configplan.txt - for line in $( egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' configplan.txt ); do - echo "Executing ${line}..." - source ${line} - done -fi +run_plan "config" # Copy over the startup script to each controller and execute it. for i in `seq 1 ${NUM_ODL_SYSTEM}`