Puppet Class: alerts::deploy::thanos

Defined in:
modules/alerts/manifests/deploy/thanos.pp

Overview

Parameters:

  • deploy_dir (Stdlib::Unixpath) (defaults to: '/srv/alerts-thanos')
  • git_dir (Stdlib::Unixpath) (defaults to: '/srv/alerts.git')


4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'modules/alerts/manifests/deploy/thanos.pp', line 4

class alerts::deploy::thanos(
  Stdlib::Unixpath $deploy_dir = '/srv/alerts-thanos',
  Stdlib::Unixpath $git_dir = '/srv/alerts.git',
) {
    require ::alerts

    alerts::deploy::instance { 'global':
        alerts_dir => $git_dir,
        deploy_dir => $deploy_dir,
        deploy_tag => 'global',
    }

    git::clone { 'operations/alerts':
        ensure    => latest,
        directory => $git_dir,
        branch    => 'master',
        notify    => Exec['start alerts-deploy for thanos'],
    }

    exec { 'start alerts-deploy for thanos':
        command     => '/bin/systemctl start alerts-deploy.target',
        refreshonly => true,
        notify      => Exec['reload thanos-rule for alerts'],
    }

    exec { 'reload thanos-rule for alerts':
        command     => '/bin/systemctl reload thanos-rule',
        refreshonly => true,
    }
}