This section describes how to deploy the Hackystat server to Tomcat and run the Hackystat unit tests to verify that the installation process was successful.
First, bring up Tomcat using "startup.bat" (in Windows) or "catalina.sh run" from Unix. You want to use the "run" argument when using Unix so that console output will go to the current shell.
Now, bring up a new shell window, change directories to hackyCore_Build, and invoke "ant -q hackyCore_Build.checkTomcat". This invokes Ant and runs a target that contacts Tomcat using the settings in hackystat.site.properties and verifies that Tomcat can be found and that the user and password settings for the Manager interface are valid. Successful execution looks similar to this:
c:\svn\hackyCore_Build>ant -q hackyCore_Build.checkTomcat BUILD SUCCESSFUL Total time: 3 seconds
![]() | Note |
|---|---|
When invoking Ant in this section, we will use the '-q' option to suppress most output. The build process includes <echo> commands at various points to provide a concise summary of progress when using the -q option. To obtain more detail on the progress of the build for debugging purposes, you can omit the -q option. | |
The installation process is a bit different depending upon whether you are installing a binary distribution or building from sources.
To install a binary distribution of Hackystat on the Tomcat server, invoke 'ant -q hackyCore_Build.deployDist'. This uses the Tomcat Manager to install the Hackystat web application located in your distribution's build/war directory. Successful execution looks like this:
C:\public_hackystat\hackystat-standard-7.0.1205\hackyCore_Build>ant -q hackyCore_Build.deployDist
[echo] (09:24:13) Completed hackyCore_Build.hotUndeployHackystat
[echo] (09:24:13) Completed hackyCore_Build.deployTestData
[echo] (09:24:22) Completed hackyCore_Build.hotDeployHackystat
BUILD SUCCESSFUL
Total time: 10 seconds
After the deployDist command has completed, watch the Tomcat console until you see the Hackystat web application initialization message appear. It should look something like the following:
12/05 09:24:21 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 12/05 09:24:21 Hackystat: Initializing system. 12/05 09:24:22 Admin: johnson@hawaii.edu (5hdk78dhgb) 12/05 09:24:22 TimeZoneChanger: Server Time Zone = GMT-10:00 12/05 09:24:22 TimeZoneChanger: No change needed 12/05 09:24:22 Users directory is: c:\public_hackystat\test\users 12/05 09:24:22 Startup Summary: SDTs: 16, Commands: 53, Sensors: 26, Users: 8 12/05 09:24:22 Version: 7.0.1205 Buildtime: December 5 2005 02:17:23 12/05 09:24:22 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
In some cases, the Ant task will finish several seconds before the Hackystat web application finishes initializing. You must wait for the Hackystat initialization message to appear before proceeding to the next step.
To compile, build, and install Hackystat from sources, invoke 'ant -q freshStart'. Successful execution results in the following:
C:\svn\hackyCore_Build>ant -q freshStart
[echo] (10:21:44) Completed hackyCore_Build.checkModuleAvailability
[echo] (10:21:44) Completed hackyCore_Build.hotUndeployHackystat
[echo] (10:21:44) Completed hackyCore_Build.clean
[echo] (10:22:01) Completed all.checkstyle
[echo] (10:22:11) Completed all.compile
[echo] (10:22:19) Completed all.install.pre-sensorshell
[echo] (10:22:23) Completed hackyCore_Build.unjarSensorShellFiles
[echo] (10:22:26) Completed hackyCore_Build.installSensorShell
[echo] (10:22:30) Completed hackyCore_Installer.unjarFiles
[echo] (10:22:41) Completed hackyApp_TelemetryControlCenter.unjarFiles
[echo] (10:22:42) Completed all.install.post-sensorshell
[echo] (10:22:42) Completed hackyCore_Build.deployTestData
[echo] (10:22:47) Completed hackyCore_Build.hotDeployHackystat
BUILD SUCCESSFUL
Total time: 1 minute 9 seconds
To verify your binary or source installation, you should run the JUnit tests by invoking 'ant -q all.junit'. Successful execution looks like this:
C:\public_hackystat\hackystat-standard-7.0.1205\hackyCore_Build>ant -q all.junit
[echo] (09:37:19) Completed hackyCore_Kernel.junit.
[echo] (09:37:25) Completed hackyCore_Installer.junit.
[echo] (09:37:26) Completed hackyCore_Statistics.junit.
[echo] (09:37:34) Completed hackyCore_Report.junit.
[echo] (09:37:39) Completed hackyCore_Common.junit.
[echo] (09:37:42) Completed hackyCore_Telemetry.junit.
[echo] (09:37:44) Completed hackySdt_CodeIssue.junit.
[echo] (09:37:46) Completed hackySensor_Checkstyle.junit.
[echo] (09:37:48) Completed hackySdt_Commit.junit.
[echo] (09:37:49) Completed hackySensor_Vcs.junit.
[echo] (09:37:51) Completed hackySensor_Svn.junit.
[echo] (09:37:52) Completed hackySdt_Perf.junit.
[echo] (09:37:54) Completed hackySensor_LoadTest.junit.
[echo] (09:38:07) Completed hackySdt_Activity.junit.
[echo] (09:38:08) Completed hackySensor_Emacs.junit.
[echo] (09:38:09) Completed hackySensor_JBuilder.junit.
[echo] (09:38:11) Completed hackySdt_FileMetric.junit.
[echo] (09:38:14) Completed hackySdt_WorkspaceMap.junit.
[echo] (09:38:16) Completed hackySdt_UnitTest.junit.
[echo] (09:38:19) Completed hackySensor_JUnit.junit.
[echo] (09:38:21) Completed hackySdt_Coverage.junit.
[echo] (09:38:23) Completed hackySensor_Emma.junit.
[echo] (09:38:25) Completed hackySensor_Eclipse.junit.
[echo] (09:38:28) Completed hackySensor_CppUnit.junit.
[echo] (09:38:30) Completed hackySdt_Build.junit.
[echo] (09:38:32) Completed hackySensor_Ant.junit.
[echo] (09:38:33) Completed hackySdt_Cli.junit.
[echo] (09:38:34) Completed hackySensor_Cli.junit.
[echo] (09:38:36) Completed hackySdt_ReviewActivity.junit.
[echo] (09:38:38) Completed hackySdt_ReviewIssue.junit.
[echo] (09:38:39) Completed hackySdt_BuffTrans.junit.
[echo] (09:38:40) Completed hackySensor_Vim.junit.
[echo] (09:38:42) Completed hackySensor_JBlanket.junit.
[echo] (09:38:42) Completed hackySensor_Office.junit.
[echo] (09:38:48) Completed hackySdt_Dependency.junit.
[echo] (09:38:50) Completed hackySensor_Pmd.junit.
[echo] (09:38:55) Completed hackySdt_Issue.junit.
[echo] (09:38:58) Completed hackySensor_Jira.junit.
[echo] (09:39:00) Completed hackySensor_FindBugs.junit.
[echo] (09:39:01) Completed hackyApp_TelemetryControlCenter.junit.
[echo] (09:39:03) Completed hackySensor_XmlSensorData.junit.
[echo] (09:39:05) Completed hackySensor_Bcml.junit.
[echo] (09:39:07) Completed hackySensor_Jupiter.junit.
[echo] (09:39:07) Completed hackySensor_VisualStudio.junit.
[echo] (09:39:37) Completed hackyApp_StdCmd.junit.
[echo] (09:39:40) Completed hackySdt_BadData.junit.
[echo] (09:39:43) Completed hackySensor_Cccc.junit.
[echo] (09:39:45) Completed hackySensor_DependencyFinder.junit.
[echo] (09:39:49) Completed hackySensor_Locc.junit.
[echo] (09:39:52) Completed hackySensor_Cvs.junit.
[echo] (09:39:52) Completed all.junitReport
[echo] (09:39:52) Completed all.junit
BUILD SUCCESSFUL
Total time: 2 minutes 47 seconds
Of course, the actual set of modules listed will depend upon the particular configuration of Hackystat that you are building.
If one or more of the JUnit test cases fail, a message will be printed out. To obtain further details on the test failure, go to the hackyCore_Build/build/reports/junit directory. That directory contains subdirectories corresponding to each of the modules in the distribution. Check the directory(s) of the module(s) that failed for further information. Since the above messages indicate completion of a module's unit tests, you can easily determine which module failed--it is listed on the line following the failure message.
Once Hackystat has been deployed, you can shutdown and startup Tomcat (even after rebooting your server) and the ackystat web application will remain deployed.
After bringing up the server, you may find that you want to make some changes to the hackystat.site.properties file. For example, you may realize that you did not specify the mail server correctly, and you want to change that entry. To make such a change, you must edit the hackystat.site.properties file, then redeploy the server so that it picks up the change.
With a binary distribution of the system, therefore, you will edit the <home>/.hackystat/hackystat.site.properties file, then invoke "ant -q hackyCore_Build.deployDist" which will undeploy the running server and then redeploy it with the updated information from the changed hackystat.site.properties file.
If you have been successful in following the instructions in this section, you have now installed the Hackystat server in your local environment. Congratulations! The remaining sections of this Chapter provide supplemental information regarding the installation process. The next section provides an FAQ with common problems and solutions during installation. Later sections provide information regarding server upgrades and problem reporting.