HomenetSetup

From Cmcl

Jump to: navigation, search

Adding new Homenet nodes..

Contents

Hardware setup before sending to users

  • Boot, change boot order (see below), hit OK to avoid CMOS checksum error

Initial database/key stuff

  • Make a new private key for the node
dd if=/dev/urandom count=128 bs=1 | /sbin/md5
  • Take node of the md5 part of the results.
  • You then have a few things to do on boss (Note: You must have /usr/testbed/sbin and /usr/tesbed/bin in your path on boss to run the commands)
    • On boss, find the homenet.xml template, make a copy for the node, and insert the key into the appropriate field. Be certain that the nodetype is appropriate (pchome2 is the hardware type for the new shuttle boxen). Then, run the following command on the xmlfile to register the node in the database.
wap wanodecreate -c nodename nodename.xml
      • (Note the -c option - this is needed to force full registration of the node - if this is not done, it will only make entries in the wanode tables and the node will propogate to the rest of the database at wanodecheckin, which is not a good idea because we then need that to happen before we can tell the node to load an OS)
      • (nodename will be the name the system is called by emulab, and does not need to be the same name as the xmlfile)
    • Also on boss:
wap sched_reserve emulab-ops waholding nodename
nfree emulab-ops hwdown nodename
os_load -s -p homenet -i UBUNTU-WAHomenet nodename
  • Make a copy of the current homenet usbkey image, mount it, and replace /etc/emulab/emulab-privkey on the usbkey filesystem with the key you just generated (just the raw hex string, not the whole xml file). Then unmount and write that to your USBStick.
    • mounting images is done with something like: mdconfig -a -t vnode -u 1 -f /path/to/image.img && mount /dev/md1s1a /mnt
    • unmounting: umount /mnt && mdconfig -d -u 1
    • If you are sharing the system with someone else using the md devices, you may need to adjust this accordingly.
    • (on the off chance you're using a usbstick image but not using CMU's emulab install, you will need to adjust a few other things on the image. Contact Pat Gunn for details)

Note that if your node must use a static IP, edit /etc/rc.d/emulab-preif on the USBKey accordingly.

Hardware configuration

  • If you are using the shuttle boxen, be sure the devices are configured to boot from the USBStick. Never boot the machines afterwards with the stick out, or you'll need to tell them to boot from USB again - they forget the boot preference for any device not present during a POST.
  • Shuttle boxen must be configured *not* to do legacy mode disk access. I believe the default is correct.
  • Power Management: Enable Power on after power failure
  • JFranklin: "By changing the cpu ratio in the bios from 6x to 10x, the CPU now runs at 2.67Ghz. I also notice that this results in three P-state frequencies (2.67Ghz, 2.14Ghz, and 1.6Ghz) with an idle system running in 1.6Ghz and a busy system running in 2.67Ghz."

OpenVPN configuration

On boss:

  • Become root, run bash (openvpn's scripts are not csh-compatible)
  • cd /usr/local/etc/openvpn/easy-rsa
  • source the vars file
  • build-key clientname - interactive. Be sure to enter the name of the client under "common name", do NOT enter the server name or disaster will befall the world and your name will be written across the sky in fiery letters. **This makes a client key (clientname.*) under the keys/ directory
    • To import the keys:
cd keys/
import_openvpn_keys hostname

Boot the node

Go ahead! Boot it up. It should then image Ubuntu onto its hard drive. It will setup OpenVPN for a control channel.

(Note: You must have /usr/testbed/sbin and /usr/tesbed/bin in your path on boss to run this command)

Personal tools