zephyrus2 is a tool that allows to compute the optimal configuration of applications to deploy. It is a completely new implementation of the previous Zephyrus tool developed within the Aeolus project (https://github.com/aeolus-project/zephyrus).
Zephyrus2 relies on SMT or CP solvers for the exploration of the search space. Moreover it comes with a completely new declarative specification language to define the desired configuration. It is written in python.
Requirement to install Zephyrus from sources: - Python 2.7 - antlr4-python2-runtime module for python - MiniZinc - Gecode - Or-tools (if you want to use this solver) - Chuffed - fzn2smt (if you want to use the SMT solver) - Z3 SMT solver (if you want to use the SMT solver) - psutil module
zephyrus2 could be installed using docker container technology (https://www.docker.com/) available for the majority of the operating systems.
The Dockerfile needed to generate the container image is stored in the docker subfolder. To clone the repository run the following command.
git clone --recursive https://email@example.com/jacopomauro/zephyrus2.git
Assuming Docker is installed and \<PATH> is the path to the zephyrus2 folder, it is possible to deploy the tool with:
sudo docker build -t zephyrus2 <PATH>/docker
Some test examples file can be located in the <PATH>/zephyrus2/test subfolder.
Assuming \<JSON> is the JSON file to use as input, located in \<JSON PATH> to use the tool it is possible to run the following command.
sudo docker run -i --rm -v <JSON PATH>:/mydir -t zephyrus2 zephyrus2.py [OPTIONS] /mydir/<JSON>
Assuming that the file contaning the last JSON object outputted in the previous phase is \<ZEP_JSON_OUT>, located in \<JSON PATH>, to obtain a concreate configuration it is possible to run the following command.
sudo docker run -i --rm -v <JSON PATH>:/mydir -t zephyrus2 bindings_optimizer.py [OPTIONS] /mydir/<JSON> /mydir/<ZEP_JSON_OUT>
To clean up please lunch the following commands:
sudo docker rmi zephyrus2
For more information, please see the Docker documentation at docs.docker.com
zephyrus2 takes in input a JSON file following the schema defined in /specs/zephyrus_input_schema.json.
It outputs a sequence of json objects following the schema defined in zephyrus_output_schema.json. Every object is followed by the string "----------". When the search is finished and the optimal solution is found the string "==========" is printed.
In order to compute the bindings it is possible to use the binding_optimizer that tries to create the bindings between the components maximizing the binding preferences. The input of the binding_optimizer is one of the json object produced by zephyurs2 and it outputs the list of the bindings in a json object following the schema defined in binding_optimizer_output_schema.json.