Version information
released Apr 1st 2014
Start using this module
Add this module to your Puppetfile:
mod 'gsick-jetty', '0.0.8'
Learn more about managing modules with a PuppetfileDocumentation
gsick/jetty — version 0.0.8 Apr 1st 2014
puppet-jetty
Puppet module for installing and configuring Jetty
Table of Contents
Status
0.0.8 released.
Dependencies
This module requires Puppet >= 3.4.0 due to each function, need parser = future
in puppet.conf
.
Usage
In your puppet file
node default {
include jetty
}
In your hieradata file
---
jetty::version: 9.1.3.v20140225
It will create /etc/default/jetty
with these default values:
JETTY_USER=jetty
JETTY_HOME=/opt/jetty
JETTY_HOST=127.0.0.1
JETTY_PORT=8080
JETTY_LOGS=/var/log/jetty
Parameters
jetty::version
: version of Jetty (required)jetty::group
: group running Jetty, defaultjetty
jetty::user
: user running Jetty, defaultjetty
jetty::home
: Jetty home directory, default/opt/jetty
jetty::log
: Jetty log directory, default/var/log/jetty
jetty::create_work_dir
: Ifwork
directory must be created, defaultfalse
jetty::remove_demo_base
: If the demo app must be removed, defaulttrue
Values of jetty::user
, jetty::home
and jetty::log
are automatically add to /etc/default/jetty
Override Jetty properties
All JETTY_* properties can be added in your hieradata file
---
# Merged with default values and added in /etc/default/jetty
jetty::jetty_properties:
JETTY_PORT: 9090
JETTY_HOST: 0.0.0.0
...
Add Java properties
All JAVA* properties can be added in your hieradata file
---
# Added in /etc/default/jetty
jetty::java_properties:
JAVA_HOME: /etc/alternatives/jre
JAVA: /etc/alternatives/jre/bin/java
JAVA_OPTIONS: "\"-server -XX:MaxPermSize=256m -Xms256m -Xmx2048m\""
...
Deploy war
In your hieradata file
---
jetty::deploy::source: /tmp/myapp.war
jetty::deploy::war: app.war
Or basic puppet usage
class {'jetty::deploy':
source => /tmp/myapp.war,
war => app.war,
}
Tests
Unit tests
$ ./fix_future_test.sh
will be remove after the next release of puppet-lint and rspec-puppet.
$ ./fix_future_test.sh
$ bundle install
$ rake test
Smoke tests
$ puppet apply tests/init.pp --noop
$ puppet apply tests/deploy.pp --noop
Authors
Gamaliel Sick
License
The MIT License (MIT)
Copyright (c) 2014 gsick
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Dependencies
- puppetlabs/stdlib (>= 4.1.0)
- puppetlabs/java (>= 1.0.1)
- pdxcat/singleton (>= 0.0.5)
The MIT License (MIT) Copyright (c) 2014 gsick Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.