As described in the Search UI's documentation, Search UI has two deployment options:
- Embedded - deploy as a module making it available from the Attivio Admin UI (Not recommended for a production user interface)
- Stand-alone - deploy to an external web server such as Tomcat
This page describes how to implement the latter option and has been validated using the following versions of Tomcat:
Apache Tomcat Version |
---|
9.0.5 |
8.5.24 |
Once you have built the application following the steps outlined in the Developer's Guide, execute the following steps to deploy your application to Tomcat.
- Stop Tomcat
- Copy the WAR file produced by the Maven build in the servlet project's target directory or download and unzip the latest pre-built release and copy the
searchui.war
file within it to<tomcat home>/webapps
- Rename the WAR file to
searchui.war
(if deploying a custom-built application). The name of the WAR file should match the value set forbaseUri
in theconfiguration.properties.js
file - create a file named
searchui.xml
in<tomcat home>/conf/Catalina/localhost/
with the following contents, updating the value of "value" with the path where you intend to put theapplication.properties
file:
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Environment name="spring.config.location" value="file:/opt/tomcat/searchui/application.properties" type="java.lang.String"/>
</Context>
- Copy the file found at
searchui/servlet/application.properties
, or theapplication.properties
file within the latest release ZIP file, to the location specified above, updating the values that are set as needed (see below). - Copy the file at
searchui/frontend/configuration.properties.js
, or the one in the latest release ZIP file, to a location on your Tomcat server outside the$CATALINA_HOME/webapps
directory and set thesuit.attivio.configuration
property in theapplication.properties
file to that location. - Modify any other properties in
configuration.properties.js
to customize your deployment of Search UI. See How Do I Configure Search UI? for details. - Start Tomcat.
It is recommended that you enable compression when deploying to Tomcat. The various JavaScript libraries that are loaded on the first page accessed in Search UI are sizeable. Enabling compression can save server bandwidth and will improve load time and user experience. See the documentation for version 8 or 9 for details.
When requiring users to login, whether using the built-in XML Authentication or integrating with an SSO provider, it is recommended to enable SSL.
- Acquire an SSL certificate. A self-signed will suffice for development but will display a warning that it is untrusted. You can generate a keystore with a self-signed certificate by executing the following command. This will produce a file named
keystore.p12
in the directory where you run the command. You can move this file to a directory such as/opt/tomcat/ssl
.
keytool -genkey -alias tomcat -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 3650
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]:
What is the name of your organizational unit?
[Unknown]:
What is the name of your organization?
[Unknown]:
What is the name of your City or Locality?
[Unknown]:
What is the name of your State or Province?
[Unknown]:
What is the two-letter country code for this unit?
[Unknown]:
Is CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?
[no]: yes
- Edit the
<tomcat home>/conf/server.xml
file and comment out theConnector
element which runs on port8080
by default:
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
- Uncomment the
Connector
element which has the protocol attribute value ofHttp11NioProtocol
and edit thecertificateKeyAlias
,certificateKeystoreFile
andcertificateKeystorePassword
values as necessary:
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true">
<SSLHostConfig>
<Certificate certificateKeyAlias="tomcat" certificateKeystoreFile="/opt/tomcat/ssl/keystore.p12" certificateKeystorePassword="password"
type="RSA" />
</SSLHostConfig>
</Connector>
- Restart Tomcat. Once Tomcat starts, your web app should be available using
https://
with port8443
.