GithubHelp home page GithubHelp logo

scott-armiger / pupmod-simp-simp_grafana Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simp/pupmod-simp-simp_grafana

0.0 0.0 0.0 187 KB

SIMP Grafana Component Module

License: Other

Ruby 73.18% Puppet 26.82%

pupmod-simp-simp_grafana's Introduction

License Build Status SIMP compatibility

Table of Contents

  1. Module Description - What the module does and why it is useful
  2. Setup - The basics of getting started with simp_grafana
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module

Module Description

Grafana is a web-based metric and analytics display tool, frequently used for log analysis. This module acts as a SIMP wrapper (or "profile") for the Puppet, Inc. Approved Grafana module written and maintained by Bill Fraser. It sets a baseline of secure defaults and integrates Grafana with other SIMP components.

This is a SIMP module

This module is a component of the System Integrity Management Platform, a compliance-management framework built on Puppet.

If you find any issues, they can be submitted to our JIRA.

Please read our Contribution Guide and visit our developer wiki.

This module is optimally designed for use within a larger SIMP ecosystem, but it can be used independently:

  • As a SIMP wrapper module, the defaults use the larger SIMP ecosystem to manage security compliance settings from the Puppet server.
  • If used independently, all SIMP-managed security subsystems may be disabled via the enable_firewall and enable_pki settings.

Note

If SIMP integration is not required, use of this module is discouraged; direct use of the component Grafana module is advised.

Setup

What simp_grafana affects

  • The Grafana package
  • IPTables rules
  • Linux Capabilities for the Grafana server daemon
  • PKI certificates in Grafana's /etc/grafana directory

Setup Requirements

Because this is a SIMP profile module, it assumes basic SIMP components are already deployed. Namely, it requires the IPTables and PKI modules. Setup of those modules is beyond the scope of this document. Please see the component documentation for more details.

Beginning with simp_grafana

Assuming SIMP is deployed, and an Internet connection is available to download the package files to the intended Grafana server, use of this module should be as simple as include '::simp_grafana'.

Usage

Aside from the few "passthrough" parameters, any parameter in the component ::grafana class may be overloaded via Hiera. For example, the install method may be changed like this:

---
grafana::install_method: 'package'

LDAP configuration

LDAP authentication is disabled by default, but defaults are pre-seeded for the SIMP OpenLDAP server using the SIMP-standard Hiera keys. To use them, simply enable use_ldap.

# Manifest

include '::simp_grafana'
# Hiera data
---
use_ldap: true

This will also set up default group mappings for groups with the CNs "simp_grafana_admins," "simp_grafana_editors," "simp_grafana_editors_ro," and "simp_grafana_viewers."

Note

At present the module does not support config merging of servers in the ldap_cfg parameter, so if any changes are made to the default server, the entire server must be configured.

Note

Due to the way Puppet 3.x handles data types, Integers in the ldap_cfg hash MUST be specified with arithmetic expression or else they will be converted to Strings when passed to the Ruby code that generates the LDAP configuration file. For example, to specify the port 8636, use the value "8635 + 1" without quotes.

Network-isolated Setup

If an Internet connection is not available, or if review of the package files is desired, the package_source parameter to the component Grafana module may be set. It takes a String that is valid for the target package provider. For example, Yum can take URLs like http://example.com/path/to/rpm or file:///path/to/rpm. If a local HTTP server is unavailable, the file may be installed via Puppet to a temporary directory. Here is an example:

# Manifest

include '::simp_grafana'

file { '/tmp/grafana_package.rpm':
  ensure => file,
  source => 'puppet:///modules/files/rpms/grafana_package.rpm',
  before => Class['simp_grafana'],
}
# Hiera data
---
grafana::package_source: 'file:///tmp/grafana_package.rpm'

Reference

Please see the header content in manifests/init.pp for the most up-to-date documentation. (We'll populate this section once we can automate it.)

Limitations

This module has only been tested on CentOS 7 and Red Hat Enterprise Linux 7.

Development

Please see the SIMP Contribution Guidelines.

Acceptance tests

To run the system tests, you need Vagrant installed. Then, run:

bundle exec rake beaker:suites

Some environment variables may be useful:

BEAKER_debug=true
BEAKER_provision=no
BEAKER_destroy=no
BEAKER_use_fixtures_dir_for_modules=yes
BEAKER_fips=yes
BEAKER_spec_prep=no
  • BEAKER_debug: show the commands being run on the STU and their output.
  • BEAKER_destroy=no: prevent the machine destruction after the tests finish so you can inspect the state.
  • BEAKER_provision=no: prevent the machine from being recreated. This can save a lot of time while you're writing the tests.
  • BEAKER_use_fixtures_dir_for_modules=yes: cause all module dependencies to be loaded from the spec/fixtures/modules directory, based on the contents of .fixtures.yml. The contents of this directory are usually populated by bundle exec rake spec_prep. This can be used to run acceptance tests to run on isolated networks.
  • BEAKER_fips=yes: enable FIPS-mode on the virtual instances. This can take a very long time, because it must enable FIPS in the kernel command-line, rebuild the initramfs, then reboot.
  • BEAKER_spec_prep=no: don't populate spec/fixtures/modules/ prior to executing the test suite. This can save time on subsequent runs when using BEAKER_destroy=no BEAKER_provision=no, however changes to the fixture modules will not take effect.

pupmod-simp-simp_grafana's People

Contributors

lamawithonel avatar trevor-vaughan avatar lnemsick-simp avatar op-ct avatar jeannegreulich avatar ralph-wright avatar brandonrdn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.