-
Notifications
You must be signed in to change notification settings - Fork 36
Tournament Installation
- Tournament Scheduler JSF Web Application
- Apache Tomacat 7
- Apache Maven 3.X.X
- MySQL or equivalent dbms
- First clone the repo with this command:
git clone git://github.com/powertac/powertac-tournament-scheduler.git
-
Open src/main/resources/tournament.properties and modify your database connection parameters to fit your local configuration. (Ignore the fileUploadLocation, weatherServerLocation, and destination parameters for now). Currently the only dbms officially supported is MySQL.
-
Open your pom.xml and navigate to this portion:
... org.codehaus.mojo tomcat-maven-plugin http://localhost:8080/manager/text admin admin /TournamentScheduler ...
Note that this is your tomcat script username and password, change these to something more secure. Leave the path element alone.
-
In the top-level directory of the Tournament Scheduler there is file called make-powertac-db.sql, this file contains all of the table definitions used by the Tournament Scheduler.
-
You can import the database and table definitions with the following command:
mysql -u yourdbusername -h yourdbhostname -p < make-powertac-db.sql
This command will prompt you for your database password for this particular user. Type your password and press enter, if no errors occur the tables have been successfully defined.
-
Download Apache Tomcat 7 here
-
Replace the {Tomcat}/bin/startup.sh with {Tournament-Scheduler}/install/startup.sh. The default Tomcat startup script does not start with enough heap space to function properly, so we must replace it.
-
Once you have replaced the script run the following command:
chmod 770 startup.sh
-
Navigate to {Tomcat}/conf/tomcat-users.xml and replace it with {Tournament-Scheduler}/install/tomcat-users.xml.
-
Once you have replaced the xml file run the following command:
chmod 670 tomcat-users.xml
- Open up tomcat-users.xml, set your username and password the same as the username and password values located in your pom.xml file.
- Now you may start tomcat, navigate to {Tomcat}/bin/startup.sh and run it. To test if you have succeed navigate to http://localhost:8080/ to see the tomcat splash page.
- If you have set everything up correctly the command to deploy the Tournament Scheduler is very easy. Simple type the following command:
mvn tomcat:redeploy
This will deploy the Tournament Scheduler to http://localhost:8080/TournamentScheduler/
- Ensure that you can navigate to the User Login screen in the Tournament Scheduler.
-
Run the script called "install-jenkins.sh" located in the {Tournament-Scheduler}/install directory. Note you must have an instance of Apache Tomcat 7 running for this script to succeed.
-
Once Jenkins is up and running navigate to the following url:
http://localhost:8080/jenkins/