Commit 1ee4bc4b authored by Leigh B Stoller's avatar Leigh B Stoller

A few little things to install on image we create for the genirack

control node. Added target genirack-install.
parent af4c1790
......@@ -285,11 +285,16 @@ xen-install: dir-install
$(INSTALL) -m 755 $(SRCDIR)/vnodectl $(BINDIR)/
echo "xen" > $(ETCDIR)/genvmtype
$(INSTALL) -m 755 $(SRCDIR)/mkvnode.pl $(BINDIR)/mkvnode.pl
$(INSTALL) -m 755 $(SRCDIR)/restorevm.pl $(BINDIR)/restorevm.pl
$(INSTALL) -m 755 $(SRCDIR)/capturevm.pl $(BINDIR)/capturevm.pl
$(INSTALL) -m 755 $(SRCDIR)/xen/restorevm.pl $(BINDIR)/restorevm.pl
$(INSTALL) -m 755 $(SRCDIR)/xen/capturevm.pl $(BINDIR)/capturevm.pl
$(INSTALL) -m 755 $(SRCDIR)/xen/xend-config.sxp $(SYSETCDIR)/xen/
$(INSTALL) -m 755 xen/emulab-cnet $(SYSETCDIR)/xen/scripts/
genirack-install:
$(INSTALL) -m 755 $(SRCDIR)/xen/restorevm.pl $(BINDIR)/restorevm.pl
$(INSTALL) -m 755 $(SRCDIR)/xen/capturevm.pl $(BINDIR)/capturevm.pl
$(INSTALL) -m 755 $(SRCDIR)/xen/xenbridge-setup $(BINDIR)/
OPENVZGUEST_TEMPLATE = /vz.save/template/cache/emulab-default.tar.gz
OPENVZGUEST = /vz/template/cache/emulab-default.tar.gz
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -36,6 +36,7 @@ RCDIR = $(SYSETCDIR)
RRCDIR = /etc
INSTALL = /usr/bin/install -c
COMMON = $(SRCDIR)/../common
DEFRUNLVLDIR ?= $(SYSETCDIR)/rc3.d
install client-install: common-install etc-install \
script-install bin-install sysetc-fixup
......@@ -77,4 +78,15 @@ sysetc-fixup:
script-install: dir-install $(SCRIPTS)
(cd ../linux; $(MAKE) DESTDIR=$(DESTDIR) RCDIR=$(RCDIR) script-install)
genirack-install:
(cd ../linux; $(MAKE) DESTDIR=$(DESTDIR) RCDIR=$(RCDIR) genirack-install)
$(INSTALL) -m 755 $(SRCDIR)/genirack.sh $(RCDIR)/init.d/genirack.sh
-ln -sf $(RCDIR)/init.d/genirack.sh $(DEFRUNLVLDIR)/S10genirack.sh
-ln -sf $(RCDIR)/init.d/genirack.sh $(SYSETCDIR)/rc2.d/S10genirack.sh
-ln -sf $(RCDIR)/init.d/genirack.sh $(SYSETCDIR)/rc4.d/S10genirack.sh
-ln -sf $(RCDIR)/init.d/genirack.sh $(SYSETCDIR)/rc5.d/S10genirack.sh
$(INSTALL) -m 644 $(SRCDIR)/interfaces-genirack $(SYSETCDIR)/network/interfaces
$(INSTALL) -m 644 $(SRCDIR)/isc-dhcp-server $(SYSETCDIR)/default/
$(INSTALL) -m 644 $(SRCDIR)/dhcpd.conf $(SYSETCDIR)/dhcp/
sfs-install:
#
# dhcpd.conf. For the Genrack control node. Do not install anyplace else!
#
server-identifier 10.1.1.254;
server-name "10.1.1.254";
default-lease-time 36000; # 10 hours
max-lease-time 36000; # 10 hours
ddns-update-style none; # req'd vers 3 directive
subnet 10.1.1.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option routers 10.1.1.254;
range 10.1.1.253;
}
subnet 10.2.1.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option routers 10.2.1.254;
range 10.2.1.253;
}
#!/bin/sh
### BEGIN INIT INFO
# Provides: genirack
# Required-Start: $network
# Required-Stop: $network
# X-Start-Before: xend isc-dhcp-server
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Configure GeniRack Stuff
# Description: Configure GeniRack Stuff
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
. /lib/init/vars.sh
. /lib/lsb/init-functions
. /etc/emulab/paths.sh
do_start() {
if [ -x $BINDIR/xenbridge-setup ]; then
log_daemon_msg "Setting up Xen Bridges"
$BINDIR/xenbridge-setup \
&& $BINDIR/xenbridge-setup -b xenbr1 eth1 \
&& $BINDIR/xenbridge-setup -b xenbr2 eth2 \
&& $BINDIR/xenbridge-setup -b xenbr3 eth3
ES=$?
return $ES
fi
}
case "$1" in
start)
do_start
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
#
# XXX abuse of mapping function follows.
# The findcnet script DHCPs on all interfaces the first time it is invoked
# and uses the results of that for every other invocation. The script
# returns "cnet" for the interface that is the control net, and the physical
# interface name for all others.
#
mapping eth*
script /usr/local/etc/emulab/findcnet
#
# These interfaces are wired to the switches.
#
iface eth1 inet static
address 10.1.1.254
netmask 255.255.255.0
iface eth2 inet static
address 10.2.1.254
netmask 255.255.255.0
iface eth3 inet static
address 10.3.1.254
netmask 255.255.255.0
#
# The control network has been identified and configured indirectly
# via the mapping above. Here we just make sure that if shutdown, we
# remove the indicator file so that we will re-DHCP next time.
#
auto eth0 eth1 eth2 eth3 eth4 eth5 eth6 eth7 eth8 eth9
iface cnet inet manual
up echo "Emulab control net is $IFACE"
down rm -f /var/run/cnet
down ifconfig $IFACE down
# Defaults for dhcp initscript
# sourced by /etc/init.d/dhcp
# installed at /etc/default/isc-dhcp-server by the maintainer scripts
#
# This is a POSIX shell fragment
#
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="xenbr1 xenbr2"
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