Deploying iTrust v6 (FA08) in the EB2 3228


Return to iTrust Information Page

Jazz in the Lab

Start Jazz. The shortcut to Jazz should be on the desktop.
In regards to the workspace
When you start Jazz, you will be prompted for a workspace. Please select Browse..., then your name at the top, and select jazz-1.0-workspace as your workspace. This is a local folder, it will not be backed up on your network drive and may be deleted after you log out. If another project has been deployed to that directory, please delete it before moving forward. Do not check "use this as the default" as it will confuse the next person who uses this machine.

Apache Tomcat

Tomcat is already installed/unzipped into a directory on the lab machines, so you will need to set up Jazz to deploy projects to Tomcat. To do this, complete the following steps:

  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 c:\tomcat\apache-tomcat-5.5.23 as the installation directory (your version number might not match the screenshot - that's okay as long as it's 5.5)

    Configuring new server runtime, only using c:\tomcat\apache-tomcat-5.5.23\ as the installation directory.
  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. The lab machines do not have a local MySQL instance running, so you must use Aramis (see instructions below for username and password).

Configuring the Project

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

  1. Download the source (iTrust Main Page - download Source Code V6.0: iTrustFA08.zip) and save it to a location you can remember. Do not extract
  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 file for the source code within the browser that comes up.
  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. Switch to the Servers view along the bottom of the screen (if you don't see the Servers view, use Window > Show View... > Server > Servers), 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 Heckman
Last Updated: Wednesday, August 27, 2008 11:17 PM