Commit 3cd66d51 authored by Mike Hibler's avatar Mike Hibler

Plumb through an fs-install makefile target and fixes to ops-install.

This officially drops the pretense that fs nodes can operate with minimal
Emulab software. If you have a seperate fs node, it had better be dedicated
to Emulab!

However, it still doesn't do everything. In particular, accounts are not
installed. This has never been needed for serving NFS, but is needed for
the samba stuff to work correctly.

Also, you cannot do an fs node software install from boss yet as we do not
mount fs filesystems on boss. You really cannot do a full ops install from
boss either since we don't mount ops' /usr/local/etc/emulab directory.
parent 7b1bfd6e
...@@ -146,6 +146,7 @@ ops-install: ...@@ -146,6 +146,7 @@ ops-install:
-chmod 770 $(INSTALL_TOPDIR)/log/mysql -chmod 770 $(INSTALL_TOPDIR)/log/mysql
-chown mysql $(INSTALL_TOPDIR)/log/mysql -chown mysql $(INSTALL_TOPDIR)/log/mysql
-chgrp mysql $(INSTALL_TOPDIR)/log/mysql -chgrp mysql $(INSTALL_TOPDIR)/log/mysql
@$(MAKE) -C rc.d control-install
@$(MAKE) -C tbsetup control-install @$(MAKE) -C tbsetup control-install
@$(MAKE) -C security control-install @$(MAKE) -C security control-install
@$(MAKE) -C tip control-install @$(MAKE) -C tip control-install
...@@ -162,7 +163,9 @@ ifeq ($(PELABSUPPORT),1) ...@@ -162,7 +163,9 @@ ifeq ($(PELABSUPPORT),1)
endif endif
fs-install: fs-install:
@$(MAKE) -C rc.d fs-install
@$(MAKE) -C tbsetup fs-install @$(MAKE) -C tbsetup fs-install
@$(MAKE) -C clientside fs-install
@$(MAKE) -C sensors fs-install @$(MAKE) -C sensors fs-install
opsfs-install: ops-install fs-install opsfs-install: ops-install fs-install
......
...@@ -45,6 +45,7 @@ include $(TESTBED_SRCDIR)/GNUmakerules ...@@ -45,6 +45,7 @@ include $(TESTBED_SRCDIR)/GNUmakerules
client: client-subdirs client: client-subdirs
client-install: client client-mkdirs client-install-subdirs client-setversion client-install: client client-mkdirs client-install-subdirs client-setversion
control-install: control-install-subdirs control-install: control-install-subdirs
fs-install: fs-install-subdirs
subboss: subboss-subdirs subboss: subboss-subdirs
subboss-install: client client-mkdirs subboss-install-subdirs subboss-install: client client-mkdirs subboss-install-subdirs
post-install: post-install-subdirs post-install: post-install-subdirs
......
...@@ -64,6 +64,7 @@ boss-install: boss-install-subdirs ...@@ -64,6 +64,7 @@ boss-install: boss-install-subdirs
client: client-subdirs client: client-subdirs
client-install: client client-install-subdirs client-install: client client-install-subdirs
control-install: control-install-subdirs control-install: control-install-subdirs
fs-install:
post-install: post-install-subdirs post-install: post-install-subdirs
clean: clean-subdirs clean: clean-subdirs
distclean: distclean-subdirs distclean: distclean-subdirs
......
...@@ -37,6 +37,7 @@ client: client-subdirs ...@@ -37,6 +37,7 @@ client: client-subdirs
install: install-subdirs install: install-subdirs
boss-install: install-subdirs boss-install: install-subdirs
control-install: control-install-subdirs control-install: control-install-subdirs
fs-install: fs-install-subdirs
client-install: client-install-subdirs client-install: client-install-subdirs
subboss: client subboss: client
subboss-install: client-install subboss-install: client-install
......
# #
# Copyright (c) 2000-2011 University of Utah and the Flux Group. # Copyright (c) 2000-2012 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -164,6 +164,7 @@ install: $(LIBS) $(addprefix $(INSTALL_LIBDIR)/, $(LIB_STUFF)) \ ...@@ -164,6 +164,7 @@ install: $(LIBS) $(addprefix $(INSTALL_LIBDIR)/, $(LIB_STUFF)) \
$(addprefix $(INSTALL_DIR)/opsdir/lib/, $(LIB_STUFF)) $(addprefix $(INSTALL_DIR)/opsdir/lib/, $(LIB_STUFF))
control-install: $(LIBS) $(addprefix $(INSTALL_LIBDIR)/, $(LIB_STUFF)) control-install: $(LIBS) $(addprefix $(INSTALL_LIBDIR)/, $(LIB_STUFF))
fs-install:
# #
# Right now we don't bother with the dynamic libs for a couple of reasons: # Right now we don't bother with the dynamic libs for a couple of reasons:
......
# #
# Copyright (c) 2000-2011 University of Utah and the Flux Group. # Copyright (c) 2000-2012 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -37,6 +37,7 @@ client-install: client ...@@ -37,6 +37,7 @@ client-install: client
# built during the ops-install target when installing a new emulab. # built during the ops-install target when installing a new emulab.
# This is done on ops of course. # This is done on ops of course.
control-install: client control-install: client
fs-install: client
include $(TESTBED_SRCDIR)/GNUmakerules include $(TESTBED_SRCDIR)/GNUmakerules
......
# #
# Copyright (c) 2000-2011 University of Utah and the Flux Group. # Copyright (c) 2000-2012 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -77,6 +77,7 @@ client: all ...@@ -77,6 +77,7 @@ client: all
client-install: client-install:
boss-install: boss-install:
control-install: all control-install: all
fs-install: all
subboss-install: subboss-install:
client-install: client-install:
mfs: mfs:
...@@ -86,4 +87,3 @@ frisbee-mfs-install: ...@@ -86,4 +87,3 @@ frisbee-mfs-install:
clean: clean:
rm -f *.o libtmcd.a libtmcc.a rm -f *.o libtmcd.a libtmcc.a
...@@ -56,6 +56,8 @@ boss-install: ...@@ -56,6 +56,8 @@ boss-install:
control-install: control-install:
@$(MAKE) -C imagezip install @$(MAKE) -C imagezip install
fs-install:
client: client-subdirs client: client-subdirs
client-install: client client-install: client
......
...@@ -44,6 +44,7 @@ boss-install: all boss-install-subdirs ...@@ -44,6 +44,7 @@ boss-install: all boss-install-subdirs
client: client-subdirs client: client-subdirs
client-install: client client-install-subdirs client-install: client client-install-subdirs
control-install: control-install-subdirs control-install: control-install-subdirs
fs-install:
subboss: subboss:
subboss-install: subboss-install:
post-install: post-install-subdirs post-install: post-install-subdirs
......
...@@ -158,9 +158,12 @@ install: ...@@ -158,9 +158,12 @@ install:
boss-install: $(INSTALL_SBINDIR)/findif \ boss-install: $(INSTALL_SBINDIR)/findif \
elabinelabfiles elabinelabfiles
control-install: tmcc control-install: tmcc findif
@$(MAKE) -C freebsd control-install @$(MAKE) -C freebsd control-install
fs-install: tmcc findif
@$(MAKE) -C freebsd fs-install
subboss-install: subboss subboss-install: subboss
@$(MAKE) -C $(MDSUBDIR) subboss-install @$(MAKE) -C $(MDSUBDIR) subboss-install
......
...@@ -58,6 +58,7 @@ install client-install: ...@@ -58,6 +58,7 @@ install client-install:
local-install: path-install local-script-install symlinks local-install: path-install local-script-install symlinks
remote-install: path-install remote-script-install remote-install: path-install remote-script-install
control-install: path-install control-script-install control-install: path-install control-script-install
fs-install: path-install fs-script-install
subboss-local-install: path-install subboss-local-script-install symlinks subboss-local-install: path-install subboss-local-script-install symlinks
other-install: other-install:
...@@ -162,6 +163,18 @@ remote-script-install: common-script-install ...@@ -162,6 +163,18 @@ remote-script-install: common-script-install
control-script-install: dir-install bossnode control-script-install: dir-install bossnode
$(INSTALL) -m 755 $(SRCDIR)/libsetup.pm $(BINDIR)/libsetup.pm $(INSTALL) -m 755 $(SRCDIR)/libsetup.pm $(BINDIR)/libsetup.pm
$(INSTALL) -m 755 $(SRCDIR)/libtmcc.pm $(BINDIR)/libtmcc.pm $(INSTALL) -m 755 $(SRCDIR)/libtmcc.pm $(BINDIR)/libtmcc.pm
$(INSTALL) -m 755 $(SRCDIR)/libtestbed.pm $(BINDIR)/libtestbed.pm
$(INSTALL) -m 755 $(SRCDIR)/tmcc.pl $(BINDIR)/tmcc
$(INSTALL) -m 755 $(SRCDIR)/ctrlnode.sh $(SYSRCDIR)/ctrlnode.sh
$(INSTALL) -m 755 $(SRCDIR)/rc.ctrlnode $(RCDIR)/rc.ctrlnode
$(INSTALL) -m 755 $(SRCDIR)/config/librc.pm $(BINDIR)/librc.pm
$(INSTALL) -m 755 $(SRCDIR)/fixarpinfo $(BINDIR)/fixarpinfo
$(INSTALL) bossnode $(ETCDIR)/bossnode
fs-script-install: dir-install bossnode
$(INSTALL) -m 755 $(SRCDIR)/libsetup.pm $(BINDIR)/libsetup.pm
$(INSTALL) -m 755 $(SRCDIR)/libtmcc.pm $(BINDIR)/libtmcc.pm
$(INSTALL) -m 755 $(SRCDIR)/libtestbed.pm $(BINDIR)/libtestbed.pm
$(INSTALL) -m 755 $(SRCDIR)/tmcc.pl $(BINDIR)/tmcc $(INSTALL) -m 755 $(SRCDIR)/tmcc.pl $(BINDIR)/tmcc
$(INSTALL) -m 755 $(SRCDIR)/ctrlnode.sh $(SYSRCDIR)/ctrlnode.sh $(INSTALL) -m 755 $(SRCDIR)/ctrlnode.sh $(SYSRCDIR)/ctrlnode.sh
$(INSTALL) -m 755 $(SRCDIR)/rc.ctrlnode $(RCDIR)/rc.ctrlnode $(INSTALL) -m 755 $(SRCDIR)/rc.ctrlnode $(RCDIR)/rc.ctrlnode
......
...@@ -57,7 +57,7 @@ use librc; ...@@ -57,7 +57,7 @@ use librc;
# Not all clients support this. # Not all clients support this.
# #
exit(0) exit(0)
if (PLAB() || JAILED() || CONTROL()); if (PLAB() || JAILED() || CONTROL() || FSNODE());
# Protos. # Protos.
sub doboot(); sub doboot();
......
...@@ -70,7 +70,7 @@ use librc; ...@@ -70,7 +70,7 @@ use librc;
# Not all clients support this. # Not all clients support this.
# #
exit(0) exit(0)
if (!(SUBBOSS() || CONTROL())); if (!(SUBBOSS() || CONTROL() || FSNODE()));
# XXX # XXX
my $os = `uname`; my $os = `uname`;
......
...@@ -47,8 +47,8 @@ use Exporter; ...@@ -47,8 +47,8 @@ use Exporter;
TBDebugTimeStamp TBDebugTimeStampWithDate TBDebugTimeStamp TBDebugTimeStampWithDate
TBDebugTimeStampsOn TBDebugTimeStampsOff TBDebugTimeStampsOn TBDebugTimeStampsOff
MFS REMOTE REMOTEDED CONTROL WINDOWS JAILED PLAB LOCALROOTFS IXP MFS REMOTE REMOTEDED CONTROL FSNODE WINDOWS JAILED PLAB LOCALROOTFS
USESFS SHADOW FSRVTYPE PROJDIR EXPDIR IXP USESFS SHADOW FSRVTYPE PROJDIR EXPDIR
SIMTRAFGEN SIMHOST ISDELAYNODEPATH JAILHOST DELAYHOST STARGATE SIMTRAFGEN SIMHOST ISDELAYNODEPATH JAILHOST DELAYHOST STARGATE
ISFW FAKEJAILED LINUXJAILED GENVNODE GENVNODETYPE GENVNODEHOST ISFW FAKEJAILED LINUXJAILED GENVNODE GENVNODETYPE GENVNODEHOST
...@@ -451,6 +451,11 @@ sub REMOTEDED() { if (-e "$ETCDIR/isremded") { return 1; } else { return 0; } } ...@@ -451,6 +451,11 @@ sub REMOTEDED() { if (-e "$ETCDIR/isremded") { return 1; } else { return 0; } }
# #
sub CONTROL() { if (-e "$ETCDIR/isctrl") { return 1; } else { return 0; } } sub CONTROL() { if (-e "$ETCDIR/isctrl") { return 1; } else { return 0; } }
#
# Same for an FS node.
#
sub FSNODE() { if (-e "$ETCDIR/isfs") { return 1; } else { return 0; } }
# #
# Same for a Windows (CygWinXP) node. # Same for a Windows (CygWinXP) node.
# #
......
...@@ -151,10 +151,19 @@ cdboot-install: destdircheck common-install etc-install \ ...@@ -151,10 +151,19 @@ cdboot-install: destdircheck common-install etc-install \
control-install: dir-install control-install: dir-install
cp /dev/null $(ETCDIR)/isctrl cp /dev/null $(ETCDIR)/isctrl
$(INSTALL) -m 755 ../tmcc $(BINDIR)/tmcc.bin $(INSTALL) -m 755 ../tmcc $(BINDIR)/tmcc.bin
$(INSTALL) -m 755 -s ../findif $(BINDIR)/findif
$(INSTALL) -m 755 $(SRCDIR)/liblocsetup.pm $(BINDIR)/liblocsetup.pm $(INSTALL) -m 755 $(SRCDIR)/liblocsetup.pm $(BINDIR)/liblocsetup.pm
(cd ../common; $(MAKE) control-install) (cd ../common; $(MAKE) control-install)
@echo "Remember to install the PEM files if necessary" @echo "Remember to install the PEM files if necessary"
fs-install: dir-install
cp /dev/null $(ETCDIR)/isfs
$(INSTALL) -m 755 ../tmcc $(BINDIR)/tmcc.bin
$(INSTALL) -m 755 -s ../findif $(BINDIR)/findif
$(INSTALL) -m 755 $(SRCDIR)/liblocsetup.pm $(BINDIR)/liblocsetup.pm
(cd ../common; $(MAKE) fs-install)
@echo "Remember to install the PEM files if necessary"
lbs-install: simple-install lbs-install: simple-install
cp /dev/null $(BINDIR)/isrem cp /dev/null $(BINDIR)/isrem
cp /dev/null $(ETCDIR)/isrem cp /dev/null $(ETCDIR)/isrem
......
...@@ -43,6 +43,7 @@ boss-install: all boss-install-subdirs ...@@ -43,6 +43,7 @@ boss-install: all boss-install-subdirs
client: client-subdirs client: client-subdirs
client-install: client client-install-subdirs client-install: client client-install-subdirs
control-install: control-install-subdirs control-install: control-install-subdirs
fs-install:
subboss: subboss:
subboss-install: subboss-install:
post-install: post-install-subdirs post-install: post-install-subdirs
......
...@@ -74,7 +74,28 @@ sub Install($$$) ...@@ -74,7 +74,28 @@ sub Install($$$)
" ${USERNODE}:${ETC_EMULAB_DIR}/${CLIENT_PEM}"); " ${USERNODE}:${ETC_EMULAB_DIR}/${CLIENT_PEM}");
ExecQuietFatal("$SSH -o 'BatchMode=yes' root\@${USERNODE} ". ExecQuietFatal("$SSH -o 'BatchMode=yes' root\@${USERNODE} ".
" 'chmod 640 ${ETC_EMULAB_DIR}/${CLIENT_PEM}; ". " 'chmod 640 ${ETC_EMULAB_DIR}/${CLIENT_PEM}; ".
" chmod 640 ${ETC_EMULAB_DIR}/${EMULAB_PEM}' "); " chmod 640 ${ETC_EMULAB_DIR}/${EMULAB_PEM}; ".
" chown root:wheel ${ETC_EMULAB_DIR}/${CLIENT_PEM}; ".
" chown root:wheel ${ETC_EMULAB_DIR}/${EMULAB_PEM}' ");
};
Phase "sslfscopy", "Copying SSL certificates to fs", sub {
if ($USERNODE eq $FSNODE) {
PhaseSkip("FS node is ops node");
}
if ($BOSSNODE eq $FSNODE) {
PhaseSkip("FS node is boss node");
}
ExecQuietFatal("$SSH -o 'BatchMode=yes' root\@${FSNODE} ".
" mkdir -p ${ETC_EMULAB_DIR} ");
ExecQuietFatal("$SCP $PREFIX/etc/$EMULAB_PEM ".
" ${FSNODE}:${ETC_EMULAB_DIR}");
ExecQuietFatal("$SCP $TOP_OBJDIR/ssl/$CTRLNODE_PEM".
" ${FSNODE}:${ETC_EMULAB_DIR}/${CLIENT_PEM}");
ExecQuietFatal("$SSH -o 'BatchMode=yes' root\@${FSNODE} ".
" 'chmod 640 ${ETC_EMULAB_DIR}/${CLIENT_PEM}; ".
" chmod 640 ${ETC_EMULAB_DIR}/${EMULAB_PEM}; ".
" chown root:wheel ${ETC_EMULAB_DIR}/${CLIENT_PEM}; ".
" chown root:wheel ${ETC_EMULAB_DIR}/${EMULAB_PEM}' ");
}; };
Phase "apache", "Setting up Apache on boss", sub { Phase "apache", "Setting up Apache on boss", sub {
Phase "dirs", "Creating SSL directories ", sub { Phase "dirs", "Creating SSL directories ", sub {
......
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