X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=jjb%2Fintegration%2Fintegration-configure-clustering.sh;h=c6e567b8970e337c17d756c36067395c34cdedae;hb=aff697d3a4cc8a47de11618e2964b2f26b60c6bb;hp=241a3ab41f6f4b11674f7e321adc5d21745a2a38;hpb=17e6069649be34438c3e5ca5d36b1a88b04fd539;p=releng%2Fbuilder.git diff --git a/jjb/integration/integration-configure-clustering.sh b/jjb/integration/integration-configure-clustering.sh index 241a3ab41..c6e567b89 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 +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 ${LOGCONF} +cat ${FEATURESCONF} if [ "${ODL_ENABLE_L3_FWD}" == "yes" ]; then echo "Enable the l3.fwd in custom.properties.." @@ -116,22 +82,9 @@ if [ "${ODL_ENABLE_L3_FWD}" == "yes" ]; then cat ${CUSTOMPROP} fi -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 @@ -176,22 +129,7 @@ do ssh ${!CONTROLLERIP} "bash /tmp/configuration-script.sh ${i}" done -# Run config plan in case it exists -configplan_filepath="${WORKSPACE}/test/csit/configplans/${STREAMTESTPLAN}" -if [ ! -f "${configplan_filepath}" ]; then - configplan_filepath="${WORKSPACE}/test/csit/configplans/${TESTPLAN}" -fi - -if [ -f ${configplan_filepath} ]; then - echo "configplan exists!!!" - echo "Reading the configplan:" - cat ${configplan_filepath} | sed "s:integration:${WORKSPACE}:" > 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}`