-
Notifications
You must be signed in to change notification settings - Fork 7
Building DMASON from source
The following tutorial will guide you through the download and setup of the D-MASON project into Eclipse. Of course you can use any IDE of your choice, or no one at all.
- Eclipse "Mars" or newer
- Subversion plug-in for Eclipse (it should already be included in Eclipse)
- Apache Maven (it should already be included in Eclipse)
- Open menu "File" > "Import" and select "Projects from Git" under "Git" folder
- Select "Clone URI" and press the "Next" button
- In the "URI" field insert "https://github.com/isislab-unisa/dmason.git"
- Fill all fields in "Authentication" with your GitHub credentials. Than press the "Next" button
- In "Branch Selection" view, select the branch on which you want work (master is the main branch), alternatively you can select all of them. Than press the "Next" button.
- Press the "Next" button in the "Local Destination" view.
- Wait until the download ends, than select "Import as general project" in "Wizard for project import" and press the "Next" button
- Fille the "Project name" field in "Import Project" section and press "Fisish" button
- Right-click on project > "Configure" > "Convert to Maven Project"
Now you can use DMASON
DMASON is built upon Three components: an ActiveMQ server, one or more Workers and a Master which include a Web Server.
In this tutorial, we’ll setup a DMASON simulation using two workers. Also, we will run all of the component on a single machine, but in a real simulation environment you may want to run the server and every worker on different hosts.
Using the jar file DMASON-X.X.jar available under the target folder it's possible to run Master and Worker(s).
For launching the Master use the follow command:
java -jar DMASON-X.X.jar -m master
In this way, it's available the ActiveMQ server and the Web System Management.
Using the jar file DMASON-X.X.jar available under the target folder run the follow command:
$ java -jar DMASON-X.X.jar -m worker -ip <ipactivemq> -p <portactivemq> -h ipslave1 ipslave2 ... ipslaveN -ns <M>
- M is the max number of available LPs that the slave nodes can execute
- ipslave{1-N} is the ip of the machines on which runs DMASON as Worker (Optional)
It's possible to run each component from Eclipse for a local test
We include the ActiveMQ library using the maven repository (see pom.xml file). The actual version is the 5.13.3.
From Eclipse run the class ActiveMQStarter.java under it/isislab/dmason/experimentals/systemmanagement/utils/activemq/ package for running the ActiveMQ.
From Eclipse run as Java application the class MasterServerMain.java under it/isislab/dmason/experimentals/systemmanagement/master/ package for running the Master component.
From Eclipse run as Java application the class WorkerMain.java under it/isislab/dmason/experimentals/systemmanagement/master/ package for running the Master component. Note: the class requires some arguments, them are the following:
- masterIP (default 127.0.0.1)
- ActiveMQ listening port (default 61616)
- number of LPs to simulate (default 1)
To export your simulation:
- "Right-click" > "Export" on simulation package
- Select "Jar File" under "Java" folder in "Export" view, than press the "Next" button
- Select the export destination and press the "Finish" button
- For how to run own simulation from System Management, read here