Copyright 2007.
In general, to run the application, build it via mvn install
, then drop the resulting
war file into any tomcat instance.
To run the app via intelliJ:
- Ensure that Apache Tomcat is installed. Any version should be OK.
- Create a run configuration via
Run
->Edit Configurations
->+
-> Tomcat Server
->Local
.- Under name write
shipit-dev
, In theDeployment
tab, click+
-> Artifact
->shipit:war exploded
, and in theStartup / Connection
tab add- the environment variables:
- JDBC_CONNECTION_STRING - the JDBC connection string for your DB instance,
eg.
JDBC_CONNECTION_STRING=jdbc:mysql://<host>:<post>/shipit
- and MYSQL_PASSWORD - the password for your remote DB instance
- JDBC_CONNECTION_STRING - the JDBC connection string for your DB instance,
eg.
- Click
OK
. - Select your
shipit-dev
configuration from the drop-down menu at the top right and then click the play button.
To update a running AWS Elastic Beanstalk instance:
- Update the version number in
pom.xml
. - Build via
mvn install
, note the name of the war which was just built. - From the AWS console, go to
Services
->Elastic Beanstalk
, and choose your instance from the dashboard. ChooseUpload and Deploy
, thenBrowse...
and choose the war which you just build withmvn install
. ClickDeploy
. Wait for the deployment to be marked as successful.
To check the logs: From the AWS console, go to Services
-> Elastic Beanstalk
, and
choose your instance from the dashboard. Click Logs
on the left, then Request Logs
.
In the unlikely event that you need to change any of the injected configuration, for
example the database connection string or password, then these are available under
Configuration
-> Software Configuration
.
Information on the CPU utilisation, and network utilisation is available under Monitoring
,
it may also be interesting to look at the utilisation or logs of the MySQL database instance
which backs this application. These are available under Services
-> RDS
-> Instances
-> shipit
.
Run the tests with mvn test
, or in intelliJ by right clicking on src/main/test
and
choosing "Run 'All Tests'".
Due to the "age" of the codebase, the unit tests rely on a connection to the database.
Therefore you will need to ensure that you have a database setup whose schema matches
the production database. This database can be local or remote. The location of this
database is set in the file src/test/resources/test-context.xml
.