Forge Home

thanos

This module install Thanos and can manage it's components

11,063 downloads

972 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

  • 1.6.0 (latest)
  • 1.5.1
  • 1.5.0
  • 1.4.0
  • 1.3.0
  • 1.2.0
  • 1.1.0
  • 1.0.2
  • 1.0.1
  • 1.0.0
  • 0.4.2
  • 0.4.1
  • 0.4.0
  • 0.3.0
  • 0.2.1
  • 0.2.0
  • 0.1.4
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0 (deleted)
released Mar 31st 2024
This version is compatible with:
  • Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x
  • Puppet >= 6.1.0 < 8.0.0
  • , , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'maeq-thanos', '1.6.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add maeq-thanos
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install maeq-thanos --version 1.6.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

maeq/thanos — version 1.6.0 Mar 31st 2024

maeq-thanos

Build Status Travis Build Status AppVeyor Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores Apache-2 License

Table of Contents

Description

This module automates the install of Thanos and it's components into a service.
Maximum tested version of Thanos : 0.26.0

Usage

For more information see REFERENCE.md.

Install Thanos

Puppet

class { 'thanos':
  version => '0.26.0'
}

Hiera Data

include thanos
thanos::version: '0.26.0'

Thanos Sidecar

thanos::manage_sidecar: true

Thanos Query

thanos::manage_query: true
thanos::query::endpoints:
  - 'sidecar:10901'
  - 'store:10901'

Thanos Query Frontend

thanos::manage_query_frontend: true

Thanos Rule

thanos::manage_rule: true
thanos::rule::queries:
  - 'query:10901'

Thanos Store

thanos::manage_store: true

Thanos Compact

thanos::manage_compact: true

Thanos Receive

thanos::manage_receive: true

Thanos Tools Bucket Web

thanos::manage_tools_bucket_web: true

Manage Storage config

For more configuration information see Thanos Storage configuration page.

Puppet

thanos::storage { '/etc/thanos/storage.yaml':
  ensure => 'present',
  type   => 'FILESYSTEM',
  config => {
    directory => '/data'
  }
}

Yaml

include thanos
thanos::manage_storage_config: true
thanos::storage_config_file: '/etc/thanos/storage.yaml'
thanos::storage_config:
  ensure: 'present'
  type: 'FILESYSTEM'
  config:
    directory: '/data'

Manage Tracing config

For more configuration information see Thanos Tracing configuration page.

Puppet

thanos::tracing { '/etc/thanos/tracing.yaml':
  ensure => 'present',
  type   => 'JAEGER',
  config => {
    service_name              => '',
    disabled                  => false,
    rpc_metrics               => false,
    tags                      => '',
    sampler_type              => '',
    sampler_param             => 0,
    sampler_manager_host_port => '',
    sampler_max_operations    => 0,
    sampler_refresh_interval  => '0s',
    reporter_max_queue_size   => 0,
    reporter_flush_interval   => '0s',
    reporter_log_spans        => false,
    endpoint                  => '',
    user                      => '',
    password                  => '',
    agent_host                => '',
    agent_port                => 0,
  }
}

Yaml

include thanos
thanos::manage_tracing_config: true
thanos::tracing_config_file: '/etc/thanos/tracing.yaml'
thanos::tracing_config:
  ensure: 'present'
  type: 'JAEGER'
  config:
    service_name: ''
    disabled: false
    rpc_metrics: false
    tags: ''
    sampler_type: ''
    sampler_param: 0
    sampler_manager_host_port: ''
    sampler_max_operations: 0
    sampler_refresh_interval: '0s'
    reporter_max_queue_size: 0
    reporter_flush_interval: '0s'
    reporter_log_spans: false
    endpoint: ''
    user: ''
    password: ''
    agent_host: ''
    agent_port: 0

Examples

Install from other source

thanos::base_url: 'http://my_private_dropbox/thanos'

Or

thanos::download_url: 'http://my_private_dropbox/thanos/thanos-0.10.1.tar.gz'

Install all in one

It's not a very good idea to deploy like this in Production. But it's possible to test it on the same machine.

thanos::manage_sidecar: true
thanos::manage_query: true
thanos::manage_rule: true
thanos::manage_store: true
thanos::manage_compact: true

thanos::sidecar::http_address: '0.0.0.0:10902'
thanos::sidecar::grpc_address: '0.0.0.0:10901'
thanos::sidecar::objstore_config_file: '/etc/thanos/storage.yaml'
thanos::query::http_address: '0.0.0.0:10904'
thanos::query::grpc_address: '0.0.0.0:10903'
thanos::query::endpoints:
  - 'localhost:10901'
  - 'localhost:10907'
thanos::rule::http_address: '0.0.0.0:10906'
thanos::rule::grpc_address: '0.0.0.0:10905'
thanos::rule::queries:
  - 'localhost:10903'
thanos::store::http_address: '0.0.0.0:10908'
thanos::store::grpc_address: '0.0.0.0:10907'
thanos::compact::http_address: '0.0.0.0:10910'
thanos::compact::grpc_address: '0.0.0.0:10909'

thanos::manage_storage_config: true
thanos::storage_config_file: '/etc/thanos/storage.yaml'
thanos::storage_config:
  ensure: 'present'
  type: 'FILESYSTEM'
  config:
    directory: '/data'

Sidecar with Prometheus

I recommend to use the module puppet-prometheus, it is very easy to use.

include prometheus
include thanos
prometheus::manage_prometheus_server: true
prometheus::config_dir: '/etc/prometheus'
prometheus::configname: 'prometheus.yaml'
prometheus::localstorage: '/data/prometheus'
prometheus::extra_options: '--web.enable-lifecycle --storage.tsdb.min-block-duration=2h --storage.tsdb.max-block-duration=2h'

thanos::manage_sidecar: true
thanos::tsdb_path: '/data/prometheus'
thanos::reloader_config_file: '/etc/prometheus/prometheus.yaml'

Limitations

Only support, Thanos supported OS. See Thanos releases page

Development

See Contributing.

This project contains tests for rspec-puppet.

Quickstart to run all linter and unit tests:

bundle install
bundle exec rake validate

Or

pdk validate
pdk test unit