Forge Home

jetty

Jetty installation and configuration module

11,880 downloads

10,459 latest version

3.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.0.8 (latest)
  • 0.0.7
  • 0.0.6
  • 0.0.5
  • 0.0.4
  • 0.0.3
  • 0.0.2
released Apr 1st 2014

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'gsick-jetty', '0.0.8'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add gsick-jetty
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install gsick-jetty --version 0.0.8

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

gsick/jetty — version 0.0.8 Apr 1st 2014

Build Status Coverage Status (83% with rspec-puppet)

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, default jetty
  • jetty::user: user running Jetty, default jetty
  • jetty::home: Jetty home directory, default /opt/jetty
  • jetty::log: Jetty log directory, default /var/log/jetty
  • jetty::create_work_dir: If work directory must be created, default false
  • jetty::remove_demo_base: If the demo app must be removed, default true

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.