- python-yaml
- python-pymongo
- python-pydot
- python-networkx
- py-matplotlib
These packages can all be installed using pip.
Install pip, if not already available.
curl -O https://bootstrap.pypa.io/get-pip.py python get-pip.pypip install pyyaml pip install pymongo pip install pydot pip install networkx pip install matplotlib
$ git clone https://github.com/deter-project/magi.git $ cd magi $ sudo python setup.py install
$ mkdir /share/magi $ sudo python setup.py sdist toshare -p /share/magi/current/
$ scp -r users.isi.deterlab.net:/share/magi/tarfiles /share/magi/
$ cd /share/magi $ mkdir modules $ git clone https://github.com/deter-project/magi-modules.git modules
We have been working on a javascript based visualization library for MAGI experiments. Although, currently, the libray only has a few sample visualizations, we have tried to create a framework that can be expanded to do generalizaed visualizations.
Experimenters can download the curently available source from out git repo, use it as it is, or build upon the same. We would be more than happy to see what others build, and if feasible add it to our codebase.
Make a copy of the visualization code under your web server home directory.
$ cd $WEBSERVER_HOME $ git clone https://github.com/deter-project/magi-viz.git
The visualization code works with Mongo DB. Install it and run a mongod server.
Try connecting to the mongo db server to make sure it is up.
$ mongo MongoDB shell version: 2.6.4 connecting to: test >
Install php module, and enable it in the apache configuration file.
http://php.net/manual/en/book.mongo.php
http://php.net/manual/en/book.json.php
http://php.net/manual/en/book.yaml.php
At this point you should be able to populate the database with canned data, and see sample visualizations.
$ cd $WEBSERVER_HOME/magi-viz/casestudy/clientserver $ ../../util/populate_db.sh magi_cs experiment_dataIf the data is successfully imported into the database, visit the following link to see a sample visualization.
http://localhost/magi-viz/casestudy/clientserver/traffic.htmlNote
The information about importing/exporting of data, and visualization urls is available in a README file under each experiment directory.
To be able to visualize real time data for an experiment, the visualization code needs to be able to pull data from the experiment database.
SSH keys need to be setup for automatic creation of a SSH tunnel to experiment database through DeterLab Ops machine.
sudo -u www ssh-keygen
magi-viz/util/helpers.js getDefault(db_config, 'sshUserName', 'muser')
$ sudo -u www ssh muser@users.isi.deterlab.net The authenticity of host 'users.isi.deterlab.net (206.117.25.49)' can't be established. ECDSA key fingerprint is SHA256:jj1atx6ugYXTkkmzAIPWVsl9LsOaOjxjb3n9emb4iwE. Are you sure you want to continue connecting (yes/no)? yes