Commit 4e1119fc authored by Leigh B Stoller's avatar Leigh B Stoller

On the MotherShip, start an alternate pubsubd listening in SSL mode, for

receiving Geni style events from event enabled clusters.

On clusters where CLUSTER_PORTAL is defined, start up an SSL enabled pubsub
notification forwarder, to send geni style events to the portal pubsubd.
parent 6ee0fc39
#!/bin/sh
#
# Start a pubsubd on local boss that accepts SSL connections.
# This is an alternate pubsubd, we cannot send events from other
# clusters into our real pubsubd.
#
# PROVIDE: portalpsd
# REQUIRE: pubsub
# KEYWORD: shutdown
TBROOT="@prefix@"
MAINSITE="@TBMAINSITE@"
PROTOGENI="@PROTOGENI_SUPPORT@"
if [ $PROTOGENI == "0" ]; then
exit 0
fi
if [ $MAINSITE == "0" ]; then
exit 0
fi
pubsubd=/usr/local/libexec/pubsubd
pidfile=/var/run/portalpsd.pid
certfile=$TBROOT/etc/emulab.pem
keyfile=$TBROOT/etc/emulab.key
bundlefile=$TBROOT/etc/genica.bundle
sslport=@CLUSTER_PUBSUBD_PORT@
localport=16507
args="-T 10 -K $keyfile -C $certfile -A $bundlefile -S -P $sslport -p $localport"
case "$1" in
start|faststart|quietstart|onestart|forcestart)
if [ -x $clusterd ]; then
$pubsubd -e $pidfile $args
echo -n "portalpsd";
fi
;;
stop|faststop|quietstop|onestop|forcestop)
if [ -r $pidfile ]; then
kill `cat $pidfile`
fi
;;
*)
echo ""
echo "Usage: `basename $0` { start | stop }"
echo ""
exit 64
;;
esac
exit 0
......@@ -107,6 +107,11 @@ case "$1" in
@prefix@/sbin/protogeni/ch_daemon
fi
if [ -x @prefix@/sbin/protogeni/igevent_daemon ]; then
echo -n " igevent_daemon"
@prefix@/sbin/protogeni/igevent_daemon
fi
if [ -x @prefix@/sbin/checknodes_daemon ]; then
echo -n " checknodes_daemon"
@prefix@/sbin/checknodes_daemon
......@@ -137,6 +142,11 @@ case "$1" in
@prefix@/sbin/apt_daemon
fi
if [ -x @prefix@/sbin/aptevent_daemon ]; then
echo -n " aptevent_daemon"
@prefix@/sbin/aptevent_daemon
fi
if [ -n "@ATTENUATOR@" -a -x @prefix@/sbin/attend ]; then
echo -n " attend"
@prefix@/sbin/attend &
......@@ -217,6 +227,9 @@ case "$1" in
if [ -r /var/run/ch_daemon.pid ]; then
kill `cat /var/run/ch_daemon.pid`
fi
if [ -r /var/run/igevent_daemon.pid ]; then
kill `cat /var/run/igevent_daemon.pid`
fi
if [ -r /var/run/checknodes.pid ]; then
kill `cat /var/run/checknodes.pid`
fi
......@@ -241,6 +254,9 @@ case "$1" in
if [ -r /var/run/apt_daemon.pid ]; then
kill `cat /var/run/apt_daemon.pid`
fi
if [ -r /var/run/aptevent_daemon.pid ]; then
kill `cat /var/run/aptevent_daemon.pid`
fi
if [ -r /var/run/attend.pid ]; then
kill `cat /var/run/attend.pid`
fi
......
#!/bin/sh
#
# Start up the event forward to send Geni style events to the Portal.
#
# PROVIDE: igclusterd
# REQUIRE: testbed
# KEYWORD: shutdown
TBROOT="@prefix@"
MAINSITE="@TBMAINSITE@"
PROTOGENI="@PROTOGENI_SUPPORT@"
CLUSTER_PORTAL="@CLUSTER_PORTAL@"
if [ $PROTOGENI == "0" ]; then
exit 0
fi
if [ $CLUSTER_PORTAL == "" ]; then
exit 0
fi
forwarder=/usr/local/libexec/pubsub_forward
pidfile=/var/run/pubsub_forward.pid
certfile=$TBROOT/etc/emulab.pem
keyfile=$TBROOT/etc/emulab.key
remoteport=@CLUSTER_PUBSUBD_PORT@
args="-d -s $CLUSTER_PORTAL -p $remoteport -K $keyfile -C $certfile -S"
case "$1" in
start|faststart|quietstart|onestart|forcestart)
if [ -x $forwarder ]; then
$forwarder -e $pidfile $args
echo -n "igforwarder";
fi
;;
stop|faststop|quietstop|onestop|forcestop)
if [ -r $pidfile ]; then
kill `cat $pidfile`
fi
;;
*)
echo ""
echo "Usage: `basename $0` { start | stop }"
echo ""
exit 64
;;
esac
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment