Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Date:

Author:

Version:

Changes:

Completed

Ext.

Int.

Is in Core

Jira Ref.

05 April 2016

tpl

0.1

Doc. created

No

x


N/A


14 April 2016Anders GranauHøfft0.2Sections expandedNox
N/ACDRRM-733
11 May 2016Emil Ifrim0.3Database configurationNox
N/A
20 March 2017Emil Ifrim0.4Redesign UpdateNox
N/A
01 April 2018Emil Ifrim0.5Redesign UpdateNox
N/A
15 January 2019SD0.6Download pdf-file




Overview

The customer project can deploy REST as two services (REST Auth and REST Core) or as three services (REST Auth,  REST Core and REST Cust). 

Two-service deployment: the custom endpoints (usualy developed in it's own standalone customer library project) are packaged together with the core endpoints

  • pros: only two services to maintain, documentation can be browsed at the same address for both core and custom endpoints
  • cons: in a intensive production setup, where high availability is a must, taking down the endpoints will happen for both(core and custom); also, in case of scalability, this has to be the same for both

Three-service deployment: the custom endpoints (usualy developed in it's own standalone customer library project) are packaged and deployed separately (REST Core has it's own war file, same for REST Cust)

  • pros: more scalable and maintainable (e.g if custom endpoints Tomcat needs maintainance, it can be stopped without affecting REST Core service)
  • cons: one more service to main and deploy.

Below it's an example with three modules, Baseline project can be used as an example for a two-rest-service deployment


This is a brief guide on how to install the REST service (rator-rest-api project and rator-rest-api-auth project). A customer rest project involves deploying three artifacts:

...

  1. Retrieve the rator-rest-api .war file (either from Jenkins/Nexus, see Resources, or by building the .war yourself, see Build).
  2. Retrieve the rator-rest-api-auth.war file (either from Jenkins/Nexus, see Resources, or by building the .war yourself, see Build).
  3. Copy the war files to the Tomcat webapps directory and (re-)start the Tomcat application.
  4. Retrieve the swagger-ui dist folder (either from Github, or from our own repositories, see Resources. Or by building the project yourself, see Build).
  5. Copy the dist folder to the Tomcat webapps directory and (re-)start the Tomcat application. You probably want to rename the dist folder to swagger-ui
    1. Nb This can be a different Tomcat installation than in step 2, or the same.
  6. In your browser, enter the URL "http://<Swagger server and port>/<base-path>/?url=http://<REST server and port>/<base-path>/api/swagger.json". 
  7. You should now see a list of the resources available on the REST server.
  8. In order to access secure resources through swagger-ui, one additional parameter must be configured in the Properties.txt file:
     

    Code Block
    languagesql
    titleoauth2 selfcare client
    rest.api.accessTokenUri=http://<host>:<port/<auth-app-context>/oauth/token #example: http://10.45.1.81:8081/rator-rest-api-auth/oauth/token


...