Re: [Puppet Users] Re: hiera consul backend Puppet 4.10
Justin, I just wanted to say that I am currently working on implementing the hiera_http to interact with consul. It's not nearly as clean/concise, but it works nonetheless. https://github.com/crayfishx/hiera-http Still implementing it at the moment and testing to make sure things work, but for now, assuming your scope is correct, works like a champ. Maybe that would help? On Thursday, August 31, 2017 at 10:10:22 PM UTC-5, Justin DynamicD wrote: > > Unfortunately puppet lookup doesn't work at all for me, instead it's > complaining about being unable to load some ruby gems that are related to a > windows chocolaty module that doesn't even get called in the current > environment. Mind you simple puppet agent -t runs and everything else is > flawless ... but anything Hiera related has been an exercise in patience. > Only way I've been able to test it to make a custom role::hieratest and > assign it to my server and just invoke puppet runs over and over to see how > the lookup works. There isn't even a module on the forge for formatting > the global hiera.yaml on the puppet master (they all stop at v4). Custom > template for that ... Once I get this consul integration doing what I want > I'll do everything in my power to avoid re-configuring hiera at all costs. > > Integrating Consul has been a very frustrating journey, much more so than > I anticipated when I started. > > Does anyone even have a list of example code I can borrow from? I can > find videos of peopel claiming it's awesome at puppet conf but they are all > horrifically devoid of any real detail or usable example. I can't imagine > I'm the first person who's tried to lookup what services are registered to > a node yet ... can't find a single working example. > > > > > On Thursday, August 31, 2017 at 5:47:09 PM UTC-7, John Baird wrote: >> >> Justin, >> >> Funny, i'm dealing with a somewhat similar scenario, but I should let you >> know that you CAN run lookup from CLI... >> >> "puppet lookup" should invoke exactly what "lookup" does from within >> puppet, that's actually something they did amazingly well... >> >> On Thursday, August 31, 2017 at 11:29:02 AM UTC-5, Justin DynamicD wrote: >>> >>> Appreciate your feedback. After a bit of "mucking about" I've added a >>> v5 yaml to a branch and will probably merge it in soon, but have left the >>> global yaml inplace as v3 until I can do more testing ... >>> >>> That said the lookup() feature doesn't feel any easier than the old >>> hiera statement ... arguably harder actually. hiera('var' , []) was easier >>> to me than lookup('var', data, 'first', []) but meh, overtime maybe I'll >>> appreciate it or at least accept it now that I can make per-environment >>> hiera changes. >>> >>> Yes, the lookup seems to work like you said it would, but it seems I've >>> only opened a can of worms: >>> >>> 1. I can't run lookup from the cli, only hiera. So guess I have to >>> figure out why (maybe because the global hiera is still v3?) >>> 2. the consul backend dumps an array of hashes ... eww ... looks like >>> Ill have to get really clever about how to manipulate things to get the >>> exact key/value I want ... out of scope of this question though. >>> >>> Thank you for your help. >>> >> -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/c0043719-c9a4-41ac-9b62-d038e2697b4c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Puppet Lookup Behavior
I am currently implementing the "hiera-http" custom backend written by crayfishx located: "https://github.com/crayfishx/hiera-http";. I have some custom classes that need to run through an iteration of hiera hashes and perform lookups on the values of said hashes. As a result, I would simply like to be able to have lookup('somestring') work from within a module. When doing this, lookup fails to use the module-specific hiera.yaml. I don't want ALL of my modules to use hiera-http as that is clearly overkill and prone to latency and longer puppet runs. The only workaround at the moment is to lookup("mymodule::somestring") which then properly uses the module hiera.yaml and looks up the value in the module-specific YAML. As you can imagine, having an HTTP URI that contains "mymodule::somestring" is not exactly clean, nor desired. Is there a way to specify the scope for lookup to force it to use the proper hiera.yaml ? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/b9e8b0dc-a4b4-426c-9caf-7987f2f4bcbe%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Announcing PDK v1.1.0
Hello Everyone! Today we are announcing the latest release of PDK, version 1.1.0. This release includes new features, UX improvements, and bugfixes! *Some of the new features and improvements include:* - Generation of defined_types - Selection of Operating System support when creating a new module - Improved error context output for unit test failures - Improved output from spec_prep and spec_clean failures - User-friendly messaging on CLI errors - User-friendly help messages after generation of a module For the full CHANGELOG please visit https://docs.puppet.com/pdk/1.0/release_notes.html To try this new version, download it from https://puppet.com/download-puppet-development-kit Thanks! Bryan Jen -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAHak91W7ryAuonCKmxwsfM6k3WG4w6-F%2Bqhj%2BnRrVH3RksEPWw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] querying unrealized/inactive resources in the catalog?
Is there a document somewhere that describes the visilibity of an unrealized and inactive resource in the downloaded catalog and puppetdb catalog? I thought I would be able to retrieve inactive resources from somewhere in puppetdb, but I can't and that could be just me. It would suit me perfectly if unrealized resources actually did not exist anywhere in the stored catalog so possibly I'm puzzled by the phrasing in the documentation, where it says that "unrealized virtual resources are included in the catalog, but they are marked as inactive". https://docs.puppet.com/puppet/4.10/lang_virtual.html#behavior Going deeper, I have the following scratch manifest (naming munged for privacy, conventions ignored for experimentation): class role::test1 { @file { '': content => "11\n", path=> '/tmp/a', } @file { '': content => "22\n", path=> '/tmp/b', } @file { '': content => "33\n", path=> '/tmp/c', } realize(File['']) } With that role applied to a host the file resource appears in the catalog, both in puppetdb and downloaded, but and do not. I can retrieve the file resource via puppetdb query to /pdb/query/v4/resources/File/ but not the others (returns json []). -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20170914153549.nsuxpxyp6sk5rqra%40iniquitous.heresiarch.ca. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Announce: Puppet Platform 5.2 available!
A new release of the Puppet Platform is available. As a reminder, we're doing monthly releases of the platform components (Agent, Server and PuppetDB) which are tested and released together. Puppet 5.2.0 is a feature and improvement release in the Puppet 5 series that also includes several bug fixes. This release ensures that translated strings can be loaded in the puppet gem. You can find more information in the Puppet 5.2 release notes: https://docs.puppet.com/puppet/latest/release_notes.html Puppet agent 5.2.0 also includes a new release of Facter, Facter 3.9, which contains a new experimental fact, `hypervisors`. This fact returns the names of any detected hypervisors and any collected metadata about them. PuppetDB 5.1.0 is a bugfix and performance release. It contains significant schema migrations, most notably for fact storage. It also improves handling of binary data in several places. For more information, see the detailed PuppetDB release notes: https://docs.puppet.com/puppetdb/latest/release_notes.html Puppet Server 5.1 contains several new features and bug fixes. New features include: • Automatic CRL refresh on certificate revocation • Puppet agents retry requests on a configurable delay if Puppet Server is busy • Autosigning supports CA certificate bundles • Administrators can add Java JARs to be loaded on startup For more information, see the Puppet Server 5.1 release notes: https://docs.puppet.com/puppetserver/latest/release_notes.html Eric Sorenson - e...@puppet.com director of product, ecosystem and platform -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/4AF9D2B2-38EB-4884-AF90-B0A464F9679F%40puppet.com. For more options, visit https://groups.google.com/d/optout.