Merge branch 'jenkins-build-70' into 'master'

Auto-merge for build 70

See merge request puppet/puppet_cd!66
This commit is contained in:
2025-10-27 12:42:57 +00:00
5 changed files with 92 additions and 5 deletions

View File

@@ -141,7 +141,18 @@
43
44
45
46</pre>
46
47
48
49
50
51
52
53
54
55
56
57</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 6</span>
@@ -185,6 +196,17 @@ class puppet_cd::main::files (
content =&gt; template($pt_puppetdb_conf_erb),
# notify =&gt; Service[$pt_agent_service,$pt_server_service],
}
# fix service file syslog vs journald
file { $pt_puppetdb_service_file:
ensure =&gt; file,
path =&gt; $pt_puppetdb_service_file,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0644&#39;,
content =&gt; template($pt_puppetdb_service_erb),
notify =&gt; Service[$pt_db_service],
}
}
}</pre>
</td>

View File

@@ -180,7 +180,7 @@
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;present&#39;</tt>)</em>
<em class="default">(defaults to: <tt>&#39;latest&#39;</tt>)</em>
&mdash;
@@ -1694,7 +1694,9 @@
247
248
249
250</pre>
250
251
252</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 89</span>
@@ -1706,7 +1708,7 @@ class puppet_cd::params (
String $pt_db_fqdn = &#39;puppetdb.example.net&#39;,
# installation
String $pt_pkg_ensure = &#39;present&#39;,
String $pt_pkg_ensure = &#39;latest&#39;,
String $pt_agent_pkg = &#39;puppet-agent&#39;,
String $pt_server_pkg = &#39;puppetserver&#39;,
Array $pt_db_pkg = [&#39;puppetdb&#39;,&#39;puppetdb-termini&#39;],
@@ -1844,6 +1846,8 @@ class puppet_cd::params (
$pt_puppetdb_conf_erb = &#39;puppet_cd/puppetdb/puppetdb.conf.erb&#39;
$pt_puppetdb_repl_ini = &quot;${pt_puppetdb_conf_d}/repl.ini&quot;
$pt_puppetdb_repl_erb = &#39;puppet_cd/puppetdb/repl.ini.erb&#39;
$pt_puppetdb_service_file = &#39;/usr/lib/systemd/system/puppetdb.service&#39;
$pt_puppetdb_service_erb = &#39;puppet_cd/puppetdb/puppetdb_service.erb&#39;
## r10k
$pt_r10k_file = &quot;${pt_r10k_dir}/r10k.yaml&quot;
$pt_r10k_erb = &#39;puppet_cd/r10k/r10k.yaml.erb&#39;

View File

@@ -42,5 +42,16 @@ class puppet_cd::main::files (
content => template($pt_puppetdb_conf_erb),
# notify => Service[$pt_agent_service,$pt_server_service],
}
# fix service file syslog vs journald
file { $pt_puppetdb_service_file:
ensure => file,
path => $pt_puppetdb_service_file,
owner => 'root',
group => 'root',
mode => '0644',
content => template($pt_puppetdb_service_erb),
notify => Service[$pt_db_service],
}
}
}

View File

@@ -93,7 +93,7 @@ class puppet_cd::params (
String $pt_db_fqdn = 'puppetdb.example.net',
# installation
String $pt_pkg_ensure = 'present',
String $pt_pkg_ensure = 'latest',
String $pt_agent_pkg = 'puppet-agent',
String $pt_server_pkg = 'puppetserver',
Array $pt_db_pkg = ['puppetdb','puppetdb-termini'],
@@ -231,6 +231,8 @@ class puppet_cd::params (
$pt_puppetdb_conf_erb = 'puppet_cd/puppetdb/puppetdb.conf.erb'
$pt_puppetdb_repl_ini = "${pt_puppetdb_conf_d}/repl.ini"
$pt_puppetdb_repl_erb = 'puppet_cd/puppetdb/repl.ini.erb'
$pt_puppetdb_service_file = '/usr/lib/systemd/system/puppetdb.service'
$pt_puppetdb_service_erb = 'puppet_cd/puppetdb/puppetdb_service.erb'
## r10k
$pt_r10k_file = "${pt_r10k_dir}/r10k.yaml"
$pt_r10k_erb = 'puppet_cd/r10k/r10k.yaml.erb'

View File

@@ -0,0 +1,48 @@
#
# Local settings can be configured without being overwritten by package upgrades, for example
# if you want to increase puppetdb open-files-limit to 10000,
# you need to increase systemd's LimitNOFILE setting, so create a file named
# "/etc/systemd/system/puppetdb.service.d/limits.conf" containing:
# [Service]
# LimitNOFILE=10000
# You can confirm it worked by running systemctl daemon-reload
# then running systemctl show puppetdb | grep LimitNOFILE
#
[Unit]
Description=puppetdb Service
After=syslog.target network.target nss-lookup.target
[Service]
Type=forking
EnvironmentFile=/etc/sysconfig/puppetdb
User=puppetdb
TimeoutStartSec=14400
TimeoutStopSec=60
Restart=on-failure
StartLimitBurst=5
PIDFile=/run/puppetlabs/puppetdb/puppetdb.pid
# https://tickets.puppetlabs.com/browse/EZ-129
# Prior to systemd v228, TasksMax was unset by default, and unlimited. Starting in 228 a default of '512'
# was implemented. This is low enough to cause problems for certain applications. In systemd 231, the
# default was changed to be 15% of the default kernel limit. This explicitly sets TasksMax to 4915,
# which should match the default in systemd 231 and later.
# See https://github.com/systemd/systemd/issues/3211#issuecomment-233676333
TasksMax=4915
#set default privileges to -rw-r-----
UMask=027
ExecReload=/opt/puppetlabs/server/apps/puppetdb/bin/puppetdb reload
ExecStart=/opt/puppetlabs/server/apps/puppetdb/bin/puppetdb start
ExecStop=/opt/puppetlabs/server/apps/puppetdb/bin/puppetdb stop
KillMode=process
SuccessExitStatus=143
StandardOutput=journald
[Install]
WantedBy=multi-user.target