From 672d9ea7e73caf4617d953d4c39d4c29dc856f3f Mon Sep 17 00:00:00 2001 From: Luis Gomez Date: Sun, 2 Jul 2017 23:59:23 +0000 Subject: [PATCH] Revert "Fix JVM monitoring scripts" This reverts commit 5d9ddfe51ad280338e9ea73996bc174ae9290e9b. Change-Id: I54ea53e4963fa4b53ab3dbc167211d35ed2824a5 Signed-off-by: Luis Gomez --- csit/scripts/set_jvm_common_attribute.sh | 52 ++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/csit/scripts/set_jvm_common_attribute.sh b/csit/scripts/set_jvm_common_attribute.sh index 4a326eac81..408910d943 100644 --- a/csit/scripts/set_jvm_common_attribute.sh +++ b/csit/scripts/set_jvm_common_attribute.sh @@ -18,10 +18,62 @@ EOF for i in `seq 1 ${NUM_ODL_SYSTEM}` do CONTROLLERIP=ODL_SYSTEM_${i}_IP + CLUSTERNAME=`head /dev/urandom | tr -dc A-Za-z0-9 | head -c 12` + + cat > ${WORKSPACE}/elasticsearch.yml < ${WORKSPACE}/org.apache.karaf.decanter.appender.elasticsearch.cfg < ${WORKSPACE}/elasticsearch_startup.sh < /dev/null 2>&1 & + ls -al /tmp/elasticsearch/elasticsearch-1.7.5/bin/elasticsearch + +EOF + echo "Setup ODL_SYSTEM_IP specific config files for ${!CONTROLLERIP} " + + cat ${WORKSPACE}/org.apache.karaf.decanter.appender.elasticsearch.cfg + cat ${WORKSPACE}/elasticsearch.yml + echo "Copying config files to ${!CONTROLLERIP}" + scp ${WORKSPACE}/org.apache.karaf.decanter.appender.elasticsearch.cfg ${!CONTROLLERIP}:/tmp/${BUNDLEFOLDER}/etc/ scp ${WORKSPACE}/org.apache.karaf.decanter.collector.jmx-local.cfg ${!CONTROLLERIP}:/tmp/${BUNDLEFOLDER}/etc/ scp ${WORKSPACE}/org.apache.karaf.decanter.collector.jmx-others.cfg ${!CONTROLLERIP}:/tmp/${BUNDLEFOLDER}/etc/ + scp ${WORKSPACE}/elasticsearch.yml ${!CONTROLLERIP}:/tmp/ + + ssh ${!CONTROLLERIP} "sudo ls -al /tmp/elasticsearch/" + + ssh ${!CONTROLLERIP} "sudo mv /tmp/elasticsearch.yml /tmp/elasticsearch/elasticsearch-1.7.5/config/" + ssh ${!CONTROLLERIP} "cat /tmp/elasticsearch/elasticsearch-1.7.5/config/elasticsearch.yml" + + echo "Copying the elasticsearch_startup script to ${!CONTROLLERIP}" + cat ${WORKSPACE}/elasticsearch_startup.sh + scp ${WORKSPACE}/elasticsearch_startup.sh ${!CONTROLLERIP}:/tmp + ssh ${!CONTROLLERIP} 'bash /tmp/elasticsearch_startup.sh' + ssh ${!CONTROLLERIP} 'ps aux | grep elasticsearch' done -- 2.36.6