####Table of Contents
- Overview
- Module Description - What the module does and why it is useful
- Prerequisites
- Setup - The basics of getting started with fcrepo
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
##Overview
The fcrepo module installs, configures, and manages Fedora 4 in a clustered environment.
##Module Description
The fcrepo module manages running Fedora 4 repositories in a clustered environment. The module ensures that the prerequisite software is installed, installs the Fedora WAR file and sets up the FCREPO_HOME directory, and manages the configuration files for every Fedora instance on each node in the cluster.
##Prerequisites
To use this module, you need Puppet installed (of course), as well as the following Puppet modules:
- puppetlabs/stdlib
- 7terminals/java
- 7terminals/maven
- 7terminals/tomcat
You'll also need to download the following source packages:
-
Java 7: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
-
Maven 3: http://maven.apache.org/download.cgi
-
Tomcat 7: http://tomcat.apache.org/download-70.cgi
Choose the correct *.tar.gz package for your platform.
###Install and configure a base installation of Puppet
Puppet Labs has good step-by-step documentation for getting a Puppet master and Puppet clients set up.
Install: http://docs.puppetlabs.com/guides/installation.html
Setup: http://docs.puppetlabs.com/guides/setting_up.html
Make sure your agents can contact the master puppet server and receive their catalog information:
sudo puppet agent --test
###Install the extra Puppet modules
sudo puppet module install puppetlabs/stdlib
sudo puppet module install 7terminals/java
sudo puppet module install 7terminals/maven
sudo puppet module install 7terminals/tomcat
##Setup
###What fcrepo affects
- Fedora service user and group
- Java, Tomcat, Maven standalone installs
- Fedora WAR
- Fedora directories (home and data)
- Fedora configuration files
- Tomcat service
This module creates a user and group to manage the Fedora service and files, creates a software directory and a data directory and assigns ownership of them to the fedora user, then installs standalone versions of Oracle Java HotSpot JDK, Tomcat, and Maven. The module installs Fedora in a sandboxed environment, with infrastructure software downloaded and installed from source, and should work on any Unix environment.
It also deploys the Fedora WAR and Fedora configuration files, nd manages the Fedora Tomcat service.
###Beginning with fcrepo
####Build and install the module
-
Clone this project, change to the
puppet-fcrepo
directory. -
Copy the source files you downloaded (see Prerequisites, above) into the module's
files/
directory:
cp /path/to/source/packages/*.tar.gz files/
- Build the module:
puppet module build .
- Install the module:
sudo puppet module install pkg/sprater-fcrepo-<version>.tar.gz --ignore-dependencies
where <version>
is the current version of the module.
####Enable the module in Puppet
include 'fcrepo'
in the puppet master's site.pp
file is enough to get
you up and running. If you wish to pass in parameters such as which user and
group to create then you can use:
class { '::fcrepo':
user => 'fcrepo',
group => 'fcrepo',
fcrepo_sandbox_home => '/opt/fcrepo',
fcrepo_datadir => '/opt/fcrepo/data',
}
##Usage
##Reference
###Classes
####Public Classes
- fcrepo: Main class, includes all other classes
####Private Classes
- fcrepo::install: Creates the user and group, ensures that the correct directories exist, and installs the base software and the Fedora WAR.
- fcrepo::config: Manages the configuration files.
- fcrepo::service: Manages the Tomcat service.
###Parameters
The following parameters are available in the fcrepo module. They are grouped into Environment, Infrastructure, and Fedora.
The defaults are defined in fcrepo::params
, and may be changed there, or
overridden the Puppet files that include the fcrepo
class.
####Environment
#####user
The Unix user that will own the Fedora directories, software, and data.
Default: fcrepo
#####group
The Unix group that will own the Fedora directories, software, and data.
Default: fcrepo
#####user_profile
The absolute path to the shell profile file that should be modified to
update the PATH environment variable. Can be set to a system-wide profile
(i.e. /etc/profile
).
Default is /home/user/.bashrc
#####fcrepo_sandbox_home
The home directory for the Fedora environment sandbox.
Default: /fedora
#####fcrepo_datadir
The Fedora data directory.
Default: /data
####Infrastructure
Software packages by default are installed in the Fedora 4 sandbox directory, owned by the Fedora Unix user and group. The user's PATH is modified to point first to these tools in the sandbox, and other environment variables may be set in the user's profile file.
#####java_source
The exact name of the Java source distribution package, in *.tar.gz format.
This file should be installed under the module's files/
directory
(usually /etc/puppet/modules/fcrepo/files/
).
Default: jdk-7u51-linux-x64.tar.gz
#####maven_source
The exact name of the Maven source distribution package, in *.tar.gz format.
This file should be installed under the module's files/
directory
(usually /etc/puppet/modules/fcrepo/files/
).
Default: apache-maven-3.1.1-bin.tar.gz
#####maven_deploydir
The Maven base directory.
Default: fcrepo sandbox home/maven3
#####tomcat_source
The exact name of the Tomcat source distribution package, in *.tar.gz format.
This file should be installed under the module's files/
directory
(usually /etc/puppet/modules/fcrepo/files/
).
Default: apache-tomcat-7.0.50.tar.gz
#####tomcat_deploydir
The Tomcat base directory (CATALINA_HOME).
Default: fcrepo sandbox home/tomcat7
##Limitations
This module does not define the raw filesystem devices, nor mount any filesystems. Make sure the filesystem(s) in which the sandbox and data directories will reside are created and mounted.
This module does not set a password for the Fedora Unix user. You'll need to do that yourself.
The java::setup
, maven::setup
, and tomcat::setup
resources only
support the $::osfamily
parameters of RedHat, Debian, and Suse.
You may need to override the $::osfamily
parameter, setting it to
one of those supported OSes, to get these tools to install under puppet.
##Development
See the DEVELOPERS file for more information on modifying, testing, and building this module.