841: Add Server Service Discovery

Test Case #: 841

 

Test Case Name: Add Server Service Discovery

System: openLMIS

Subsystem: requisition, example, blue

Test case designed by: Lucyna Kwidzińska

Design Date:16.08.2016

Short description

  • investigate adding Consul w/ our current Nginx setup (Jwilder's Dockerization of Nginx), if this Docker image isn't going to work, propose alternative on dev forum
  • add Consul to Nginx configuration of the development environment. Nginx is currently deployed working in development environment so that developer testing is as close to deployment infrastructure as possible. This should show the singular service registering and api endpoints being accessible through port 80 of Nginx.
  • create proof of concept of server side service discovery to a PoC branch of OpenLMIS Blue repository: demonstrate Nginx+Consul configuration with the Requisition service and the Example service showing how endpoints in both services may be reached from the same host (domain) and port. ie in a PoC deployment, example.openlmis.org/api/requisition would route to Requisition service and example.openlmis.org/api/helloworld would route to Example Service.

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

Step

Action

Expected system response

Comment

1

  Run requisition service:

 

    Type the commands in cmd:

1) sudo docker-compose run --service-ports requisition

2) gradle clean build

3) gradle bootRun

                                                                                       

Requisition service is running.                                                                                                                            

                                                 

2

Verify if the consul is accessible under port 8500.

 

The consul is accessible.

 

Every port should be already registered and listed.

3

Run example service:

 

    Type the commands in cmd:

1) sudo docker-compose run --service-ports requisition

2) gradle clean build

3) gradle bootRun 

Example service is running.  

 

4

Verify if the consul is accessible under port 8500.  
The consul is accessible. 

Every port should be already registered and listed.  

5

Clone the OpenLMIS-Blue, branch poc-service-discovery   

6

Run docker-compose:

docker-compose -f docker-compose.discovery.yml up

 

 

7

 Verify if the access to requisition service under localhost/requisition is possible.

 

8

  Verify if the access to example service under localhost/example is possible.  

 

 

 

 

Post – conditions:

OpenLMIS: the global initiative for powerful LMIS software