SKOOR Webservice installation
Prerequisites
- SKOOR RPM repository is available
Installation
Install eranger-webservice package from SKOOR repository:
# yum install eranger-webservice
eranger-jre and eranger-phantomjs will be installed as dependent packages.
The package will do the following changes to the system:
- Install SKOOR Webservice into directory /opt/eranger/eranger-webservice (Spring Boot App)
- Configure service including automatic startup at boot time
- Create web service configuration in /etc/opt/eranger/eranger-webservice.cfg
- Create reverse proxy configuration in /etc/httpd/conf.d/eranger-webservice-proxy.conf
/eranger-webservice -> http://localhost:8090/ - Configure log rotation in /etc/logrotate.d/eranger-webservice.conf
- Start the web service
- Reload the Apache configuration
Service start / stop / restart /status
The eRanger Webservice is configured as a Linux service and can be managed with the respective commands:
# service eranger-webservice start # service eranger-webservice stop # service eranger-webservice restart # service eranger-webservice status
or
# systemctl start eranger-webservice # systemctl stop eranger-webservice # systemctl restart eranger-webservice # systemctl status eranger-webservice
Custom configuration
The standard configuration should work out of the box with no changes.
The following changes can be done if required:
Tomcat port
If the standard port 8090 is not available, it can be changed in the file "/opt/eranger/eranger-webservice/eranger-webservice.conf":
# Spring Boot service config file # Has to be in the same directory as the JAR file MODE=service JAVA_HOME=/opt/eranger/eranger-jre/current APP_NAME=eranger-webservice JAVA_OPTS="-Dserver.port=8091" PID_FOLDER=/var/opt/run/eranger LOG_FOLDER=/var/log/eranger LOG_FILENAME=eranger-webservice.log
The same port must be configured in the reverse proxy configuration in "/etc/httpd/conf.d/eranger-webservice-proxy.conf":
# mod_proxy setup for using httpd as a reverse proxy for tomcat # has to placed in /etc/httpd/conf.d ProxyPass /eranger-webservice http://localhost:8091/ ProxyPassReverse /eranger-webservice http://localhost:8091/ <Location "/eranger-webservice"> setOutputFilter DEFLATE Require all granted Satisfy Any Order allow,deny Allow from all </Location>
PID file
In the default configuration, a PID file is written to "/var/opt/run/eranger".
If a different path is preferred, it can be configured in the file "/opt/eranger/eranger-webservice/eranger-webservice.conf".
# Spring Boot service config file # Has to be in the same directory as the JAR file MODE=service JAVA_HOME=/opt/eranger/eranger-jre/current APP_NAME=eranger-webservice JAVA_OPTS="-Dserver.port=8091" PID_FOLDER=/new/pid/path
Multi tenancy
The webservice is able to get data from multiple SKOOR Engine Backends using the tenantId.
To configure additional backends, one has to provide a separate eranger-webservice-<tenantId>.cfg config file in the /etc/opt/eranger folder. This file is basically a copy of the default eranger-webservice.cfg file with a tenanc specific eranger address..
# eRanger Server Address eranger.address=<host of Skoor server>
You don't have to change files.root or reports.root. The webserver handles the separation of those folders itself.
After the configuration has been saved, you should be able to retrieve data from the configured SKOOR Engine by providing either the HTTP request header X-Tenant-Id or the URl parameter tenantId.