ssaini
10/14/2022, 8:35 PMWilliam Myers
10/14/2022, 9:42 PMWilliam Myers
10/14/2022, 9:44 PMSlackbot
10/14/2022, 9:48 PMWilliam Myers
10/14/2022, 10:29 PMWilliam Myers
10/14/2022, 10:34 PMnatemccurdy
10/14/2022, 10:34 PMr10k to sync your Puppet code on all your Puppetservers.
You’d either setup a pull model, where you just run r10k every X minutes on each puppetserver, polling for changes to your code. Or in a push model, where you’d use some kind of webhook to trigger r10k remotely when your git repo is committed to.
In both cases, Code Manager and r10k, you’re expected to use a “Control Repository” to maintain your custom Puppet code and any references to Forge modules. And each branch of your control repository gets deployed as a different Puppet environment.natemccurdy
10/14/2022, 10:35 PMWilliam Myers
10/14/2022, 10:35 PMWilliam Myers
10/14/2022, 10:36 PMWilliam Myers
10/14/2022, 10:36 PMWilliam Myers
10/14/2022, 10:37 PMnatemccurdy
10/14/2022, 10:39 PMproduction is the main branch (and thus the main Puppet environment).
People branch off of production to test some new feature or fix a bug, push their branch to the git server, which then causes Code Manager/r10k to deploy that feature branch as an environment on the Puppetservers.
The developer can then do Puppet runs against that feature-branch environment to validate their change.
When they’re done testing, they merge their branch into production.William Myers
10/14/2022, 11:40 PMWilliam Myers
10/14/2022, 11:41 PMWilliam Myers
10/14/2022, 11:42 PMNotStrong
10/15/2022, 5:38 PMNotStrong
10/16/2022, 4:08 PM2022-10-16T18:01:15.734+02:00 ERROR [qtp390913102-60] [puppetserver] Puppet Cached catalog for testpuppetserver1 failed: Could not find terminus testpuppetserver1 for indirection catalog
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:368:in `make_terminus'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:140:in `terminus'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/store_configs.rb:6:in `initialize'
org/jruby/RubyClass.java:881:in `new'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:370:in `make_terminus'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:140:in `terminus'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:41:in `cache'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:265:in `find_in_cache'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:215:in `find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_routes.rb:120:in `do_find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_routes.rb:53:in `block in call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:289:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_routes.rb:52:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/server/v3.rb:17:in `block in wrap'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:82:in `block in process'
org/jruby/RubyArray.java:1865:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:81:in `process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:88:in `process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:88:in `process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:86:in `block in process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:69:in `block in with_request_profiling'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in `profile'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:65:in `with_request_profiling'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:85:in `block in process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:92:in `respond_to_errors'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:84:in `process'
uri:classloader:/puppetserver-lib/puppet/server/master.rb:69:in `block in handleRequest'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:289:in `override'
uri:classloader:/puppetserver-lib/puppet/server/master.rb:68:in `handleRequest'
termini install from package (ubuntu repos)
root@testpuppetserver1:/var/log/puppetlabs/puppetserver# dpkg -l |grep puppetdb-termini
ii puppetdb-termini 7.11.2-1focal all Termini for puppetdb
puppetdb.conf
[main]
server_urls = <https://testpuppetserver1:8081>
puppet.conf
[server]
vardir = /opt/puppetlabs/server/data/puppetserver
logdir = /var/log/puppetlabs/puppetserver
rundir = /var/run/puppetlabs/puppetserver
pidfile = /var/run/puppetlabs/puppetserver/puppetserver.pid
codedir = /etc/puppetlabs/code
storeconfigs = true
storeconfigs_backend = testpuppetserver1
reports = testpuppetserver1
dns_alt_names = testpuppetserver1
[main]
noop = true
server = testpuppetserver1
splay = true
report = true
report_server = testpuppetserver1
ignorecache=true
certname = testpuppetserver1
environment = devvchepkov
10/16/2022, 5:06 PMDr Bunsen Honeydew
10/16/2022, 5:06 PMtheforeman-puppet module at https://forge.puppet.com/theforeman/puppet?src=slack&channel=puppetNotStrong
10/16/2022, 7:02 PMNotStrong
10/16/2022, 7:04 PMSlackbot
10/16/2022, 7:23 PMsmortex
10/16/2022, 8:03 PMstoreconfigs_backend and reports are lists of handlers, not servers e.g. puppetdb,my_custom_termini https://puppet.com/docs/puppet/7/configuration.html#reportssmortex
10/16/2022, 8:04 PMpuppetdbNotStrong
10/16/2022, 8:12 PMvchepkov
10/16/2022, 8:17 PMNotStrong
10/16/2022, 8:21 PM/etc/hosts.
Edit my config puppetdb.conf like :
[main]
server_urls = <https://puppetdb:8081>
Change my puppet.conf like :
storeconfigs = true
storeconfigs_backend = puppetdb, testpuppetserver1
reports = puppetdb, testpuppetserver1NotStrong
10/16/2022, 8:22 PM/etc/hosts.
Edit my config puppetdb.conf like :
[main]
server_urls = <https://puppetdb:8081>
Change my puppet.conf like :
storeconfigs = true
storeconfigs_backend = puppetdb, testpuppetserver1
reports = puppetdb, testpuppetserver1NotStrong
10/16/2022, 8:23 PM