Commit 97080b62 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add tutorial section on creating and using a delta.

parent 7d8ba2c8
......@@ -15,6 +15,7 @@
<li> <a href="#RPMS">Installing RPMS automatically</a>
<li> <a href="#Startupcmd">Starting your application automatically</a>
<li> <a href="#ReadyBits">How do I know when all my nodes are ready?</a>
<li> <a href="#Delta">Customizing an OS (How to create a <i>delta</i>)</a>
......@@ -123,6 +124,93 @@ generalized barrier synchronization would be more useful, we will
investigate the implementation of such a feature.</i>
<li> <a NAME="Delta"></a>
<h3>Customizing an OS (How to create a <i>delta</i>)</h3>
If your set of operating system customizations cannot be easily
contained within an RPM (or multiple RPMs), or if you are just not
familiar with the RPM mechanism, then you can create your own
operating system <i>delta</i>. A delta is like an RPM or Tar file in
that it contains a bunch of files to be unpacked onto the node. The
difference is that with a delta you do not have to figure what files
you changed, and how to automate the installation process. Instead,
you just allocate a node, change it anyway you like, and then issue
the <tt>create-delta</tt> command. The resulting delta file can then
be specified in your NS file using the Testbed NS extension
<tt>tb-set-node-deltas</tt>. You can create one delta to install on
all of your nodes, or several different deltas for various nodes in
your experiment. When the nodes in your new experiment boot for the
first time, the delta will be installed (all of the files unpacked)
very early in the boot phase, and the node rebooted again (in case you
have installed daemons that need to be started during initialization).
Your experiment can then proceed.
The key point is that the Testbed configuration software deals with
figuring out what files you changed, installing the delta on your
nodes, rebooting the nodes that have new software installed, and
ensuring that any particular delta is installed only once on each
Lets step through an example. The first thing you need to do is
create an experiment with a single node in it. The following NS file
can be submitted to the "Begin Experiment" page.
set ns [new Simulator]
source tb_compat.tcl
set nodeA [$ns node]
tb-set-node-os $nodeA FBSD40-STD
$ns run </code></pre>
When you have received email notification that the experiment has
configured, log into the node with <tt>ssh</tt>. Install whatever
software you like, making sure to update the necessary files if you
have installed daemons that need to be started automatically at boot
time. After all of your software is installed, create the delta file
sudo /usr/local/bin/create-delta /proj/testbed/ </code></pre>
The argument to the <tt>create-delta</tt> command is a complete
pathname, which <b>must</b> reside someplace in your /proj directory
(a subdirectory is fine). You cannot write the delta file to any
other filesystem. It should be noted that a delta created on one OS
cannot be installed on another. In other words, a delta created on a
FreeBSD machine can only be installed on a FreeBSD machine. If you
need the same software installed on a Linux machine as well, you will
need to repeat this process with a node running Linux. See the section
on <a href="nscommands.html#OS"><tt>tb-set-node-os</tt></a> in the <a
href="nscommands.html">Extensions</a> reference.
After you have created your delta, you can then use it in subsequent
experiments by using the Testbed NS extension
<tt>tb-set-node-deltas</tt>. For example, here is an NS file that
creates a two node experiment, installs a different delta on each
node, and then runs a program automatically on each node. Presumably,
the startup program is installed by the delta, and encapsulates the
experiment being performed.
set ns [new Simulator]
source tb_compat.tcl
set nodeA [$ns node]
set nodeB [$ns node]
tb-set-node-os $nodeA FBSD40-STD
tb-set-node-os $nodeB RHL62-STD
tb-set-node-deltas $nodeA /proj/testbed/deltas/
tb-set-node-deltas $nodeB /proj/testbed/deltas/
tb-set-node-startup $nodeA /usr/site/bin/run-my-experiment
tb-set-node-startup $nodeB /usr/site/bin/run-my-experiment
$ns run </code></pre>
<hr size=2 noshade>
......@@ -30,6 +30,8 @@
Starting your application automatically</a>
<li> <a href="advanced.html#ReadyBits">
How do I know when all my nodes are ready?</a>
<li> <a href="advanced.html#Delta">
Customizing an OS (How to create a <i>delta</i>)</a>
<li> <a href="batchmode.html">Batch Mode Experiments</a>
<li> <a href="image.html">Creating your own disk image</a>
Supports Markdown
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