This page is a work in progress. Please be sure to read and be familiar with the Emulab documentation.
The testbed needs to know what switches are connected to it and what power ports they are plugged into. Right now, we insert these manually into the database.
Testbed nodes need to be setup to boot from the network by default. This is done through the Preboot eXecution Environment, available for most network cards. For onboard network cards, it is typically enabled through the BIOS.
These filesystems are PXE booted over the network via TFTP and allow us to perform various parts of node maintenance.
There are three different MFS (memory file system) images that come with DETER/Emulab.
They are:
The reason all these tasks are split up among multiple images is to keep the image size down since they are booted over the network. With faster networks, these images will likely be rolled into a single Linux based image in the future.
Each site will have to install root SSH keys from boss into each MFS and change the root password.
This process, along with fetching/unpacking the MFS tarball, has been automated by the script setup_mfs in testbed/install:
[jjh@boss ~/testbed/install]$ sudo ./setup_mfs -h Usage: setup_mfs The setup phase is always performed. Options not required -g Get the MFS from web and extract -f <filename> Use provided mfs tar.bz2 archive
This script will configure all three MFS images with your boss's root ssh key and a password of your choice.
[jjh@boss ~/testbed/install]$ sudo ./setup_mfs -g ################################################################################ # Fetching http://www.deterlab.net/~jjh/Deter%20OS%20Images/deter-mfs.tar.bz2 # Extracting to /usr/testbed/tftpboot # % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 37.4M 100 37.4M 0 0 3295k 0 0:00:11 0:00:11 --:--:-- 3287k Please enter a MFS root password Password: Verifying - Password: ################################################################################ # Setting up MFS: /usr/testbed/tftpboot/freebsd/boot # Created md0... Created /mnt-md0 Changing the image root password... Locking toor... Unmounting /mnt-md0 Removing mount point /mnt-md0 Unconfiguring md0 Running prepare on mfs and kernel loader.conf: loader.rc: kernel: mfsroot: mfsroot.gz updated... ################################################################################ # Setting up MFS: /usr/testbed/tftpboot/freebsd.newnode/boot # Created md0... Created /mnt-md0 Changing the image root password... Locking toor... Unmounting /mnt-md0 Removing mount point /mnt-md0 Unconfiguring md0 Running prepare on mfs and kernel loader.conf: loader.rc: kernel: mfsroot: mfsroot.gz updated... acpi.ko: ################################################################################ # Setting up MFS: /usr/testbed/tftpboot/frisbee/boot # Created md0... Created /mnt-md0 Changing the image root password... Locking toor... Unmounting /mnt-md0 Removing mount point /mnt-md0 Unconfiguring md0 Running prepare on mfs and kernel loader.conf: loader.rc: kernel: mfsroot: mfsroot.gz updated... [jjh@boss ~/testbed/install]$
When the PXE boot ROM is loaded during machine boot.
The default bootloader for testbed nodes is /tftpboot/pxeboot.emu. There are four different versions of pxeboot.emu distributed with the tarball.
Pick a loader that best suits your installation and copy it:
cp /tftpboot/pxeboot.emu-<null|sio|sio2|vga> /tftpboot/pxeboot.emu
You can also look at modifying /usr/local/etc/dhcpd.conf.template. You will have to generate a new dhcpd.conf configuration using /usr/testbed/sbin/dhcpd_makeconf > /usr/local/etc/dhcpd.conf and restarting dhcpd.
Generally each node will have a control network interface and experimental interfaces. The control network interface should be on a switch port that is on the CONTROL (VLAN 2003) network. The experimental interfaces should be on ports that are enabled, but can be in a default VLAN for now.
The testbed nodes should be set to boot only off of the network. Disable hard drive boot to prevent failed PXE requests from falling through to booting whatever is on the disk.
You will have to create a new "Node Type" for each class of node you wish to add to your testbed.
If you are creating a node type for a typical testbed pc, use the class 'pc.' If you are creating a node type for special hardware, choose something else such as 'router' for routers or 'appliance' for appliance type nodes.
See the section on node types
Connect to the MySQL database on boss (typically tbdb).
mysql> insert into nodes (node_id, type, phys_nodeid, role) values ("juniper1", "junpier", "juniper1", "testnode");
Update the other fields in the node table for this new type of node:
mysql> update nodes set inception=now(), def_boot_path='', def_boot_cmd_line='', next_boot_path='', pxe_boot_path='', rpms='', deltas='', tarballs='', startupcmd='', startstatus='none', bootstatus='unknown', status='', status_timestamp='', failureaction='fatal', eventstate='ISUP', state_timestamp=now(), op_mode='MINIMAL', op_mode_timestamp=now(), allocstate='FREE_DIRTY', allocstate_timestamp=now(), next_op_mode='', ipodhash='' where type="juniper";
Set the node status to up for the newly created nodes:
mysql> insert into node_status values ('juniper1', 'up', NULL);
Card is typically incremented and port is always 1 for testbed nodes (I know, confusing).
mysql> insert into interfaces (node_id, card, port, interface_type, iface, role) values ("juniper1", 1, 1, "fop", "eth0", "expt"); mysql> insert into interfaces (node_id, card, port, interface_type, iface, role) values ("juniper1", 2, 1, "fop", "eth1", "expt");
We must also setup the interface state table:
mysql> insert into interface_state (node_id, card, port, iface) values (\"juniper1", 1, 1, "eth0"); mysql> insert into interface_state (node_id, card, port, iface) values (\"juniper1", 2, 1, "eth1");
Lets say our juniper has two ports on card 2 of our switch on ports 23 and 24:
mysql> insert into wires (node_id1, node_id2, type, card1, port1, card2, port2) values ("juniper1", "hp1", "Node", 1, 1, 2, 23); mysql> insert into wires (node_id1, node_id2, type, card1, port1, card2, port2) values ("juniper1", "hp1", "Node", 2, 1, 2, 24);
If you have a serial controller, you can add an entry into the tip lines table. The 'tipname' corresponds to the name given to the capture daemon on the serial server:
mysql> insert into tiplines (tipname, node_id, server) values ('juniper1', 'juniper1', 'serial3');