= Inventory Gathering = * [#data Data Structure] * [#node Node Image] * Expirment details == Data Structure == #data Our layout will try to capture the relationship between nodes (which for our current purposes means motherboards) and devices (any network/communication device). The relationship heirachy looks like this: {{{ TESTBED - | -> Node - -INV_... -- Inventory Attributes (e.g. motherboard serial number, disk size, cpu type,...) -INF_... -- Infrastructure Attributes (Control IP, Control interface,...) -CM_... -- CM attributes (e.g. CM IP, CM Version, ...) | -> Device -name = FQDNofNode_dev_unique# -INV_if_name= "name the os thinks this device is. (e.g. eth0)" -INV_dev_id = "xxxx:xxxx" where the x's are hex numbers that represent the device identifiers. }}} To reflect these relationships we're going to establish a few naming conventions. These will be enumerated in the following table ||Hardware || resource type || name || attributes (all prefixed with INV_)|| ||Mother board|| Node || FQDNofNode || disk, cpu, memory, mother board serial number, disk serial number || ||Wired ethernet card || Device || FQDNofNode_DEV_unique# || mac, device id, device string, bus type || ||Wireless ethernet card || Device || FQDNofNode_DEV_unique# || mac, device id, device string, bus type || ||USB connected device || Device || FQDNofNode_DEV_unique# || mac (if it exists), device id, device string, bus type || == Node Image == #node The node image is a very slight modification of the baseline image. It only has one addition package ruby rest api (lsusb and lspci are installed by default), which is installed by: {{{ root@node.. apt-get install ruby-rest-lib }}} There are two scripts that are copied to /root directory of the node, gatherer.rb and inventory.sh. Inventory.sh is merely a launchers that specifies where to redirect logs, and where the lspci/lsusb binaries are (set via flags when invoking gatherer.rb). Inventory.sh is added to the node startup routine (this will hopefully change) at priority s99. When the node boots into this image it should immediately begin the inventory process.