Example.DDS: Add option to switch DDS RMS plugin

This commit is contained in:
Dennis Klein 2019-07-18 00:31:21 +02:00 committed by Dennis Klein
parent 7002dcbca3
commit 2c4a6674d2
2 changed files with 14 additions and 8 deletions

View File

@ -1,7 +1,3 @@
@bash_begin@ sampler, 127.0.0.1, , /tmp/fairmq-ex-dds, 1
# source setup.sh processor, 127.0.0.1, , /tmp/fairmq-ex-dds, 10
@bash_end@ sink, 127.0.0.1, , /tmp/fairmq-ex-dds, 1
sampler, localhost, , /tmp/fairmq-ex-dds, 1
processor, localhost, , /tmp/fairmq-ex-dds, 10
sink, localhost, , /tmp/fairmq-ex-dds, 1

View File

@ -8,6 +8,9 @@
# copied verbatim in the file "LICENSE" # # copied verbatim in the file "LICENSE" #
################################################################################ ################################################################################
# fairmq-start-ex-dds.sh [localhost] -> submit agents with localhost plugin
# fairmq-start-ex-dds.sh ssh -> submit agents with ssh plugin
set -e set -e
cleanup() { cleanup() {
@ -18,6 +21,8 @@ cleanup() {
source @DDS_INSTALL_PREFIX@/DDS_env.sh source @DDS_INSTALL_PREFIX@/DDS_env.sh
export PATH=@BIN_DIR@:$PATH export PATH=@BIN_DIR@:$PATH
plugin=${1:-localhost}
exec 5>&1 exec 5>&1
output=$(dds-session start | tee >(cat - >&5)) output=$(dds-session start | tee >(cat - >&5))
export DDS_SESSION_ID=$(echo ${output} | grep "DDS session ID: " | cut -d' ' -f4) export DDS_SESSION_ID=$(echo ${output} | grep "DDS session ID: " | cut -d' ' -f4)
@ -26,7 +31,12 @@ echo "SESSION ID: ${DDS_SESSION_ID}"
trap "cleanup ${DDS_SESSION_ID}" EXIT trap "cleanup ${DDS_SESSION_ID}" EXIT
requiredNofAgents=12 requiredNofAgents=12
dds-submit -r localhost -n ${requiredNofAgents} if [[ "$plugin" == "ssh" ]]; then
dds-submit -r ${plugin} -c @DATA_DIR@/ex-dds-hosts.cfg
else
dds-submit -r ${plugin} -n ${requiredNofAgents}
fi
echo "...waiting for ${requiredNofAgents} idle agents..."
dds-info --wait-for-idle-agents ${requiredNofAgents} dds-info --wait-for-idle-agents ${requiredNofAgents}
topologyFile=@DATA_DIR@/ex-dds-topology.xml topologyFile=@DATA_DIR@/ex-dds-topology.xml