puppet-xnat /

Filename Size Date modified Message
lib/facter
manifests
templates
tests
37 B
2.2 KB
2.0 KB
3.6 KB
11.4 KB
90 B
5.3 KB
466 B
283 B
== XNAT puppet module ==

The current stable version is tagged in the repository with v0.4.
Downloading the script can easily be done via the XNAT MarketPlace: http://marketplace.xnat.org/plugin/xnat-puppet-installation-script.
A tag of this version and older tags are also available, at: https://bitbucket.org/bigr_erasmusmc/puppet-xnat/downloads. 

This module configures an XNAT installation. The script has been tested on:

 - Fedora 20.1
 - RedHat Server 7.0
 - Scientific Linux 6.5
 - Ubuntu Server 14.0.4.1

Acknowledgements: Thanks to Stefan Klein (Erasmus MC), Marcel Koek (Erasmus MC), Erwin Vast (Erasmus MC) and Pieter Lukasse (The Hyve).
License: Apache License, see license file.

== Installation ==

See the INSTALL file for the prerequisites before using the puppet script. See Installation Configuration below for important settings.

The puppet script installs several services and packages. The install locations vary per package. We provide the following table with the exact details per package that can be used in case of errors, later updates or partial installs/repairs. For repairing or updating a system, the puppet script can be ru-run, even the puppet script is not changed. It uses the checks that are listed in the Check column to determine if a package is already installed. If one makes the check condition false (e.g. removing the listed directory), the puppet script will re-install that specific package. Beside the checks, the puppet script will -always- copy the latest XNAT build to the tomcat webapps directory and restart the service. 
The puppet column lists if the package is installed as a puppet module or custom installation (e.g. download and install zip/tar.gz)
------------------------------------------------------------------------------
Puppet | Package    | Install location          | Check
------------------------------------------------------------------------------
No     | java       | /usr/lib/jvm/{version}    | If install location exists
Yes    | postgresql | via package manager       | Determined by puppet package
No     | tomcat     | /usr/share/tomcat{version}| If install location exists
No     | xnat       | /home/xnat/xnat           | If install location exists
Yes    | apache     | via package manager       | Determined by puppet package
------------------------------------------------------------------------------

Other checks:

------------------------------------------------------------------------
Item                   | Check
------------------------------------------------------------------------
Install database             | If database 'xnat' exists (see notes)
Build XNAT                   | If {xnat}/deployments directory exists
Shutdown tomcat              | If {tomcat}/bin/.shutdown.sh exists
Move tomcat ROOT (see notes) | If {tomcat}/webapps/tomcat does not exist
------------------------------------------------------------------------

Notes:
 - An apache proxy is used to redirect requests from port 80 to 8080, which is tomcat's default port. Because root rights are required for ports < 1024, we have choosen apache as the proxy, as jsvc is more complex for automatic installation. This works only if xnat is deployed as ROOT, and therefore the existing ROOT (tomcat status/manager) is moved to the webapp /tomcat. The webpage is still accessable by http{s}://{hostname}/tomcat .
 - The puppet script also copies a .jinfo file to the java installation location. This is required for a correct java installation with the update-alternatives application.
 - The xnat database can be removed the following way (for testing):
   NOTE: ALL XNAT DATA WILL BE REMOVED! MAKE A BACKUP!
    - sudo -u postgres psql
    - DROP DATABASE xnat
    - \q (for exit psql)
 - The XNAT installation can be run with SELinux Enabled. The script has been adapted and tested to run with SELinux.
 - Depending on the OS, apache may be installed as apache, apache2, apache22 or httpd.
 - The script downloads the given version from the XNAT ftp side.
 - The script does not modify any firewall settings, for security reasons. To make the website accessable, please make sure that port 80 and 8104 (dicom gateway) are open in iptables or any other firewall service.  
 
== Installation configuration ==
Several settings can be configured in the file /etc/puppet/modules/xnat/tests/test.pp
Please review these settings before running the puppet script.

Noteworthy settings:
 - db_userpassword should be set to a new password for the database.
 - archive_root is where all imaging data (and support files) are stored.
 - tomcat_web_user/password can be set to access tomcat's status/management pages.
 - catalina_tmp_dir should be linked to a location with sufficient space. Uploads are also temporarily stored here, which can take up several GB's, depending on the upload datasize. 
 - tablespace_dir is the location of the database. This can be changed for improved backup support or to move the database to a faster disk, if required.
 - java_opts should be changed accordinly, based on the systems memory availibility.
 - if any of the directories are changed, please also update the makedirs.sh (next to test.pp) accordingly.