Installation
This chapter describes how to install Reports on an on-premise Qmatic Orchestra system. Reports has two parts: the reports-backend service, which generates the reports and sends the e-mails, and the reports-frontend web app, which runs in Orchestra's WildFly server.
Prerequisites
- Qmatic Orchestra 7.3 or later, with the Orchestra database (
qp_central) and the statistics database (statdb) installed. - PostgreSQL, Microsoft SQL Server or Oracle. See the Qmatic Orchestra datasheet for the supported operating systems and databases.
- The Reports release package for your version:
backend.zipand the frontend package (frontend.zip, withreports-frontend.war,reports-frontend-scripts,orchestra_sql.zipandapplication.png). Use a reports-backend of the same 3.4.x release as the frontend. - Administrator access to the Orchestra server and to the database server.
- The Roboto font on the reports-backend server (needed for PDF reports).
Manual installation
When you copy a command from this chapter, make sure it is on one line before you run it.
Install reports-backend
-
Extract
backend.zip, for example toC:\qmatic\Reports(Windows) or/opt/qmatic/reports-backend(Linux, owned by aqmaticuser). -
Install the Roboto font: download it from Google Fonts. On Windows, copy the font files to
C:\Windows\Fonts. On Linux:mkdir roboto && unzip Roboto.zip -d robotocp -rfv roboto /usr/share/fonts/ && cd /usr/share/fonts/roboto && fc-cache -fv -
Create the backend database: run the matching
db-scripts/backend-schema-<db>.sql. The default database name isreports_backend. -
Edit
config/application.properties:server.http-port/server.https-port(defaults 8086 / 8446). Setserver.ssl.enabled=trueto use HTTPS.spring.datasource.url,spring.datasource.username,spring.datasource.passwordfor thereports_backenddatabase. Enable the block for your database type.- The e-mail provider for scheduled reports: either SendGrid (
sendgrid.email.no-reply,sendgrid.api-key) or SMTP (smtp.enabled=true,smtp.email.no-reply,spring.mail.host,spring.mail.port,spring.mail.username,spring.mail.password). You can't use both. auth.users: the user name and password that reports-frontend uses to call the backend, as a JSON array. Use the same values inCRS_AUTH_USERbelow.- The statistics database: uncomment
stat.datasource.url,stat.datasource.usernameandstat.datasource.password, for examplejdbc:postgresql://<host>:5432/statdb?currentSchema=stat.
-
Install and start the service:
- Windows: run
bin\install-reports-backend.batas administrator, then start the Qmatic Reports Backend service. - Linux: make the scripts in
binexecutable, runsudo bin/install-reports-backend.sh(needschkconfig), thensudo /etc/init.d/reports-backend start.
- Windows: run
-
If reports-backend uses a self-signed certificate, import it into the Orchestra truststore with the alias
reports(System Administration > Settings > TrustStore Management) and restart Orchestra.
With SQL Server and Windows Authentication, use the *-sqlserver-integrated.sql scripts and access-mssql-integrated_frontend.sql, add integratedSecurity=true to the datasource URLs, and run the backend service as a domain user with the "Log on as a service" right.
Install reports-frontend
-
Create the frontend database: in
reports-frontend-scripts, run the matchingsql/frontend-schema-<db>.sql(postgres,postgres-linux,sqlserver,sqlserver-integratedororacle). It creates thereports_frontenddatabase with the scheduling tables and favorites. -
Update
shiro.iniin<orchestra-home>/conf. Add these lines to the[urls]section:/reports-frontend/rest/** = qpBasicAuthc, noSessionCreation, modules[reports-frontend]/reports-frontend/** = saml2SecurityFilter, qpAuthc, modules[reports-frontend] -
Create the JNDI datasource: set
JAVA_HOMEto Orchestra's Java, then runbin/create-reports-frontend-jndi.batorbin/create-reports-frontend-jndi.shfromreports-frontend-scripts. It adds the datasourcejava:/jdbc/reportFrontendfor thereports_frontenddatabase tostandalone-full.xml. Check the database user and password in the datasource, then restart Orchestra. -
Edit
standalone-full.xml(<orchestra-home>/app/wildfly<version>/standalone/configuration):- Exclude Reports from WildFly caching: in the
qmatic-cache-controlfilter, setcustomPathsToExcludeFromFilterto/reports-frontend/. - Allow printing the PDF: in the
Content-Security-Policyresponse header, changeimg-src * data: 'unsafe-inline';toimg-src * data: blob: 'unsafe-inline';.
- Exclude Reports from WildFly caching: in the
-
Set the environment variables in
standalone.bat(Windows,set) orstandalone.sh(Linux,export) in<orchestra-home>/app/wildfly<version>/bin:CRS_AUTH_USER={"user":"<backend user>","password":"<backend password>"}DATABASE=postgresICRS_URL=http://<host>:8086/reports-backendDATABASEispostgres,mssqlororacle. UsehttpsinICRS_URLwhen reports-backend uses SSL. Restart Orchestra. -
Deploy reports-frontend, after reports-backend is running:
- Option A: install the frontend package through Xtend.
- Option B: manually:
-
Unzip
orchestra_sql.zipand runfrontend_update_central_<db>.sql(postgres,sqlserverororacle) on theqp_centraldatabase. It adds Reports to Orchestra Home. -
Add these lines at the end of
<orchestra-home>/conf/lang/applicationMessages.properties:application.reports-frontend = Reportsapplication.reports-frontend.description = View and schedule Canned Reports -
Copy
reports-frontend.warto<orchestra-home>/custdeployand restart Orchestra.
-
-
Give access: in Orchestra, add the access module Reports to the roles of everyone who will use Reports.
-
Check: log in to Orchestra and open the Reports tile. The Scheduled reports tab appears.
Upgrading
- Upgrade reports-backend first, to the same 3.4.x release: stop the service, replace the application files, keep
config/application.properties, and start the service. - Redeploy reports-frontend: install the new frontend package through Xtend, or replace
reports-frontend.warin<orchestra-home>/custdeploy. - Your scheduled reports and favorites are kept. There are no database migration scripts for reports-frontend.
When you upgrade reports-backend from version 2.1.6 or earlier, add the SMTP properties to application.properties.
Configuration outside the app
| Item | Where | What it does |
|---|---|---|
| Access module Reports | Orchestra roles | Users need it to open Reports. |
| Administrator roles | Orchestra roles | SystemAdministrator, BusinessAdministrator, MarketingAdministration, Client Admin or Calendar Admin: all branches and all scheduled reports. Other users: their own branches and their own scheduled reports. |
| Branch access | Orchestra users | The branches a non-administrator can report on. For branch-level permissions, also add the bi module to /qsystem/rest/servicepoint/branches in shiro.ini, assign the Connector ServicePoint module to the BIUser role, and give users the BIUser role. |
ICRS_URL | standalone.bat / standalone.sh | URL of reports-backend. |
CRS_AUTH_USER | standalone.bat / standalone.sh | User and password for calls to reports-backend; must match auth.users in the backend. |
DATABASE | standalone.bat / standalone.sh | Database type of reports_frontend: postgres, mssql or oracle. |
| E-mail provider | reports-backend application.properties | SMTP or SendGrid settings for scheduled reports. |
| Statistics database | reports-backend application.properties | Connection to statdb. Changes can take up to 10 minutes to apply (cache). |
| Language | Orchestra language bundle reportsFrontendMessages_<lang>.properties | Overrides the texts of Reports. Supported languages: English, German, Spanish, French, Italian, Dutch. |
| Favorites | reports_frontend database | Saved per user; removed by clicking the star again. |
Uninstalling
- Remove
reports-frontend.warfrom<orchestra-home>/custdeploy(or uninstall it through Xtend). - Remove the two
/reports-frontend/lines fromshiro.ini. - Remove the access module Reports from the Orchestra roles.
- Stop and remove the reports-backend service.
- Optionally drop the
reports_frontendandreports_backenddatabases and remove thejava:/jdbc/reportFrontenddatasource fromstandalone-full.xml. - Restart Orchestra.
Troubleshooting
The browser shows "too many redirects" after login
The user's role doesn't have the access module Reports. Add the module to the role in Orchestra and log in again.
Reports fails to start after deployment
reports-backend must be running before reports-frontend is deployed. Start the backend service, then delete reports-frontend.war.failed from <orchestra-home>/custdeploy to deploy again.
"The report could not be requested"
Reports can't reach reports-backend. Check that the service is running, that ICRS_URL is correct (https when SSL is on), and that CRS_AUTH_USER matches auth.users in the backend. If the backend uses a self-signed certificate, import it into the Orchestra truststore.
Reports show no data
Check the statistics database settings of reports-backend (stat.datasource.*). After a change, wait up to 10 minutes or restart the backend service. Non-administrators only see data for their own branches.
Scheduled reports are not received
Check the e-mail provider settings in reports-backend and that the scheduled report is Active.
The print button of the PDF viewer does nothing
Add blob: to img-src in the Content-Security-Policy header in standalone-full.xml (see Manual installation).