Skip to content

How to deploy the Strategic Dashboard

Lidia edited this page Sep 13, 2019 · 41 revisions

Q-Rapids Dashboard is a web application developed in Java. Some data is stored in a PostgreSQL database and some in an Elasticsearch Cluster. It is composed by 4 components:

  • qrapids-dasboard: web application providing all the functionality to the final user
  • qrapids-si_assessment-rest: RESTful service providing strategic indicators assessment using Bayesian Networks instead of an average
  • qrapids-forecast-rest: RESTful service prodiding prediction functionality
  • qrapids-backlog-XXX: RESTful services to export the quality requirements to the specific tools that manage the backlog. For instance qrapids-backlog-openproject is used if the backlog is managed in _OpenProject _or qrapids-backlog-jira if the backlog is managed in Jira.

Requisites

The requisites to deploy Q-Rapids Dashboard are:

  • A web server, e.g. Tomcat
  • Oracle Java JRE
  • PostgreSQL, an open source object-relational database system. The information that you are going to need to configure the connection to the database is: URL and PORT where PostgreSQL is accessible, username, and password
  • Elastic Search
  • R Server
    1. Download and install R in the machine where the R server will be deployed. For Linux, version 3.4.4 is recommended, and for Windows, version 3.5.3. For Linux, the libraries libssl and libcurl may be needed to install the R packages, install the corresponding ones for your distro. For Windows, Rtools may be needed.
    2. (Optional step) For Linux, the installation of the "prophet" package can be speeded up installing the "rstan" binaries beforehand. RStan on Linux ( Section "Installing from the repository")
  • PABRE-WS, the corresponding version is included in as part of the installation package (pabre-ws.war). Please, follow the instructions shown at section "Running the project with pabre-ws.war" in the README.md to correctly deploy PABRE. The code is available at https://github.com/OpenReqEU/requirement-patterns

Other Q-Rapids components Required

The data is ingested and analysed by the following components

The quality alerts are generated by

Deployment Steps

The instructions included in this deployment guidelines explain how to deploy the dashboard using all the needed war files. The needed war files can be found in the installation package included in the dashboard releases or you can generate them by yourself following the How to make your own Strategic Dashboard deployment.

In order to install the dasbhoard, you need to have the following files:

  • qrapids-dashboard-X.Y.X.war
  • qrapids-forescast-rest-X.Y.X.war
  • qrapids-si_assessment-X.Y.X.war
  • TimeSeriesFunctions-X.Y.X.R
  • pabre-ws.war

The corresponding qrapids-backlog-XXX.war (if need) is available in the corresponding repository.

Step 1: Deploy Strategic Indicators Assessment RESTful services

  1. Deploy qrapids-si_assessment-X.Y.X.war in your Web Server

Step 2: Deploy Forecasting RESTful services

  1. Deploy qrapids-forescast-rest-X.Y.X.war in your Web Server
  2. Copy TimeSeriesFunctions-X.Y.X.R to an accesible folder (RSCRIP_FOLDER). You can use the APACHE version of the scripts (included in the installation package), including only one forecasting method, or use the GPL version of the scripts containing the complete set of forecasting methods, available in the forecast-R_script repository
  3. Configure forecasting, setting the correponding values in the following application.properties file:
    Rserve.host=<RSERVER IP>
    Rserve.port=<RSERVER PORT>
    Rscripts.location=<RSCRIPT_FOLDER>/TimeSeriesFunctions-X.Y.X.R
  4. Installing the required R packages, from an R console, depending on the .R script file you have deployed:
    1. If you deployed the .R script file (APACHE version) included in the installation package:
      install.packages("devtools")
      library(devtools)
      install_version("prophet", version="0.4")
      install_version("Rserve", version="1.7-3.1")
      install_version("elastic", version="0.8.4")
    2. If you deployed the .R script file (GPL version) from qrapids-forecast-R_script repository:
      install.packages("devtools")
      library(devtools)
      install_version("forecast", version="8.7")
      install_version("prophet", version="0.4")
      install_version("Rserve", version="1.7-3.1")
      install_version("elastic", version="0.8.4")
      install_version("forecastHybrid", version="4.2.17")
  5. The Rserve is already prepared to be run:
    library(Rserve)
    Rserve()

By default, Rserve will start the server listening on the 6311 port. You can change it if you prefer to use another port with the parameter “port” (and setting the corresponding one in the application property Rserve.port) :
Rserve(port=6312)

Step 3: Deploy Backlog RESTful services

  1. Deploy the corresponding qrapids-backlog-XXX.war in your Web Server

Step 4: Configure PABRE-WS

If you have a QR patterns catalogue, you need to import the catalogue.

  1. Invoke the endpoint /pabre-ws/api/catalogue/import, with a POST request, including in the body of the message the JSON file of the QR patterns catalogue.

Step 5: Deploy Dashboard web application

  1. Create a database in the PostgreSQL database system:
    CREATE DATABASE qrdashboard;
  2. Deploy the qrapids-dashboard-X.Y.X.war in your Web Server
  3. Configure the dashboard. Details about the dashboard configuration are in Configuration file

Step 6: Check ElasticSerach indexes

Check if you have the indexes for each product you have configured for the qrapids-eval. If the strategic_indicators indexes are missing, you must create them manually with the following statement:

PUT strategic_indicators.default
{
    "aliases": {},
    "mappings": {
      "strategic_indicators": {
        "properties": {
          "datasource": {
            "type": "keyword"
          },
          "description": {
            "type": "text"
          },
          "evaluationDate": {
            "type": "date"
          },
          "strategic_indicator":{
            "type": "keyword"
          },
          "name": {
            "type": "keyword"
          },
          "project": {
            "type": "keyword"
          },
          "value": {
            "type": "double"
          }
        }
      }
    }
}

Detailed information aobut the Elasticsearch indexes accessed by the dashboard in Elasticsearch Indexes

Clone this wiki locally