Aeolus: How to get started

From Pmgwiki

(Difference between revisions)
Jump to: navigation, search
(Directions for checking out and running code)
(Directions for installing and running Aeolus code)
 
(36 intermediate revisions not shown)
Line 1: Line 1:
-
== Directions for checking out and running code ==
+
== Directions for installing and running Aeolus code ==
# Prerequisites
# Prerequisites
-
#* MySql database
+
#* Postgres database
-
#** Install the rpms or packages (mysql, mysql-server, mysql-devel (may not need all these))
+
#** Install the rpms or packages (postgresql, postgresql-server, postgresql-jdbc)
-
#** Start the server (/etc/rc.d/init.d/mysqld start)
+
#** service postgresql initdb (or run initdb somehow else)
-
#** chkconfig on for the server (to restart on reboot)
+
#** chkconfig postgresql on
-
#** set passwords appropriately (probably need -p in the second one)
+
#** sudo -u postgres createuser --superuser YOUR_UNIX_USERNAME
-
#* java 1.6
+
#** createdb AeolusAuthority
-
# Check out code
+
#** edit pg_hba.conf and change 127.0.0.1 entry to "trust" (fedora)
-
#*svn co svn+ssh://<Your-Name-Here>@lirone.csail.mit.edu/space/svnroot/aeolus/src<br>
+
#** restart postgres server /etc/rc.d/init.d/postgresql restart
-
#* alternatively use eclipse to check out the sources from the repo
+
#* java 1.6 (OpenJDK 1.7 recommended)
-
# Build code
+
#* ant
-
#*use eclipse to browse to build.xml
+
# Download code: (download link coming soon)
-
#* right click on build.xml and then choose Ant Build from the menu<br>
+
#* For people with pmg accounts
-
#* Alternatively run "ant" in the aeolus directory (uses build.xml)
+
#** 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
 +
# Build code using Eclipse or ant
 +
#* Eclipse: browse to build.xml, right click on build.xml and then choose Ant Build from the menu<br>
 +
#* ant: run "ant" in the aeolus directory (uses build.xml)
# Create environment
# Create environment
-
#* Create databases (once)
+
#* Create database (once)
#** AUTHORITY SERVER (per authority/server/AuthorityManager.java)
#** AUTHORITY SERVER (per authority/server/AuthorityManager.java)
 +
#*** running as the postgres user
 +
#*** psql template1
#*** CREATE DATABASE AeolusAuthority;
#*** CREATE DATABASE AeolusAuthority;
-
#*** CONNECT AeolusAuthority;
+
#*** CREATE USER aeolus PASSWORD '<password-from-AuthorityManager.java>';
-
#*** GRANT ALL ON * TO 'aeolus'@'localhost' IDENTIFIED BY 'PFlate762!';
+
#*** GRANT ALL ON database AeolusAuthority TO aeolus;
-
#** AUDITING (per auditing/MySQLPersistentLogging.java)
+
#*** recent tests indicate that some versions of postgres do not handle database names with upper case characters very well.  This leads to the suggestion to change AeolusAuthority to aeolusauthority in the above "create database" command and in the file authority/api/AuthorityConfiguration.java
-
#*** CREATE DATABASE AeolusLogging;
+
-
#*** CONNECT AeolusLogging;
+
-
#*** GRANT ALL ON * TO 'aeolusLogger'@'localhost' IDENTIFIED BY 'PFlate762!';
+
-
#* Start authority server and audit server
+
-
#** cd ~/workspace/aeolus/dist ./aeolus-server.jar &
+
# Run code
# Run code
-
#*java -cp ~/workspace/aeolus/aeolus/dist/aeolus-rt.jar edu.mit.csail.aeolus.runtime.RuntimeLoader ~/workspace/aeolus/aeolus/dist/aeolus-medical.jar edu.mit.csail.aeolus.apps.testapps.HelloWorld<br>
+
#* cd aeolus
-
#* Note: aeolus-medical.jar contains all the classes in apps (or at least approximately)
+
#* ./run-server                  This starts the AS (aka the Authority Server)
-
#* Alternatively, cd to the dist directory and type <br>java -cp aeolus-rt.jar edu.mit.csail.aeolus.runtime.RuntimeLoader aeolus-medical.jar edu.mit.csail.aeolus.apps.testapps.HelloWorld
+
#* ./run-vn edu.mit.csail.aeolus.apps.<insert dir-name>.<insert class-name>   This starts the application
-
#* For performance measurements bypass the aeolus class loader<br>java -jar aeolus-rt.jar aeolus-rt.jar edu.mit.csail.aeolus.apps.testapps.RuntimeBenchmark
+
#** Note: do not use ".class" in the class name
 +
#** <b>Important:</b> You can use ./run-vn -logging false <args-as-above> to turn off auditing. (The system is much slower with auditing enabled.)
 +
# Misc notes
 +
#* 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
 +
#* Note: the Aeolus class loader always needs a full, absolute pathname
 +
 
 +
The API documentation is available here: [http://pmg.csail.mit.edu/aeolus/]

Latest revision as of 17:07, 27 August 2012

Directions for installing and running Aeolus code

  1. Prerequisites
    • Postgres database
      • Install the rpms or packages (postgresql, postgresql-server, postgresql-jdbc)
      • service postgresql initdb (or run initdb somehow else)
      • chkconfig postgresql on
      • 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 (OpenJDK 1.7 recommended)
    • ant
  2. Download code: (download link coming soon)
    • For people with pmg accounts
      • 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
  3. Build code using Eclipse or ant
    • Eclipse: browse to build.xml, right click on build.xml and then choose Ant Build from the menu
    • ant: run "ant" in the aeolus directory (uses build.xml)
  4. Create environment
    • Create database (once)
      • AUTHORITY SERVER (per authority/server/AuthorityManager.java)
        • running as the postgres user
        • psql template1
        • CREATE DATABASE AeolusAuthority;
        • CREATE USER aeolus PASSWORD '<password-from-AuthorityManager.java>';
        • GRANT ALL ON database AeolusAuthority TO aeolus;
        • recent tests indicate that some versions of postgres do not handle database names with upper case characters very well. This leads to the suggestion to change AeolusAuthority to aeolusauthority in the above "create database" command and in the file authority/api/AuthorityConfiguration.java
  5. 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
      • Important: You can use ./run-vn -logging false <args-as-above> to turn off auditing. (The system is much slower with auditing enabled.)
  6. Misc notes
    • 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
    • Note: the Aeolus class loader always needs a full, absolute pathname

The API documentation is available here: [1]

Personal tools