Commit 11bc397e authored by Leigh Stoller's avatar Leigh Stoller

Clean up the definitions for the definition of the Portal SSL enabled

pubsubd. The main point is that instead of being able to run the SSL
pubsubd at the Mothership only, any site can be a Portal and needs to
run it. So for example my elabinelab is a real Portal, which is very
handy for testing.
parent a3efcf7d
......@@ -54,9 +54,12 @@ my $TB = "@prefix@";
my $TBOPS = "@TBOPSEMAIL@";
my $TBLOGS = "@TBLOGSEMAIL@";
my $MAINSITE = @TBMAINSITE@;
my $BOSSNODE = "@BOSSNODE@";
my $LOGFILE = "$TB/log/aptevent_daemon.log";
# Portal pubsubd running on this port.
my $PSDPORT = 16507;
# Portal SSL pubsubd running on this host:port
my $CLUSTER_PORTAL = "@CLUSTER_PORTAL@";
my $CLUSTER_PUBSUBD_SSLPORT = "@CLUSTER_PUBSUBD_SSLPORT@";
my $CLUSTER_PUBSUBD_ALTPORT = "@CLUSTER_PUBSUBD_ALTPORT@";
# un-taint path
$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin:/usr/site/bin';
......@@ -137,8 +140,8 @@ if (!$impotent) {
# Cloudlab that are forwarding to to the Mothership.
#
my $url = "elvin://localhost";
if ($MAINSITE) {
$url .= ":$PSDPORT";
if ($CLUSTER_PORTAL ne "" && $CLUSTER_PORTAL eq $BOSSNODE) {
$url .= ":${CLUSTER_PUBSUBD_ALTPORT}";
}
my $localhandle = event_register($url, 0);
if (!$localhandle) {
......
......@@ -680,7 +680,8 @@ BOOTINFO_EVENTS
SDCOLLECTD_USE_RRDTOOL
SDCOLLECTD_DOSTATS
EXPIRE_PASSWORDS
CLUSTER_PUBSUBD_PORT
CLUSTER_PUBSUBD_SSLPORT
CLUSTER_PUBSUBD_ALTPORT
CLUSTER_PORTAL
ATTENUATOR
BS_IQN_PREFIX
......@@ -5201,7 +5202,8 @@ NFSMFS_ROOT=""
BS_IQN_PREFIX=iqn.2000-10.net.emulab
ATTENUATOR=""
CLUSTER_PORTAL=""
CLUSTER_PUBSUBD_PORT=""
CLUSTER_PUBSUBD_ALTPORT=""
CLUSTER_PUBSUBD_SSLPORT=""
EXPIRE_PASSWORDS=1
SDCOLLECTD_DOSTATS=0
SDCOLLECTD_USE_RRDTOOL=0
......
#
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -319,7 +319,8 @@ AC_SUBST(NFSMFS_ROOT)
AC_SUBST(BS_IQN_PREFIX)
AC_SUBST(ATTENUATOR)
AC_SUBST(CLUSTER_PORTAL)
AC_SUBST(CLUSTER_PUBSUBD_PORT)
AC_SUBST(CLUSTER_PUBSUBD_SSLPORT)
AC_SUBST(CLUSTER_PUBSUBD_ALTPORT)
AC_SUBST(EXPIRE_PASSWORDS)
AC_SUBST(SDCOLLECTD_DOSTATS)
AC_SUBST(SDCOLLECTD_USE_RRDTOOL)
......@@ -493,7 +494,8 @@ NFSMFS_ROOT=""
BS_IQN_PREFIX=iqn.2000-10.net.emulab
ATTENUATOR=""
CLUSTER_PORTAL=""
CLUSTER_PUBSUBD_PORT=""
CLUSTER_PUBSUBD_ALTPORT=""
CLUSTER_PUBSUBD_SSLPORT=""
EXPIRE_PASSWORDS=1
SDCOLLECTD_DOSTATS=0
SDCOLLECTD_USE_RRDTOOL=0
......
......@@ -132,8 +132,8 @@ PROTOGENI_MAXSERVERLOAD=24
PROTOGENI_NONFSMOUNTS=0
# Portal for the Cloudlab Cluster.
CLUSTER_PORTAL="boss.emulab.net"
CLUSTER_PUBSUBD_PORT=16506
CLUSTER_PUBSUBD_SSLPORT=16506
CLUSTER_PUBSUBD_ALTPORT=16507
#
# Fancy new browser in the console support
#
......
......@@ -118,7 +118,8 @@ PROTOGENI_MAXSERVERLOAD=24
PROTOGENI_NONFSMOUNTS=0
# Portal for the Cloudlab Cluster.
CLUSTER_PORTAL="boss.emulab.net"
CLUSTER_PUBSUBD_PORT=16506
CLUSTER_PUBSUBD_SSLPORT=16506
CLUSTER_PUBSUBD_ALTPORT=16507
FANCYBANNER=1
ISOLATEADMINS=0
EC2META_ENABLE=1
......
......@@ -123,8 +123,8 @@ PROTOGENI_MAXSERVERLOAD=24
PROTOGENI_NONFSMOUNTS=0
# Portal for the Cloudlab Cluster.
CLUSTER_PORTAL="boss.emulab.net"
CLUSTER_PUBSUBD_PORT=16506
CLUSTER_PUBSUBD_SSLPORT=16506
CLUSTER_PUBSUBD_ALTPORT=16507
#
# Fancy new browser in the console support
#
......
......@@ -540,8 +540,8 @@ PROTOGENI_MAXSERVERLOAD=24
PROTOGENI_NONFSMOUNTS=0
# Portal for the Cloudlab Cluster.
CLUSTER_PORTAL="boss.emulab.net"
CLUSTER_PUBSUBD_PORT=16506
CLUSTER_PUBSUBD_SSLPORT=16506
CLUSTER_PUBSUBD_ALTPORT=16507
# Blockstores
BS_IQN_PREFIX=iqn.2015-04.us.cloudlab.wisconsin
......
......@@ -108,7 +108,8 @@ PROTOGENI_MAXSERVERLOAD=24
PROTOGENI_LOCALUSER=1
# Portal for the Cloudlab Cluster.
CLUSTER_PORTAL="boss.emulab.net"
CLUSTER_PUBSUBD_PORT=16506
CLUSTER_PUBSUBD_SSLPORT=16506
CLUSTER_PUBSUBD_ALTPORT=16507
# Mobile networking support (PhantomNet)
MOBILESUPPORT=1
# Do not set these without talking to Utah!
......
......@@ -478,7 +478,8 @@ PROTOGENI_MAXSERVERLOAD=24
PROTOGENI_NONFSMOUNTS=0
# Portal for the Cloudlab Cluster.
CLUSTER_PORTAL="boss.emulab.net"
CLUSTER_PUBSUBD_PORT=16506
CLUSTER_PUBSUBD_SSLPORT=16506
CLUSTER_PUBSUBD_ALTPORT=16507
FANCYBANNER=1
ISOLATEADMINS=0
#
......
......@@ -12,27 +12,33 @@
TBROOT="@prefix@"
MAINSITE="@TBMAINSITE@"
PROTOGENI="@PROTOGENI_SUPPORT@"
CLUSTER_PORTAL="@CLUSTER_PORTAL@"
BOSSNODE="@BOSSNODE@"
if [ $PROTOGENI == "0" ]; then
exit 0
fi
if [ $MAINSITE == "0" ]; then
if [ $CLUSTER_PORTAL == "" -o $CLUSTER_PORTAL != $BOSSNODE ]; then
exit 0
fi
. /etc/rc.conf
pubsubd_flags=${pubsubd_flags:-""}
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@
sslport=@CLUSTER_PUBSUBD_SSLPORT@
localport=16507
args="-T 10 -K $keyfile -C $certfile -A $bundlefile -S -P $sslport -p $localport"
pubsubd_flags="$pubsubd_flags -K $keyfile -C $certfile "
pubsubd_flags="$pubsubd_flags -A $bundlefile -S -P $sslport -p $localport"
case "$1" in
start|faststart|quietstart|onestart|forcestart)
if [ -x $clusterd ]; then
$pubsubd -e $pidfile $args
$pubsubd -e $pidfile $pubsubd_flags
echo -n "portalpsd";
fi
;;
......
......@@ -24,7 +24,7 @@ forwarder=/usr/local/libexec/pubsub_forward
pidfile=/var/run/pubsub_forward_wrapper.pid
certfile=$TBROOT/etc/emulab.pem
keyfile=$TBROOT/etc/emulab.key
remoteport=@CLUSTER_PUBSUBD_PORT@
remoteport=@CLUSTER_PUBSUBD_SSLPORT@
args="-s $CLUSTER_PORTAL -p $remoteport -K $keyfile -C $certfile -S"
case "$1" in
......
#
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -33,6 +33,7 @@ ELVINCOMPAT = @ELVIN_COMPAT@
TBMAINSITE = @TBMAINSITE@
PROTOGENI = @PROTOGENI_SUPPORT@
CLUSTER_PORTAL = @CLUSTER_PORTAL@
BOSSNODE = @BOSSNODE@
SYSTEM := $(shell uname -s)
......@@ -43,9 +44,11 @@ RC_SCRIPTS = 2.mysql-server.sh 3.mfrisbeed.sh 3.testbed.sh \
SUBBOSS_SCRIPTS = 2.dhcpd.sh 3.mfrisbeed-subboss.sh arplock.sh \
3.reportboot-subboss.sh
OPS_SCRIPTS = 3.and.sh 1.mysql-client.sh 1.mysql-server.sh arplock-opsfs.sh
ifeq ($(TBMAINSITE),1)
ifneq ($(CLUSTER_PORTAL),)
ifeq ($(CLUSTER_PORTAL),$(BOSSNODE))
RC_SCRIPTS += 2.portalpsd.sh
endif
endif
ifeq ($(ELVINCOMPAT),1)
OPS_SCRIPTS += 2.elvind.sh 3.elvin_gateway.sh
endif
......
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