Skip to content

Tutorial

Davide Conzon edited this page Apr 14, 2020 · 11 revisions

Preliminary steps

This tutorial assumes that:

  • You have installed on your machine or in the cloud one instance of an XMPP server. This software has been tested with Openfire and Tigase. For a complete list of available XMPP servers see here.
  • For the deployment of the Simulators, you have access to a Kubernetes cluster and you have setup the KUBECONFIG environment variable to the path of a valid Kubernetes config file). And you have to use a deployment file saved in the SimulationConf folder (here an example).
  • The SOO is launched using CPSwarm Launcher.

Steps

Start cloning the project in your environment from the CPSwarm github repository.

Then you have to remove the configuration files from the git index, with the following commands.

git update-index --skip-worktree src/main/resources/orchestrator.xml
git update-index --skip-worktree src/main/resources/frevoConfiguration.json

Then you can open the src/main/resources/orchestrator.xml file and configure it, setting your values:

  <serverURI>123.123.123.123</serverURI> 

Use this tag to set the IP/URI of the XMPP server that you want to use.

  <serverName>pippo.pluto.it</serverName> 

Use this tag to set the name of the XMPP server that you want to use.

  <username>orchestrator</username> 

Use this tag to set username to be used to connect to the XMPP Server

  <serverPassword>orchestrator</serverPassword> 

Use this tag to set the password to be used by the orchestrator to connect (it is a temporary solution).

  <optimizationUser>frevo</optimizationUser>   

Use this tag to set the JID used by the Optimization Tool.

  <configEnabled>true</configEnabled> 

Use this tag to indicate if the configuration of the simulators has to be done or not.

  <startingTimeout>30000</startingTimeout> 

Use this tag to indicate the waiting time for new Simulation Managers.

  <localOptimization>false</localOptimization> 

Use this tag to indicate if the Optimization Tool has to be launched by the SOO (true) or not (false).

  <optimizationToolPath>/home/Desktop/frevo.xmpp-0.0.1-SNAPSHOT-jar-with-dependencies.jar</optimizationToolPath> 

Use this tag to indicate the path of the Optimization Tool executable, to launch it if LocalOptimization=true.

  <optimizationToolPassword>blah</optimizationToolPassword> 

Use this tag to indicate the password of the Optimization Tool, needed if LocalOptimization=true (it is a temporary solution).

  <localSimulationManager>false</localSimulationManager>

Use this tag to indicate if the Simulation Manager has to be launched locally by the SOO (true) or not (false).

  <simulationManagerPath>/home/Desktop/stageManager.jar</simulationManagerPath>

Use this tag to indicate the path of the simulation manager executable, to launch it if localSimulationManager=true

Then, you can proceed to modify the Optimization Tool configuration file (if needed). You can open the src/main/resources/frevoConfiguration.json file and configure it. Please consider that the simulation timeout, candidate count, generation count and list of parameters to be optimized are set dynamically for each optimization through the Launcher and the parameters.json file passed by the Modelling Tool from the configuration folder. So you need to modify only the other settings (please, modify them only if you know what you are doing).

After changing the settings you can compile the SOO with

mvn clean install -DskipTests

in the root of your repository.

This will generate the executable jar in the target folder of the repository that can be run from CPSwarm Launcher.

Getting Started

Clone this wiki locally