arch.txt 17.7 KB
Newer Older
1 2 3
======================
Emulab Source Tree Map
======================
4

5 6 7 8 9 10 11 12
This file documents roughly the contents of our source tree as of
April, 2003. Some of the entries in here are per-script, others are
for a group of scripts, in which case the documentation inside the
individual scripts should be sufficient explanation. The end of the
file also has some overview-ish stuff about abstractions and things
like that.

[This file maintained by testbed-ops@emulab.net]
13

Jay Lepreau's avatar
tweak  
Jay Lepreau committed
14 15 16
For big picture and some details, read the OSDI'02 paper, in
doc/papers/netbed-osdi02* and on the Web.

17 18 19 20 21 22 23 24 25 26 27 28 29 30
Accounts
 - unix accounts
   - unix group management (per-proj and per-group)
 - ssh key distribution
 - sfs key distribution
 - account permissions (web only, ron/wa, root/non-root, etc.)
 - emulab permissions
   - control of hardware/hw config.
   - administrative control
 - hierarchical organization
   - delegation at all levels
   - trust models and their security impact

Assign (resource allocation algorithms)
Jay Lepreau's avatar
tweak  
Jay Lepreau committed
31
 - the Testbed Mapping Problem: read draft of our upcoming CCR paper in doc/papers
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
   - NP Hard
   - in some ways, constraint satisfaction problem
     - but more, because not all satisfactory solutions are equal
   - time constraints: we're an interactive system, and need to
     perform on interactive timescales - a few seconds max to get a
     good answer
   - variation in wide area
     - soft matching
     - complicated more by fact that we can combine the unknown
       (wide-area link) with something we control (traffic shaping)
 - Emulab solution
   - many "valid" solutions, but difference between near-optimal and
     random valid soln. is huge and important
   - sim. annealing core
   - highly optimized
     - clever domain specific tricks
     - main purpose is to conserve scarce resources (nodes,
       interswitch bandwidth, soon special hw like GigE)
   - lots of parameters, not always clear how to tune them
 - Netbed solution
   - typically no exact match, just some that may be closer than
     others - very fuzzy matching
   - genetic algo. core
   - not as highly developed yet, but meets our needs
   - main purpose is to find a real-world overlay that matches the
     supplied topology as closely as possible

Capture/console (node consoles - "'zero-penalty' remote research")
 - serial line consoles to nodes replace kbd/vga
 - fine-grained access control
   - changes quickly when node changes "ownership"
 - simple, secure remote access
   - ACLs, authenticated ssl tunnel program + standard telnet client

CD-ROM (remote node mgmt/robustness, adding nodes to the system)
 - simple to add a node
 - fallback boot method (CD-ROM) when disk is hozed
 - path for self-update and disk reimaging
 - goal is to reduce need for human intervention whenever possible

Database (centralized store for persistent shared system state)
 - lots o' stuff here
 - most stuff falls into one of several categories
   - semi-permanant hw setup info (wires, ifaces, nodes, outlets)
   - current hardware configs (reservations, ifaces, vlans, etc)
   - semi-permanant sw setup info (disk images, OS's, etc.)
   - current sw setup (traffic shaping, trafgen, routing, etc.)
   - virtualized expt info (topology, config, etc)
   - administrative info (users, groups, projects, etc.)
   - misc. config bits and logging
 - sw engineering issues
   - db schema must match sw build

Jay Lepreau's avatar
tweak  
Jay Lepreau committed
85
IXP (special hw resources) [not released due to Intel license restrictions]
86 87 88 89 90 91 92
 - use as testbed infrastructure
   - traffic shaping
 - use for experimentation
   - shared facil. gives more people access, increases usage
   - emulab is good environment w/many tools

Event system (distributed event coordination/communication)
Jay Lepreau's avatar
tweak  
Jay Lepreau committed
93
 - "Elvin" publish/subscribe system underneath (imported from elsewhere)
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
 - used in several directions
   - emulab to nodes/programs
   - nodes to emulab
   - programs on emulab server to each other
   - can be nodes to nodes too
 - delay agent
   - coordinated control of traffic shaping
   - changes can initiate anywhere
     - automatic timed changes from emulab
     - manual changes from emulab server or a node
   - allows for reactive traffic shaping, trace playback, etc.
 - nsetrafgen
   - control of NSE simulators and their traffic generation
 - program agent
   - start/stop arbitrary program
   - timed or manual, and allows reactivity
 - event scheduler
   - controls timed events
   - may be submitted apriori or during a run
 - stated uses it heavily, but is described elsewhere
 - tevc/tevd
   - simple command line client for use on any server or node
 - trafgen
   - traffic generation via TG toolkit
   - patched to allow control via events

install (emulab cluster site configuration tools)
 - for making more emulabs
 - mostly automated install process
   - FreeBSD "port"/"meta-port"-style install script
   - installs dependencies as needed
   - performs emulab-specific install tasks
 - one for configuring a "boss" node (secure server)
 - one for configuring an "ops" node (public server)

ipod/apod (node control without power control hardware)
 - "ICMP Ping-Of-Death" and big brother, "Authenticated Ping-Of-Death"
 - reboot pingable but hung node without external intervention
 - adds robustness and greater control
 - especially important where only other alternative is a human

Libaries (Software engineering?)
 - shared constants
 - common interfaces
 - database routines and abstractions
 - important for robust, maintainable software

OS tools (disk images, etc)
 - management of disk contents
 - image creation
   - imagezip
     - lots of cool tricks here - read the frisbee paper
 - image distribution/installation
   - frisbee
Jay Lepreau's avatar
tweak  
Jay Lepreau committed
148
     - lots to say here... read the paper in USENIX'03 and doc/papers
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
   - growdisk - partition management on heterogeneous nodes
 - deltas
   - deprecated - dump/restore
   - with our incredible disk image tools, it is way faster to 
     just reload the disk instead of checking it first
 - tarfile installation
   - easy changes without forcing a customized disk image

PXE/DHCP - node boot process
 - automatic database-driven control of nodes
 - can't assume anything about the disk
 - node always boots off of PXE so we get control 
 - talk to the database (via bootinfo)
   - may be told to boot a tftp kernel or a specific partition
   - tftp kernels (often with Memory file systems) used for:
     - disk image creation/installation
     - NetBoot
     - OSKit kernels
 - in emulab disk images, nodes self-configure using a pull model
   - see also TMCD
 - progress monitored by stated

Security
 - always conscious of threat model
 - segregate public server (ops)
 - limited shells on secure server
   - secure server trusted by all nodes
     - emulab performs config tasks on behalf of user
 - plasticwrap/paperbag - transparently run commands on secure server
 - suexec during web execution adds extra layer of security and
   permission checks
180
 - lastlogs 
181
   - track logins on servers and nodes, report into main db
182
 - giving away root on the nodes causes issues 
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
 - passwords
   - we enforce good ones via checkpass/cracklib
   - have expirations

Sensors
 - monitor nodes
 - healthd - temperature, etc
 - slothd - activity measurements
   - detect tty, network, cpu activity and report it
   - low overhead
   - agile 
     - extremely low latency in detecting new activity in an idle node
     - higher latency okay for detecting beginning of inactivity
       - when its active, stay out of the way...

198
TBSetup 
199 200 201 202 203 204 205 206 207 208 209 210
 - core of testbed software
 - primary focus: expt config tasks
   - and auxiliary functions necessary for expt config stuff
 - assign_wrapper
   - interface between db data representation and resource allocation
     algorithms. Call the solver and use the output to set up the
     database state that runs the rest of the process.
 - batch daemon
   - core of a pretty typical batch system
   - allows for more automation
     - submit expt even when no resources are avail., runs later
 - checkports - ?
211 212
 - console reset/setup
   - control console access (see also capture section)
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335
 - db2ns - dump our db data rep back into an ns file
 - eventsys start/control
   - start up event schedulers for each expt - see event section
 - exports setup
   - control access to files via NFS on nodes
   - create an /etc/exports file based on current node "ownership" and
     group membership
   - controls access to all home dirs, proj dirs, and group dirs
 - frisbeelauncher
   - wrapper to set up a frisbee server when trying to load a disk
 - libaudit - track requests for certain control actions
 - libtbsetup - see libraries section
 - libtestbed - see libraries section
 - mkgroup/mkproj, rmgroup/rmproj, rmuser
   - manage users, groups, and projects (sync unix world to match db)
 - named_setup
   - set up dns subdomains for each expt
   - create aliases for each node that are consistent across swapins
 - node_control - change node sw setup params (boot params, startup)
 - node_reboot
   - reboot a node as gracefully as possible
   - try 'ssh reboot', IPOD, then power cycle, as needed.
 - node_update - push mounts/accounts changes to nodes
 - nscheck - syntax check an ns file for use in emulab
 - os_load - start a frisbee disk reload
 - os_select - configure node boot params
 - os_setup 
   - major part of expt config
   - db says what nodes should be running, so make it happen
   - may load disks, then reboots nodes and waits for them to come up
 - portstats - diag. tool for switch port counters
 - power - power control program
 - ptopgen - generate description of currently available hw
 - reload_daemon
   - first-cut node manager
   - reload disks when nodes get freed
 - resetvlans - clear any vlans made up of a set of nodes
 - routecalc - generate shortest path routes for a topology
 - sched_reload - set up a disk reload for later
 - sched_reserve - set up a node to go to an expt when freed
 - setgroups - update unix groups file with current membership
 - sfskey update - sync live sfskey config with db config
 - snmpit - SNMP switch control
   - supports multiple switch types
   - configures VLANs into "links" and "LANs" in topologies
   - read other switch data (ie for portstats)
 - startexp/endexp - begin/end experiments
   - wrappers called from web
   - start takes a "new" expt and an ns file
     - prerun it and swap it in, and send mail, leaving "active" expt
   - end takes a expt that is "new", "swapped", "active", or "terminated"
     - swap out if needed, and tbend it, then clean up the last bits
 - staticroutes
   - take db topology info and pass it to routecalc to generate static
     shortest-path routes for the expt. Save result in db.
 - swapexp
   - called from web - swap in, out, or restart an expt.
   - performs some checks, some locking, and calls tbswap or tbrestart
 - tbprerun
   - parse an ns file into the database, fully preparing it for swapin
 - tbswap
   - swap an expt in or out
   - performs a long list of sw/hw setup tasks
 - tbend
   - end an expt that has been swapped out
   - clean out virtual state
 - tbreport
   - dump a report of the experiment's configuration (virt and phys)
 - tbresize
   - older interface for rudimentary expt editing
   - add nodes to an expt, either unconnected or in a LAN
 - tbrestart
   - restart an expt without completely swapping out and back in
   - restart event system, reset ready/startup/boot status, port cntrs
 - vnode_setup
   - called from os_setup
   - configures multiplexed virtual nodes
   - mechanism: ssh runs a script in on the disk
 - wanassign/wanlinksolve (see assign section)
 - wanlinkinfo - display info on wide-area nodes from db
 - checkpass - see security section
 - ns2ir
   - The Parser
   - similar to/based on ns parser
   - rewrote methods to put info into database
   - performs emulab-specific checks
   - we supply a library that they use to get access to
     emulab-specific commands

Testsuite (regression testing - software engineering?)
 - automated system runs lists of tests in different modes
   - modes are levels of reality
 - used for regression testing ("did we break something?") 
   - and development ("does this new thing work?"
 - test mode (aka frontend mode):
   - all scripts run like normal, but whenever something would have
     touched hardware, assume it succeeded, and return
   - doesn't touch nodes/switches, etc, but does all the db changes
 - full mode:
   - reserve some nodes from the testbed
   - set up "redirect" for certain critical daemons
   - set up an alternate db, make our nodes the only free ones
   - run alternate daemons (or live daemons use alt. db for our nodes)
   - entire system runs like normal, but off of a separate installed
     set of scripts
 - very flexible
   - tests can modify db, run arbitrary scripts
   - simple to use in normal case
     - check that normal expt path runs w/o errors
 - work in progress:
   - use full mode to verify accuracy/precision of traffic shaping
   - some parts may evolve to a set of tests that we run quickly at
     after swapping in before turning it over to the user

TMCD - Testbed Master Control Daemon
 - Server for node self-configuration
   - provides controlled access to the database
   - supports a pull model
   - recieves various reports/messages from nodes
 - TMCC - Testbed Master Control Client
   - currently supported on FreeBSD and Linux, and ported to OpenBSD
   - tool for nodes<->emulab communication
   - part of a set of node initialization scripts
336
 - Node self-configuration process
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413
   - report "I'm alive"
   - update config scripts (currently via sup)
   - run the config, which sets up:
     - interfaces, accounts, mounts, agents, startup programs, testbed
       daemons, installs tarfiles/rpms/etc, starts ntp, traffic shaping,
       virtual nodes, routing (gated/ospf and static/manual routes),
       hostname, /etc/hosts, IPOD/APOD, sfs, etc.
   - used on local nodes and widearea nodes, as well as inside jails

Tools (built for emulab, but useful outside of it too)
 - pcapper
   - traffic visualization tool
   - realtime tcl/tk graph of packets/throughput
   - categorized by traffic types

Visualization
 - graphical view of topologies in the database

Web Interface
 - Main configuration/administrative interface
 - Manage projects, groups, users    
   - edit user info, ssh keys, sfs keys, etc.
   - push account updates to nodes
 - Control nodes/experiments
   - start/end/swap expts
   - control nodes, delays, etc.
   - NetBuild GUI for creating expts/nsfiles
   - node status/monitoring
 - Get info about Emulab/Netbed
   - even download a CD, and get a key to join Netbed
   - all the documentation
     - tutorials, FAQs, etc.
   - publications, photos, some of our users, etc.
 - manage project data
   - disk images, custom OS's, etc.
 - for admins etc, also provides web db access and cvs web access

Stated ("state-dee") - node state management daemon
 - listens for node state events
   - performs triggered actions
   - watches for problems/timeouts
     - sends notifications at times
   - updates the database with current state
 - watches how nodes reboot, reload, etc
 - several "state machines" (operational modes) define what is correct
   - each node is somewhere in some state machine always
 - reports successful boots, reloads, etc.

Netbed Wide-area nodes
 - Most emulab abstractions have netbed wide-area counterpart
   - same methods/abstractions/tools used in LAN or WAN environment
   - easy to switch from a wide-area run to an emulated run (or simulated)
 - Boot process a little different
 - Many parallels to local area case
   - SFS instead of NFS for shared homedirs
   - Can set up links as tunnels with 192.168.* addresses
   - Accounts same (except for rootness)
   - Traffic generation

Simulated Nodes
 - many nodes simulated inside NSE on a single phys. node
 - can interact with real network
 - traffic gen can happen inside
 - links, etc. all work like normal
 - Due to NS limitations/abstractions, lots of things in the real
   world don't have a parallel here

Multiplexed Nodes
 - many nodes run on one physical node, and appear as many individual nodes
 - Implemented with "jail" on FreeBSD, or "____" on Linux
 - Goal to be as close to normal physical nodes as possible
 - creates lots of issues with multiplexing of virtual links onto
   physical links
   - routing, demultiplexing, etc

Cross-cutting Abstractions
 - Four different environments
414 415
   - Emulab/emulation (dedicated phys.) nodes, wide-area nodes, 
     simulated nodes, and multiplexed ("virtual") nodes
416 417 418 419
   - can mix and match in same expt
   - in many cases, same expt can run in any (or several) of the
     environments with few or no changes
 - Nodes
420
   - Emulated/emulab: dedicated physical nodes in a cluster
421 422
     - get root, can reboot, serial console, total control of node
       - including OS, disk imaging, etc.
423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453
   - Widearea: shared nodes, geographically distributed
     - get an account (non-root, typically)
     - sometimes get a jail / "virtual server"
     - less control (of OS, rebooting, etc.)
   - Simulated: nodes inside of an NS simulator
     - nodes are simulated, don't run an OS, etc.
     - functionality programmed via NS models
   - Multiplexed: jails / virtual servers on cluster nodes
     - Almost as real as emulation nodes
     - allows bigger scale, risks potential for side-effects
     - same level of control as emulation nodes
 - Links
   - Emulated/emulab:
     - completely controllable network characteristics
     - including LAN speeds or shaped links
     - isolated control network
     - very realistic, predictable, repeatable
   - Widearea:
     - network is the real/raw internet
     - tunnels are optionally configured
     - no separate control network
     - completely realistic, but unpredictable
   - Simulated:
     - links inside NSE (NS Emulator)
     - NSE does shaping
     - real and sim worlds can talk to each other
   - Multiplexed:
     - Same capabilities as normal emulated/emulab links
     - some tricks involved to get everything to work right

---EOF---