Forge Home

unicorn_systemd

Manage systemd unit files of unicorn.

14,783 downloads

6,320 latest version

5.0 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

  • 2.2.0 (latest)
  • 2.1.0
  • 2.0.1
  • 2.0.0
  • 1.1.4
  • 1.1.3 (deleted)
  • 1.1.2
  • 1.1.1
  • 1.1.0
  • 1.0.1
  • 1.0.0
released Mar 19th 2019
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 6.0.0
  • , , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'hfm-unicorn_systemd', '2.2.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add hfm-unicorn_systemd
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install hfm-unicorn_systemd --version 2.2.0

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

hfm/unicorn_systemd — version 2.2.0 Mar 19th 2019

puppet-unicorn_systemd

Build Status Puppet Forge

Table of Contents

  1. Description
  2. Usage - Configuration options and additional functionality
  1. Reference - An under-the-hood peek at what the module is doing and how
  1. Limitations - OS compatibility, etc.
  2. Development - Guide for contributing to the module

Description

This module handles configuring and running unicorn service for systemd.

Usage

Configuring unicorn_systemd

class { 'unicorn_systemd':
  user              => 'app',
  group             => 'app',
  working_directory => '/srv',
  pidfile           => '/var/run/unicorn.pid',
  exec_start        => '/usr/local/bin/unicorn -E $RAILS_ENV /srv/sample.ru',
  environment       => {
    'RAILS_ENV=production',
    'UNICORN_RB=config/unicorn.rb',
  }
}

Configuring modules from Hiera

---
unicorn_systemd::user: app
unicorn_systemd::group: app
unicorn_systemd::working_directory: /srv
unicorn_systemd::pidfile: /var/run/unicorn.pid
unicorn_systemd::exec_start: /usr/local/bin/unicorn -E $RAILS_ENV -c $UNICORN_RB /srv/sample.ru
unicorn_systemd::environment:
  RAILS_ENV: production
  UNICORN_RB: config/unicorn.rb

Reference

Classes

Public Classes

Parameters

unicorn_systemd

  • user: The user to execute the processes as. String type.
  • group: The group to execute the processes as. String type.
  • working_directory: The working directory for executed processes. String type.
  • pidfile: The pidfile for unicorn master process. String type.
  • exec_start: The commands with their arguments that are executed for this service. String type.
  • environment: The environment variables for executed processes. Hashes type.
  • ensure: Whether the unit files should exist. Valid options: present, absent, file. Default to present.
  • service_ensure: Whether the service should be enabled. String type. Defaults to running.
  • service_enable: Whether the service should be enabled. Boolean type. Defaults to true.

Limitations

This module has been tested on:

  • RedHat Enterprise Linux 7
  • CentOS 7
  • Scientific Linux 7
  • Debian 8
  • Ubuntu 16.04

Development

Running tests

The STNS puppet module contains tests for beaker-rspec (acceptance tests) to verify functionality. For detailed information on using these tools, please see their respective documentation.

Testing quickstart

  • Acceptance tests:
# Set your DOCKER_HOST variable
$ eval "$(docker-machine env default)"

# Run beaker acceptance tests
$ BEAKER_set=centos7 bundle exec rake beaker