Aeolus: How to get started
From Pmgwiki
(Difference between revisions)
(→Directions for checking out and running code) |
(→Directions for checking out and running code) |
||
Line 16: | Line 16: | ||
#*svn co svn+ssh://<Your-Name-Here>@lirone.csail.mit.edu/space/svnroot/aeolus aeolus<br> | #*svn co svn+ssh://<Your-Name-Here>@lirone.csail.mit.edu/space/svnroot/aeolus aeolus<br> | ||
#* alternatively use eclipse to check out the sources from the repo | #* alternatively use eclipse to check out the sources from the repo | ||
- | # You can look at the documentation on line at [http://pmg.csail.mit.edu/aeolus] | + | # You can look at the documentation on line at [http://pmg.csail.mit.edu/aeolus/javadoc] |
# Build code | # Build code | ||
#*use eclipse to browse to build.xml | #*use eclipse to browse to build.xml |
Revision as of 21:36, 4 April 2012
Directions for checking out and running code
- Prerequisites
- Postgres database
- Install the rpms or packages (postgresql, postgresql-server, postgresql-jdbc)
- service postgresql initdb (or run initdb somehow else)
- chkconfig postgresql on
- (the following is adapted from aeolus/auditing/graphdb/SQLEventStore.java)
- sudo -u postgres createuser --superuser YOUR_UNIX_USERNAME
- createdb AeolusAuthority
- edit pg_hba.conf and change 127.0.0.1 entry to "trust" (fedora)
- restart postgres server /etc/rc.d/init.d/postgresql restart
- java 1.6
- ant
- Postgres database
- Check out code (or download code: download information coming soon)
- svn co svn+ssh://<Your-Name-Here>@lirone.csail.mit.edu/space/svnroot/aeolus aeolus
- alternatively use eclipse to check out the sources from the repo
- svn co svn+ssh://<Your-Name-Here>@lirone.csail.mit.edu/space/svnroot/aeolus aeolus
- You can look at the documentation on line at [1]
- Build code
- use eclipse to browse to build.xml
- right click on build.xml and then choose Ant Build from the menu
- Alternatively run "ant" in the aeolus directory (uses build.xml)
- Create environment
- Create databases (once)
- AUTHORITY SERVER (per authority/server/AuthorityManager.java)
- CREATE DATABASE AeolusAuthority;
- CONNECT AeolusAuthority;
- GRANT ALL ON * TO 'aeolus'@'localhost' IDENTIFIED BY 'find the password in the AuthorityManager code';
- AUTHORITY SERVER (per authority/server/AuthorityManager.java)
- Create databases (once)
- Run code
- cd aeolus
- ./run-server This starts the AS (aka the Authority Server)
- ./run-vn edu.mit.csail.aeolus.apps.<insert dir-name>.<insert class-name> This starts the application
- Note: do not use ".class" in the class name
- Running code in earlier versions (for reference only)
- java -cp ~/workspace/aeolus/aeolus/dist/aeolus-rt.jar:~/workspace/aeolus/aeolus/../lib/bcel-5.2.jar edu.mit.csail.aeolus.runtime.RuntimeLoader ~/workspace/aeolus/aeolus/dist/aeolus-apps.jar edu.mit.csail.aeolus.apps.testapps.HelloWorld
- Note: aeolus-apps.jar contains all the classes in apps (or at least approximately)
- Note: need to add aeolus-apps.jar to the class path if using shared state
- Alternatively, cd to the dist directory and type
java -cp aeolus-rt.jar:../lib/bcel-5.2.jar edu.mit.csail.aeolus.runtime.RuntimeLoader /home/user-name/workspace/aeolus/dist/aeolus-apps.jar edu.mit.csail.aeolus.apps.testapps.HelloWorld
- Note: the Aeolus class loader (RuntimeLoader in above command) always needs a full, absolute pathname
- For performance measurements bypass the aeolus class loader
java -jar aeolus-rt.jar aeolus-rt.jar edu.mit.csail.aeolus.apps.testapps.RuntimeBenchmark - For completeness, here are the other two commands to collect performance numbers:
- RPC: java -Xmx3G -cp aeolus-rt.jar:aeolus-apps.jar;../lib/bcel-5.2.jar edu.mit.csail.aeolus.runtime.RuntimeLoader ~/aeolus/dist/aeolus-apps.jar edu.mit.csail.aeolus.testing.MyApplication
- Monster: java -Xmx3G -cp aeolus-rt.jar:../lib/bcel-5.2.jar edu.mit.csail.aeolus.runtime.RuntimeLoader ~/aeolus/dist/aeolus-apps.jar edu.mit.csail.aeolus.apps.bnewmonster.MonsterServer
- java -cp ~/workspace/aeolus/aeolus/dist/aeolus-rt.jar:~/workspace/aeolus/aeolus/../lib/bcel-5.2.jar edu.mit.csail.aeolus.runtime.RuntimeLoader ~/workspace/aeolus/aeolus/dist/aeolus-apps.jar edu.mit.csail.aeolus.apps.testapps.HelloWorld