-
Notifications
You must be signed in to change notification settings - Fork 18
AgentSpring running instructions for d13n model (Linux & Mac)
This information is outdated. Please see https://github.com/EMLab/emlab-generation/wiki/Running-instructions
This description assumes a working Ubuntu Linux OS with Internet access, to which login and super user rights are possible. This could be Ubuntu in Parallels or as a separate operating system. For new users, it may be handy to get hand on some basic keyboard shortcuts. Managing the software requires work in the Terminal. There are three steps:
- Configuring the machine: have subversion installed, get a local copy of the model and run the setup scripts
- Running the model: compile and start the model, start agentspring, open the web browser
- Developing the model: get springsource
###Step 1: Configuring the machine.
- Open a new terminal (shortcut CTRL ALT T) and install software:
sudo apt-get install subversion maven2 git
git clone https://github.com/alfredas/AgentSpring.git ~/AgentSpring
- Compile and install AgentSpring
cd ~/AgentSpring
mvn clean install
- Download the model. Another model may be in another location:
svn co https://svn.eeni.tbm.tudelft.nl/d13n ~/Documents/d13n
- Open a terminal (CTRL ALT T) and make a ramdisk
mkdir /tmp/ramdisk
sudo mount -t tmpfs -o size=512M tmpfs /tmp/ramdisk/
- Go to the model folder and start the model (possibly, the model you need is in a branch):
cd ~/Documents/d13n/model/trunk/
mvn clean install exec:java
- Optionally, you can add -o for offline mode for mvn commands, in order to speed up the compilation process. Add -e for more information on errors if they occur. If the model is already compiled and should just be started use:
mvn exec:java
- Open another terminal (CTRL ALT T) and start AgentSpring with:
cd ~/AgentSpring/agentspring-face
mvn jetty:run
-
Watch the log on terminal-screen: hopefully it says ‘Build Successful’. The model should be located at: http://localhost:8080/agentspring-face/
-
Remarks:
- Refresh the browser if no proper website is shown.
- In parameter settings page: don’t forget SAVE button on the bottom of the page.
- To stop the model (in case it breaks/doesn’t work properly): CTRL C (in terminal).
- Only after a restart of the PC, agentspring needs to be started.
- Only after changes in the model code/scenario, the model needs to be compiled before it can be started.
- If there is no Internet connection and the model has worked before, the script commands can be appended by ‘-o’.
- Download SpringSource Toolkit by selecting the right version from here (for ubuntu under parallels, this should be the 64 bit linux with installer): http://www.springsource.org/downloads/sts
- Follow the installation instructions.
- Start Springsource (path and version of sts-x.x.x depend on installation files):
./springsource/sts-x.x.x.RELEASE/STS
- Or in the Springsource/RELEASE-FOLDER
./STS
- The dashboard appears. Select "Install extensions", select the Subclipse (not Subvversive) plugin and install it, in order to enable the function of sending changes to the server and receiving updates of changes by others within Springsource. Springsource needs to be restarted afterwards.
- After the restart, close the dashboard.
- Import the project as already downloaded in step 2.
- Right click in the ‘Package explorer’, that is the white space on the left of the screen.
- Choose Import… - Maven – Existing Maven Projects.
- Browse the Root directory to Documents/d13n/model/trunk
- Click finish to import it.
- If a “Subversion Library Not Available” error is displayed, follow the presented instructions and if it is required to edit 'eclipse.ini', edit /home/USERNAME/springsource/STS.ini instead
- Use the Team menu for committing (sending changes) and updating (receiving changes).
- When changes in the code are made, the model can be recompiled and restarted by using step 2.
Follow the instructions under Linux. A few details can/should be different. Also Mac is based on unix, so most commands will work.
- Step 1. If no super user rights are available on your system, software cannot be installed. That is no problem persé. In the default Mac installation, subversion and maven are already installed. Only git is missing. Instead of installing software with the
sudo apt-get install subversion maven2 git
and afterwards retrieving AgentSpring withgit clone https://github.com/alfredas/AgentSpring.git ~/AgentSpring
, you can directly download AgentSpring from https://github.com/alfredas/AgentSpring/zipball/master and unzip it into the user’s home folder ~/AgentSpring. - Step 2. Making a ramdisk is different.
diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://1165430`
ln -s /Volumes/ramdisk /tmp/ramdisk