Installing Terminology Registry Server


Ansible establishes a SSH connection to install services on other machines with a given user (vagrant for local environments). Before installing services on a fresh box it is recommended to perform a SSH from provisioner box to target box with vagrant user.

Here are the steps to install the TR-Server.

  1. Make sure a vagrant box is running with the same IP given in inventories/local for tr-server i.e. 192.168.33.21.
  2. Go to Freeshr-Playbooks folder. Start and ssh into provisioner box from.
  3. Download/Build the TR rpm and required omods

    1. Put the tr-server RPM into /tmp/ folder. Under development version can be built locally or can be downloaded from CI-Server. Released versions are published to github-releases.
    2. Download the OpenMRS Atomfeed-omod and put it into /tmp/ folder.
      wget https://oss.sonatype.org/content/repositories/snapshots/org/ict4h/openmrs/openmrs-atomfeed-omod/2.5.5-SNAPSHOT/openmrs-atomfeed-omod-2.5.5-20161107.094541-4.jar -O /tmp/openmrs-atomfeed-2.5.5-SNAPSHOT.omod
    3. Download the Web Services rest omod and put it into /tmp/ folder.
      wget https://modules.openmrs.org/modulus/api/releases/1547/download/webservices.rest-2.17.omod -O /tmp/webservices.rest-2.17.omod
    4. Download the openmrs legacyui omod and put it into /tmp/ folder. This is applicable from TR-2.7 onwards.
      wget https://modules.openmrs.org/modulus/api/releases/1594/download/legacyui-1.3.1.omod -O /tmp/legacyui-1.3.1.omod
  4. Setup Ansible Variables and start provision:-

    cd /vagrant/
    cp group_vars/all_example group_vars/all #make sure this is not commited
    touch ~/.vaultpass.txt
    ansible-playbook tr.yml --tags tr-server -i inventories/local --extra-vars="rpm=/tmp/bdshr-terminology-server-2.7-1.noarch.rpm" --extra-vars="atomfeedomod=/tmp/openmrs-atomfeed-2.5.5-SNAPSHOT.omod" --extra-vars="restomod=/tmp/webservices.rest-2.17.omod" --extra-vars="uiomod=/tmp/legacyui-1.3.1.omod" -k -vvvv 
  5. TR-Server Initial setup.

    1. Go to your browser and access http://192.168.33.21:9080/openmrs. This will take you to initial setup screen of openmrs.
    2. Choose English as as the preferred language.

    3. Choose Advanced as the installation type.
    4. Installation wizard: step 1

      1. choose "yes" for "Do you currently have an OpenMRS database installed .... ?" enter database name "terminologies".
    5. Installation wizard: step 2
      1. choose "yes" for "Do you need OpenMRS to automatically create the tables ... ?"
      2. choose "no" for "Do you want to also add demo data to your database.... ?"
      3. choose "Yes" for "Do you currently have a database user other than root .... ?". By default, a username "terminologies" would be already filled in for the username.
    6. Installation wizard: step 3
      1. Do you want to be able to upload modules from the web interface? - NO
      2. Do you want updates to the database to be automatically applied on startup when a new web application is deployed? - YES
    7. Installation wizard: step 4
      1. choose a password for "admin" user. note this down.
    8. Installation wizard: skip step 5, optionally fill in details
    9. Review installation instructions and proceed. The wizard should "create openmrs tables", "Add OpenMRS core data" and "Update the database" before redirecting you to the login page.

The TR-Server will be up and running after this. It will be generate feeds for newly created concepts/reference-terms/medicines once you have deployed TR-Feed omod.

Installing TR-Feed Omod:-

  • Put the TR-Feed omod into /tmp/ folder. Under development version can be built locally or can be downloaded from CI-Server. Released versions are published to github-releases.

    cd /vagrant/
    ansible-playbook tr.yml -t tr-feed-server -i inventories/local --extra-vars="trfeedomod=/tmp/freeshr-terminology-feed-2.7-SNAPSHOT.omod" -k -vvvv

    This will put the omod and restart the service. Verify that FreeSHR terminology service feed module is present and running in openmrs=>admin=>manage modules.