binford2k
05/25/2023, 6:52 PM<module>/data
.csharpsteen
05/25/2023, 6:53 PMpuppet_enterpise
module defines its datadir to be /etc/puppetlabs/enterprise/conf.d/
so that re-configuration after restore of a backup, or during a classifier outage will mostly Do The Right Thing™ instead of shifting the entire PE install to out-of-box-defaults which is, if nothing else, a great way to slam a performance issue on top of whatever problem you were trying to solve :lolsob:bastelfreak
05/25/2023, 6:56 PMcsharpsteen
05/25/2023, 6:57 PMvchepkov
05/25/2023, 6:59 PMbinford2k
05/25/2023, 7:00 PMcsharpsteen
05/25/2023, 7:04 PMcommon.yaml
, but I think that has become less useful recently as puppet infra configure
sandboxes its environmentpath
to /opt/puppetlabs/server/data/environments/
and uses the enterprise
environment --- as a firebreak between sensitive operations like upgrade and the infinite combinations of user module behavior that acceptance tests can't guard against.
In general, the usefulness of user Hiera is debatable since the directories don't exist before installation and are some form of circular dependency after.vchepkov
05/25/2023, 7:13 PMpuppet_enterprise::profile::plan_executor::versioned_deploys
bastelfreak
05/25/2023, 7:16 PMvchepkov
05/25/2023, 7:17 PMcsharpsteen
05/25/2023, 7:18 PMpuppet infra configure
is defined in /etc/puppetlabs/enterprise/hiera.yaml
, but I wouldn't recommend modifying it as one of two things is likely to happen depending on whether it is marked as a config file in the packages:
• The file gets overwritten on upgrade and unexpected things happen because customized data sources are no longer pulled in.
• The file does not get overwritten on upgrade and unexpected things happen because updated defaults are no longer pulled in.bastelfreak
05/25/2023, 7:19 PMvchepkov
05/25/2023, 7:20 PM- name: "Common data from Hiera3 user hieradata"
datadir: "/etc/puppetlabs/code/environments/%{environment}/hieradata"
data_hash: yaml_data
path: "common.yaml"
- name: "Common data from Hiera5 user data"
datadir: "/etc/puppetlabs/code/environments/%{environment}/data"
data_hash: yaml_data
path: "common.yaml"
bastelfreak
05/25/2023, 7:21 PMvchepkov
05/25/2023, 7:23 PMbastelfreak
05/25/2023, 7:23 PMvchepkov
05/25/2023, 7:23 PMbastelfreak
05/25/2023, 7:23 PMvchepkov
05/25/2023, 7:25 PMcsharpsteen
05/25/2023, 7:30 PMsudo crontab -l
should show puppet infra recover_configuration
running on a schedule. That tool looks at PuppetDB and tries to determine if any puppet_enterprise
parameters are being set via Classifier or user Hiera data. It then writes those values back to /etc/puppetlabs/enterprise/conf.d/user_data.conf
and enterprise/conf.d/nodes/*.conf
in the case of settings that appear to be different for compilers vs. primary vs. replica vs. database.puppet infra configure
also runs that same configuration recovery to sync enterprise/conf.d/
up before making changes. The --no-recover
flag is commonly used to skip this step in situations where PuppetDB is not responding.vchepkov
05/25/2023, 7:33 PMcsharpsteen
05/25/2023, 7:40 PMpuppet_enterprise
is the majority consumer of that data. The pe_infrastructure
and pe_repo
modules also use it.pe.conf
. pe_infrastructure
is mostly active during first install, not sure why pe_repo
ignores the other data files --- likely just an oversight.vchepkov
05/25/2023, 7:56 PM--- /etc/puppetlabs/nginx/conf.d/proxy.conf 2023-02-16 09:48:18.801727023 -0500
+++ /etc/puppetlabs/nginx/conf.d/proxy.conf.augnew 2023-05-04 19:10:35.327820741 -0400
@@ -17,7 +17,7 @@
ssl_session_cache shared:SSL:50m;
location /
{
-proxy_pass <http://127.0.0.1:4430>;
+proxy_pass <http://localhost:4430>;
I think the process misses some hiera
that one is driven by puppet_enterprise::plaintext_address, for example and it's not extracted to conf.dDr Bunsen Honeydew
05/25/2023, 7:56 PMvchepkov
05/25/2023, 7:57 PM--- /etc/puppetlabs/r10k/r10k.yaml 2023-02-04 09:46:53.577921459 -0500
+++ /tmp/puppet-file20230504-3697032-knu4j4 2023-05-04 19:08:34.304876302 -0400
@@ -1,8 +1,8 @@
---
-cachedir: /opt/puppetlabs/server/data/puppetserver/r10k
+cachedir: /opt/puppetlabs/puppet/cache/r10k
sources:
puppet:
- basedir: /etc/puppetlabs/code/environments
+ basedir: /opt/puppetlabs/server/data/environments
Dr Bunsen Honeydew
05/25/2023, 7:57 PMbastelfreak
05/25/2023, 7:58 PMvchepkov
05/25/2023, 7:58 PMbastelfreak
05/25/2023, 7:58 PM