CTS2-LE Installation and Deployment: Unterschied zwischen den Versionen

Aus CTS2-LE
Zur Navigation springen Zur Suche springen
K (cts2_conf.xml)
(setting.json)
Zeile 44: Zeile 44:
  
 
You should leave most of the directories untouched. Only adapt the <span style="color:#ff7f24">highlighted</span> files as described in the section.
 
You should leave most of the directories untouched. Only adapt the <span style="color:#ff7f24">highlighted</span> files as described in the section.
== setting.json ==
+
== grouping.json ==
 +
 
 +
<!-- == setting.json ==
 
CTS2-LE was developed in a modular fashion and thus, there are independent components that need to be connected. For example, you can run multiple store instances each having a customized schema along with a specific query set. The file setting.json is used to define and weave these components. It will be consumed on start-up to determine the overall configuration of the system. The default setting.json has the following structure
 
CTS2-LE was developed in a modular fashion and thus, there are independent components that need to be connected. For example, you can run multiple store instances each having a customized schema along with a specific query set. The file setting.json is used to define and weave these components. It will be consumed on start-up to determine the overall configuration of the system. The default setting.json has the following structure
 
  {
 
  {
Zeile 77: Zeile 79:
  
 
Because only one store instance can be addressed at the time of importing, deploying or booting, the remaining store references have to be commented out using a '#'.
 
Because only one store instance can be addressed at the time of importing, deploying or booting, the remaining store references have to be commented out using a '#'.
 +
-->
  
 
== cts2_conf.xml ==
 
== cts2_conf.xml ==

Version vom 30. Juni 2015, 16:52 Uhr

This section describes how to install and deploy a CTS2-LE server instance along with the navigator front-end. It has to be ensured that the system fulfils the defined prerequisites. The following steps are aligned to the recommended system environment and hence offer commands on the basis of an Ubuntu-like OS.


General settings

Configure roles and users

Since the web application can be managed by means of the tomcat manager interface, it is useful to configure a role and a user. In /var/lib/tomcat7/conf/tomcat-users.xml add a role manager-gui and assign it to a user in the following manner:

<role rolename="manager-gui"/>
<user username="user" password="password" roles="manager-gui"/>

Encoding

Make sure, the correct encoding for requests and responses is set. In /var/lib/tomcat7/conf/server.xml check the attribute URIEncoding in the connector tag.

<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" URIEncoding="UTF-8"/>

Increasing Java heap space

Experience has shown that increasing the heap space for tomcat positively influences the servers efficiency. Therefore, it is recommended to permanently set the environment variable CATALINA_OPTS.

CATALINA_OPTS="-Xms512m -Xmx900m"

Setting the resource root

Select a directory where the terminology store instances will be located. The directory has to be specified by setting an environment variable called CTS2LE_RESOURCE_ROOT.

Since the resource root is one of the building blocks of CTS2-LE, no arbitrary manipulation of the files within the directory should be done. Only apply changes to the files which are described in this section.

Extract the delivered start-up directory to the defined destination and set access rights recursively.

sudo chmod -R 777 $CTS2LE_RESOURCE_ROOT

Delivered artifacts

You will be receiving a zip-compressed archive that combines several artifacts that allow for a fast and clean installation of CTS2-LE. The archive file has to be unzipped in the $CTS2LE_RESOURCE_ROOT directory and then shows the following structure:

/bin
    WebCts2LE.war 
    WebCts2LEStarter.sh 
/signatures
/queries
/load-vocabs
/jdbm2
cts2_conf.xml
setting.json

You should leave most of the directories untouched. Only adapt the highlighted files as described in the section.

grouping.json

cts2_conf.xml

This XML-structured file determines which vocabularies will be loaded. By default, it takes the following structure:

<conf>	
	<vocabularies>
		<vocabulary load="true" friendly-name="Example terminology and value sets" resourceID="exa"/>
	</vocabularies>
</conf>

The attribute friendly-name is used as a consumer friendly designation for a vocabulary while the resourceID represents a system intern identifier that must not be changed. If the attribute load is set to true, the corresponding terminology will be loaded. Mark any desired vocabulary by following this strategy and save the file. More information on how to load vocabularies outside the installation and deployment process can be found here.

WebCts2LE.war and WebCts2LEStarter.sh

  1. a web application archive (WebCts2LE.war) which will be deployed in a servlet container
  2. a script (WebCts2LEStarter) for loading the store content


Deployment

The delivered script WebCts2LEStarter.sh serves 2 use cases:

  1. it automatically deploys the war-file
  2. it faciliates the process of loading core terminologies

Before starting the script, check the value of the tomcat version and tomcat home-directory.

NAME=tomcat7
CATALINA_BASE=/var/lib/$NAME

Ensure that the script is executable by running the following command:

chmod +x WebCts2LEStarter.sh

Finally, start the script by appending the war-file as an argument.

./WebCts2LEStarter.sh WebCts2LE.war

Troubleshooting

  • Do not run the starter script with root privileges.