flapjack

contributions requested
Puppet Module for Flapjack

5,917 downloads

5,917 latest version

4.6 quality score

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 1.0.0 (latest)
released Feb 26th 2016
This version is compatible with:
  • Ubuntu

Start using this module

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

Add this module to your Puppetfile:

mod 'Lavaburn-flapjack', '1.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add Lavaburn-flapjack
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install Lavaburn-flapjack --version 1.0.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

Lavaburn/flapjack — version 1.0.0 Feb 26th 2016

Puppet Module for Flapjack

===================================

Build Status Coverage Status Puppet Forge

Overview

This module installs and configures Flapjack. It also contains several defined types for configuring through the REST API.

Dependencies

  • puppetlabs/stdlib
  • reidmv/yamlfile

Optional:

  • yo61/logrotate

Installation

  1. Default settings
class { 'flapjack': }
  1. With logrotate enabled (requires logrotate to be installed first!)
class { 'flapjack':
  setup_logrotate => true,
}
  1. Custom package (self-built)
class { 'flapjack':
  package_source => '/tmp/mypackage.deb'
}

Configuration

  1. Production environment in /etc/flapjack/flapjack_config.yaml
flapjack::config::base { 'production': }
  1. Development environment in /etc/flapjack/flapjack_config1.yaml
flapjack::config::base { 'dev':
  config_file     => 'flapjack_config1.yaml',
  environment     => 'dev',
}
  1. Change the log level
flapjack::config::base { 'production': 
  log_level => DEBUG,
}

The above parameters need to be applied to every section below.

Redis Config

flapjack::config::redis { 'production':
  host     => '127.0.0.1',
  port     => 6379,			# Default = 6380 (embedded redis)
  password => 'stronghash'	# Default = false (NOAUTH)
}

Enable the processor

flapjack::config::processor { 'production':
  new_check_scheduled_maintenance_duration => '1 day', # Highly recommended to change
}

Enable the notifier

flapjack::config::notifier { 'production': }

Enable Nagios processing

flapjack::config::nagios { 'production': }

Enable the WEB 'gateway'

flapjack::config::gateway::web { 'production':
  port    => 3080,						# Default
  api_url => "http://myhostname:3081/",	# Should be reachable from browser !!
}

Enable the JSON API 'gateway'

flapjack::config::gateway::jsonapi { 'production':
  port 	   => 3081,							# Default
  base_url => "http://myhostname:3081/",	# Should be valid
}

Enable the E-mail Gateway

flapjack::config::gateway::email { 'production':
  smtp_from   => 'test@example.com',
  smtp_host   => 'smtp.mydomain.com',
  smtp_domain => 'mydomain.com',
}

Other gateways include:

  • SMS (Messagenet)
  • SMS_Twilio
  • Pagerduty
  • (Amazon) SNS
  • Jabber
  • OOBETET

Supported Environments

  • Ruby 1.9.3 - TODO

  • Ruby 2.1.8 - TODO

  • Ruby 2.2.4 - TODO

  • Puppet 3.7.5 - TODO

  • Puppet 3.8.5 - TODO

  • Puppet 4.2.3 - TODO

  • Puppet 4.3.1 - TODO

Acceptance tested on:

  • Ubuntu 14.04

Testing

Set up for testing

gem install bundler
bundle install

To choose a different Puppet version, use PUPPET_VERSION environmental variable

PUPPET_VERSION="4.2.3" bundle install

Syntax and Spec Testing

bundle exec rake test

Acceptance testing with Beaker

bundle exec rake beaker

You can use the environmental variables BEAKER_debug, BEAKER_destroy and BEAKER_provision