#puppet-dcm4chee
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with dcm4chee
- Usage - Configuration options
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development
The dcm4chee module lets you use Puppet to install, deploy & configure dcm4chee and weasis.
dcm4chee is an Open Source Clinical Image and Object Management system. http://www.dcm4che.org/
weasis is an Open Source DICOM web viewer. https://github.com/nroduit/Weasis
This module helps you in getting both set up and running using Puppet.
Following describes the basic building blocks executed by the module:
- staging
- downloads and extracts all necessary archives for dcm4chee (dcm4chee, jboss, java image io library for 64bit machines, weasis) into a staging directory
- executes install_jboss.sh to copy jboss components over to dcm4chee
- exchanges a JAI Image IO library (libclib_jiio.so) for Linux-amd64 see dcm4chee install-guide
- copies weasis, weasis-pacs-connector, weasis-i18n war files into dcm4chee's deployment directory
- installation
- copies the dcm4chee home path prepared during staging to dcm4chee users home directory
- installs a database server, creates a database for dcm4chee and executes the dcm4chee database creation script
- configuration
- configures dcm4chee's database connection
- configures jboss http and ajp ports and its java command line arguments
- configures weasis using weasis pacs-connector
- service
- sets up dcm4chee as a service via a template init.d script
- ensures dcm4chee is running
Please refer to the dependency section in metadata.json for the pre-requisite modules.
Important note: this module expects
- you to have java already installed
- you to have packages needed by nanliu-staging (such as unzip, curl) already installed
The simplest way to get dcm4chee up and running with the dcm4chee module is to install dcm4chee database and server on the same node as follows:
class { 'dcm4chee':
server_java_path => '/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java',
}
Following describes basic use cases. Please check out the examples manifests as well.
To setup dcm4chee with its default settings do:
class { 'dcm4chee':
server_java_path => '/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java',
}
To specify jboss java options do:
class { 'dcm4chee':
server_java_path => '/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java',
server_java_opts => [ '-Xms128m',
'-Xmx740m',
'-XX:MaxPermSize=256m',
'-Dsun.rmi.dgc.client.gcInterval=3600000',
'-Dsun.rmi.dgc.server.gcInterval=3600000',
],
}
To specify jboss ports other than the defaults do:
class { 'dcm4chee':
server_java_path => '/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java',
server_http_port => 8081,
server_ajp_connector_port => 8089,
}
To install dcm4chee database and server on separate nodes using roles and profiles pattern
node 'db.example.com' {
include role::db
}
class role::db {
class { 'dcm4chee':
server => false,
server_host => 'pacs.example.com',
}
}
node 'pacs.example.com' {
include role::pacs
}
class role::pacs {
class { 'dcm4chee':
server_java_path => '/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java',
database => false,
database_host => 'db.example.com',
}
}
Note: you need to add necessary puppet code to above example code to ensure database connectivity between dcm4chee database and server.
dcm4chee
: Installs and configures dcm4chee.
dcm4chee::default::entry
: Adds an entry to a dcm4chee configuration file (e.g.,/etc/default/dcm4chee
).
All parameters are optional except where otherwise noted.
Specifies whether the dcm4chee server should be installed. Valid options: 'true', 'false'. Defaults to 'true'.
Specifies the dcm4chee version which should be installed. Valid options: '2.18.1'. Defaults to '2.18.1'.
Specifies the dcm4chee host name or IP address. Valid options: string. Defaults to 'localhost'.
Specifies the absolute path to the java binary which should be used to run dcm4chee.
Valid options: string containing an absolute path.
Default is undefined. You must define this parameter if server
= true.
Specifies the java command line arguments which should be used to run dcm4chee (see template). Valid options: an array. Default is [].
Specifies the dcm4chee (jboss) http port. Valid options: integer between 0 and 65535. Defaults to '8080'.
Specifies the dcm4chee (jboss) ajp connector port. Valid options: integer between 0 and 65535. Defaults to '8009'.
Specifies the dcm4chee (jboss) log file path managing 'server/default/conf/jboss-log4j.xml' RollingFileAppender param "File". Valid options: string. Defaults to '${jboss.server.log.dir}/server.log'.
Specifies the dcm4chee (jboss) log file max size managing 'server/default/conf/jboss-log4j.xml' RollingFileAppender param "MaxFileSize". Valid options: string. Defaults to '10000KB'.
Specifies whether the dcm4chee dcm4chee (jboss) log file should be appended to. Managing 'server/default/conf/jboss-log4j.xml' RollingFileAppender param "Append". Valid options: 'true', 'false'. Defaults to 'false'.
Specifies the dcm4chee (jboss) log file path managing 'server/default/conf/jboss-log4j.xml' RollingFileAppender param "MaxBackupIndex". Valid options: integer. Defaults to '1'.
Specifies the dcm4chee (jboss) log appenders managing 'server/default/conf/jboss-log4j.xml' elements. Valid options: array containing elements from values 'FILE', 'CONSOLE', 'JMX'. Defaults to [ 'FILE', 'JMX' ].
Specifies the dcm4chee DICOM AE Title.
Valid options: string.
Defaults to 'DCM4CHEE'.
Important note: this parameter is only used to configure the connection of DICOM web viewer weasis
to dcm4chee.
It does not change dcm4chee's DICOM AE Title. This should be done from within dcm4chee's web UI!
Specifies the dcm4chee DICOM port.
Valid options: integer between 0 and 65535.
Defaults to '11112'.
Important note: this parameter is only used to configure the connection of DICOM web viewer weasis
to dcm4chee.
It does not change dcm4chee's DICOM AE Title. This should be done from within dcm4chee's web UI!
Specifies whether JAI Image IO library (libclib_jiio.so) for Linux-amd64 should be exchanged. Valid options: 'true', 'false'. Defaults to 'false'.
Important Note: this was changed to false
since server http://dicom.vital-it.ch:8087 is currently down. You thus have to exchange the library yourself manually or follow instructions under section 8. at https://dcm4che.atlassian.net/wiki/display/ee2/Installation/
#####server_service_ensure
Specifies whether to dcm4chee service should be running. Maps to the ensure
parameter of Puppet's native service
resource type
Valid options: 'running', 'stopped', 'true', and 'false'.
Default: 'running'.
#####server_service_enable
Specifies whether to enable the dcm4chee service at boot. Maps to the enable
parameter of Puppet's native service
resource type
Valid options: 'true' and 'false'.
Default: 'true'.
Determines whether to create the specified user
, if it doesn't exist. Uses Puppet's native user
resource type with parameters managehome
=> true, home
=> $::dcm4chee::user_home
. Valid options: 'true' and 'false'. Default: 'true'.
#####user
Specifies a user to run dcm4chee as. Is passed to Puppet's native user
resource type parameter name
.
Valid options: string containing a valid username.
Default: 'dcm4chee'.
#####user_home
Specifies home directory of user
.
Valid options: string containing an absolute path. Is passed to Puppet's native user
resource type parameter home
.
Default: '/opt/dcm4chee'.
Specifies whether the dcm4chee database should be installed. Valid options: 'true', 'false'. Defaults to 'true'.
Specifies the type of the dcm4chee database. Valid options: 'mysql', 'postgresql'. Defaults to 'postgresql'.
Specifies the dcm4chee database host name or IP address. Valid options: string. Defaults to 'localhost'.
Specifies the dcm4chee database port.
Valid options: integer between 0 and 65535.
Defaults to '5432' for database_type
= 'postgresql' and '3306' for database_type
= 'mysql'.
Specifies the dcm4chee database to create. Valid options: string. Defaults to 'dcm4chee'.
Specifies the dcm4chee database owners password. Valid options: string. Defaults to 'dcm4chee'.
Specifies whether the DICOM web viewer weasis should be installed. Valid options: 'true', 'false'. Defaults to 'true'.
Specifies the weasis pacs-connector property 'aet'. Valid options: string. Defaults to 'PACS-CONNECTOR'.
Specifies the weasis pacs-connector property 'request.addparams'. Valid options: string. Default is undefined.
Specifies the weasis pacs-connector property 'request.ids'. Valid options: an array containing elements from values 'patientID', 'studyUID', 'accessionNumber', 'seriesUID', 'objectUID'. Defaults to [ 'patientID', 'studyUID', 'accessionNumber', 'seriesUID', 'objectUID' ].
Specifies the weasis pacs-connector property 'hosts.allow'. Valid options: an array. Default is [].
Required. Provides the value of the managed parameter. Valid options: a string.
Determines whether the fragment should exist in the configuration file. Valid options: 'present', 'absent'. Default: 'present'.
Specifies a parameter to manage. Valid options: a string. Default: the '[title]' passed in your define.
Determines the ordering of your parameters in the configuration file
(parameters with lower order
values appear first.) Valid options: an integer
or a string containing an integer. Default: '10'.
Specifies a character to include before and after the specified value. Valid options: a string (usually a single or double quote). Default: (blank).
##Limitations
This module was only tested with dcm4chee-2.18.1-psql and dcm4chee-2.18.1-mysql.
This module is currently limited to Ubuntu 14.04 64bit.
This module is currently limited to dcm4chee version 2.18.1.
##Development
Please feel free to open pull requests!
###Running tests This project contains tests for rspec-puppet to verify functionality.
To install all dependencies for the testing environment:
sudo gem install bundler
bundle install
To run the tests once:
bundle exec rake spec
To run the tests on any change of puppet files in the manifests folder:
bundle exec guard