Merge branch 'jenkins-build-26' into 'master'
Auto-merge for build 26 See merge request puppet/prometheus_cd!25
This commit is contained in:
@@ -25,7 +25,6 @@ INSTALLATION
|
|||||||
CONFIGURATION
|
CONFIGURATION
|
||||||
|
|
||||||
* manage directories and files including templates
|
* manage directories and files including templates
|
||||||
* manages the main alloy jenkins for loki and prometheus
|
|
||||||
* manage service
|
* manage service
|
||||||
|
|
||||||
## Repo Documentation
|
## Repo Documentation
|
||||||
|
|||||||
@@ -87,8 +87,6 @@
|
|||||||
<ul><li>
|
<ul><li>
|
||||||
<p>manage directories and files including templates</p>
|
<p>manage directories and files including templates</p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p>manages the main alloy jenkins for loki and prometheus</p>
|
|
||||||
</li><li>
|
|
||||||
<p>manage service</p>
|
<p>manage service</p>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
|
|||||||
@@ -87,8 +87,6 @@
|
|||||||
<ul><li>
|
<ul><li>
|
||||||
<p>manage directories and files including templates</p>
|
<p>manage directories and files including templates</p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p>manages the main alloy jenkins for loki and prometheus</p>
|
|
||||||
</li><li>
|
|
||||||
<p>manage service</p>
|
<p>manage service</p>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
|
|||||||
@@ -117,7 +117,18 @@
|
|||||||
19
|
19
|
||||||
20
|
20
|
||||||
21
|
21
|
||||||
22</pre>
|
22
|
||||||
|
23
|
||||||
|
24
|
||||||
|
25
|
||||||
|
26
|
||||||
|
27
|
||||||
|
28
|
||||||
|
29
|
||||||
|
30
|
||||||
|
31
|
||||||
|
32
|
||||||
|
33</pre>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 6</span>
|
||||||
@@ -126,7 +137,7 @@ class prometheus_cd::main::dirs (
|
|||||||
) inherits prometheus_cd::params {
|
) inherits prometheus_cd::params {
|
||||||
require prometheus_cd::main::install
|
require prometheus_cd::main::install
|
||||||
if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) {
|
if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) {
|
||||||
# prometheus directors
|
# prometheus directory
|
||||||
file { $ps_main_dir:
|
file { $ps_main_dir:
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
@@ -137,6 +148,17 @@ class prometheus_cd::main::dirs (
|
|||||||
seltype => etc_t,
|
seltype => etc_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
}
|
}
|
||||||
|
# service systemfile directory
|
||||||
|
file { $ps_system_file_dir:
|
||||||
|
ensure => directory,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0755',
|
||||||
|
selrange => s0,
|
||||||
|
selrole => object_r,
|
||||||
|
seltype => systemd_unit_file_t,
|
||||||
|
seluser => unconfined_u,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -118,15 +118,27 @@
|
|||||||
20
|
20
|
||||||
21
|
21
|
||||||
22
|
22
|
||||||
23</pre>
|
23
|
||||||
|
24
|
||||||
|
25
|
||||||
|
26
|
||||||
|
27
|
||||||
|
28
|
||||||
|
29
|
||||||
|
30
|
||||||
|
31
|
||||||
|
32
|
||||||
|
33
|
||||||
|
34
|
||||||
|
35</pre>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 6</span>
|
||||||
|
|
||||||
class prometheus_cd::main::files (
|
class prometheus_cd::main::files (
|
||||||
) inherits prometheus_cd::params {
|
) inherits prometheus_cd::params {
|
||||||
require prometheus_cd::main::dirs
|
|
||||||
if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) {
|
if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) {
|
||||||
|
require prometheus_cd::main::dirs
|
||||||
file { $ps_main_file:
|
file { $ps_main_file:
|
||||||
ensure => file,
|
ensure => file,
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
@@ -139,6 +151,18 @@ class prometheus_cd::main::files (
|
|||||||
content => template('prometheus_cd/prometheus.yml.erb'),
|
content => template('prometheus_cd/prometheus.yml.erb'),
|
||||||
notify => Service[$ps_prom_service],
|
notify => Service[$ps_prom_service],
|
||||||
}
|
}
|
||||||
|
file { $ps_system_service_file:
|
||||||
|
ensure => file,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0644',
|
||||||
|
selrange => s0,
|
||||||
|
selrole => object_r,
|
||||||
|
seltype => systemd_unit_file_t,
|
||||||
|
seluser => unconfined_u,
|
||||||
|
content => template('prometheus_cd/override.conf.erb'),
|
||||||
|
notify => Service[$ps_prom_service],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -359,7 +359,9 @@
|
|||||||
54
|
54
|
||||||
55
|
55
|
||||||
56
|
56
|
||||||
57</pre>
|
57
|
||||||
|
58
|
||||||
|
59</pre>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 17</span>
|
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 17</span>
|
||||||
@@ -394,9 +396,11 @@ class prometheus_cd::params (
|
|||||||
|
|
||||||
# dirs
|
# dirs
|
||||||
$ps_main_dir = '/etc/prometheus'
|
$ps_main_dir = '/etc/prometheus'
|
||||||
|
$ps_system_file_dir = '/etc/systemd/system/prometheus.service.d'
|
||||||
|
|
||||||
# files
|
# files
|
||||||
$ps_main_file = "${ps_main_dir}/prometheus.yml"
|
$ps_main_file = "${ps_main_dir}/prometheus.yml"
|
||||||
|
$ps_system_service_file = "${ps_system_file_dir}/override.conf"
|
||||||
|
|
||||||
# services
|
# services
|
||||||
$ps_prom_service = 'prometheus'
|
$ps_prom_service = 'prometheus'
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class prometheus_cd::main::dirs (
|
|||||||
) inherits prometheus_cd::params {
|
) inherits prometheus_cd::params {
|
||||||
require prometheus_cd::main::install
|
require prometheus_cd::main::install
|
||||||
if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) {
|
if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) {
|
||||||
# prometheus directors
|
# prometheus directory
|
||||||
file { $ps_main_dir:
|
file { $ps_main_dir:
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
@@ -18,5 +18,16 @@ class prometheus_cd::main::dirs (
|
|||||||
seltype => etc_t,
|
seltype => etc_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
}
|
}
|
||||||
|
# service systemfile directory
|
||||||
|
file { $ps_system_file_dir:
|
||||||
|
ensure => directory,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0755',
|
||||||
|
selrange => s0,
|
||||||
|
selrole => object_r,
|
||||||
|
seltype => systemd_unit_file_t,
|
||||||
|
seluser => unconfined_u,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
class prometheus_cd::main::files (
|
class prometheus_cd::main::files (
|
||||||
) inherits prometheus_cd::params {
|
) inherits prometheus_cd::params {
|
||||||
require prometheus_cd::main::dirs
|
|
||||||
if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) {
|
if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) {
|
||||||
|
require prometheus_cd::main::dirs
|
||||||
file { $ps_main_file:
|
file { $ps_main_file:
|
||||||
ensure => file,
|
ensure => file,
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
@@ -19,5 +19,17 @@ class prometheus_cd::main::files (
|
|||||||
content => template('prometheus_cd/prometheus.yml.erb'),
|
content => template('prometheus_cd/prometheus.yml.erb'),
|
||||||
notify => Service[$ps_prom_service],
|
notify => Service[$ps_prom_service],
|
||||||
}
|
}
|
||||||
|
file { $ps_system_service_file:
|
||||||
|
ensure => file,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0644',
|
||||||
|
selrange => s0,
|
||||||
|
selrole => object_r,
|
||||||
|
seltype => systemd_unit_file_t,
|
||||||
|
seluser => unconfined_u,
|
||||||
|
content => template('prometheus_cd/override.conf.erb'),
|
||||||
|
notify => Service[$ps_prom_service],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,9 +44,11 @@ class prometheus_cd::params (
|
|||||||
|
|
||||||
# dirs
|
# dirs
|
||||||
$ps_main_dir = '/etc/prometheus'
|
$ps_main_dir = '/etc/prometheus'
|
||||||
|
$ps_system_file_dir = '/etc/systemd/system/prometheus.service.d'
|
||||||
|
|
||||||
# files
|
# files
|
||||||
$ps_main_file = "${ps_main_dir}/prometheus.yml"
|
$ps_main_file = "${ps_main_dir}/prometheus.yml"
|
||||||
|
$ps_system_service_file = "${ps_system_file_dir}/override.conf"
|
||||||
|
|
||||||
# services
|
# services
|
||||||
$ps_prom_service = 'prometheus'
|
$ps_prom_service = 'prometheus'
|
||||||
|
|||||||
10
templates/override.conf.erb.erb
Normal file
10
templates/override.conf.erb.erb
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
##############################################################################
|
||||||
|
##### File created by Puppet - manual changes will be overwritten #####
|
||||||
|
###############################################################################
|
||||||
|
[Service]
|
||||||
|
ExecStart=
|
||||||
|
ExecStart=/usr/bin/prometheus \
|
||||||
|
--config.file=/etc/prometheus/prometheus.yml \
|
||||||
|
--storage.tsdb.path=/var/lib/prometheus \
|
||||||
|
--web.enable-remote-write-receiver \
|
||||||
|
--web.enable-lifecycle
|
||||||
Reference in New Issue
Block a user