Skip to content

Tournament Installation

eonarheim edited this page May 22, 2012 · 22 revisions

Tournament Scheduler Installation

up

Requirements:

  • Tournament Scheduler JSF Web Application
  • Apache Tomacat 7
  • Apache Maven 3.X.X
  • MySQL or equivalent dbms

Step 1: Clone the Tournament Scheduler Repository

  1. First clone the repo with this command:

git clone git://github.com/powertac/powertac-tournament-scheduler.git

  1. 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.

  2. 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.

Step 2: Install the Powertac Tournament Scheduler Database

  1. 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.

  2. 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.

Step 3: Set up Tomcat

  1. Download Apache Tomcat 7 here

  2. 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.

  3. Once you have replaced the script run the following command:

chmod 770 startup.sh

  1. Navigate to {Tomcat}/conf/tomcat-users.xml and replace it with {Tournament-Scheduler}/install/tomcat-users.xml.

  2. Once you have replaced the xml file run the following command:

chmod 670 tomcat-users.xml

  1. Open up tomcat-users.xml, set your username and password the same as the username and password values located in your pom.xml file.
  1. 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.

Step 4: Deploy the Tournament Scheduler WebApp

  1. 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/

  1. Ensure that you can navigate to the User Login screen in the Tournament Scheduler.

Step 5: Install Jenkins

  1. 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.

  2. Once Jenkins is up and running navigate to the following url:

http://localhost:8080/jenkins/

Clone this wiki locally