Forge Home

grafana

Grafana instance configuration using Docker.

11,363 downloads

6,584 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.

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

  • 0.6.1 (latest)
  • 0.6.0
  • 0.5.2
  • 0.5.1
  • 0.5.0
  • 0.4.3
  • 0.4.2
  • 0.4.1
  • 0.4.0
  • 0.3.3
  • 0.3.2
released Aug 25th 2016
This version is compatible with:
  • Puppet Enterprise >= 3.7.0
  • Puppet >= 3.4.0
  • , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'ajsmith-grafana', '0.6.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add ajsmith-grafana
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install ajsmith-grafana --version 0.6.1

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

ajsmith/grafana — version 0.6.1 Aug 25th 2016

puppet-grafana

Table of Contents

  1. Overview
  2. Usage
  3. Compatibility
  4. Release Notes

Overview

This module deploys Grafana as a Docker container on Red Hat systems. The Grafana container is managed as a systemd service.

Usage

Running the Container

The simplest configuration to run the Grafana container is:

grafana::docker::container { 'grafana':
    publish => ['3000:3000/tcp'],
}

The above example configures a systemd service which runs the Grafana container. It is started immediately and enabled to be started on system boot.

The following options are supported on grafana::docker::container:

  • image: The name of the Docker image to use.

  • depends: Dependencies on other systemd docker units which need to be started before this one. (List)

  • pull_image: Always pull image before starting the container. (Default false)

  • env: Set environment variables in the container. (List)

  • env_file: Use environment file in the container. (List)

  • link: Containers which this container links to. (List)

  • log_driver: Set log driver to use.

  • log_opt: Set options for the log driver. (List)

  • publish: Ports which should be published by this container. (List)

  • volume: Volumes to be used by this container. (List)

  • volumes_from: Containers which this container mounts volumes from. (List)

  • systemd_env_file: Path to a systemd environment file to use.

Configuring the Container

The Grafana container can be configured by mounting configuration files from the host filesystem, as so:

grafana::docker::container { 'grafana':
    publish => ['3000:3000/tcp'],
    volume  => ['/var/local/grafana/grafana.ini:/etc/grafana/grafana.ini:ro'],
}

Note you will need to create the configuration file /var/local/grafana/grafana.ini for the above example to work. How you do that is up to you.

Persistent storage using a Data Volume Container

You may also want to manage persistent data using the data volume container pattern. To implement that, we do the following:

grafana::docker::data_volume_container { 'grafana-data': }
->
grafana::docker::container { 'grafana':
  volumes_from => ['grafana-data'],
}

This first creates a service for the data volume container named "grafana-data", then creates a service named "grafana" which mounts volumes from that container.

The following options are supported on grafana::docker::data_volume_container:

  • image: The name of the Docker image to use.

  • pull_image: Always pull image before starting the container. (Default false)

  • systemd_env_file: Path to a systemd environment file to use.

Compatibility

This module is compatible with Red Hat Linux systems which are capable of running Docker:

  • RHEL 7+
  • CentOS 7+
  • Fedora 20+

Release Notes

v0.6.1 2016/08/25

  • Re-release to fix a build issue in the last release.

v0.6.0 2016/08/17

  • Upgrade to ajsmith/docker_systemd v0.4.x.
  • Provide support for more Docker options:
    • --env
    • --env-file
    • --log-driver
    • --log-opt

v0.5.2 2016/08/04

  • Documentation updates.

v0.5.1 2016/08/04

  • Update default Grafana Docker image.

v0.5.0 2016/08/03

  • Ugrade to ajsmith/docker_systemd v0.3.x.
  • Add pull_image and systemd_env_file options to Docker container resources.
  • Removed resources for building Grafana Docker images.

v0.4.3 2016/08/01

  • Support volume configuration for the Grafana Docker container.

v0.4.1 2016/02/11

  • Fix Grafana image version.

v0.4.0 2016/02/10

  • Use updated Grafana v2.6.0 image.
  • Allow customizations to the Grafana Docker image build process.
  • Add option to set the VCS revision of the Grafana Docker image.
  • Improve rspec test coverage.

v0.3.3 2016/01/11

  • Style fixes.

v0.3.2 2016/01/11

  • Initial release.