Deploying iTrust v6 (FA08) at Home


Return to iTrust Information Page

Downloads

To install iTrust on your home system, download and install the following packages.

Jazz v1.0 Client with WTP Obtain from your TAs (they will give you a link to download the zip file). Unzip into desired location.
JDK v1.5 or above Download the Java JDK and not the JRE package. Any update for version 1.5 (eg v5) will do; you do not need NetBeans nor the Source Code (though the source can be helpful).
Apache Tomcat v5.5.26 Download the core zip, unzip into desired location. Don't forget this! Download the MySQL JDBC Driver, place the .jar file into the following directory: <your tomcat folder>/common/lib/
MySQL v5.0 Select and install the distribution for your operating system. Note that you do not need to obtain a username for download.
MySQL GUI Tools Bundle for 5.0(optional) These can be useful for tweaking your local database and testing your queries. Install for your operating system.
iTrust Source Code Download the zip to desired location. Do not extract.

Top

Starting the Jazz client

Extract your Jazz client zip anywhere on your hard drive. Start Jazz by running: <your install location>/Jazz Client with WTP v1.0/jazz/client/eclipse/TeamConcert.exe". We recommend creating a shortcut for this.

To use more of Jazz's features, see the Getting Started with Jazz tutorial. For now, move on to setting up Tomcat

Top

Apache Tomcat

Once you unzip Tomcat into a directory on your machine (don't forget the MySQL driver!), you will need to set up the Web Tools environment to deploy projects. To do this, complete the following steps in Rational Team Concert or Eclipse:

  1. Go to Window > Show View > Other... Select Server > Servers...

    Showing the Servers view
  2. In the Servers view, right click and select "New"

    Creating a new server runtime
  3. Select Apache > Tomcat 5.5. Hit next.
  4. Select the folder where you previously unzipped Tomcat (your version number might not match the screenshot - that's okay as long as it's 5.5). If you were able to select your Tomcat folder, go on to step 5.

    Configuring new server runtime
    If you do not have the option to browse for the Tomcat installtion directory, you need to reset it. Click the Installed Runtimes... button.

    Previously installed runtimes

    Select the Server Runtime Environment that is already installed and then click Remove. Click OK.

    Removing previous runtime installations

    Click Next. Select the folder where you previously unzipped Tomcat (your version number might not match the screenshot - that's okay as long as it's 5.5)

    Configuring new server runtime
  5. Hit Finish
  6. In the servers view, you should see your new runtime below. Click on the "Play" button to start the server

    Configuring new server runtime
  7. If you see the text Server startup in xxxxx ms in the Console view, and the Servers view shows that your status is "Synchronized", then your server is properly configured. If the Console view isn't open, go to Window > Show View... > Console

Top

MySQL

iTrust needs to be able to connect to a MySQL database. For CSC 326 and 712, we have a MySQL installation running on Aramis, and your TA should give you a username and password for using your account there. If, however, you wish to have a local database (which performs significantly faster), you can install MySQL on your own machine. Here are instructions for how to set up your sever on Windows, Linux and Mac OS X. We recommend you use the Developer Machine option.

If you use a local MySQL setup, then you will also need to create a database. Use the GUI tools for this, or use the "MySQL Command Line Client", and run the command Create Database XXXX; where XXXX is your desired database name.

Be sure to remember what you initialize as your root password (you will need it later).

Troubleshooting MySQL Installation

If MySQL does not install properly and you wish to re-install, be sure to remove the log files and the data tables. For example, if you originally installed MySQL into c:\Program Files\MySQL\My SQL Server 5.0, then delete the MySQL folder before re-installing.

MySQL has a large community and extensive documentation, so if you can't find the answer to your question here, consult the MySQL website.

Configuring the Project

The source files will need to be imported as an Eclipse project, and deployed as a Tomcat application. To do this, follow these steps:

  1. Download the source (see link at the top) and save it to a location you can remember.
  2. From within Jazz, switch to the Java perspective. (use Window > Open Perspective..., or use the icons in the upper-right corner)
  3. To import the project files, go to File -> Import ... and select Existing Projects Into Workspace. Click Next.

    Make sure you select "Existing Projects into Workspace" !!!!

  4. Check the radio button Select Archive File and select Browse.
  5. Select the archive of your source code (called iTrustFA08.zip if you're installing for the first time)
  6. Make sure that iTrust is checked in the projects selector and click Finish. The files are now in your workspace. The Package Explorer should look like this:

    The project is imported into your workspace, and Tomcat is set up
  7. Now you need to deploy the project to your Tomcat server. In the Servers view, right-click on your Tomcat installation and select Add and Remove Projects...
  8. iTrust should show up on the list, move it over to the "Configured Projects" pane, hit Finish
  9. If you click on the plus sign in your server configuration, you should see "iTrust" deployed (published) there.
  10. Now that iTrust is set up to be deployed on Tomcat, you need to set the database parameters. In the Package Explorer, Open up iTrust > WebRoot > META-INF > context.xml
  11. If the file is opened in "Design" mode, switch to the "Source" mode at the bottom of the editor.
  12. Follow the comments in the context.xml file to properly set up your database parameters. If you have a username and password for Aramis, or if you have a local database, please use those parameters instead of the ones below. Otherwise, use the following parameters:
    username="iTrustTester"
    password="iTrustTester"
    url="jdbc:mysql://aramis.csc.ncsu.edu/iTrustTestStudent"


    If you are using a local database, your parameters might look like the following:
    username="root"
    password="pw"
    url="jdbc:mysql://localhost/iTrust"

  13. To test your parameters, go to iTrust > unittests> edu.ncsu.csc.itrust. Right-click on DBBuilder.java, select Run as... > Java Application
    (to view your packages easier, click on the triangle in the package explorer view, Package Presentation > "Hierarchical")

    Running DBBuilder to build all of the tables in your database
  14. The console view should show many lines beginning with Executing: , then end with Operation Completed
  15. To populate your database with test data, go to unittests, and in the datagenerators package, run the TestDataGenerator.java program. You should also get a lot of Executing: , followed by an Operation Completed

Top

Running the Application

  1. Start the Tomcat Server in the "Servers" view as before.
  2. Open your internet browser and surf to http://localhost:8080/iTrust/. You should be able to log in and use the application as normal.

Top

Return to iTrust Information Page

Copyright © 2004-2007 North Carolina State University, Dr. Laurie Williams, Andy Meneely, Ben Smith, Sarah Smith
Last Updated: Monday, September 8, 2008 12:52 PM