Commit c53d5827 authored by Mike Hibler's avatar Mike Hibler

Changes related to allowing seperate 'fs' (file server) node.

Entailed new instructions for manual setup as well as integration into
elabinelab framework.  First, the manual path:

setup.txt, setup-boss.txt, setup-ops.txt and new setup-fs.txt:
    Updated to reflect potential for separate fs node.  The org here
    is a little dicey and could be confusing with ops+fs vs. ops and fs.
    Has not been field tested yet.

*/GNUmakefile.in: new fs-install target.

configure, configure.in, defs-*:
    Somewhat unrelated, make min uid/gid to use be a defs setting.
    Also add config of fs-install.in script.

boss-install.in, ops-install.in and new fs-install.in:
    Handle distinct fs node.  If you have one, fs-install is run before
    ops-install.  All scripts rely on the defs file settings of FSNODE
    and USERNODE to determine if the fs node is seperate.

utils/checkquota.in:
    Just return "ok" if quotas are not used (i.e., if defs file FS_WITH_QUOTA
    string is null.

install/ports/emulab-fs:
    Meta port for fs node specific stuff.  Also a patch for the samba port
    Makefile so it doesn't drag in CUPs, etc.  Note that the current samba
    port Makefile has this change, I am just backporting to our version.

Elabinelab specific changes:

elabinelab-withfs.ns:
    NS fragment used in conjunction with
	tb-elab-in-elab-topology "withfs"
    to setup inner-elab with fs node.

elabinelab.ns:
    The hard work on the boss side.  Recognize seperate-fs config and handle
    running of rc.mkelab on that node.  fs setup happens before ops setup.

rc.mkelab:
    The hard work on the client side.  Recognize FsNode setup as well as
    differentiate ops+fs from ops setup.

Related stuff either not part of the repo or checked in previously:
    emulab-fs package
parent 317c82a5
...@@ -31,7 +31,8 @@ SUBDIRS = lib db assign www @optional_subdirs@ ipod security sensors \ ...@@ -31,7 +31,8 @@ SUBDIRS = lib db assign www @optional_subdirs@ ipod security sensors \
all: all-subdirs all: all-subdirs
install: install:
@echo "Choose either boss-install (paper) or ops-install (plastic)" @echo "Choose either boss-install, ops-install or fs-install"
@echo "Choose opsfs-install instead of ops-install for a combined ops/fs machine"
@echo "Choose tipserv-install for dedicated tip server machines." @echo "Choose tipserv-install for dedicated tip server machines."
# #
...@@ -89,6 +90,13 @@ endif ...@@ -89,6 +90,13 @@ endif
@$(MAKE) -C tmcd control-install @$(MAKE) -C tmcd control-install
@$(MAKE) -C account control-install @$(MAKE) -C account control-install
fs-install:
@$(MAKE) -C tbsetup fs-install
@$(MAKE) -C account fs-install
opsfs-install: ops-install fs-install
@echo "Combined ops/fs install done."
install-mkdirs: install-mkdirs:
-mkdir -p $(INSTALL_TOPDIR)/opsdir -mkdir -p $(INSTALL_TOPDIR)/opsdir
-mkdir -p $(INSTALL_TOPDIR)/locks -mkdir -p $(INSTALL_TOPDIR)/locks
......
...@@ -14,7 +14,7 @@ include $(OBJDIR)/Makeconf ...@@ -14,7 +14,7 @@ include $(OBJDIR)/Makeconf
SBIN_STUFF = tbacct addsfskey addpubkey mkusercert SBIN_STUFF = tbacct addsfskey addpubkey mkusercert
LIBEXEC_STUFF = webtbacct webaddsfskey webaddpubkey webmkusercert LIBEXEC_STUFF = webtbacct webaddsfskey webaddpubkey webmkusercert
FS_SBIN_STUFF = quotamail FSBIN_STUFF = quotamail
# #
# Force dependencies on the scripts so that they will be rerun through # Force dependencies on the scripts so that they will be rerun through
...@@ -42,10 +42,9 @@ post-install: ...@@ -42,10 +42,9 @@ post-install:
chown root $(INSTALL_SBINDIR)/mkusercert chown root $(INSTALL_SBINDIR)/mkusercert
chmod u+s $(INSTALL_SBINDIR)/mkusercert chmod u+s $(INSTALL_SBINDIR)/mkusercert
# XXX ops == fs right now control-install:
control-install: fs-install
fs-script-install: $(addprefix $(INSTALL_SBINDIR)/, $(FS_SBIN_STUFF)) fs-script-install: $(addprefix $(INSTALL_SBINDIR)/, $(FSBIN_STUFF))
fs-install: fs-script-install fs-install: fs-script-install
......
...@@ -1365,6 +1365,8 @@ done ...@@ -1365,6 +1365,8 @@ done
...@@ -1425,6 +1427,8 @@ BOSSEVENTPORT=2927 ...@@ -1425,6 +1427,8 @@ BOSSEVENTPORT=2927
UNIFIED_BOSS_AND_OPS=0 UNIFIED_BOSS_AND_OPS=0
FRISEBEEMCASTADDR="234.5.6" FRISEBEEMCASTADDR="234.5.6"
FRISEBEEMCASTPORT=3564 FRISEBEEMCASTPORT=3564
MIN_UNIX_UID=10000
MIN_UNIX_GID=6000
# #
# Okay, I know this is improper usage of --with. Too bad. # Okay, I know this is improper usage of --with. Too bad.
...@@ -1925,17 +1929,17 @@ for ac_hdr in ulxmlrpcpp/ulxr_config.h ...@@ -1925,17 +1929,17 @@ for ac_hdr in ulxmlrpcpp/ulxr_config.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1929: checking for $ac_hdr" >&5 echo "configure:1933: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1934 "configure" #line 1938 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -1974,17 +1978,17 @@ for ac_hdr in linux/videodev.h ...@@ -1974,17 +1978,17 @@ for ac_hdr in linux/videodev.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1978: checking for $ac_hdr" >&5 echo "configure:1982: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1983 "configure" #line 1987 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -2017,7 +2021,7 @@ done ...@@ -2017,7 +2021,7 @@ done
# Extract the first word of "gtk-config", so it can be a program name with args. # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2 set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2021: checking for $ac_word" >&5 echo "configure:2025: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GTK_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2096,7 +2100,7 @@ fi ...@@ -2096,7 +2100,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh. # ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:2100: checking for a BSD compatible install" >&5 echo "configure:2104: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -2157,7 +2161,7 @@ esac ...@@ -2157,7 +2161,7 @@ esac
# Extract the first word of "rsync", so it can be a program name with args. # Extract the first word of "rsync", so it can be a program name with args.
set dummy rsync; ac_word=$2 set dummy rsync; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2161: checking for $ac_word" >&5 echo "configure:2165: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RSYNC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_RSYNC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2328,7 +2332,8 @@ outfiles="$outfiles Makeconf GNUmakefile \ ...@@ -2328,7 +2332,8 @@ outfiles="$outfiles Makeconf GNUmakefile \
cdrom/GNUmakefile cdrom/tbbootconfig/GNUmakefile \ cdrom/GNUmakefile cdrom/tbbootconfig/GNUmakefile \
cdrom/groklilo/GNUmakefile \ cdrom/groklilo/GNUmakefile \
dhcpd/dhcpd.conf.template dhcpd/GNUmakefile \ dhcpd/dhcpd.conf.template dhcpd/GNUmakefile \
install/GNUmakefile install/ops-install install/boss-install \ install/GNUmakefile \
install/ops-install install/boss-install install/fs-install \
install/newnode_sshkeys/GNUmakefile install/smb.conf.head \ install/newnode_sshkeys/GNUmakefile install/smb.conf.head \
mote/GNUmakefile mote/tbuisp mote/tbsgmotepower mote/newmote \ mote/GNUmakefile mote/tbuisp mote/tbsgmotepower mote/newmote \
mote/sgtools/GNUmakefile \ mote/sgtools/GNUmakefile \
...@@ -2605,6 +2610,8 @@ s%@FRISEBEEMCASTADDR@%$FRISEBEEMCASTADDR%g ...@@ -2605,6 +2610,8 @@ s%@FRISEBEEMCASTADDR@%$FRISEBEEMCASTADDR%g
s%@FRISEBEEMCASTPORT@%$FRISEBEEMCASTPORT%g s%@FRISEBEEMCASTPORT@%$FRISEBEEMCASTPORT%g
s%@WINSUPPORT@%$WINSUPPORT%g s%@WINSUPPORT@%$WINSUPPORT%g
s%@CVSSUPPORT@%$CVSSUPPORT%g s%@CVSSUPPORT@%$CVSSUPPORT%g
s%@MIN_UNIX_UID@%$MIN_UNIX_UID%g
s%@MIN_UNIX_GID@%$MIN_UNIX_GID%g
s%@TBOPSEMAIL@%$TBOPSEMAIL%g s%@TBOPSEMAIL@%$TBOPSEMAIL%g
s%@TBOPSEMAIL_NOSLASH@%$TBOPSEMAIL_NOSLASH%g s%@TBOPSEMAIL_NOSLASH@%$TBOPSEMAIL_NOSLASH%g
s%@TBLOGSEMAIL@%$TBLOGSEMAIL%g s%@TBLOGSEMAIL@%$TBLOGSEMAIL%g
......
...@@ -148,6 +148,8 @@ AC_SUBST(FRISEBEEMCASTADDR) ...@@ -148,6 +148,8 @@ AC_SUBST(FRISEBEEMCASTADDR)
AC_SUBST(FRISEBEEMCASTPORT) AC_SUBST(FRISEBEEMCASTPORT)
AC_SUBST(WINSUPPORT) AC_SUBST(WINSUPPORT)
AC_SUBST(CVSSUPPORT) AC_SUBST(CVSSUPPORT)
AC_SUBST(MIN_UNIX_UID)
AC_SUBST(MIN_UNIX_GID)
# #
# Offer both versions of the email addresses that have the @ escaped # Offer both versions of the email addresses that have the @ escaped
...@@ -206,6 +208,8 @@ BOSSEVENTPORT=2927 ...@@ -206,6 +208,8 @@ BOSSEVENTPORT=2927
UNIFIED_BOSS_AND_OPS=0 UNIFIED_BOSS_AND_OPS=0
FRISEBEEMCASTADDR="234.5.6" FRISEBEEMCASTADDR="234.5.6"
FRISEBEEMCASTPORT=3564 FRISEBEEMCASTPORT=3564
MIN_UNIX_UID=10000
MIN_UNIX_GID=6000
# #
# Okay, I know this is improper usage of --with. Too bad. # Okay, I know this is improper usage of --with. Too bad.
...@@ -766,7 +770,8 @@ outfiles="$outfiles Makeconf GNUmakefile \ ...@@ -766,7 +770,8 @@ outfiles="$outfiles Makeconf GNUmakefile \
cdrom/GNUmakefile cdrom/tbbootconfig/GNUmakefile \ cdrom/GNUmakefile cdrom/tbbootconfig/GNUmakefile \
cdrom/groklilo/GNUmakefile \ cdrom/groklilo/GNUmakefile \
dhcpd/dhcpd.conf.template dhcpd/GNUmakefile \ dhcpd/dhcpd.conf.template dhcpd/GNUmakefile \
install/GNUmakefile install/ops-install install/boss-install \ install/GNUmakefile \
install/ops-install install/boss-install install/fs-install \
install/newnode_sshkeys/GNUmakefile install/smb.conf.head \ install/newnode_sshkeys/GNUmakefile install/smb.conf.head \
mote/GNUmakefile mote/tbuisp mote/tbsgmotepower mote/newmote \ mote/GNUmakefile mote/tbuisp mote/tbsgmotepower mote/newmote \
mote/sgtools/GNUmakefile \ mote/sgtools/GNUmakefile \
......
...@@ -40,6 +40,8 @@ MAILMANSUPPORT=1 ...@@ -40,6 +40,8 @@ MAILMANSUPPORT=1
WINSUPPORT=1 WINSUPPORT=1
SFSSUPPORT=0 SFSSUPPORT=0
CVSSUPPORT=1 CVSSUPPORT=1
MIN_UNIX_UID=10000
MIN_UNIX_GID=6000
# #
# SSL Certificate stuff. Used to customize config files in ssl directory. # SSL Certificate stuff. Used to customize config files in ssl directory.
# Note that OrganizationalUnit is set in the cnf file. # Note that OrganizationalUnit is set in the cnf file.
......
...@@ -31,11 +31,15 @@ WWWHOST=changeme ...@@ -31,11 +31,15 @@ WWWHOST=changeme
TBMAINSITE=0 TBMAINSITE=0
THISHOMEBASE=changeme THISHOMEBASE=changeme
PLABSUPPORT=0 PLABSUPPORT=0
WIKISUPPORT=0
BUGDBSUPPORT=0
MAILMANSUPPORT=0
WINSUPPORT=0
SFSSUPPORT=0 SFSSUPPORT=0
CVSSUPPORT=0
DISABLE_NSE=1 DISABLE_NSE=1
# This means it is an inner elab! # This means it is an inner elab!
ELABINELAB=1 ELABINELAB=1
WINSUPPORT=0
# The name of the outer boss for inner boss to request services from. # The name of the outer boss for inner boss to request services from.
OUTERBOSS_NODENAME=changeme OUTERBOSS_NODENAME=changeme
# #
...@@ -54,6 +58,7 @@ TESTBED_NETWORK=changeme ...@@ -54,6 +58,7 @@ TESTBED_NETWORK=changeme
TESTBED_NETMASK=changeme TESTBED_NETMASK=changeme
BOSSNODE_IP=changeme BOSSNODE_IP=changeme
USERNODE_IP=changeme USERNODE_IP=changeme
FSNODE_IP=changeme
CONTROL_ROUTER_IP=changeme CONTROL_ROUTER_IP=changeme
CONTROL_NETWORK=changeme CONTROL_NETWORK=changeme
CONTROL_NETMASK=changeme CONTROL_NETMASK=changeme
...@@ -69,3 +74,6 @@ NAMED_FORWARDERS=changeme ...@@ -69,3 +74,6 @@ NAMED_FORWARDERS=changeme
# Must localize to avoid conflict with outer emulab frisbeed. # Must localize to avoid conflict with outer emulab frisbeed.
# #
FRISEBEEMCASTADDR=changeme FRISEBEEMCASTADDR=changeme
# testing
MIN_UNIX_UID=500
MIN_UNIX_GID=500
...@@ -25,6 +25,17 @@ USERNODE=ops.example.emulab.net ...@@ -25,6 +25,17 @@ USERNODE=ops.example.emulab.net
# as the ops node) # as the ops node)
FSNODE=fs.example.emulab.net FSNODE=fs.example.emulab.net
#
# Minimum Unix uid and gid values for Emulab users.
# Emulab will create the initial user with these values and all additional
# users will have values greater than these. It would be unwise to make
# these less than 1000 to avoid conflicts with "standard" BSD and Linux
# users. These can also be tweaked to avoid pre-existing accounts on the
# fileserver machine.
#
MIN_UNIX_UID=10000
MIN_UNIX_GID=6000
# #
# Addresses to which email will be sent - These are expected to go to mailing # Addresses to which email will be sent - These are expected to go to mailing
# lists. You can either host the lists on your ops node, send them off to # lists. You can either host the lists on your ops node, send them off to
...@@ -75,6 +86,14 @@ FSDIR_GROUPS=/groups ...@@ -75,6 +86,14 @@ FSDIR_GROUPS=/groups
FSDIR_PROJ=/q/proj FSDIR_PROJ=/q/proj
FSDIR_USERS=/users FSDIR_USERS=/users
FSDIR_SHARE=/share FSDIR_SHARE=/share
#
# Filesystems on which quotas should be enforced.
# Note that if multiple of the FSDIR_* vars above are on the same filesystem
# (e.g., /q/proj and /q/users) then you should only specify the base of the
# common filesystem on which they all reside here (e.g., /q).
# Set to the empty string to turn off quota checking.
#
FS_WITH_QUOTAS="/q /groups /users" FS_WITH_QUOTAS="/q /groups /users"
# #
......
This diff is collapsed.
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
##### Most recently tested on FreeBSD 4.11. ##### Most recently tested on FreeBSD 4.11.
##### #####
##### Step 0 - OS installation and setup ##### Step 1 - OS installation and setup
Install FreeBSD on the machine you'll be using for your ops node, using the Install FreeBSD on the machine you'll be using for your ops node, using the
standard FreeBSD installation process. When asked by the installer, it's best standard FreeBSD installation process. When asked by the installer, it's best
...@@ -30,6 +30,19 @@ space to hold them: ...@@ -30,6 +30,19 @@ space to hold them:
be safe and build with at least a million). be safe and build with at least a million).
/usr/testbed/ - Needs space for testbed software and logs. Several (3-4) GB /usr/testbed/ - Needs space for testbed software and logs. Several (3-4) GB
should be enough. should be enough.
Do *not* create any user accounts yet, and just log in as root for the time being.
Our software will create user accounts later, once you get boss set up. If you
already created any users, then delete them with the "pw" command and make sure
the home directories for them are removed as well.
##### Step 1a - Shared filesystem setup for combined ops/fs machine.
If you have a separate 'fs' node, you should have already setup your shared
filesystems and can skip to Step 2. If this node is also to be your file
server, you will also need:
/users/ - Needs space for user home directories. Amount of space required /users/ - Needs space for user home directories. Amount of space required
depends on how many users you expect to have. depends on how many users you expect to have.
Generally, though, we suggest that users store large Generally, though, we suggest that users store large
...@@ -46,8 +59,10 @@ space to hold them: ...@@ -46,8 +59,10 @@ space to hold them:
on what you want to make available. on what you want to make available.
You may want to enforce quotas on the user-writable filesystems. This is the You may want to enforce quotas on the user-writable filesystems. This is the
main reason you'd want to keep them in separate filesystems (i.e., so people can main reason you'd want to keep them in separate filesystems (i.e., so people
have different /users/ and /proj/ quotas.) can have different /users/ and /proj/ quotas.) If you do not think you will
ever use quotas, then you could make /users and /proj part of the same
filesystem.
Note also since /share is exported read-only, FreeBSD requires that it be on Note also since /share is exported read-only, FreeBSD requires that it be on
a separate filesystem from anything that is exported read-write. So while a separate filesystem from anything that is exported read-write. So while
...@@ -61,12 +76,10 @@ symlinks to the appropriate places. ie., if you make one big filesystem called ...@@ -61,12 +76,10 @@ symlinks to the appropriate places. ie., if you make one big filesystem called
ln -s /z/proj /proj ln -s /z/proj /proj
... etc. ... etc.
Do *not* create any user accounts yet, and just log in as root for the time being. In other words, we assume the existence of /users, /proj, /group and /share.
Our software will create user accounts later, once you get boss set up. If you
already created any users, then delete them with the "pw" command and make sure
the home directories for them are removed as well.
##### Step 1 - Installing packages ##### Step 2 - Installing packages
To make sure that you're running with versions of software from the ports To make sure that you're running with versions of software from the ports
collection that are known to work with our software, and to save you hours collection that are known to work with our software, and to save you hours
...@@ -105,10 +118,10 @@ ops feel like 'home' (like emacs, jove, or whatever). NOTE: You must ...@@ -105,10 +118,10 @@ ops feel like 'home' (like emacs, jove, or whatever). NOTE: You must
download and copy the ports tree into place, even if you do not intend to download and copy the ports tree into place, even if you do not intend to
install any packages yourself. install any packages yourself.
##### Step 2 - Unpacking and running configure ##### Step 3 - Unpacking and running configure
At this point, you'll need to make a 'defs' file - You will use the same At this point, you'll need to make a 'defs' file - You will use the same
defs file on boss and ops. See defs-example in the top level directory defs file on boss, ops and fs. See defs-example in the top level directory
as a starting point. You want to make sure each of the variables has a as a starting point. You want to make sure each of the variables has a
definition that makes sense in your environment. Feel free to ask Utah if definition that makes sense in your environment. Feel free to ask Utah if
something is not clear. something is not clear.
...@@ -128,7 +141,7 @@ unpack the source code is /usr/testbed/src/testbed. You will use the ...@@ -128,7 +141,7 @@ unpack the source code is /usr/testbed/src/testbed. You will use the
Typically, you would store your defs file in the source tree along with Typically, you would store your defs file in the source tree along with
the other defs files that came in the tarball. the other defs files that came in the tarball.
##### Step 3 - Running the ops installation script ##### Step 4 - Running the ops installation script
In the object tree you've configured (say, /usr/testbed/obj/testbed), there's In the object tree you've configured (say, /usr/testbed/obj/testbed), there's
an 'install' subdirectory, with a script called 'ops-install'. Just run this an 'install' subdirectory, with a script called 'ops-install'. Just run this
...@@ -153,7 +166,7 @@ sets up password-less 'sudo' for anyone in the 'wheel' group. If you don't want ...@@ -153,7 +166,7 @@ sets up password-less 'sudo' for anyone in the 'wheel' group. If you don't want
these for security reasons, you can undo them after the installation script is these for security reasons, you can undo them after the installation script is
finished. finished.
##### Step 4 - Installing from source ##### Step 5 - Installing from source
To install the actual testbed software, simply do a 'gmake ops-install' in your To install the actual testbed software, simply do a 'gmake ops-install' in your
object directory. object directory.
...@@ -167,17 +180,17 @@ addition, you'll need to build a custom kernel with the appropriate driver (you ...@@ -167,17 +180,17 @@ addition, you'll need to build a custom kernel with the appropriate driver (you
may even need to get patches from Utah for some boards). You'll also need to may even need to get patches from Utah for some boards). You'll also need to
set up a few things (not yet automated), described in doc/adding_nodes.txt . set up a few things (not yet automated), described in doc/adding_nodes.txt .
##### Step 5 - Setting up mailing lists ##### Step 6 - Setting up mailing lists
Optional. The ops-install script set up some mailing lists for the email Optional. The ops-install script set up some mailing lists for the email
addresses you set up in the defs file, in /etc/mail/lists . If you want to run addresses you set up in the defs file, in /etc/mail/lists . If you want to run
these mailing lists off your ops node, you can put some people in them now. these mailing lists off your ops node, you can put some people in them now.
These are just standard sendmail list files: a list of addresses and/or These are just standard sendmail list files: a list of addresses and/or
archive files, one per line. If you chose to use archive files, give a path archive files, one per line. If you chose to use archive files, give a path
to the file you'd like sendmail to stick all correspondance in, and create to the file you'd like sendmail to stick all correspondence in, and create
this file. this file.
##### Step 6 - Other miscellaneous things to set up ##### Step 7 - Other miscellaneous things to set up
[Nothing at this time] [Nothing at this time]
......
This diff is collapsed.
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2000-2004 University of Utah and the Flux Group. # Copyright (c) 2000-2005 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
...@@ -15,7 +15,7 @@ include $(OBJDIR)/Makeconf ...@@ -15,7 +15,7 @@ include $(OBJDIR)/Makeconf
# Force dependencies on the scripts so that they will be rerun through # Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed. # configure if the .in file is changed.
# #
all: boss-install ops-install all: boss-install ops-install fs-install
include $(TESTBED_SRCDIR)/GNUmakerules include $(TESTBED_SRCDIR)/GNUmakerules
......
...@@ -36,6 +36,7 @@ my $FSNODE = '@FSNODE@'; ...@@ -36,6 +36,7 @@ my $FSNODE = '@FSNODE@';
my $BOSSNODE = '@BOSSNODE@'; my $BOSSNODE = '@BOSSNODE@';
my $BOSSNODE_IP= '@BOSSNODE_IP@'; my $BOSSNODE_IP= '@BOSSNODE_IP@';
my $USERNODE_IP= '@USERNODE_IP@'; my $USERNODE_IP= '@USERNODE_IP@';
my $FSNODE_IP= '@FSNODE_IP@';
# #
# Some programs we use # Some programs we use
...@@ -179,8 +180,9 @@ my %EXPERIMENTS = ...@@ -179,8 +180,9 @@ my %EXPERIMENTS =
# List of names that goes into $HOSTS and which must resolve. # List of names that goes into $HOSTS and which must resolve.
# #
my @OPS_NAMES = ($USERNODE, "users", "ops"); my @OPS_NAMES = ($USERNODE, "users", "ops");
push(@OPS_NAMES, $FSNODE) if ($USERNODE eq $FSNODE) {
if ($USERNODE ne $FSNODE); push(@OPS_NAMES, "fs");
}
# #
# The meta-port (name and version) that drags in all the dependancies for # The meta-port (name and version) that drags in all the dependancies for
...@@ -654,18 +656,25 @@ Phase "suidperl", "Setting the suid bit on $SUIDPERL", sub { ...@@ -654,18 +656,25 @@ Phase "suidperl", "Setting the suid bit on $SUIDPERL", sub {
ExecQuietFatal("$CHMOD u+s $SUIDPERL"); ExecQuietFatal("$CHMOD u+s $SUIDPERL");
}; };
Phase "hosts", "Adding boss/ops IP addresses to $HOSTS", sub { Phase "hosts", "Adding boss/ops/fs IP addresses to $HOSTS", sub {
DoneIfEdited($HOSTS); DoneIfEdited($HOSTS);
AppendToFileFatal($HOSTS, my $hstr = "${BOSSNODE_IP}\t${BOSSNODE} boss".
"${BOSSNODE_IP}\t${BOSSNODE} boss", "\n${USERNODE_IP}\t@OPS_NAMES";
"${USERNODE_IP}\t@OPS_NAMES"); if ($USERNODE ne $FSNODE) {
$hstr .= "\n${FSNODE_IP}\t${FSNODE} fs";
}
AppendToFileFatal($HOSTS, $hstr);
}; };
Phase "resolve", "Checking to make sure names for ops resolve", sub { Phase "resolve", "Checking to make sure names for boss/ops/fs resolve", sub {
foreach my $name (@OPS_NAMES, ${BOSSNODE}, "boss") { my @hnames = (@OPS_NAMES, ${BOSSNODE}, "boss");
if ($USERNODE ne $FSNODE) {
push @hnames, ${FSNODE}, "fs";
}
foreach my $name (@hnames) {
Phase $name, $name, sub { Phase $name, $name, sub {
if (gethostbyname($name)) { if (gethostbyname($name)) {
PhaseSkip("$name resolves"); PhaseSucceed("$name resolves");
} else { } else {
PhaseFail("$name does not resolve - please see setup.txt\n" . PhaseFail("$name does not resolve - please see setup.txt\n" .
"for further instructions!"); "for further instructions!");
...@@ -776,7 +785,7 @@ Phase "ssh", "Setting up root ssh from boss to ops", sub { ...@@ -776,7 +785,7 @@ Phase "ssh", "Setting up root ssh from boss to ops", sub {
" StrictHostKeyChecking no", " StrictHostKeyChecking no",
" Protocol 1,2"); " Protocol 1,2");
}; };
Phase "keycopy", "Copy root ssh keys to ops", sub { Phase "keycopy", "Copy root ssh keys to ops and fs", sub {
if (! ExecQuiet("$SSH -o 'BatchMode=yes' root\@${USERNODE} pwd")) { if (! ExecQuiet("$SSH -o 'BatchMode=yes' root\@${USERNODE} pwd")) {
PhaseSkip("Key already copied"); PhaseSkip("Key already copied");
} else { } else {
...@@ -788,13 +797,35 @@ Phase "ssh", "Setting up root ssh from boss to ops", sub { ...@@ -788,13 +797,35 @@ Phase "ssh", "Setting up root ssh from boss to ops", sub {
" '(cat > ${ETCSSH}/ssh_known_hosts)'"); " '(cat > ${ETCSSH}/ssh_known_hosts)'");
if (ExecQuiet("$SSH -o 'BatchMode=yes' root\@${USERNODE} pwd")) { if (ExecQuiet("$SSH -o 'BatchMode=yes' root\@${USERNODE} pwd")) {
PhaseFail("You'll need to manually copy boss's public SSH key\n". PhaseFail("You need to manually copy boss's public SSH key\n".
"over to ops print so boss can get into ops without\n". "over to $USERNODE so boss can get into it without\n".
"a password. Run the following print as root:\n" . "a password. Run the following as root:\n" .
"scp $ROOT_PUBKEY ${USERNODE}:$ROOT_AUTHKEY"); "scp $ROOT_PUBKEY ${USERNODE}:$ROOT_AUTHKEY");
} }
} }
}; };
Phase "keycopy2", "Copy root ssh keys to fs", sub {
if ($USERNODE eq $FSNODE) {
PhaseSkip("FS node is ops node");
}
if (! ExecQuiet("$SSH -o 'BatchMode=yes' root\@${FSNODE} pwd")) {
PhaseSkip("Key already copied");
} else {
ExecQuietFatal("$SCP -i $INIT_PRIVKEY ".
"$ROOT_PUBKEY ${FSNODE}:$ROOT_AUTHKEY");
# Copy hosts keys to fs.
ExecQuietFatal("cat ${ETCSSH}/*.pub | $SSH ${FSNODE} ".
" '(cat > ${ETCSSH}/ssh_known_hosts)'");
if (ExecQuiet("$SSH -o 'BatchMode=yes' root\@${FSNODE} pwd")) {
PhaseFail("You need to manually copy boss's public SSH key\n".
"over to $FSNODE so boss can get into it without\n".
"a password. Run the following as root:\n" .
"scp $ROOT_PUBKEY ${FSNODE}:$ROOT_AUTHKEY");
}
}
};
}; };
Phase "rndc", "Setting up rndc for control of nameserver", sub { Phase "rndc", "Setting up rndc for control of nameserver", sub {
...@@ -934,6 +965,13 @@ Phase "named", "Setting up initial named configuration", sub { ...@@ -934,6 +965,13 @@ Phase "named", "Setting up initial named configuration", sub {
ExecQuietFatal("$SCP $TOP_OBJDIR/named/resolv.conf.ops ". ExecQuietFatal("$SCP $TOP_OBJDIR/named/resolv.conf.ops ".
" ${USERNODE}:/etc/resolv.conf"); " ${USERNODE}:/etc/resolv.conf");
}; };
Phase "copying2", "Copying resolv.conf over to fs", sub {
if ($USERNODE eq $FSNODE) {
PhaseSkip("FS node is ops node");
}
ExecQuietFatal("$SCP $TOP_OBJDIR/named/resolv.conf.ops ".
" ${FSNODE}:/etc/resolv.conf");
};
}; };
Phase "firstuser", "Setting up initial user (elabman)", sub { Phase "firstuser", "Setting up initial user (elabman)", sub {
......
This diff is collapsed.
This diff is collapsed.
# New ports collection makefile for: emulab-ops
# Date created: 28 January 2003
# Whom: ricci@cs.utah.edu
PORTNAME= emulab-fs
PORTVERSION= 1.4
CATEGORIES= misc
MASTER_SITES= #none
DISTFILES= #none
EXTRACT_ONLY= #none
COMMENT= "Meta-port for an emulab fs node"
MAINTAINER= hibler@cs.utah.edu
#
# For samba, so that it doesn't suck in everything under the sun
#
.MAKEFLAGS+= -DSAMBA_SUBPORT -DWITHOUT_WINBIND -DWITHOUT_LDAP -DWITHOUT_POPT
#
# This prevents any ports from trying to run interactively - some, ask silly
# questions without this option.
#
.MAKEFLAGS+= -DBATCH
RUN_DEPENDS= gmake:${PORTSDIR}/devel/gmake \
sudo:${PORTSDIR}/security/sudo \
rsync:${PORTSDIR}/net/rsync \
smbd:${PORTSDIR}/net/samba3
NO_BUILD= yes
do-install: # empty
.include <bsd.port.mk>
Meta-port for an emulab fs node. This port does not install the emulab software
itself - it just ensures that the requisite ports are installed.
@comment This packing list left intentionally empty
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
PORTSDIR=/usr/ports PORTSDIR=/usr/ports
PORTSUBDIR=misc PORTSUBDIR=misc
SRCDIR=`dirname $0` SRCDIR=`dirname $0`
PORTS="elvind emulab-boss emulab-ops libelvin emulab-tftp-hpa p5-GD-old ulsshxmlrpcpp" PORTS="elvind emulab-boss emulab-fs emulab-ops libelvin emulab-tftp-hpa p5-GD-old ulsshxmlrpcpp"
for PORT in $PORTS for PORT in $PORTS
do do
......
--- /usr/ports/net/samba3/Makefile.orig Tue Aug 23 23:31:08 2005
+++ /usr/ports/net/samba3/Makefile Tue Aug 23 23:17:58 2005
@@ -63,8 +63,8 @@
.if !defined(SAMBA_SUBPORT)
OPTIONS= LDAP "With LDAP support" on \
- ADS "With Active Directory support" on \
- CUPS "With CUPS printing support" on \