Today I’ve written again from scratch the two BASH scripts to export changes made in IMUNES, this time using Python. I’ve built a UI with GTK3 using Glade, and I’ve organized the code in a more clean and safe way. Docker management is done via the official library docker-py.
##Install The software is available on GitHub: https://github.com/patriziotufarolo/ImunesExperimentExporter
- Clone the repository and browse it
git clone https://github.com/patriziotufarolo/ImunesExperimentExporter cd ImunesExperimentExporter
- Install dependencies through Pip
pip install -r requirements.txt
- Install the software by calling
sudo python2 setup.py install
- Enjoy the software calling it with the command
You need to have Docker configured for listening on UNIX socket (at the path /var/run/docker.sock). Please note that in a normal environment this socket file is owned by root and docker group, so it could be needed to run imunes-export with root or docker group privileges.
##Export a topology You can choose to export a single container or the whole experiment. The execution flow is the same as the last time.
- Draw a topology
- Run the experiment
- Make changes you want to make (e.g. configurations, your files, etc.)
- Use my software to export those changes to your computer’s file system
- Stop the experiment
- Save the topology
- Close IMUNES
##Import a topology You have to do this operation container by container, because it’s safer. IMUNES uses an odd file to save its topologies and I didn’t want to implement a more intelligent way to export them in a more clean way :)
- Open IMUNES again
- Load the topology back, container by container, selecting the folder where you’ve saved it before.
- Execute the experiment
- Use my software load your previously exported changes back
Please let me know if you find bug, issues and…patches :)