(diagram of package directories and experiment-setup)
The modules directory contains python modules that implement behaviour in the SEER framework. Each module contains a least one class that extends from one of the add-on classes ( Agent, Service, Collector, Aggregator ). Each of these add-on classes also contains dependencies on other modules or software. The source directory contains the source to build software packages for use by SEER modules. It also contains scripts that are called upon to build the associated source.
During the setup process, initial modules dependencies are passed to the setup script from the user as arguments on the command line. The full dependency tree is calculated by searching the configured SEER package directories.
Create a packages directory on users that can be seen by your experiment. Common places would be in the project directory or your personal directory. The name of the directory itself is not important but an example would be /users/username/myseer:
cd ~/
mkdir myseer
Create the following subdirectories
- modules
- source
- scripts
mkdir modules source scripts
Place python module files in the modules directory:
mv mymodule.py ~/myseer/modules
In the NS file, add -d /path/to/dir ClassName [ClassName [...]] to the experiment-setup call. If your class is called myAgent defined in modules/newAgent.py, the parameter should be myAgent.:
tb-set-node-startcmd $node "sudo python /share/seer/v160/experiment-setup.py Basic -d /users/me/myseer myAgent"
Note
The arguments for modules to load are class names, not file names.
Make sure you have a packages directly as described above
place the software in ‘source’
place a build script in ‘scripts’, see this page for the arguments a script is called with
Examples:
Loading it from the experiment:
Loading it directly on the desktop:
When the SEER experiment setup script is executed, the following process occurs:
Note
A module can also be an empty python class that only depends on other modules. The ‘Basic’ module is an example of this.