Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

Module setup

Before setting up the generic web application, checkout the snapshot and release module artifacts. If the code changes that you need have not been uploaded to maven, create a Pull Request in the relevant repository. Once the PR has been reviewed and approved, merge it to the master branch and upload the new artifact to maven.  We have listed the modules that we currently have on the server side here.

Update pom.xml and set the correct versions for core, connector and register dependencies.

Update the following files with password credentials (MySQL, PostgreSQL and CouchDB)

  1. config/assets/config/couchdb.properties
  2. config/assets/config/opensrp.properties
  3. src/main/resources/quartz.properties
  4. src/main/webapp/META-INF/context.xml
  5. config/assets/migrations/environments/development.properties

NB: The config folder is a git submodule that holds server-wide properties. Checkout the following documentation for more info.

If you are using PostgreSQL as the main data store, checkout this documentation on how to run MyBatis migrations.

Generic Web profiles

The generic web app https://github.com/OpenSRP/opensrp-server-web has four major profiles defined in the pom file.

These are: couchdb, postgres, jedis and lettuce. Couchdb and Postgres profile are used to define the main data store while Jedis and Lettuce, the redis client to use.

Postgres and Jedis are activated by default and they will be active profiles when you run the following command

mvn clean package

But when you specify a property, the active ones are overriden. Couchdb will be the only active profile when you run the following command

mvn clean package -P couchdb

This means that the redis client won't be defined.

To fix this, provide data store and redis client property types

mvn clean package -P couchdb,jedis

Deployment

Once tomcat is running, you can install the opensrp.war file from target folder into the webapps directory in order to run the application.

sudo cp target/opensrp.war /var/lib/tomcat7/webapps/
  • No labels