|
Deploying ExaminatorIntroductionThe figure at left (click to enlarge) shows a small Terracotta server array that could be implemented to run Examinator and provide High Availability. This cluster configuration has the following components running on separate machines:
The application servers must have access to an SMTP server, which can be remote. In the example at left, the SMTP server is located in the cloud. For more information on deployment, see the following resources:
HardwareExaminator can be deployed using commodity hardware. Minimum Hardware Requirements
Recommended Hardware
SoftwareExaminator can be deployed using open-source software. The configurations shown were used in our Examinator deployment, but variations are possible.
Once you install the software listed above, continue with the following sections. Configure TerracottaYou can download a Terracotta configuration file (tc-config-prod.xml) that has been modified for use with Examinator. Edit the "name" and "host" attributes of the two <server> elements, one for each Terracotta server:
See the following documents for more information on configuring Terracotta clusters:
You can also edit the paths in the following properties to match your setup requirements:
Install ExaminatorUse Subversion (version 1.4 or 1.5.x) to download the Examinator package: svn co http://svn.terracotta.org/svn/forge/projects/exam/tags/release-1.0.1 exam
After a successful download, a project directory called exam should appear in your current directory. Change to the exam directory and use Maven (version 2.0.9) to compile: mvn -Pprod-build -Dexaminator-host=<localHostName> -Dexaminator-port=<portNumber> clean package where <localHostName> is the hostname of the active load balancer and <portNumber> is the TCP port used to connect to that load balancer.
Set Up the DatabaseThe exam project defaults to using the MySQL root account and connecting to the database at localhost:3306. With MySQL running, set up a new database user to avoid using the root account. You can change the values of any of these parameters in the POM file or using command-line flags. In the following examples, the database user is called "exam" and has the password "myPassword". The database instance is running on the local host on TCP port 3306. POM FileChange the following properties in the exam project's pom.xml file: <db-user>root</db-user> <db-passwd>myPassword</db-passwd> <db-host>localhost</db-host> <db-port>3306</db-port> <db-name>exam</db-name> Use the following command to create the Examinator database: mvn compile hibernate3:hbm2ddl Command-LineIf you do not edit the POM file, use the following command to create the Examinator database: mvn -Ddb-passwd=myPassword -Ddb-user=exam compile hibernate3:hbm2ddl Configure Examinator to Use an SMTP ServerExaminator requires access to an SMTP mail server to send confirmation emails for new accounts. You configure an SMTP server in the mail.properties file located in <maven projects directory>/src/main/filtered-resources.
You must edit the following properties:
The remaining properties in mail.properties set the text that appears in the subject of different types of emails. A configured mail.properties file should appear similar to the following: examinator.from.email=Support@MyCompany.com smtp.host=mail.MyCompany.com subject.signup.confirmation=Welcome to Examinator subject.password.reset.confirmation=Password reset confirmation subject.password.reset.done=Your password has been reset Start the ClusterWith MySQL running, start the cluster in the following order:
|
Exam App Deployment
(None)
