2 echo "Setup common config to ${ODL_SYSTEM_IP}"
4 cat > ${WORKSPACE}/org.apache.karaf.decanter.appender.elasticsearch.cfg <<EOF
7 clusterName=elasticsearch
11 cat > ${WORKSPACE}/org.apache.karaf.decanter.collector.jmx-local.cfg <<EOF
14 object.name=java.lang:type=*,name=*
18 cat > ${WORKSPACE}/org.apache.karaf.decanter.collector.jmx-others.cfg <<EOF
21 object.name=java.lang:type=*
25 echo "Copying config files to ${ODL_SYSTEM_IP}"
27 scp ${WORKSPACE}/org.apache.karaf.decanter.appender.elasticsearch.cfg ${ODL_SYSTEM_IP}:/tmp/${BUNDLEFOLDER}/etc/
28 scp ${WORKSPACE}/org.apache.karaf.decanter.collector.jmx-local.cfg ${ODL_SYSTEM_IP}:/tmp/${BUNDLEFOLDER}/etc/
29 scp ${WORKSPACE}/org.apache.karaf.decanter.collector.jmx-others.cfg ${ODL_SYSTEM_IP}:/tmp/${BUNDLEFOLDER}/etc/
31 cat > ${WORKSPACE}/elasticsearch.yml <<EOF
32 cluster.name: elasticsearch
33 network.host: ${ODL_SYSTEM_IP}
37 scp ${WORKSPACE}/elasticsearch.yml ${ODL_SYSTEM_IP}:/tmp/
38 ssh ${ODL_SYSTEM_IP} "sudo mv /tmp/elasticsearch.yml /tmp/elasticsearch/elasticsearch-1.7.5/config/"
39 ssh ${ODL_SYSTEM_IP} "cat /tmp/elasticsearch/elasticsearch-1.7.5/config/elasticsearch.yml"
41 cat > ${WORKSPACE}/elasticsearch_startup.sh <<EOF
43 echo "Starting Elasticsearch node"
45 sudo /tmp/elasticsearch/elasticsearch-1.7.5/bin/elasticsearch > /dev/null 2>&1 &
46 ls -al /tmp/elasticsearch/elasticsearch-1.7.5/bin/elasticsearch
50 echo "Copying the elasticsearch_startup script to ${ODL_SYSTEM_IP}"
51 cat ${WORKSPACE}/elasticsearch_startup.sh
52 scp ${WORKSPACE}/elasticsearch_startup.sh ${ODL_SYSTEM_IP}:/tmp
53 ssh ${ODL_SYSTEM_IP} 'bash /tmp/elasticsearch_startup.sh'
54 ssh ${ODL_SYSTEM_IP} 'ps aux | grep elasticsearch'