Re: [Puppet Users] Custom Types and Providers
My best guess is that modulepath is not configured to the correct location. After you run parse_config, see what Puppet[:modulepath] returns (it needs to maps to the path that contains the directory with your lib dir in it). ie: module_path/fake_module/lib parse_config should load the default settings for Puppet which is either /etc/puppet/modules or whatever you set in puppet.conf On Thu, Jul 10, 2014 at 5:43 PM, Michael Legleux legl...@gmail.com wrote: Using puppet 3.62 Trying to follow along with the book At one point (beginning of ch. 3), it says using irb: require 'puppet' Puppet::Type.type(:package) = Puppet::Type::Package My output is identical However the next bit diverges... require 'puppet' Puppet.parse_config Puppet::Type.type(:custom_package).provide(:apt) = Puppet::Type::Custom_package::ProviderApt Puppet.parse_config returns notice and Puppet::Type.type(:custom_package).provide(:apt) does not return Puppet::Type::Custom_package::ProviderApt as Puppet::Type.type(:custom_package) is returning nil. my tree is identical to the books (save for the rpm and yum providers) . └── lib └── puppet ├── provider │ └── custom_package │ └── apt.rb └── type └── custom_package.rb Is this book still 100% relevant or are parts achieving obsolescence? -- 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/00ab0833-4bd1-4939-a710-6223eb7e122b%40googlegroups.com https://groups.google.com/d/msgid/puppet-users/00ab0833-4bd1-4939-a710-6223eb7e122b%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/CA%2B0t2LyBU6kBduYeP9xGS%2BXcCbbsNKzAf2NMRE0_ixF-NZVZqQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] How to configure PIP package provider to run pip3?
there is a patch in openstack-infra that is looking to accomplish this. They are creating different providers for pip vs. pip3 (b/c for their use case, they have to be able to use both in the same run) (it's buried in here somewhere) https://review.openstack.org/#/c/51425/ On Mon, Jun 16, 2014 at 2:22 PM, Alexander Luetjen luet...@googlemail.com wrote: Ubuntu 14.04 comes with pre-loaded python 3 running side-by-side with the python 2.7. To install a package into the python 3 environment, I can simple run pip3 instead of pip. Is there a way to make the pip package provider run pip3 instead of pip? Cheers, Alex -- 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/58d9f9c2-2322-44d2-bd62-1cc94d9a99cd%40googlegroups.com https://groups.google.com/d/msgid/puppet-users/58d9f9c2-2322-44d2-bd62-1cc94d9a99cd%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/CA%2B0t2LzFVh6x-0Jgb7wxawVqbzv0RjNpXRaXcqP_zeOoz07s_g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Recursive hiera lookups with Arrays and Hashes
thanks for your work on this, it was already on my TODO list. I will definitely be looking at this patch in the near future. On Mon, May 5, 2014 at 2:04 AM, Trevor Vaughan tvaug...@onyxpoint.comwrote: All, I've just patched Hiera to allow recursive lookups of Arrays and Hashes. https://github.com/onyxpoint/hiera/commit/a00c9e4ef0e033d1012c95fda028412eeb425ce4 For my uses, this patch works properly, however, it hasn't gotten buy off from the Hiera team yet. This allows you to do the following: --- foo : - 'one' - 'two' bar : %{hiera('foo')} Result: hiera foo = [ 'one', 'two' ] hiera bar = ['one', 'two' ] There is no merging of arrays or hashes if you nest the entries and if you use an array entry on the left hand side of a lookup you'll probably end up with a Hiera entry that you can't reference. Thanks, Trevor -- Trevor Vaughan Vice President, Onyx Point, Inc (410) 541-6699 tvaug...@onyxpoint.com -- This account not approved for unencrypted proprietary information -- -- 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/CANs%2BFoWdCC2vKmYqLxoBeUk2oSWpHSacB_3Mpsw%2B8D277fHnCg%40mail.gmail.comhttps://groups.google.com/d/msgid/puppet-users/CANs%2BFoWdCC2vKmYqLxoBeUk2oSWpHSacB_3Mpsw%2B8D277fHnCg%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/CA%2B0t2Ly53sW6n_yxieRqFo5qSRFQQD9vZ%2BWtcXdNHiKv%3D1PU1A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Managing big changes
Hi, A couple of things that I have tried before. 1. If the intention is to perform a refactor where the code changes are large, but the expected changes to the catalog are small, I would recommend looking at: - https://github.com/ripienaar/puppet-catalog-diff Depending on what versions of Puppet you are looking at, you may have to hack on it a bit. 2. Environments are useful for detecting potential changes in combination with --noop. You should be able to target an agent to your new environment (containing the changed code) puppet agent -td --environment new_env --noop And verify the impact of changes before you make any changes. The main problem with environment is that they do not work correctly with types and providers. 3. Although the cost of writing and maintaining rspec-puppet (ie: unit tests) can be quite high. Refactors are where they really shine. If you have good test coverage, then after a refactor, you should be able to see what expectations you have broken and have to update your tests accordingly. On Wed, Apr 2, 2014 at 8:32 AM, Sven Sporer s...@intothespirit.com wrote: Hi, I'm wondering if there's an established way on how to write and improve modules with potentially system-breaking or incompatible changes. One example are changes in the filesystem layout, or simply the change of an OS user's homedir (usermod fails because of running processes). Of course, Puppet isn't at fault here, but the question is: How do you write a module to support this? It's not always possible to just bootstrap the server again (= potential downtime), or breaking Puppet runs until there's time to manually prepare the server for changes. We could use multiple environments and Puppetfile's (r10k). On the other hand, this means that there are a lot of environments to manage (deploy module updates, ...). Any other angles (or posts somewhere) on this? Sven -- 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/0d485460-fefe-43df-b060-cd769818a643%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/0d485460-fefe-43df-b060-cd769818a643%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/CA%2B0t2LzxDZ2VVhKNgAfBC19gDEOHqiNJD%2BVLrC%2Byx2vsp1KSOA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Re: Is ensure_resource() evil?
I disagree that ensure_resource is evil and should not be used. It is however, potentially problematic, and it's issues are worth discussing. It was written (full disclosure by me) as an improvement over defined(). While it is not perfect (it suffers from parse-order issues), it is intended as an improvement of defined, a convenience method which exists in Puppet core. Specifically, it is intended to solve the limitation in Puppet that duplicate resource declarations are treated as failures in Puppet, even if the resources they describe are identical. That being said, there are two reasons it may be problematic. 1. Behavior depends on parse order - this is probably the best reason not to use it. The behavior of how it will fail depends on the order in which code is parsed in Puppet. That is why this method (as well as defined(), and resource collection overrides) should only be used by users who understand this behavior, it's limitations, and how to debug it when they run into issues. It's usage and the fact that it depends on the order in which your code is parsed makes it problematic to have in modules that are intended to be shared. That being said, it looks like Puppet is moving to a more procedural language,which may make this less of an issue going forward. 2. It is not part of Puppet core and may need access to unsupported APIs to work as expected. I was not aware until I read that email thread that it was not working correctly with parameter aliases, it's pretty reasonable to open this up as an issue and see if someone volunteers to fix it. That being said, I think it will require access to some undocumented unsupported APIs in order to implement correctly. On Mon, Mar 31, 2014 at 7:08 AM, jcbollinger john.bollin...@stjude.orgwrote: On Sunday, March 30, 2014 11:24:30 PM UTC-5, Atom Powers wrote: Over the years I've heard a lot of people declare one function/method/implementation of something to be evil. I've found that, more often than not, the person declaring it to be bad has simply been burned by trying to use it for something the function was never intended to be used for. (Usually an easy trap due to incomplete documentation.) So I wonder, are ensure_resource and create_resources really evil, or just too easy to abuse in evil ways? On Fri, Mar 28, 2014 at 9:06 AM, jcbollinger john.bo...@stjude.orgwrote: Ensure_resource() is evil. Do not use it. Ensure_resource() is evil. Create_resources() is not. The post from which you excerpted my comment ( https://groups.google.com/forum/#!searchin/puppet-users/ensure_resource/puppet-users/dOCIZ8-Gfgw/VhlBbrSRpb8J) explains why ensure_resource() is evil: in short, because it looks like it does something useful, but in fact hands you a gun loaded with foot-seeking bullets. It takes *at least* as much work to use ensure_resource() safely as it does to avoid any need for it in the first place. John -- 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/f5d5c0aa-2355-4dc8-91da-2311fc3f679a%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/f5d5c0aa-2355-4dc8-91da-2311fc3f679a%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/CA%2B0t2LxOkQOosGsGuDRSWc24jq8t%2BUa2CXuV10SkSQK8DMCREg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] ENC - how to set order of operations?
On Mon, Feb 3, 2014 at 9:45 AM, Jon Yeargers ethrbu...@gmail.com wrote: Right. So how would I declare this dependency setup if I stop using node files? Even if you use an ENC, Puppet will still consult your site manifest, so using an ENC does not preclude you from setting resource dependencies via collection in your site manifest. On Monday, February 3, 2014 9:33:40 AM UTC-8, Jose Luis Ledesma wrote: Hi Perhaps I'm confused but an ENC stores node definition and not collector nor dependencies...doesn't it? Regards, El 03/02/2014 16:13, Jon Yeargers ethr...@gmail.com escribió: I need to convert my resource based system to ENC. It's mostly straightforward but I'm not sure how to handle operations like these: Class['apt'] - Package| | -- 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...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/ msgid/puppet-users/b6324c21-3725-480d-b2ab-33ee48577ba6% 40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- 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/89c4d5d6-1f79-454c-8d22-1e1fb9ce15d6%40googlegroups.com . For more options, visit https://groups.google.com/groups/opt_out. -- 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/CA%2B0t2LyhRt64H6gpuAayMeUMHc%2BEXnqpxm5Xnu%3DN7WXjqgyvGA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet-dev] Re: [Puppet Users] using puppet device
On Thu, Dec 12, 2013 at 1:46 AM, Nan Liu nan@gmail.com wrote: On Wed, Dec 11, 2013 at 8:51 AM, Dan Bode bod...@gmail.com wrote: I had a bit of time to research the existing device code to see if I can use it for an integration with two specific use cases: I'm not sure what issues are still actively worked on, and I'm keeping an eye on the redmine migration to see what gets ported over. I've had onsite discussion with PL developers, and I would love to get more feedback and roadmap for devices v.s. transport. For now, I'm staying with transport resources. Comments below. 1. discovery/inventory - access hardware inventory and store it somewhere where it can be retrieved. So far, device supports this use case. - specify a list of device endpoints in device.conf - run puppet device to get their facts to serve as inventory (although puppet device looks like it gets facts and requests catalogs, I will probably call the facts method directly to just get the facts) - have the front end query these facts from PuppetDB puppet device facts are not really invoked via facter, and have some gotchas (such as symbol keys). They are tucked away in lib/puppet/util/network_devices/device_name/facts.rb. However since facter is not available for puppet device, the only win for device is inventory in puppetdb. The missing functionality can be implemented as a resource for transport solution which exports facts via puppet face. I can't think of a case where I need facts from a device to make a configuration decisions. Perhaps I'm just not far enough into it :) 2. management - manage the process of bringing up a cluster from scratch This is the use case where puppet device is problematic. In this use case, an external system needs to specify how a collection of resources should be configured. The types of these resources are heterogeneous, for example: - Server - Storage - Network - add Port - create server These hardware configuration rules (and their dependencies) map pretty cleanly to the Puppet DSL and the Resource/Graph model. Where a manifests represents multiple devices and multiple endpoints. This is one of the main reason I'm using transport since it expresses cross node dependency using the existing DSL. I had the following issues with puppet device for this use case: 1. It iterates through the endpoints and configures them one at a time This is probably the biggest barrier. I need to keep track of a collection of resources that target multiple endpoints and apply them in a certain order. Looking at the device code it seems to just iterate through the endpoints in device.conf and configure them one at a time. I spent some time thinking about the current device command and how I might use it to configure workflows across multiple endpoints. - on the puppet master, keep a queue (or list) for each endpoint that needs to be configured - have an external process (the dispatcher) that keeps track of the configuration that needs to be applied (along with their endpoints) and stores the resources that represent that configuration into the correct queue for it's endpoint. - have an ENC that checks the certname of a device when it checks in, maps it to a queue, and clears all entries for a queue (for it to apply) - If the dispatcher keeps track of all of the resources that it put onto which queue, it can track the report for those devices to know when it's entire job is completed. The above explanation is the best way I could think of to use the existing device, but it is cumbersome enough that it warrants not using the device model. 2. it does not allow for the specification of dependencies between multiple device endpoints. It only allows for certain endpoints to be processed in a certain order. This is pretty much the same as #1, but worth mentioning separately. 3. It invents its own command line for doing things (it does not cleanly operate with puppet resource, puppet apply, puppet agent with represents a major loss of functionality) 4. Management of device.conf The existence of device.conf creates its own management issues. You need to assign a single node to a single device, you have to manage the process for getting the credentials to that device, you have to figure out how many devices/which devices go to which nodes as you scale out to a large number of device endpoints. *Solution:* The transport model (as created by Nan Liu) seems to get around the issues mentioned above and would allow a pretty clean integration path. For folks not familiar with the transport model. It uses regular types and providers that accept a parameter called transport that can be used to indicate that it should be applied against some remote endpoint. For example: Transport { 'ssh': url = some_url password = 'some_password' } port { transport = Transport[ssh] } This will work perfectly for my use case
Re: [Puppet Users] using puppet device
On Thu, Dec 12, 2013 at 2:08 AM, Markus Burger markus.bur...@uni-ak.ac.atwrote: Hi, On 11-12-2013 10:51:08, Dan Bode wrote: Hi all, I had a bit of time to research the existing device code to see if I can use it for an integration with two specific use cases: 1. discovery/inventory - access hardware inventory and store it somewhere where it can be retrieved. So far, device supports this use case. - specify a list of device endpoints in device.conf - run puppet device to get their facts to serve as inventory (although puppet device looks like it gets facts and requests catalogs, I will probably call the facts method directly to just get the facts) - have the front end query these facts from PuppetDB 2. management - manage the process of bringing up a cluster from scratch This is the use case where puppet device is problematic. In this use case, an external system needs to specify how a collection of resources should be configured. The types of these resources are heterogeneous, for example: - Server - Storage - Network - add Port - create server These hardware configuration rules (and their dependencies) map pretty cleanly to the Puppet DSL and the Resource/Graph model. Where a manifests represents multiple devices and multiple endpoints. I had the following issues with puppet device for this use case: 1. It iterates through the endpoints and configures them one at a time This is probably the biggest barrier. I need to keep track of a collection of resources that target multiple endpoints and apply them in a certain order. Looking at the device code it seems to just iterate through the endpoints in device.conf and configure them one at a time. I currently use a simple solution to work around this problem where i create the device.conf through an external process on the fly and specify my devices and there dependencys in a yaml file, run them in order and just check the exit code. it looks something like this: --- defaults: scheme: sshios port: 22 userinfo: foo:bar query: crypt=true cmd: /usr/bin/puppet device --verbose --environment=network --detailed-exit-codes --deviceconfig={{DEVCFG}} || [ $? -eq 2 ] devices: dc1: sw-dc1-01.foo.bar: deps: - * sw-dc1-02.foo.bar: sw-dc1-03.foo.bar: deps: - sw-dc1-02.foo.bar str-dc1-01.foo.bar: scheme: netapp deps: - sw-dc1-01.foo.bar Just to clarify, this is letting you specify the order in which resources are configured on your devices? This looks like it only allows you to specify order between types of things (and not between resources). It also looks like you are still grouping resources based on how a certain maps to a device? (so in this example, if you had a workflow that needed to configure 10 resources against 10 endpoints, this would involve updating the 10 node definitions in your site manifest?) I spent some time thinking about the current device command and how I might use it to configure workflows across multiple endpoints. - on the puppet master, keep a queue (or list) for each endpoint that needs to be configured - have an external process (the dispatcher) that keeps track of the configuration that needs to be applied (along with their endpoints) and stores the resources that represent that configuration into the correct queue for it's endpoint. - have an ENC that checks the certname of a device when it checks in, maps it to a queue, and clears all entries for a queue (for it to apply) - If the dispatcher keeps track of all of the resources that it put onto which queue, it can track the report for those devices to know when it's entire job is completed. The above explanation is the best way I could think of to use the existing device, but it is cumbersome enough that it warrants not using the device model. 2. it does not allow for the specification of dependencies between multiple device endpoints. It only allows for certain endpoints to be processed in a certain order. This is pretty much the same as #1, but worth mentioning separately. 3. It invents its own command line for doing things (it does not cleanly operate with puppet resource, puppet apply, puppet agent with represents a major loss of functionality) 4. Management of device.conf The existence of device.conf creates its own management issues. You need to assign a single node to a single device, you have to manage the process for getting the credentials to that device, you have to figure out how many devices/which devices go to which nodes as you scale out to a large number of device endpoints. *Solution:* The transport model (as created by Nan Liu) seems to get around the issues mentioned above and would allow a pretty clean integration path. For folks not familiar with the transport model. It uses
[Puppet Users] using puppet device
Hi all, I had a bit of time to research the existing device code to see if I can use it for an integration with two specific use cases: 1. discovery/inventory - access hardware inventory and store it somewhere where it can be retrieved. So far, device supports this use case. - specify a list of device endpoints in device.conf - run puppet device to get their facts to serve as inventory (although puppet device looks like it gets facts and requests catalogs, I will probably call the facts method directly to just get the facts) - have the front end query these facts from PuppetDB 2. management - manage the process of bringing up a cluster from scratch This is the use case where puppet device is problematic. In this use case, an external system needs to specify how a collection of resources should be configured. The types of these resources are heterogeneous, for example: - Server - Storage - Network - add Port - create server These hardware configuration rules (and their dependencies) map pretty cleanly to the Puppet DSL and the Resource/Graph model. Where a manifests represents multiple devices and multiple endpoints. I had the following issues with puppet device for this use case: 1. It iterates through the endpoints and configures them one at a time This is probably the biggest barrier. I need to keep track of a collection of resources that target multiple endpoints and apply them in a certain order. Looking at the device code it seems to just iterate through the endpoints in device.conf and configure them one at a time. I spent some time thinking about the current device command and how I might use it to configure workflows across multiple endpoints. - on the puppet master, keep a queue (or list) for each endpoint that needs to be configured - have an external process (the dispatcher) that keeps track of the configuration that needs to be applied (along with their endpoints) and stores the resources that represent that configuration into the correct queue for it's endpoint. - have an ENC that checks the certname of a device when it checks in, maps it to a queue, and clears all entries for a queue (for it to apply) - If the dispatcher keeps track of all of the resources that it put onto which queue, it can track the report for those devices to know when it's entire job is completed. The above explanation is the best way I could think of to use the existing device, but it is cumbersome enough that it warrants not using the device model. 2. it does not allow for the specification of dependencies between multiple device endpoints. It only allows for certain endpoints to be processed in a certain order. This is pretty much the same as #1, but worth mentioning separately. 3. It invents its own command line for doing things (it does not cleanly operate with puppet resource, puppet apply, puppet agent with represents a major loss of functionality) 4. Management of device.conf The existence of device.conf creates its own management issues. You need to assign a single node to a single device, you have to manage the process for getting the credentials to that device, you have to figure out how many devices/which devices go to which nodes as you scale out to a large number of device endpoints. *Solution:* The transport model (as created by Nan Liu) seems to get around the issues mentioned above and would allow a pretty clean integration path. For folks not familiar with the transport model. It uses regular types and providers that accept a parameter called transport that can be used to indicate that it should be applied against some remote endpoint. For example: Transport { 'ssh': url = some_url password = 'some_password' } port { transport = Transport[ssh] } This will work perfectly for my use case. *The problem:* This is fundamentally incompatible with the device model. I will not be able to leverage resources implemented using this model, people using the device model will not be able to leverage resources that I/we write. I would feel much more confident in transport if it was possible to still leverage the logic encoded in Puppet devices. This is impossible b/c devices label themselves in such a way that means that they can only be consumed by the puppet device command (while I would use resource, apply, and agent). Is this something we could just fix in the device type and providers? To have them either get their credentials from device.conf or transport resources? Could we get rid of the code that allows for puppet devices to only be applied using the puppet device command? Thanks for everyone that has made it this far in the email :) I look forward to some great discussions! - Dan -- 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
Re: [Puppet Users] Picking a pattern apart?
Hi Matthew, FWIW, I ran into the same issue, and wound up creating an abstraction layer on top of my hiera lookups to do this: It does a lot more than what you are asking for, but I thought it was worth mentioning since it was written to solve the same problem. https://github.com/bodepd/scenario_node_terminus/blob/master/README.md#data-mappings On Wed, Nov 6, 2013 at 3:41 PM, Matthew Barr mb...@mbarr.net wrote: NOTE: of course, I just wrote this whole thing, and I think using a hiera lookup in the parameter might be about the same. That's at the end of this.I'd still like to know if it breaks scope or the renderer... However, it might be an option for overriding params.pp settings, without having to do the inherit pattern on the other classes in a module? of course, when we get hiera 2, that'll make life much easier. I just needed to do something a bit strange with hiera 2 modules. I know it works, since I just ran it.. but I'm not sure it's a good idea... or if it's just luck. (Assume puppet 3.x) Problem: db_url amqp_url are both set the same across all machines in a specific environment, but different per environment: dev, stage, prod. Perfect, you'd put this info into Hiera. No problem. Automatic lookups-This also gives the option of overriding a value from hiera in the node scope.. So: webserver::db_url: mysql://dev-url webserver ::amqp_url: amqp://dev-url + class webserver( $db_url, $amqp_url) { blah } - node 'Web' { include webserver } node 'WebTest' { class {'webserver': db_url= 'mysql://testbox' } } But what happens when you want to use it with a second class? And they need the exact same data? You clearly don't want to replicate the keys in Hiera! - The worker class is screwed :) class worker ($db_url, $amqp_url) { other blah } The obvious thought is to put the data into a common key in hiera: - I'd also like to preserve the option of overriding a specific parameter, like for testing with vagrant etc. Here's the way I thought of: --- centralconfig::db_url: mysql://dev-url centralconfig ::amqp_url: amqp://dev-url class webserver { require centralconfig $db_url = $centralconfig::db_url $amqp_url = $centralconfig::amqp_url blah } --- node 'Web' { include webserver } node 'worker' { include worker } node 'webtest' { class {'centralconfig': db_url= 'mysql://testbox' } include webserver } Now, if this is bad... You could convert the automatic lookups to be actual hiera_lookup calls. class webserver( $db_url = hiera('centralconfig::db_url') $amqp_url = hiera('centralconfig::db_url') ){ blah } And.. this might be the easiest, cleanest option.. -- 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/CACCqFtj1aML4OpNF32X3LkafiEtGo-yecoZjMnM%3DySatVGWyFw%40mail.gmail.com . For more options, visit https://groups.google.com/groups/opt_out. -- 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/CA%2B0t2LxjgVDjzs4Fcrj-xHrWE7y-yjq0NdZ1xa6Lo2esF%3D%2B%3DVQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: [Puppet-dev] Status of Data in modules
On Fri, Oct 11, 2013 at 11:09 AM, Eric Sorenson eric.soren...@puppetlabs.com wrote: Thanks to everyone who kicked the tires on the experimental data in modules feature included in Puppet 3.3.0. We got a lot of feedback, some cool proof-of-concept modules, and a definitive conclusion to the experiment. The idea of including a module-specific hiera backend is centered around one primary use case: replacing the 'params class pattern', a common idiom in Puppet modules that's described in the [Using Parameterized Classes][param-classes] guide. The problem that most testers ran into though is that for non-trivial modules they ended up having to re-implement the Puppet DSL logic encoded in their params.pp in convoluted, non-obvious ways. The solutions to this led to more contortions until we'd ended up with the ability to execute parser functions in the right-hand-side of a yaml value. So something which started out trying to help separate data from code ended up putting code back into data! Additionally, even after multiple attempts to simplify the surface area and user experience with the bindings system (described in ARM-9) that underlay the data-in-modules implementation, users still found its complexity daunting. There are some important bits of scaffolding (like an actual type system for Puppet!) that will prove valuable as more of the future parser and evaluator work that Henrik is building makes its way into the product, but in the final analysis the data in modules feature was the wrong vehicle to introduce them. Refocusing on the problems users were trying to solve (and here I have to give shout-outs to Ashley Penney for his [puppetlabs-ntp][] branch and the dynamic duo of Spencer Krug/William van Hevelingen for their [startrek][] module) and the problems with the 'params' pattern lent some clarity. We've gotten into a situation of disparity with regard to hiera and data bindings, because data bindings enable module _users_ to use their site-wide hiera data but don't provide moduel _authors_ the same affordance. But rather than introduce additional complexity, we can close the gap for existing code patterns. So the proposed solution at this point is: - enable an implicit data-binding lookup against the hiera-puppet backend for a value of 'classname::variable' in the file 'modules/classname/manifests/params.pp', which simplifies class definition and provides consistency with other hiera backends. As a module author, you'd still leave your logic for variables in params.pp, but they'd be implicitly looked up via data bindings as the class is declared, after consulting site-wide hiera. +1 Really happy to see this solved in a way that will not lead to complex migrations to Puppet 4. Although, to play devil's advocate, two concerns: the special nature of params as a namespace suffix: - how do users know not to use this namespace for anything else? - What if user declares resources in params? Does this fail? Do they always get realized when anything else from that namespace is applied? the magic mapping from x::parameter x::params::parameter may be something hard to grok for new users who are not already familiar with the params pattern. This is probably solvable with documentation and --debug logging, but still worth noting. - remove the user-facing '--binder' functionality - fix known problems with the hiera-puppet lookups ([Redmine 15746][15746], namely, but if there are others that are important to you please speak up!) To show how this would work, I'll rework the ['smart parameter defaults' example][param-classes] I linked above, with my commentary behind `##` comments: # /etc/puppet/modules/webserver/manifests/params.pp class webserver::params { ## nothing changes here... $packages = $operatingsystem ? { /(?i-mx:ubuntu|debian)/= 'apache2', /(?i-mx:centos|fedora|redhat)/ = 'httpd', } $vhost_dir = $operatingsystem ? { /(?i-mx:ubuntu|debian)/= '/etc/apache2/sites-enabled', /(?i-mx:centos|fedora|redhat)/ = '/etc/httpd/conf.d', } } # /etc/puppet/modules/webserver/manifests/init.pp class webserver( ## inheritance is gone, and $packages, ## data bindings look up the defaults $vhost_dir ## as webserver::params::vhost_dir ) { package { $packages: ensure = present } file { 'vhost_dir': path = $vhost_dir, ensure = directory, mode = '0750', owner = 'www-data', group = 'root', } } # /etc/puppet/manifests/site.pp node default { class { 'webserver': } ## no params needed, they're in hiera ## then in one of my site-wide hiera layers, I can override ## the value without modifying the module or class declaration # /etc/puppet/hieradata/snowflake.domain.com.yaml webserver::vhost_dir: '/some/other/dir' This way the
Re: [Puppet Users] rspec and overriding :facts per context
I do this with params.merge! in a before block: here is an example: https://github.com/stackforge/puppet-openstack/blob/master/spec/classes/openstack_cinder_all_spec.rb#L61 On Mon, Oct 7, 2013 at 6:26 AM, Johan De Wit jo...@open-future.be wrote: Hi, I'm looking for a way to avoid repeating all necessary facts to make the catalog compile. I'm using the let function for passing needed facts: Now I have to repeat all facts in every context to make it work. Is there a way to do something like : describe 'x' do let(:facts) {{ :x = 'x',: y = 'y', .., :many = 'more' , z = 'z' }} it {} //test using default facts context 'x has other value' do let(:x) { 'overruled value' } is still using the facts :x = 'x' end context 'y has other value' do let(:params) {{ :y = 'overruled' }} = all other params are gone, only :y exists end end Only when i repeat all facts, in every context, it works as should, but i would like tot ovoid repeating this in every context. Any hints on where to look for a solution are welcome. I have looked at before(:each) .. but still no working solution Thx Johan -- Johan De Wit Open Source Consultant Red Hat Certified Engineer (805008667232363) Puppet Certified Professional 2013 (PCP006) __**___ Open-Future Phone +32 (0)2/255 70 70 Zavelstraat 72 Fax +32 (0)2/255 70 71 3071 KORTENBERG Mobile+32 (0)474/42 40 73 BELGIUM http://www.open-future.be __**___ Next Events: Extending Puppet Training 2013 | http://www.open-future.be/** extending-puppet-training-8-**till-11th-octoberhttp://www.open-future.be/extending-puppet-training-8-till-11th-october Puppet Fundamentals Training | http://www.open-future.be/** puppet-fundamentals-training-**15-till-17th-octoberhttp://www.open-future.be/puppet-fundamentals-training-15-till-17th-october Puppet Advanced Training | https://www.open-future.be/** puppet-advanced-training-12-**till-14th-novemberhttps://www.open-future.be/puppet-advanced-training-12-till-14th-november Zabbix Certified Training | http://www.open-future.be/** zabbix-certified-training-18-**till-20th-novemberhttp://www.open-future.be/zabbix-certified-training-18-till-20th-november Zabbix Large Environments Training | http://www.open-future.be/** zabbix-large-environments-**training-21-till-22nd-novemberhttp://www.open-future.be/zabbix-large-environments-training-21-till-22nd-november Puppet Fundamentals Training | http://www.open-future.be/** puppet-fundamentals-training-**10-till-12th-decemberhttp://www.open-future.be/puppet-fundamentals-training-10-till-12th-december Subscribe to our newsletter | http://eepurl.com/BUG8H -- 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+unsubscribe@**googlegroups.compuppet-users%2bunsubscr...@googlegroups.com . To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/**group/puppet-usershttp://groups.google.com/group/puppet-users . For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] rspec-puppet require syntax
I'm pretty sure the error is b/c the class names need to be capitalized. On Tue, Sep 17, 2013 at 10:05 AM, Guy Knights g...@eastsidegamestudio.comwrote: Can someone tell me the correct way to specify the following require statement in an rspec-puppet test? *require = [Class['ssl'],Class['pcre3'],Staging::Extract[nginx-${version}.tar.gz]]* I tried this: *'require' = [Class['ssl'],Class['pcre3'],Staging::Extract['nginx-1.4.1.tar.gz']]*but got the following error: *Failure/Error: ) * *expected that the catalogue would contain Exec[install_nginx] with require set to `[Class['ssl'],Class['pcre3'],Staging::Extract['nginx-1.4.1.tar.gz']]` but it is set to `[Class[Ssl]{:name=Ssl}, Class[Pcre3]{:name=Pcre3}, Staging::Extract[nginx-1.4.1.tar.gz]{:name=nginx-1.4.1.tar.gz}]` in the catalogue* I've tried every combination of different quotes, removing the inner quotes, capitalising the resource titles, and even just copying and pasting what the error above says the catalogue is reporting, but it just doesn't work. I thought I had the syntax for requires figured out, but apparently not. Thanks, Guy -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] puppetlabs/openstack
it's really hard to look at the parameters and tell if something is missing. I would check the service logs for clues. first have a look at: /var/log/nova/nova-compute.log On Thu, Aug 29, 2013 at 3:27 AM, Thomas Bendler thomas.bend...@gmail.comwrote: Hi @all, I'm trying to setup an openstack test cluster with one controller node and three compute nodes. Therefor I've used the puppetlabs openstack modules. On the controller node I've used: - openstack::auth_file - openstack::controller - openstack::repo - openstack::repo::yum_refresh - openstack::test_file On the compute node I've used: - openstack::compute - openstack::repo - openstack::repo::yum_refresh The configuration is completely done with parameters. On the controller node I specified the following parameters (the rest remain default as specified in params.pp): openstack::auth_file admin_password s3cret openstack::controlleradmin_emailjohn.doe@example.local admin_password s3cret bridge_interface eth1 cinder_db_password s3cret cinder_user_password s3cret floating_range 172.17.0.128/25 glance_api_servers 127.0.0.1:9292 glance_db_password s3cret glance_user_password s3cret horizon_app_links http://monitor.example.local/; keystone_admin_token keystone_admin_token keystone_db_password s3cret multi_host true mysql_root_passwords3cret nova_db_password s3cret nova_user_password s3cret private_interface eth1 public_address 192.168.1.1 public_interface eth0 quantumfalse rabbit_passwords3cret secret_key s3cret verbosetrue openstack::test_file floating_iptrue quantumfalse sleep_time 120 On the compute nodes the configuration is like this (for testing I have both, KVM and QUEMU nodes): openstack::compute cinder_db_password s3cret db_hostcontroller1.example.local fixed_range10.0.0.0/24 glance_api_servers controller1.example.local:9292 internal_address 192.168.1.2 keystone_host controller1.example.local libvirt_type qemu multi_host true nova_db_password s3cret nova_user_password s3cret private_interface eth1 public_interface eth0 purge_nova_config false quantumfalse quantum_user_password s3cret rabbit_hostcontroller1.example.local rabbit_passwords3cret setup_test_volume true verbosetrue vncproxy_host controller1.example.local Preparations with volume groups as stated in the module documentation are done before installation. The installation is working so far, I can connect to the controller node but several things don't work as expected. I.e., when I go to the system info page I only see services from the controller node but no service from the compute nodes. I can create VMs without storage but no VMs with storage. So I guess I did something wrong or not completely. Does anyone know if I miss something (i.e. with the parameters)? The platform is Scientific 6.4 with openstack modules version 2.1.0. Regards Thomas -- Linux ... enjoy the ride! -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop
Re: [Puppet Users] MultiNode Openstack deployement using Puppet Module
On Fri, Aug 30, 2013 at 3:42 AM, JK jkumbh...@gmail.com wrote: Hi All, I want to deploy openstack mult node deployment on 2 physical node with 2 NIC on each of them. I have tried stackforge openstack module. It installed properly but due to some reason i couldn't launch VM instance. without some log exerts, it's going to be really hard to assist you. Have you looked at /var/log/nova/nova-compute.log on the compute host? Can anyone suggest the proper step by step guide to configure, setup and test Image on Openstack? Also it would be helpful if you provide Network configuration assumption if any. Thanks in advance. JK -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Error testing deploying Grizzly
I believe the error indicates that hiera was installed as a rubygem which is not supported on Puppet 3.x. Maybe the error will go away if you remove the hiera gems? I think I have gotten around it by adding 'require rubygems' to the puppet executable. I'm copying the puppet-users mailing list b/c I am guessing this is a common problem. On Wed, May 1, 2013 at 12:35 PM, Ling Gao linggao...@gmail.com wrote: Hi, What does the following error mean? Error: Could not retrieve catalog from remote server: Error 400 on SERVER: You need rubygems to use Hiera at /etc/puppet/manifests/site.pp:12 on node nodename Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run I have puppet 3.1.1-1 installed and have rubygems-1.8.16-1 installed on both puppet server and agent nodes. Thanks, Ling On Tue, Apr 30, 2013 at 6:15 PM, Dan Bode bod...@gmail.com wrote: sorry, I keep accidentally replying to the sender and not the list... On Tue, Apr 30, 2013 at 3:14 PM, Dan Bode bod...@gmail.com wrote: On Tue, Apr 30, 2013 at 2:37 PM, Ling Gao linggao...@gmail.com wrote: Thanks for the quick response. Here is the situation I am trying to solve: the controller and compute nodes are behind the firewall. only the puppet server can access the internet. So I need to: 1. find and download the correct OpenStack rpms and their dependencies and put them on the puppet server. (I think of RDO unless you have better repositories. ). You should be able to use the dev_env as an example of how to achieve this: https://github.com/stackforge/puppet-openstack_dev_env if you look at the following files: manifests/site.pp and hiera_data/common.yaml they should provide you with enough information to get started. You will still have to do a couple of things: - look at the manifests in manifests/setup/* to see example of some of the preconfig being set up - update anything that refers to a proxy (search for 3128),and remove it (or point it to your own proxy if you are going to use one) - either preconfigure your own RDO repos as a part of the OS base image or use puppet to configure it If that sounds like too much too bite into, you may want to consider using packstack to get started. 2. find puppet modules (I can load it from github if the ones from the RDO does not work). 3. construct manifest files (I am not good at it. Just started learning it. So examples are good start for me.) Can anyone help? Thanks, Ling On Tue, Apr 30, 2013 at 5:11 PM, Sandro Mathys s...@sandro-mathys.chwrote: The Puppet modules that come with Packstack (openstack-packstack package) are not intended to be run outside manually. The example manifest you're trying to run wants to configure RabbitMQ but since RDO supports Qpid instead, the rabbitmq module (and executable) are missing from RDO. If you want to use RDO to install OpenStack, use the packstack binary as described on the RDO website. If you want to use plain Puppet to install OpenStack, better don't take the modules from RDO or write your own manifest(s) to make sure you use the existing modules if you must, i.e. copy Packstack's behavior. On Tue, Apr 30, 2013 at 10:54 PM, Ling Gao linggao...@gmail.comwrote: I am testing deploying OpenStack Grizzly on RH6.4 in my cluster. I decided to use the OpenStack rpms and the puppet modules from RDO, but not use packstack to deploy. Here is what I am doing. Please let me know this will work or not. 1. install puppet server 2. Install the openstack modules: yum install -y http://rdo.fedorapeople.org/openstack/openstack-grizzly/rdo-release-grizzly-1.noarch.rpm yum install -y openstack-packstack This will put the openstack modules to /usr/lib/python2.6/site-packages/packstack/puppet/modules directory 3. modify /etc/puppet/puppet.conf. modulepath = /usr/lib/python2.6/site-packages/packstack/puppet/modules 4. Use the site.pp file that comes from /usr/lib/python2.6/site-packages/packstack/puppet/modules/openstack/examples/ directory 5. Install a controller using puppet. But got the following error: # puppet agent -t Info: Retrieving plugin Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb Info: Loading facts in /var/lib/puppet/lib/facter/iptables_version.rb Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb Info: Loading facts in /var/lib/puppet/lib/facter/ip6tables_version.rb Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type rabbitmq_user at /usr/lib/python2.6/site-packages/packstack/puppet/modules/nova/manifests/rabbitmq.pp:26 on node nodename Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run What is missing? Can anyone help? I am not familiar
Re: [Puppet Users] cloudstack_resources - invalid instance resource type
On Sat, Mar 16, 2013 at 10:08 PM, Nick Wales n...@nickwales.co.uk wrote: I've created cloudstack_resources as a module, have setup the transport.yaml and can successfully run puppet resource cloudstack_instance against my cloudstack environment. The following cloudstack_instance files have been created /var/lib/puppet/lib/puppet/provider/cloudstack_instance /var/lib/puppet/lib/puppet/provider/cloudstack_instance/default.rb /var/lib/puppet/lib/puppet/type/cloudstack_instance.rb But having created an init.pp in that module with the following: class cloudstack_resources { cloudstack_instance{ 'bar': flavor = '1.s', ensure = present, zone = 'cs1.internal', image= 'CentOS-6-x86_64', network = 'guestNetworkForBasicZone', } # this is line 19 I get the following in my puppet run: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type cloudstack_instance at /etc/puppet/environments/cloudstack/modules/cloudstack_resources/manifests/init.pp:19 on node redacted Any thoughts on where I have gone wrong? the error message indicates that the resource type cannot be found. I believe its referring to a loading failure on the server side which means that the resource types cannot be resolved in the modulepath used to compile the catalog. This is using puppet version 3.1.0 -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Beta release of puppetdbquery module 1.0
On Mon, Mar 4, 2013 at 7:59 AM, Erik Dalén erik.gustav.da...@gmail.comwrote: I've released version 1.0.0-pre1 of the dalen-puppetdbquery module, it includes the old functions against the PuppetDB api version 1.0. But also some entirely new functions that will query the PuppetDB api v2.0 (in puppetdb 1.1 and up). These new functions borrow the syntax from Dan Bode's ruby-puppetdb, but are entirely rewritten to make use of the 2.0 API. I also wanted to make sure that Pieter Loubser and RI Pienaar also got a shout out for helping put together the initial grammar for ruby-puppetdb (it heavily borrowed from mcollective's syntax, and Piter built the initial parser) It now uses a lexer and parser written in rex racc (ruby versions of lex yacc) to compile a high level query language into PuppetDB queries. An example of a high level query would be: Class[Apache]{service_enable=true} and (osfamily=Redhat or osfamily=Debian) That would find any host with the apache class (notice though that class names have to be capitalized in queries) with the parameter service_enable = true and osfamily red hat or debian. It does normal operator precedence, so a parenthesis is required around that or-statement. The three new query functions are: * query_nodes * query_facts * query_resources So far only query_nodes and query_facts accept the new query language. In all three functions an array argument instead of string will be treated as a raw puppetdb query. Anyway, please test it and send me feedback (dalen on freenode). The old functions are left intact but deprecated, so it shouldn't affect any existing code using the older functions. -- Erik Dalén -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Scalability and performance
On Tue, Oct 9, 2012 at 4:56 PM, Robjon robertjo...@gmx.us wrote: Hi guys, I am pretty new to this space, playing around with a few tools. I am trying to read up on how I would scale Puppet (or other tools) up in my installation, and came across this blog post comparing Puppet and CFEngine: http://www.blogcompiler.com/2012/09/30/scalability-of-cfengine-and-puppet-2/ The numbers presented here are pretty extreme: CFEngine agents running 166 times faster than Puppet agents in a small installation The results of that paper are not very realistic. The benchmark is based on doing nothing but running echo commands. Since cfengine is written in C (or C++) there is not question that it will perform many actions faster than Puppet, but saying that it is 100X faster or whatever is disingenuous (unless you can manage your infrastructure with nothing but echo commands). I would be more interested to see comparisons based on real admin tasks like managing packages or services. - and the difference is increasing? Also, it seems to be the case that Puppet is more centralized which results in everything slowing down: as the master gets more loaded, all the Puppet agents run slower. it is possible to either run puppet with or without a master. If you want more centralized control, use a master, if you need something that scales to the extreme, run puppet without a master using puppet apply (which is must more similar to how cfengine works) Is this correct? Could some of you with more experience please comment on this? Thanks. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/5LcBoBBaZGQJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] anchor pattern and class containment status
On Wed, Oct 3, 2012 at 2:57 PM, Tim Mooney tim.moo...@ndsu.edu wrote: All- We're currently using puppet 2.7.14 on master and all clients. I thought I understood why 'anchor' is part of stdlib, but after re-reading both http://projects.puppetlabs.**com/projects/puppet/wiki/** Anchor_Patternhttp://projects.puppetlabs.com/projects/puppet/wiki/Anchor_Pattern and http://projects.puppetlabs.**com/issues/8040http://projects.puppetlabs.com/issues/8040 yesterday in preparation for trying to explain it to one of our team that's coming up to speed on puppet, now I'm not so certain I really understand. yep, its probably the most confusing part of Puppet :( Specifically, is it necessary to use the anchor pattern if your module only defines resources and doesn't require or include any other classes? you only have to use the anchor pattern when you need to depend on a class that has classes defined in it. The example below does not need the anchor pattern. For example, if I have class benthic { group { 'squarepants': ensure = present, gid= '9', } user { 'spongebob': ensure = present, uid= '9', gid= 'squarepants', home = '/home/pineapple', } package { 'starfish': ensure = present, } file { '/etc/starfish.conf': ensure = file, owner = 'root', group = 'squarepants', mode= '0640', source = 'puppet:///benthic/starfish.**conf', require = [ Package['starfish'], User['spongebob'], ], } service { 'i_m_ready', ensure = running, enable = true, require = Package['starfish'], } } Given that class, do I need to use anchors to ensure that the group/user/package/file/**service resource graph is correctly attached to (contained within) Class['benthic'], so that if some other module does someresource { 'whatever': ... require = Class['benthic'], } it just works, or, should I augment my class to also have anchor { 'benthic::begin': } anchor { 'benthic::end': } Anchor['benthic::begin'] - Group['squarepants'] Service['i_m_ready'] - Anchor['benthic::end'] ? My resources within the class are using explicit require when necessary and relying on puppet's automatic require logic in other places so they are correctly ordered, but it's not clear from the pattern document in the wiki or the ticket whether the issue is solely with nested classes, or whether it's important to also use the pattern for standard resources. Also, the ticket was with respect to 2.6. I know this hasn't changed for 2.7, but is there anything in 3.0 that addresses the issue? Tim -- Tim Mooney tim.moo...@ndsu.edu Enterprise Computing Infrastructure 701-231-1076(Voice) Room 242-J6, IACC Building 701-231-8541 (Fax) North Dakota State University, Fargo, ND 58105-5164 -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@** googlegroups.com puppet-users%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/** group/puppet-users?hl=enhttp://groups.google.com/group/puppet-users?hl=en . -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] openstack:all with just 1 network interface.
On Wed, Sep 5, 2012 at 11:48 PM, neel npater...@gmail.com wrote: Hi, From https://github.com/puppetlabs/puppetlabs-openstack I can understand that we need to create br100 bridge for case when there is just 1 network interface. From readme it not very clear what should be private_interface = 'eth1' set to. Do We need to set it to eth0 or leave it to default? Assuming that eth0 is your only interface that is correct. This is the physical interface that the bridge is connected to. Any further reference for :all on single node with single interface would help in quickly setting up dev environment. Thanks, Neel -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/H7nNQV9AgfYJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] create_resources function returns error can't convert Array into Hash
On Wed, Sep 5, 2012 at 7:05 AM, JeremyCampbell jeremycampbel...@gmail.comwrote: I have written a custom function that returns a hash of data to be used by the *create_resources* function. class network::multiroute::mhpeers ( ) { $routes = gen_ip_routes(gw.uk) create_resources(network::multiroute::mhpeer, $routes) } However, on the puppet client I get err: Could not retrieve catalog from remote server: Error 400 on SERVER: can't convert Array into Hash can you try this with --trace and post the output? also,can you put the following line before the call to create_resources just to verify the data structure? $foo = inline_template(% puts routes.inspect %) also, could you try quoting the name of the defined type? 'network:: multiroute::mhpeer' My custom function https://gist.github.com/796ad5b9d81c01d1dced returns the following data structure: {10.100.0.9={dstip=10.100.0.10, dsthost=gw1.uk}, 10.100.0.46={dstip=10.100.0.45, dsthost=gw1.fr}, 10.100.0.17={dstip=10.100.0.18, dsthost=gw2.us}, 10.100.0.13={dstip=10.100.0.14, dsthost=gw1.us}} Based on the puppet sourcehttps://github.com/puppetlabs/puppet/blob/master/lib/puppet/parser/functions/create_resources.rb the rdoc states: The hash should be in the form `{title = {parameters} }` I believe I am returning the hash in the correct format so I am confused as to what the problem could be. I've been stuck on this issue for quite some time, any pointers would be really appreciated! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/h4EyleCsPLsJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] create_resources function returns error can't convert Array into Hash
On Wed, Sep 5, 2012 at 8:15 AM, JeremyCampbell jeremycampbel...@gmail.comwrote: On Wednesday, September 5, 2012 4:15:31 PM UTC+2, Dan Bode wrote: On Wed, Sep 5, 2012 at 7:05 AM, JeremyCampbell jeremyca...@gmail.comwrote: I have written a custom function that returns a hash of data to be used by the *create_resources* function. class network::multiroute::mhpeers ( ) { $routes = gen_ip_routes(gw.uk) create_resources(network::**multiroute::mhpeer, $routes) } However, on the puppet client I get err: Could not retrieve catalog from remote server: Error 400 on SERVER: can't convert Array into Hash can you try this with --trace and post the output? # puppet agent --test --server devbox --trace info: Retrieving plugin info: Loading facts in /var/lib/puppet/lib/facter/defgw_ipv4.rb info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb info: Loading facts in /var/lib/puppet/lib/facter/virtual.rb info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb /usr/lib/ruby/site_ruby/1.8/puppet/indirector/rest.rb:56:in `deserialize' /usr/lib/ruby/site_ruby/1.8/puppet/indirector/rest.rb:126:in `find' /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:195:in `find' /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:239:in `retrieve_new_catalog' /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:493:in `thinmark' /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime' /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:492:in `thinmark' /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:238:in `retrieve_new_catalog' /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:86:in `retrieve_catalog' /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:112:in `retrieve_and_apply_catalog' /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:152:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:43:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:21:in `lock' /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:43:in `run' /usr/lib/ruby/1.8/sync.rb:230:in `synchronize' /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:43:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:95:in `with_client' /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:41:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `call' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `controlled_run' /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:339:in `onetime' /usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:313:in `run_command' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:416:in `hook' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:407:in `exit_on_fail' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute' /usr/bin/puppet:4 err: Could not retrieve catalog from remote server: Error 400 on SERVER: can't convert Array into Hash at /etc/puppet/puppet/modules/network/manifests/multiroute/mhpeers.pp:7 on node gw1.zz warning: Not using cache on failed catalog err: Could not retrieve catalog; skipping run actually, I care way more about --trace on the master also,can you put the following line before the call to create_resources just to verify the data structure? $foo = inline_template(% puts routes.inspect %) I've done that but I'm not sure where/what output you expect. Please advise. This should print the actual data structure in the masters logs. I would recommend just running the master from the foreground and looking for this output. also, could you try quoting the name of the defined type? 'network:: multiroute::mhpeer' Ok, Ive done this, but it doesn't make any difference. ok, it was worth a try, that would have been easy :) My custom function https://gist.github.com/796ad5b9d81c01d1dcedreturns the following data structure: {10.100.0.9={dstip=10.**100.0.10, dsthost=gw1.uk}, 10.100.0.46={dstip=10.**100.0.45, dsthost=gw1.fr}, 10.100.0.17={dstip=10.**100.0.18, dsthost=gw2.us}, 10.100.0.13={dstip=10.**100.0.14, dsthost=gw1.us}} Based on the puppet sourcehttps://github.com/puppetlabs/puppet/blob/master/lib/puppet/parser/functions/create_resources.rb the rdoc states: The hash should be in the form `{title = {parameters} }` I believe I am returning the hash in the correct format so I am confused as to what the problem could be. I've been stuck on this issue for quite some time, any pointers would be really appreciated! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/** msg/puppet-users/-/**h4EyleCsPLsJhttps://groups.google.com/d/msg/puppet-users/-/h4EyleCsPLsJ . To post to this group, send email to puppet...@googlegroups.com. To unsubscribe
Re: [Puppet Users] create_resources function returns error can't convert Array into Hash
On Wed, Sep 5, 2012 at 8:37 AM, JeremyCampbell jeremycampbel...@gmail.comwrote: On Wednesday, September 5, 2012 5:20:49 PM UTC+2, Dan Bode wrote: On Wed, Sep 5, 2012 at 8:15 AM, JeremyCampbell jeremyca...@gmail.comwrote: On Wednesday, September 5, 2012 4:15:31 PM UTC+2, Dan Bode wrote: On Wed, Sep 5, 2012 at 7:05 AM, JeremyCampbell jeremyca...@gmail.comwrote: I have written a custom function that returns a hash of data to be used by the *create_resources* function. class network::multiroute::mhpeers ( ) { $routes = gen_ip_routes(gw.uk) create_resources(network::**mult**iroute::mhpeer, $routes) } However, on the puppet client I get err: Could not retrieve catalog from remote server: Error 400 on SERVER: can't convert Array into Hash can you try this with --trace and post the output? # puppet agent --test --server devbox --trace info: Retrieving plugin info: Loading facts in /var/lib/puppet/lib/facter/**defgw_ipv4.rb info: Loading facts in /var/lib/puppet/lib/facter/**puppet_vardir.rb info: Loading facts in /var/lib/puppet/lib/facter/**virtual.rb info: Loading facts in /var/lib/puppet/lib/facter/**root_home.rb /usr/lib/ruby/site_ruby/1.8/**puppet/indirector/rest.rb:56:**in `deserialize' /usr/lib/ruby/site_ruby/1.8/**puppet/indirector/rest.rb:126:**in `find' /usr/lib/ruby/site_ruby/1.8/**puppet/indirector/indirection.**rb:195:in `find' /usr/lib/ruby/site_ruby/1.8/**puppet/configurer.rb:239:in `retrieve_new_catalog' /usr/lib/ruby/site_ruby/1.8/**puppet/util.rb:493:in `thinmark' /usr/lib/ruby/1.8/benchmark.**rb:308:in `realtime' /usr/lib/ruby/site_ruby/1.8/**puppet/util.rb:492:in `thinmark' /usr/lib/ruby/site_ruby/1.8/**puppet/configurer.rb:238:in `retrieve_new_catalog' /usr/lib/ruby/site_ruby/1.8/**puppet/configurer.rb:86:in `retrieve_catalog' /usr/lib/ruby/site_ruby/1.8/**puppet/configurer.rb:112:in `retrieve_and_apply_catalog' /usr/lib/ruby/site_ruby/1.8/**puppet/configurer.rb:152:in `run' /usr/lib/ruby/site_ruby/1.8/**puppet/agent.rb:43:in `run' /usr/lib/ruby/site_ruby/1.8/**puppet/agent/locker.rb:21:in `lock' /usr/lib/ruby/site_ruby/1.8/**puppet/agent.rb:43:in `run' /usr/lib/ruby/1.8/sync.rb:230:**in `synchronize' /usr/lib/ruby/site_ruby/1.8/**puppet/agent.rb:43:in `run' /usr/lib/ruby/site_ruby/1.8/**puppet/agent.rb:95:in `with_client' /usr/lib/ruby/site_ruby/1.8/**puppet/agent.rb:41:in `run' /usr/lib/ruby/site_ruby/1.8/**puppet/application.rb:172:in `call' /usr/lib/ruby/site_ruby/1.8/**puppet/application.rb:172:in `controlled_run' /usr/lib/ruby/site_ruby/1.8/**puppet/agent.rb:39:in `run' /usr/lib/ruby/site_ruby/1.8/**puppet/application/agent.rb:**339:in `onetime' /usr/lib/ruby/site_ruby/1.8/**puppet/application/agent.rb:**313:in `run_command' /usr/lib/ruby/site_ruby/1.8/**puppet/application.rb:309:in `run' /usr/lib/ruby/site_ruby/1.8/**puppet/application.rb:416:in `hook' /usr/lib/ruby/site_ruby/1.8/**puppet/application.rb:309:in `run' /usr/lib/ruby/site_ruby/1.8/**puppet/application.rb:407:in `exit_on_fail' /usr/lib/ruby/site_ruby/1.8/**puppet/application.rb:309:in `run' /usr/lib/ruby/site_ruby/1.8/**puppet/util/command_line.rb:**69:in `execute' /usr/bin/puppet:4 err: Could not retrieve catalog from remote server: Error 400 on SERVER: can't convert Array into Hash at /etc/puppet/puppet/modules/** network/manifests/multiroute/**mhpeers.pp:7 on node gw1.zz warning: Not using cache on failed catalog err: Could not retrieve catalog; skipping run actually, I care way more about --trace on the master Sorry Dan, I should have realized you meant on the master. See below - is this what you expected? yep, although it looks completely valid. Can you share the result of --trace from the master? $ sudo /usr/sbin/puppetmasterd --no-daemonize --trace {10.100.0.10={dsthost=gw1.nl, dstip=10.100.0.9}, 10.100.0.34={dsthost=gw1.fr, dstip=10.100.0.33}, 10.100.0.6={dsthost=gw2.us, dstip=10.100.0.5}, 10.100.0.2={dsthost=gw1.us, dstip=10.100.0.1}, 10.100.0.22={dsthost=gw2.nl, dstip=10.100.0.21}} also,can you put the following line before the call to create_resources just to verify the data structure? $foo = inline_template(% puts routes.inspect %) I've done that but I'm not sure where/what output you expect. Please advise. This should print the actual data structure in the masters logs. I would recommend just running the master from the foreground and looking for this output. also, could you try quoting the name of the defined type? 'network:: multiroute::mhpeer' Ok, Ive done this, but it doesn't make any difference. ok, it was worth a try, that would have been easy :) My custom function https://gist.github.com/796ad5b9d81c01d1dcedreturns the following data structure: {10.100.0.9={dstip=10.**1**00.0.10, dsthost=gw1.uk}, 10.100.0.46={dstip=10.**1**00.0.45, dsthost=gw1.fr}, 10.100.0.17={dstip=10.**1**00.0.18, dsthost=gw2.us}, 10.100.0.13={dstip=10.**1**00.0.14, dsthost=gw1.us
Re: [Puppet Users] Puppet apply err: Could not prefetch keystone_user provider 'keystone'
On Thu, Aug 9, 2012 at 12:13 PM, Shannon McFarland shmcf...@gmail.comwrote: On a new puppet master node I get this error on a puppet apply for an OpenStack multi-node setup. This is a new one I have never seen before. Tips? This is pretty specific to the puppet/openstack integration. There is currently a separate mailing list where questions related to that implementation can be directed. puppet-openst...@puppetlabs.com The keystone native types parse the admin_token out of the keystone config file. Can you verify if that file exists and if it specifies an admin_token? are you running this command on a node that is not being configured as a keystone server? It is also possible that this error has occurred b/c you are running puppet 2.6.x. Although, 2.6.x is not 100% verified to work with these modules, a patch was recently merged to resolve this issue. https://github.com/puppetlabs/puppetlabs-keystone/commit/de7ab2dbe8ff38d5789f0a1a23664c6f54a62341 debug: Prefetching keystone resources for keystone_user err: Could not prefetch keystone_user provider 'keystone': File: /etc/keystone/keystone.conf does not contain a section DEFAULT with the admin_token specified. Keystone types will not work if keystone is not correctly configured err: /Stage[main]/Swift::Keystone::Auth/Keystone_user[swift]: Could not evaluate: File: /etc/keystone/keystone.conf does not contain a section DEFAULT with the admin_token specified. Keystone types will not work if keystone is not correctly configured debug: Prefetching keystone resources for keystone_user_role err: Could not prefetch keystone_user_role provider 'keystone': File: /etc/keystone/keystone.conf does not contain a section DEFAULT with the admin_token specified. Keystone types will not work if keystone is not correctly configured -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/HlwhMV6LriEJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] duplicate resources across defined types
On Thu, Aug 2, 2012 at 7:09 AM, Joe Topjian joe.topj...@cybera.ca wrote: Hi Dan, virtual resources are definitely intended to solve the same problem, but they would not work for this use case b/c multiple declarations of the same virtual resource still result in the duplicate definition failures. virtual resources can also be problematic b/c collecting resources also realizes them as a side effect. I see. Thank you. I incorporated the ensure_resource function into the vhost type: https://github.com/jtopjian/puppetlabs-apache/tree/jtopjian-ensure_resource I made a few inline comments It seems to pass the test manifest that I threw at it, but it is giving these warnings: /usr/lib/ruby/1.8/puppet/parser/functions/create_resources.rb:1: warning: multiple values for a block parameter (2 for 1) from /usr/lib/ruby/1.8/puppet/parser/scope.rb:464 /usr/lib/ruby/1.8/puppet/parser/functions/create_resources.rb:1: warning: multiple values for a block parameter (2 for 1) from /etc/puppet/modules/ensure_resource/lib/puppet/parser/functions/ensure_resource.rb:24 /usr/lib/ruby/1.8/puppet/parser/functions/create_resources.rb:1: warning: multiple values for a block parameter (2 for 1) from /etc/puppet/modules/ensure_resource/lib/puppet/parser/functions/ensure_resource.rb:24 should be fixed in master. Thanks, Joe -- Joe Topjian Systems Administrator Cybera Inc. www.cybera.ca Cybera is a not-for-profit organization that works to spur and support innovation, for the economic benefit of Alberta, through the use of cyberinfrastructure. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] duplicate resources across defined types
Hi Joe, On Tue, Jul 31, 2012 at 6:41 PM, Joe Topjian joe.topj...@cybera.ca wrote: Hello, I am hoping that someone might be able to shed some light on the best way to solve an issue. https://github.com/puppetlabs/puppetlabs-apache/commit/c2c75a62b7dafced8a6120a14bacfc8be7539282https://github.com/puppetlabs/puppetlabs-apache/commit/c2c75a62b7dafced8a6120a14bacfc8be7539282#commitcomment-1654941 This is actually a pretty common modeling problem in Puppet. I just wrote a function called ensure_resource that is intended to solve this problem. https://github.com/bodepd/puppet-ensure_resource The function allows you to ensure that a resource should exist in the catalog. If the exact resource already exists in the catalog (meaning that it has the exact type, title, and specified parameters), it will not create the resource. Otherwise it will create the resource which could result in a duplicate resource definition if the resource already existed but had non-matching parameters. I would really like to see this incorporated into the apache module. thoughts? - Dan This commit introduced functionality into the vhost type to ensure that the $docroot and $logroot exist. This is smart as Apache will throw a warning if $docroot does not exist and error out if $logroot does not exist. I believe the original intention of the author was to make the names of these resources unique so that multiple vhosts can share the same docroot and logroot (line 71-80). However, the path of the resources is not unique across vhosts that use the same $docroot and $logroot and therefore puppet will error out. The first thing that came to my mind was to make the resources virtual and then just realize a single directory. Unless something special needs done, marking the two file resources as virtual (@file) still does not work. The other option that has been discussed is to use a conditional if block: https://github.com/puppetlabs/puppetlabs-apache/pull/37/files Here, on all but one of the vhost entries, you mark ensure_dirs as false and Puppet will not enforce the existence of the two directories. This works, but it comes off as a workaround more than a proper solution. Any ideas? Thanks, Joe -- Joe Topjian Systems Administrator Cybera Inc. www.cybera.ca Cybera is a not-for-profit organization that works to spur and support innovation, for the economic benefit of Alberta, through the use of cyberinfrastructure. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] duplicate resources across defined types
On Wed, Aug 1, 2012 at 7:37 PM, Joe Topjian joe.topj...@cybera.ca wrote: Hi Dan, This is actually a pretty common modeling problem in Puppet. I figured it had to be common as this type of configuration can exist in a lot of other system administration areas. I just wrote a function called ensure_resource that is intended to solve this problem. https://github.com/bodepd/puppet-ensure_resource The function allows you to ensure that a resource should exist in the catalog. If the exact resource already exists in the catalog (meaning that it has the exact type, title, and specified parameters), it will not create the resource. Otherwise it will create the resource which could result in a duplicate resource definition if the resource already existed but had non-matching parameters. I would really like to see this incorporated into the apache module. I agree. thoughts? The only thing I am curious about now is the difference between this and a virtual resource? Maybe I was under the wrong impression about virtual resources... I thought that they did this same thing. virtual resources are definitely intended to solve the same problem, but they would not work for this use case b/c multiple declarations of the same virtual resource still result in the duplicate definition failures. virtual resources can also be problematic b/c collecting resources also realizes them as a side effect. Thank you for your help and work with this! Joe -- Joe Topjian Systems Administrator Cybera Inc. www.cybera.ca Cybera is a not-for-profit organization that works to spur and support innovation, for the economic benefit of Alberta, through the use of cyberinfrastructure. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] librarian-puppet vs git superproject?
On Mon, Jul 23, 2012 at 8:43 PM, Dan Bode d...@puppetlabs.com wrote: On Mon, Jul 23, 2012 at 3:43 PM, Ryan Bowlby rbowlb...@gmail.com wrote: Can anyone comment on their experiences with librarian-puppet or using git superproject with per puppet module repositories? I tried using git submodules for a long time. I found that I just could not keep up with updating changed modules in two places (the module repo and the superproject repo). I wound up with projects that were never quite in sync. My other problem is that the puppet ecosystem (the forge, etc) does not really have a concept of a super project. All that it has is modules. I wound up switching to yaml files that specify dependencies with a rake task. This way, I can have superprojects that are themselves puppet modules. It also allows me to only check in the fact that master of all modules should work with master of its dependencies (which is almost always the state that I want checked-in) For an example, have a look at the rake tasks for the puppetlabs-openstack modules: https://github.com/puppetlabs/puppetlabs-openstack/blob/master/Rakefile I would love to see something like this eventually expanded into the Modulefile. I havent really looked at librarian yet, but I am interested. I probably should have looked into puppet librarian before sending this email. Its very similar to the custom yaml files with rake tasks that I had mentioned before. I should actually be able to remove my custom yaml files and drop in puppet-librarian. We are in the midst of determining which route is optimal for our environment. It seems like using git superprojects would mean one less new tool for everyone to learn. What then would be the advantages of librarian-puppet? Thanks, Ryan Bowlby -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/4Kf47PY2sIwJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] librarian-puppet vs git superproject?
On Mon, Jul 23, 2012 at 3:43 PM, Ryan Bowlby rbowlb...@gmail.com wrote: Can anyone comment on their experiences with librarian-puppet or using git superproject with per puppet module repositories? I tried using git submodules for a long time. I found that I just could not keep up with updating changed modules in two places (the module repo and the superproject repo). I wound up with projects that were never quite in sync. My other problem is that the puppet ecosystem (the forge, etc) does not really have a concept of a super project. All that it has is modules. I wound up switching to yaml files that specify dependencies with a rake task. This way, I can have superprojects that are themselves puppet modules. It also allows me to only check in the fact that master of all modules should work with master of its dependencies (which is almost always the state that I want checked-in) For an example, have a look at the rake tasks for the puppetlabs-openstack modules: https://github.com/puppetlabs/puppetlabs-openstack/blob/master/Rakefile I would love to see something like this eventually expanded into the Modulefile. I havent really looked at librarian yet, but I am interested. We are in the midst of determining which route is optimal for our environment. It seems like using git superprojects would mean one less new tool for everyone to learn. What then would be the advantages of librarian-puppet? Thanks, Ryan Bowlby -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/4Kf47PY2sIwJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Node not find
On Fri, Jul 6, 2012 at 4:22 AM, pierre-emmanuel degand pierreemmanuel.deg...@gmail.com wrote: Hi, my new server doesn't find his node *whereas i did the same for my others servers and it works on them*. My key is generated and signed by my master (i had had to add my puppetmaster in /etc/hosts). My node : *node 'vpsX.ovh.net' { * * * *}* * * It's save in vpsX.ovh.net.pp in puppet/manifests/nodes and in my site.pp i include did you mean import? nodes/* . When i use : puppet agent --test, i got this error : *err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find default node or by name with 'vpsX.ovh.net, vpsX.ovh, vpsX' on node vpsX.ovh.net* *warning: Not using cache on failed catalog* *err: Could not retrieve catalog; skipping run* * * Any help would be appreciated :)* * * * * * * * * * -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/i3QJSF8PFlUJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Have puppet store updated facts in couchdb without updating configuration
On Fri, Jul 6, 2012 at 9:01 AM, ZJE countac...@gmail.com wrote: We have a test puppet environment where we use couchDB as a facts terminus. We are thinking of using facter+couch as our new inventory system and would like to be able to pull inventory without having to resolve puppet configurations on our servers (we have very strict change management procedures) Is it possible to run puppet in an inventory mode and only update facts? I appears that using --noop does not update the data in couchDB. Have a look at facts upload. puppet help facts upload It can be run on the agents to just run facter and upload the facts to the master (using its rest terminus) Thanks! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/hw8eWzV-HCYJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Facts of other nodes
You may want to have a look at this function: https://github.com/puppetlabs/puppetlabs-nodesearch it doest map exactly to your use case, but the implementation of it is close to what the implementation for your solution may look like. Its worth noting that once the next generation of storeconfigs comes out (which is REALLY soon), it will have better APIs to support these kinds of functions and I intend to write puppet functions that support these kinds of use cases. On Wed, May 9, 2012 at 12:33 PM, Joe joe.topj...@cybera.ca wrote: Hello, I'm trying to figure out the best solution for using facts of other nodes in manifests. I understand the use of exported configs and the concat module but, I think, when using someone's contributed module, unless they wrote the module using those solutions, I would have to rewrite the module myself. Here is the best way I can explain the particular problem I'm running into. Maybe I'm totally on the wrong path with this. class my_mysql_server { class { 'mysql::server': } # other stuff as needed # ... } node node1.example.com { class { 'my_mysql_server': } } node node2.example.com { class { 'some::app::db': db_username = 'foo', db_password = 'password', db_host = $my_mysql_server::fqdn, } } In this case, 'some::app' is a contributed module. $db_host in 'db.pp' simply references a single variable in a template - not a loop and not using concat. This does work, but I'm not entirely comfortable with it. For one, if my_mysql_server is never applied, $fqdn will not be available. This generally won't happen in the above example, but it's still a concern I have. Secondly, if I choose to apply my_mysql_server to two nodes, there would be more than one result for db_host. I'm not exactly sure how to get around this. What's the best practice for this type of situation? Should I just hard-code the fqdn of my_mysql_server and be done with it? Or is there a more dynamic way to do this? Thanks, Joe -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] File Loop, Possible??
you could do something like this: define loopydir() { file { $module::params::base_dir/${name}: ensure = directory owner = root, group = root, } } include module::params file { $module::params::base_dir : ensure = directory owner = root group = root, } loopydir{ [1,2,3]: } On Wed, Apr 25, 2012 at 10:57 AM, Brian Carpio bcar...@thetek.net wrote: Is there a way to define a single file resource or even exec resource like this: file { $module::params::base_dir : ensure = directory owner = root group = root, } file { $module::params::base_dir/$module::params::name: ensure = directory owner = root, group = root, } I want to define module::params::name like: class module::params { $name = [ dir1, dir2, dir3 ] } Something like that so I don't have to make a full file definition for each directory I want to create. Each directory will reside under the $module::params::base which would be like /home/git and each dir1, dir2 etc.. would be like /home/git/dir1, /home/git/dir2, /home/git/ dir3 etc... -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: [Puppet-dev] Taking github noise away from puppet-dev list
+1 On Mon, Apr 9, 2012 at 2:09 PM, Michael Stahnke stah...@puppetlabs.comwrote: Since our move to github for pull requests and patches, the usefulness of puppet-dev has declined significantly. puppet-dev used to be a great list for development discussion of puppet and the ecosystem around it. With the information and pull request emails from github, unless everybody has finely-tuned their email clients, the puppet-dev list has turned into mostly noise. We have a goal to foster development discussion from the community. Because of that, I am proposing we move the github notifications to a new list, puppet-commits. I realize this may have a consequence of reducing patch/commit discussion. This should be compensated by: 1. Still having a list where pull requests can be commented on 2. Ability to comment on pull requests directly on github 3. More forethought and discussion on the dev list prior to making a pull request/patch. 4. You can also watch the RSS feed for the puppet projects you have the most interest in. This decision isn't final, but I would like to get opinions on the idea. I welcome feedback until Friday, April 13. Michael Stahnke Community Manager -- You received this message because you are subscribed to the Google Groups Puppet Developers group. To post to this group, send email to puppet-...@googlegroups.com. To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] openstack-puppet mailing list
Hi all, I have been working to create a community around a set of modules for configuring and deploying OpenStack. For folks who are interested in our openstack efforts, I created a separate mailing list. http://groups.google.com/group/puppet-openstack I plan to be pretty verbose about the code as it progresses and I didn't want to flood the puppet users group with openstack specific messages. - Dan -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Developing new modules using Puppet Sandbox
on a related note. I am a little over a week into starting to write a tool to streamline my module development efforts. It is intended to model multi-node deployments and to support running integration tests. It is all ec2 based (I had to abandon my vagrant + rake workflow b/c it just did not scale for large complicated app deployments) I am not quite ready to share, it doesn't have any docs yet, its just a bunch of code. I am happy to share the source if anyone is interested: https://github.com/bodepd/stack_builder On Wed, Mar 21, 2012 at 3:56 PM, elasticdog aaronschae...@gmail.com wrote: On Wednesday, March 21, 2012 3:11:52 PM UTC-7, Jonathan Proulx wrote: Screen cast looks cool, can't wait to dig into the code. I'm at the beginning (3rd day?) of a similar project using cucumber to drive module tests on virtual boxes using vagrant. I've been focusing on puppet applying single tasks (a module and its dependencies) to a variety of operating systems and verifying it works. Very cool! It would be awesome to have an automated way to test manifests cross-platform. Puppet Sandbox isn't too complex at this point, it just takes the headache out of configuring this type of environment and allows you to stay away from your production setup. It still needs tweaking to work on multiple platforms, and I'd love for some of the templates it creates to be more dynamic so they could pick up changes based on info in the Vagrantfile, but it works as expected with the default configuration. -- Aaron Bull Schaefer -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/y1Gga98yLg8J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Austin Puppet User's meetup
It looks like everything is sorted out for an Austin Puppet User's meetup. Huge thanks to HomeAway for providing the space at their fantastic downtown office. *Location* HomeAway 1011 W 5th Street (5th and Lamar) Suite 300 *Time* 7-9 Feb 29th 7-9pm I plan to talk a little bit about our plans for tighter integration between Puppet and OpenStack. Please RSVP at the following link if you plan to attend http://pug-austin-feb-2012.eventbrite.com/ I look forward to seeing everything there -Dan On Tue, Feb 14, 2012 at 8:08 PM, Dan Bode d...@puppetlabs.com wrote: Just a quick update. I am currently working out the location and the exact date. It may wind up being the following week. Although I am still happy to grab a beer with some folks next week :) On Tue, Feb 14, 2012 at 8:04 PM, Jeff Adams jeff.ad...@bancvue.comwrote: I'm interested, and I may have a co-worker or two interested as well. Thanks! - Jeff On 02/07/2012 09:04 PM, Dan Bode wrote: Hi Austin Puppet Users, I will be in the area in a few weeks and I would like to try to get some of the local users together to talk Puppet and have a few beers. Curious about how much interest there would be for an event on the 23rd of February (location tbd). regards, Dan Bode -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@**googlegroups.compuppet-users%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/**group/puppet-users?hl=enhttp://groups.google.com/group/puppet-users?hl=en . -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@** googlegroups.com puppet-users%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/** group/puppet-users?hl=enhttp://groups.google.com/group/puppet-users?hl=en . -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Austin Puppet User's meetup
Just a quick update. I am currently working out the location and the exact date. It may wind up being the following week. Although I am still happy to grab a beer with some folks next week :) On Tue, Feb 14, 2012 at 8:04 PM, Jeff Adams jeff.ad...@bancvue.com wrote: I'm interested, and I may have a co-worker or two interested as well. Thanks! - Jeff On 02/07/2012 09:04 PM, Dan Bode wrote: Hi Austin Puppet Users, I will be in the area in a few weeks and I would like to try to get some of the local users together to talk Puppet and have a few beers. Curious about how much interest there would be for an event on the 23rd of February (location tbd). regards, Dan Bode -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@**googlegroups.compuppet-users%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/**group/puppet-users?hl=enhttp://groups.google.com/group/puppet-users?hl=en . -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@** googlegroups.com puppet-users%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/** group/puppet-users?hl=enhttp://groups.google.com/group/puppet-users?hl=en . -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Austin Puppet User's meetup
Hi Austin Puppet Users, I will be in the area in a few weeks and I would like to try to get some of the local users together to talk Puppet and have a few beers. Curious about how much interest there would be for an event on the 23rd of February (location tbd). regards, Dan Bode -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Cross-module (package) dependencies
On Tue, Jan 24, 2012 at 1:28 AM, Felix Frank felix.fr...@alumni.tu-berlin.de wrote: Hi, there was a discussion in the can we deprecate defined() in Telly thread about how we can even begin to design Forge modules without it. A recurring problem is that multiple modules rely on certain packages, and there is no good model (yet) to unite their resource declarations. Therefore it's a common (although imho disgusting) workaround to do things like if !defined(Package[foo]) { package { foo: ensure = installed } } On 01/20/2012 11:34 PM, Cody wrote: Defining all somewhat common packages in a central location becomes unrealistic when you no longer control the code that is in every module you use. If you obtain five modules from the forge and they all require a specific package and so all define that package your not going to convince, nor is it a good design to require everyone to move the package definitions from that collection of modules. They need to function as a collection out of the box. Agreed. How can this be accomplished? Perhaps there needs to be some kind of Forge common module that by policy can only ever declare virtual resources (packages are a prominent Until there is a way to distinguish between collection of regular versus virtual resources, I hope that we don't do anything that advocates the usage of virtual resources. The problem is that collections (like below) meant to establish multiple dependencies unfortunately have the side effect of realizing virtual resources. Class['apt'] - Package| | example). A user who wishes to retain the capability of using modules from the Forge would be required to install this common module, and replace their own resource declarations with realizations of the common resources. For this to work, it's definitely a plus that you can override attributes in collections: Package| title == apache2: | { ensure = 2.2.12 } ...although that does bear some caveats. Does this still work in recent versions? If we can take this for granted, all Forge modules can adhere to that same standard. This is a rough sketch of how things might possibly work, and surely has lots of wrinkles of its own. Still, I'm quite sure we need a proper way to rid ourselves of the horror that is the parse order dependent check for defined resources ;-) Cheers, Felix -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] RFC: Deprecate defined() function for Telly.
I wind up using defined more than I should probably admit. yes it is dangerous/confusing b/c of parse order dependencies, but it is also really useful for a few use cases * static resources in a defined resource type (avoids having to use classes to store all static dependencies) * the big reason I keep on leaning on it is for package dependencies. Often something needs an additional package installed (and it is possible that other modules may have that same package dependency, and I don't want to have to create a new class every time that I need another package (especially for something complicated that may have tons of package dependencies) puppet-apt has a relevant pull request where someone wants to wrap a defined? around python-software-properties for this exact reason https://github.com/puppetlabs/puppet-apt/pull/10 On Thu, Jan 19, 2012 at 9:18 AM, Nigel Kersten ni...@puppetlabs.com wrote: I'm looking for strong opinions on whether we should or shouldn't deprecate the defined() function for Telly, the next major Puppet release this year. jcbollinger put it quite well in another thread: Use of the defined function introduces a parse-order dependency, and the additional work you need to do to ensure that that dependency is always fulfilled overcomes any simplicity advantage that might otherwise exist. -- Nigel Kersten Product Manager, Puppet Labs -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] RFC: Deprecate defined() function for Telly.
How about deprecating defined?(Type['title']), but allowing it to accept a resource hash? This would definitely satisfy my use cases while alleviating concerns about resource attribute conflicts/parse order dependencies if defined?( { package['foo'] = { ensure = present } } ) { package { 'foo': ensure = present } } On Fri, Jan 20, 2012 at 1:00 AM, Dan Bode d...@puppetlabs.com wrote: I wind up using defined more than I should probably admit. yes it is dangerous/confusing b/c of parse order dependencies, but it is also really useful for a few use cases * static resources in a defined resource type (avoids having to use classes to store all static dependencies) * the big reason I keep on leaning on it is for package dependencies. Often something needs an additional package installed (and it is possible that other modules may have that same package dependency, and I don't want to have to create a new class every time that I need another package (especially for something complicated that may have tons of package dependencies) puppet-apt has a relevant pull request where someone wants to wrap a defined? around python-software-properties for this exact reason https://github.com/puppetlabs/puppet-apt/pull/10 On Thu, Jan 19, 2012 at 9:18 AM, Nigel Kersten ni...@puppetlabs.comwrote: I'm looking for strong opinions on whether we should or shouldn't deprecate the defined() function for Telly, the next major Puppet release this year. jcbollinger put it quite well in another thread: Use of the defined function introduces a parse-order dependency, and the additional work you need to do to ensure that that dependency is always fulfilled overcomes any simplicity advantage that might otherwise exist. -- Nigel Kersten Product Manager, Puppet Labs -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] pip provider
I ran into the same issue when I tried to use the pip provider. Perhaps this is related? http://projects.puppetlabs.com/issues/7754 On Mon, Jan 16, 2012 at 11:01 AM, Chris Blumentritt cblum...@gmail.comwrote: I am running puppet 2.7.9 and using the pip provider. The package gets/is installed but puppet installs it on every run. Do other people run into this. I tried search bugs and the group and have not seen any mention of it. Chris -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] hiera-puppet in template
On Tue, Jan 10, 2012 at 8:53 AM, Markus Falb markus.f...@fasel.at wrote: hi, hiera is working in my manifest but not within a template. x=%= scope.function_hiera(x) % err: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template bla/blubb.conf.erb: undefined method `function_hiera' ... Is it supposed to used in a template and how? You may need to explicitly load the function: Try adding the following Ruby code to your template: Puppet::Parser::Functions.function(:hiera) -- Kind Regards, Markus Falb -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Adding node parameters to puppet dashboard
A face has been developed that can programmatically insert data into the Dashboard using its restful interface. usage is documented in the README https://github.com/puppetlabs/puppetlabs-dashboard You may want to have a look at a couple of branches that still need to be merged: 1. https://github.com/bodepd/puppetlabs-dashboard/tree/test_coverage_and_remove_cp_as_dep removes the heavy dependency on cloud provisioner (so you dont have to install fog) 2. https://github.com/bodepd/puppetlabs-dashboard/tree/11216_cli_hashes supports setting parameter hashes from the command line On Tue, Jan 10, 2012 at 2:57 PM, Chris Blumentritt cblum...@gmail.comwrote: I would like to add parameters to nodes in puppet dashboard either from the command line or programmatically through an api. For adding classes and groups to a node as well as adding nodes to the dashboard I have been using the rake tasks. There is no rake task for adding parameters that I can find. Is there an api for the dashboard? Chris -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Help using puppetlabs-mysql
you are running into a documentation issue. All of the configuration was moved to a new parameter called: config_hash. I can submit a patch On Mon, Oct 31, 2011 at 10:01 AM, treydock treyd...@gmail.com wrote: I'm working to begin managing MySQL with the puppetlabs-mysql provided module, but am not able to get very far with the README documentation. So far, simply trying to add the server module and define the root_password is failing like so, err: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter root_password at /etc/puppet/manifests/ nodes.pp:882 on node puppetnode1.tld The definition looks like this, node 'puppetnode1.tld' { class { 'mysql::server': root_password = 'test' } should be changed to: class { 'mysql::server': config_hash = { root_password = 'test'} } database_user { 'treydock@localhost': password_hash = mysql_password('pass') } database_grant { 'treydock@localhost/*': privileges = ['ALL'], } mysql::db { 'zabbix': user= 'zabbix', password= 'zabbix', host= 'localhost', grant = ['ALL'], } } The database_user and _grant thus far haven't actually done anything. I'm assuming it's because mysql::server isn't working or being applied. There's likely something very obvious I'm missing. This is also my first time using parameterized classes. Thanks - Trey -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Help using puppetlabs-mysql
On Mon, Oct 31, 2011 at 10:55 AM, treydock treyd...@gmail.com wrote: On Oct 31, 12:26 pm, Dan Bode d...@puppetlabs.com wrote: you are running into a documentation issue. All of the configuration was moved to a new parameter called: config_hash. I can submit a patch On Mon, Oct 31, 2011 at 10:01 AM, treydock treyd...@gmail.com wrote: I'm working to begin managing MySQL with the puppetlabs-mysql provided module, but am not able to get very far with the README documentation. So far, simply trying to add the server module and define the root_password is failing like so, err: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter root_password at /etc/puppet/manifests/ nodes.pp:882 on node puppetnode1.tld The definition looks like this, node 'puppetnode1.tld' { class { 'mysql::server': root_password = 'test' } should be changed to: class { 'mysql::server': config_hash = { root_password = 'test'} } database_user { 'treydock@localhost': password_hash = mysql_password('pass') } database_grant { 'treydock@localhost/*': privileges = ['ALL'], } mysql::db { 'zabbix': user= 'zabbix', password= 'zabbix', host= 'localhost', grant = ['ALL'], } } The database_user and _grant thus far haven't actually done anything. I'm assuming it's because mysql::server isn't working or being applied. There's likely something very obvious I'm missing. This is also my first time using parameterized classes. Thanks - Trey -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. Ah that was it! Thanks. Is there a way to similuate or run the equivilant of mysql_secure_installation within this module? I tried an initial attempt with the following...but once it's added to the mysql::server class it never seems to get called... what failed? How did you add it to the mysql::server class? class mysql::server::secure { database_user { '': ensure= absent, require = Service['mysqld']; root@${fqdn}: ensure= absent, require = Service['mysqld']; } database { test: ensure = absent, require = Service['mysqld']; } } Would the easier route be to just modify the mysql_secure_installation script to be more puppet friendly? Thanks - Trey -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Help using puppetlabs-mysql
On Mon, Oct 31, 2011 at 12:44 PM, treydock treyd...@gmail.com wrote: On Oct 31, 1:56 pm, treydock treyd...@gmail.com wrote: On Oct 31, 1:05 pm, Dan Bode d...@puppetlabs.com wrote: On Mon, Oct 31, 2011 at 10:55 AM, treydock treyd...@gmail.com wrote: On Oct 31, 12:26 pm, Dan Bode d...@puppetlabs.com wrote: you are running into a documentation issue. All of the configuration was moved to a new parameter called: config_hash. I can submit a patch On Mon, Oct 31, 2011 at 10:01 AM, treydock treyd...@gmail.com wrote: I'm working to begin managing MySQL with the puppetlabs-mysql provided module, but am not able to get very far with the README documentation. So far, simply trying to add the server module and define the root_password is failing like so, err: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter root_password at /etc/puppet/manifests/ nodes.pp:882 on node puppetnode1.tld The definition looks like this, node 'puppetnode1.tld' { class { 'mysql::server': root_password = 'test' } should be changed to: class { 'mysql::server': config_hash = { root_password = 'test'} } database_user { 'treydock@localhost': password_hash = mysql_password('pass') } database_grant { 'treydock@localhost/*': privileges = ['ALL'], } mysql::db { 'zabbix': user= 'zabbix', password= 'zabbix', host= 'localhost', grant = ['ALL'], } } The database_user and _grant thus far haven't actually done anything. I'm assuming it's because mysql::server isn't working or being applied. There's likely something very obvious I'm missing. This is also my first time using parameterized classes. Thanks - Trey -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. Ah that was it! Thanks. Is there a way to similuate or run the equivilant of mysql_secure_installation within this module? I tried an initial attempt with the following...but once it's added to the mysql::server class it never seems to get called... what failed? How did you add it to the mysql::server class? class mysql::server::secure { database_user { '': ensure= absent, require = Service['mysqld']; root@${fqdn}: ensure= absent, require = Service['mysqld']; } database { test: ensure = absent, require = Service['mysqld']; } } Would the easier route be to just modify the mysql_secure_installation script to be more puppet friendly? Thanks - Trey -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. It didn't fail, it just simply did nothing. This is it's inclusion in mysql::server class mysql::server( $service_name = $mysql::params::service_name, $config_hash = {}, $package_name = 'mysql-server' ) inherits mysql::params { include mysql::server::secure # automatically create a class to deal with # configuration $hash = { mysql::config = $config_hash } I am doing it via Exec now anyways. Though I'd prefer to do it with the new type and provider - Trey Slightly different question...is there a way to pass / store the hash for the root password rather than the plain text password? Similar to how the puppet user resource works? I am not quite sure if mysql supports that. Could you open a ticket here: http://projects.puppetlabs.com/projects/modules and explain what the implementation would look like? thanks Thanks - Trey -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You
Re: [Puppet Users] Chaining behavior
The ordering only applies to the order in which resources are applied, not the order in which the code is processed. It will work like you expect if you switch out the calls to the notice function with notify resources. On Mon, Oct 24, 2011 at 3:48 AM, Andre Nathan andre...@gmail.com wrote: Hello I'm experimenting with the new resource chaining syntax. Here's the code: class first { notice(first) } class second { notice(second) } class third { notice(third) } include third include second include first Class[first] - Class[second] - Class[third] Shouldn't the last line guarantee that the classes are executed in that specific order? Thanks in advance, Andre -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Fwd: How does an ENC find the client's enviromement?
The client's environment is stored as a fact. Facts are saved before the ENC is called. By default, they will be saved to /var/lib/puppet/yaml/facts/NODE_NAME/TIMESTAMP.yaml An ENC can read a client's latest environment and other facts from this location. -Dan On Mon, Oct 17, 2011 at 8:25 AM, Mohamed Lrhazi lrh...@gmail.com wrote: To be clearer.. am asking about ENC setting the environment, just 'finding it out. On Mon, Oct 17, 2011 at 11:23 AM, Mohamed Lrhazi lrh...@gmail.com wrote: On Mon, Oct 17, 2011 at 8:53 AM, jcbollinger john.bollin...@stjude.org wrote: On Oct 16, 6:38 pm, Mohamed Lrhazi lrh...@gmail.com wrote: I tried to work around the problem by having a copy of the ENC per environment, which would work for me too... but then that does not work either: external_nodes = /etc/puppet/environments/$environment/gu-enc/gu-enc.py In the above, $environment evaluates to production even though my puppet agent call specified a different environment. I guess the above is evaluated on master's start up, only once, not per client invocation. Thanks a lot, Mohamed. On Sun, Oct 16, 2011 at 1:26 PM, Mohamed Lrhazi lrh...@gmail.com wrote: Hello, I started writing an ENC and run into what seems like a chicken and egg problem... I was starting off by getting the client's facts from the inventory service by getting: https://puppetmaster:8140/production/facts/$client_hostname and then was getting the environment from the fact named environment then I realized that production in the previous URL is the environment I am querying! Is there another way of finding the environment that the client is providing to the master? The client may specify in its puppet.conf which environment it thinks it is in (key 'environment'). The ENC may also specify which environment a client is in by setting the variable environment, but see http://projects.puppetlabs.com/issues/3910 for problems related to that. Your master can specify the default environment for nodes that do not otherwise specify one, via the environment key in the [master] section of their own puppet.conf. I'm not sure offhand whether something like 3910 applies if the default is changed. This is all covered in the External Nodes Guide and the puppet.conf documentation. Thanks a lot John... I tried and could not find my answer in the docs. my specific question is: - When the master calls my ENC, it knows what the environment of the client is, regardless of where it got it from, right? - All the master passes to the ENC is the clients' cert name, nothing else. My question is whether there is a way for the ENC to find that environment or not? Thanks a lot, Mohamed. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Fwd: How does an ENC find the client's enviromement?
On Mon, Oct 17, 2011 at 9:42 AM, Mohamed Lrhazi lrh...@gmail.com wrote: Task a lot Dan... I will use that, though I was hoping for a solution using the inventory service...It looks like one needs to know the environment first, before speaking to it: The same should also hold true for the inventory service. I believe that the calls that save facts to the inventory service are all synchronous. http://docs.puppetlabs.com/guides/rest_api.html#facts Having environment present as a part of the URL's is just a convention for restful interfaces. Ju st provide 'production' as the environment and you will be able to access everything Mohamed. On Mon, Oct 17, 2011 at 11:40 AM, Dan Bode d...@puppetlabs.com wrote: The client's environment is stored as a fact. Facts are saved before the ENC is called. By default, they will be saved to /var/lib/puppet/yaml/facts/NODE_NAME/TIMESTAMP.yaml An ENC can read a client's latest environment and other facts from this location. -Dan On Mon, Oct 17, 2011 at 8:25 AM, Mohamed Lrhazi lrh...@gmail.com wrote: To be clearer.. am asking about ENC setting the environment, just 'finding it out. On Mon, Oct 17, 2011 at 11:23 AM, Mohamed Lrhazi lrh...@gmail.com wrote: On Mon, Oct 17, 2011 at 8:53 AM, jcbollinger john.bollin...@stjude.org wrote: On Oct 16, 6:38 pm, Mohamed Lrhazi lrh...@gmail.com wrote: I tried to work around the problem by having a copy of the ENC per environment, which would work for me too... but then that does not work either: external_nodes = /etc/puppet/environments/$environment/gu-enc/gu-enc.py In the above, $environment evaluates to production even though my puppet agent call specified a different environment. I guess the above is evaluated on master's start up, only once, not per client invocation. Thanks a lot, Mohamed. On Sun, Oct 16, 2011 at 1:26 PM, Mohamed Lrhazi lrh...@gmail.com wrote: Hello, I started writing an ENC and run into what seems like a chicken and egg problem... I was starting off by getting the client's facts from the inventory service by getting: https://puppetmaster:8140/production/facts/$client_hostname and then was getting the environment from the fact named environment then I realized that production in the previous URL is the environment I am querying! Is there another way of finding the environment that the client is providing to the master? The client may specify in its puppet.conf which environment it thinks it is in (key 'environment'). The ENC may also specify which environment a client is in by setting the variable environment, but see http://projects.puppetlabs.com/issues/3910 for problems related to that. Your master can specify the default environment for nodes that do not otherwise specify one, via the environment key in the [master] section of their own puppet.conf. I'm not sure offhand whether something like 3910 applies if the default is changed. This is all covered in the External Nodes Guide and the puppet.conf documentation. Thanks a lot John... I tried and could not find my answer in the docs. my specific question is: - When the master calls my ENC, it knows what the environment of the client is, regardless of where it got it from, right? - All the master passes to the ENC is the clients' cert name, nothing else. My question is whether there is a way for the ENC to find that environment or not? Thanks a lot, Mohamed. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options
Re: [Puppet Users] Cloud Provisioner: What works and what doesn't work?
This definitely was a bug: http://projects.puppetlabs.com/issues/10062 It has been resolved in master (the latest source) and will be fixed in the next release. On Sun, Oct 9, 2011 at 2:02 PM, Dan Bode d...@puppetlabs.com wrote: thanks for pointing out this issue. I have a feeling that this issue was caused by some changes in how faces handles options between 2.7.2 and 2.7.3 The cloud provisioner definitely needs to be updated to work with the latest version of Puppet. could you try this out with 2.7.2rc3 and see if the issue still exists with that version? I am definitely not recommending this as a permanent fix, just trying to collect some data. thanks, Dan On Thu, Oct 6, 2011 at 12:03 PM, Eivind Hagen eiv...@sibblingz.comwrote: Hi all, I'm very excited about using puppet cloud provisioner to spin up new EC2 instances and have puppet auto-installed on them and then get them to play their part by getting them classified using either puppet master or puppet dashboard, so that each node will install all the appropriate packages according to their roles. However, I'm running into some troubles. Using puppet v2.7.3 with cloud provisioner, I get some unexpected errors from the various commands I try to run: # puppet node bootstrap --image ami- --keypair puppet --login root --keyfile /root/.ssh/puppet.pem --certname mypuppetmaster.mydomain.com --type t1.micro notice: Creating new instance ... notice: Creating new instance ... Done notice: Creating tags for instance ... notice: Creating tags for instance ... Done notice: Launching server i-12341234 ... ### notice: Server i-12341234 is now launched notice: Server i-12341234 public dns name: ec2-XX-XX-XXX- XXX.compute-1.amazonaws.com notice: Waiting for SSH response ... notice: Waiting for SSH response ... Done notice: Installing Puppet ... notice: Puppet is now installed on: ec2-XX-XX-XXX- XXX.compute-1.amazonaws.com notice: Signing certificate ... err: Unknown options passed: image, keyfile, keypair, login, type err: Try 'puppet help node bootstrap' for usage It complains that some required options are unknown: image, keyfile, login, type Clearly, I'm passing in those options, and it did spin up an instance, and apparently installed puppet on it. Should I ignore such errors, or is this an indication that something is wrong in my setup? Thanks! -Eivind -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] puppetlabs-mysql: How does the command on this line get the mysql root password?
It expects the password to be set somewhere other than on the command line (my.cnf) On Tue, Oct 11, 2011 at 7:18 AM, adam adus...@gmail.com wrote: Stupid question here: how does this line of code get the mysql root password?: https://github.com/puppetlabs/puppetlabs-mysql/blob/master/lib/puppet/provider/database/mysql.rb#L12 I am asking because when I run the set of commands to make a mysql server and db locally, everything is fine. When I run on my ec2 instance, I get: debug: Puppet::Type::Database::ProviderMysql: Executing '/usr/bin/ mysql -NBe CREATE DATABASE testdb CHARACTER SET utf8' err: /Stage[main]/Testdb::Dev::Db/Mysql::Db[testdb]/Database[testdb]/ ensure: change from absent to present failed: Execution of '/usr/bin/ mysql -NBe CREATE DATABASE testdb CHARACTER SET utf8' returned 1: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) I figured I would just debug the code in the module, but it's pretty unclear to me how the mysql command is supposed to get the root password. Thanks! Adam -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] More cloud provisioner stuff
On Thu, Oct 6, 2011 at 1:41 PM, Joshua Vaughn-Uding unix.magic...@gmail.com wrote: I'm still having some issues with cloud provisioner. I have a fresh install of provisioner, .60rc1, puppet 2.7.3, and dashboard 1.2.0. Everything has a very default install as described in the documentation. I was unable to get bootstrap to work, so I did things in a linear fashion (create, install, classify). Classify is failing and theres not really any good debug info, I just get this: root@ip-10-36-11-244:/etc/puppet/manifests# puppet node install ec2-50-19-149-210.compute-1.amazonaws.com --login root --keyfile / root/.ssh/puppet.pem --install-script gems --puppet-version 2.7.5 notice: Waiting for SSH response ... notice: Waiting for SSH response ... Done notice: Installing Puppet ... info: access[^/catalog/([^/]+)$]: allowing 'method' find info: access[^/catalog/([^/]+)$]: allowing $1 access info: access[^/node/([^/]+)$]: allowing 'method' find info: access[^/node/([^/]+)$]: allowing $1 access info: access[/certificate_revocation_list/ca]: allowing 'method' find info: access[/certificate_revocation_list/ca]: allowing * access info: access[/report]: allowing 'method' save info: access[/report]: allowing * access info: access[/file]: allowing * access info: access[/certificate/ca]: adding authentication no info: access[/certificate/ca]: allowing 'method' find info: access[/certificate/ca]: allowing * access info: access[/certificate/]: adding authentication no info: access[/certificate/]: allowing 'method' find info: access[/certificate/]: allowing * access info: access[/certificate_request]: adding authentication no info: access[/certificate_request]: allowing 'method' find info: access[/certificate_request]: allowing 'method' save info: access[/certificate_request]: allowing * access info: access[/]: adding authentication any info: access[/certificate_status]: allowing 'method' save info: access[/certificate_status]: adding authentication yes info: access[/certificate_status]: allowing * access info: Inserting default '/status'(auth) ACL because none were found in '/etc/puppet/auth.conf' info: Inserting default '/resource'(auth) ACL because none were found in '/etc/puppet/auth.conf' info: Could not find certificate for '2c96865c-deb0-a646-2d94- c4287f72650f' info: Could not find certificate_request for '2c96865c-deb0-a646-2d94- c4287f72650f' notice: 2c96865c-deb0-a646-2d94-c4287f72650f has a waiting certificate request notice: Signed certificate request for 2c96865c-deb0-a646-2d94- c4287f72650f notice: Removing file Puppet::SSL::CertificateRequest 2c96865c-deb0- a646-2d94-c4287f72650f at '/etc/puppet/ssl/ca/requests/2c96865c-deb0- a646-2d94-c4287f72650f.pem' 2c96865c-deb0-a646-2d94-c4287f72650f root@ip-10-36-11-244:/etc/puppet/manifests# puppet node classify ec2-50-19-149-210.compute-1.amazonaws.com --mode agent --node- group=puppet-agentsnotice: Registering node ... err: Connection reset by peer err: Try 'puppet help node classify' for usage It looks like that you have not set the options that let the classify action know how to connect to the dashboard. You need to set: report_server: hostname of dashboard report_port: dashboard port (3000) In the version that you are using, the node classify action does not have the best logging. I would recommend trying out the version in master (if you don't mind running from source) The latest version has some improved logging for the classification action. I would also recommend running the classify action with --verbose enabled nothing shows up in dashboard, a check of the syslog on the client reveals: Oct 6 19:50:19 domU-12-31-39-0C-10-C7 puppet-agent[1279]: (/File[/var/ lib/puppet/lib/puppet/face/node/terminate.rb]/ensure) defined content as '{md5}58a4dadeb4194a3cb285f1d2ec582bd2' Oct 6 19:50:19 domU-12-31-39-0C-10-C7 puppet-agent[1279]: Loading downloaded plugin /var/lib/puppet/lib/puppet/cloudpack.rb Oct 6 19:50:19 domU-12-31-39-0C-10-C7 puppet-agent[1279]: Could not load downloaded file /var/lib/puppet/lib/puppet/cloudpack.rb: no such file to load -- guid Oct 6 19:50:19 domU-12-31-39-0C-10-C7 puppet-agent[1279]: Loading downloaded plugin /var/lib/puppet/lib/puppet/face/node/classify.rb Oct 6 19:50:19 domU-12-31-39-0C-10-C7 puppet-agent[1279]: Could not load downloaded file /var/lib/puppet/lib/puppet/face/node/classify.rb: no such file to load -- guid Oct 6 19:50:19 domU-12-31-39-0C-10-C7 puppet-agent[1279]: Loading downloaded plugin /var/lib/puppet/lib/puppet/face/node/terminate.rb Oct 6 19:50:19 domU-12-31-39-0C-10-C7 puppet-agent[1279]: Could not load downloaded file /var/lib/puppet/lib/puppet/face/node/ terminate.rb: no such file to load -- guid Oct 6 19:50:19 domU-12-31-39-0C-10-C7 puppet-agent[1279]: Loading downloaded plugin /var/lib/puppet/lib/puppet/face/node/init.rb Oct 6 19:50:19 domU-12-31-39-0C-10-C7 puppet-agent[1279]: Could not load downloaded file
Re: [Puppet Users] Cloud Provisioner: What works and what doesn't work?
thanks for pointing out this issue. I have a feeling that this issue was caused by some changes in how faces handles options between 2.7.2 and 2.7.3 The cloud provisioner definitely needs to be updated to work with the latest version of Puppet. could you try this out with 2.7.2rc3 and see if the issue still exists with that version? I am definitely not recommending this as a permanent fix, just trying to collect some data. thanks, Dan On Thu, Oct 6, 2011 at 12:03 PM, Eivind Hagen eiv...@sibblingz.com wrote: Hi all, I'm very excited about using puppet cloud provisioner to spin up new EC2 instances and have puppet auto-installed on them and then get them to play their part by getting them classified using either puppet master or puppet dashboard, so that each node will install all the appropriate packages according to their roles. However, I'm running into some troubles. Using puppet v2.7.3 with cloud provisioner, I get some unexpected errors from the various commands I try to run: # puppet node bootstrap --image ami- --keypair puppet --login root --keyfile /root/.ssh/puppet.pem --certname mypuppetmaster.mydomain.com --type t1.micro notice: Creating new instance ... notice: Creating new instance ... Done notice: Creating tags for instance ... notice: Creating tags for instance ... Done notice: Launching server i-12341234 ... ### notice: Server i-12341234 is now launched notice: Server i-12341234 public dns name: ec2-XX-XX-XXX- XXX.compute-1.amazonaws.com notice: Waiting for SSH response ... notice: Waiting for SSH response ... Done notice: Installing Puppet ... notice: Puppet is now installed on: ec2-XX-XX-XXX- XXX.compute-1.amazonaws.com notice: Signing certificate ... err: Unknown options passed: image, keyfile, keypair, login, type err: Try 'puppet help node bootstrap' for usage It complains that some required options are unknown: image, keyfile, login, type Clearly, I'm passing in those options, and it did spin up an instance, and apparently installed puppet on it. Should I ignore such errors, or is this an indication that something is wrong in my setup? Thanks! -Eivind -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Concat::Fragment collection broken in 2.7.5
what version did you upgrade from? could you also recreate with --trace. thanks, Dan On Tue, Oct 4, 2011 at 2:36 PM, Bruno Leon nonolem...@gmail.com wrote: I don't if anybody is using the concat modules from ripienaar, but since an upgrade to 2.7.5 I keep getting an error on fragment collection. The code is like below: @@concat::fragment{ ${name} : target = /etc/bind/named.conf.keys, content = template(dns/named.conf.keys.**erb), order = 10, tag = 'dnskey' } Concat::Fragment | tag == 'dnskey' | err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find type Concat::Fragment on node Is anybody facing the same kind of issue ? -- Bruno -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@** googlegroups.com puppet-users%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/** group/puppet-users?hl=enhttp://groups.google.com/group/puppet-users?hl=en . -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Get the value of a parameter passed to a parameterized class
This is stored inside of the compiled catalog. Catalogs are saved on the client where they are applied the default location is: /var/lib/puppet/client_yaml/catalog/CERTNAME.yaml On Mon, Oct 3, 2011 at 3:44 PM, Bruno Leon nonolem...@gmail.com wrote: Hi, is there a way to get the value of a parameter passed to a parameterized class ? I've searched quite a lot and did not came out with a solution. Thanks -- Bruno -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@** googlegroups.com puppet-users%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/** group/puppet-users?hl=enhttp://groups.google.com/group/puppet-users?hl=en . -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] apply.pp module missing?
It looks like it is failing b/c you are running a version older than 2.6.x (probably 0.25.5) for 0.25.5, the executable is a little different, try running: $ puppet my_test_manifest.pp there are significant syntax changes between 0.25.5 and 2.6.x, I would not recommend starting with the older version. -Dan On Sun, Oct 2, 2011 at 12:26 PM, John Bower olympus.sta...@gmail.comwrote: Hello, I have succesfully installed puppet on ubunu, one master and one client. I am going through the documentation and I am having a hard time getting this example to work http://docs.puppetlabs.com/learning/manifests.html $ puppet apply my_test_manifest.pp I get this error root@puppet:/etc/puppet/manifests# pwd /etc/puppet/manifests root@puppet:/etc/puppet/manifests# puppet apply my_test_manifest.pp Could not parse for environment production: Could not find file /etc/ puppet/manifests/apply.pp root@puppet:/etc/puppet/manifests# locate apply.pp root@puppet:/etc/puppet/manifests# I am supposed to generate apply.pp somehow or am I actually missing a module or something else i dont know about? Thanks PS.: So far I am impressed with puppet's abilities and look forward to implementing it :) -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Help with cloud provisioner
Thanks for being an early adopter of cloud provisioner. Fixes for these issues will exist in the next version (and currently exist in master if you install from source) On Fri, Sep 30, 2011 at 2:59 PM, Josh joshevau...@gmail.com wrote: I have a very basic puppet install right now, running puppet master, with the dashboard and foreman on the same host, I have some legacy static nodes (nodes.pp) and now I am using puppet to provision nodes in EC2. I am running cloud provisioner .60rc1 and my question is what happens after a puppet node bootstrap? I'm running into some issues and maybe its just idiot user driving this thing, but I do something like: puppet node bootstrap --image ami-79e32e10 --keypair puppet --login root --keyfile \ /root/.ssh/puppet.pem --certname app01.c43870.blueboxgrid.com --type m1.small which works okay when EC is being nice, the node comes up and puppet logs in and installs the agent which then generates a certificate and has it auto signed. After which the puppet agent exits (why?), and nobody is really happy after that: Sep 30 12:16:51 app01 puppet-master[18203]: Removing file Puppet::SSL::CertificateRequest 21b5041a-db2a-f26f-c2e6-faf3676a5d2a at '/etc/puppet/ssl/ca/requests/21b5041a-db2a-f26f-c2e6- faf3676a5d2a.pem' Sep 30 12:17:01 app01 puppet-master[18203]: Could not find node '21b5041a-db2a-f26f-c2e6-faf3676a5d2a'; cannot compile What am I missing? Of course there's no catalog, I had no idea what the name of the node was going to appear as, so its not like I could put together a manifest for new instance. in the next version, a new option exists: --puppetagent-certname can be used to assign the certificate name for the new node. Is the idea being that it gets a default set of packages then I need to use facts to figure out what it is? So basically my question is, what happens next? What am I missing? I have a new instance with puppet on it but since there's no catalog, the agent (if it were still running) wouldn't know what to ask for. There is also a classify action, which can be used to assign node groups to a node in the dashboard (this requires that the dashboard be used as an External node classifier) This requires that the parameters: --report-server, --report-port, and --node-group are used Thanks -Josh -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] mysql database
you can find several examples of existing types/providers for managing mysql online. Here is one example: https://github.com/puppetlabs/puppetlabs-mysql hope this helps -Dan On Sun, Oct 2, 2011 at 1:26 PM, Matthew Black mjbl...@gmail.com wrote: No that is one of the ways to do it. The alternative is to write your own provider and type. As for whether your method is correct, if it is working for you and scales then its the correct procedure for you. On Sun, Oct 2, 2011 at 11:41 AM, CHEBRIAN ksd@gmail.com wrote: Hi, How to create mysql database thru puppet. I fired thru exec . it it creating. but i feel it is not a correct procedure. Please share your suggestions -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Increment variable each time a definition is called.
I can think of something really hacky that I don't recommend for production, it could be ok for debugging purposes. notice(inline_template( '%= $dangerous_counter = $dangerous_counter || 0; $dangerous_counter = $dangerous_counter + 1 %' )) will create a global variable in Ruby, I have a feeling that this will increment for all nodes if you are running a master though. On Tue, Sep 27, 2011 at 3:12 PM, Douglas Garstang doug.garst...@gmail.comwrote: I want to set a variable in a class, and then increment the value of that variable each time a definition is called. Since I have to qualify the variable in the definition, like so: $platform::proxy::config::ssl_port_start I tried this: $platform::proxy::config::ssl_port_start = $platform::proxy::config::ssl_port_start + 1 but then puppet complains: Cannot assign to variables in other namespaces at... and since I have to qualify the original variable ugh how can I do this? Doug -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Software inventory
On Wed, Sep 21, 2011 at 9:45 AM, Glenn Bailey replic...@dallaslamers.orgwrote: Howdy, Before I go about writing one myself, anyone out there written a software inventory module/fact for gathering a list of all installed rpms/debs on a system? Got a few ideas floating around in my head, but wanted to see if/what other folks have done .. you can already do this with: puppet resource package this will generate a manifests that represents all of the packages installed on a system. -- I've seen things you people wouldn't believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhauser gate. All those moments will be lost in time... like tears in rain... Time to die. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- Join us for PuppetConf http://bit.ly/puppetconfsig, September 22nd and 23rd in Portland, OR. http://bit.ly/puppetconfsig -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Software inventory
its also pretty easy to programatically access the information, which could make parsing it easier: require 'puppet' Puppet::Type.type(:package).instances On Wed, Sep 21, 2011 at 10:53 AM, Glenn Bailey replic...@dallaslamers.orgwrote: Before I go about writing one myself, anyone out there written a software inventory module/fact for gathering a list of all installed rpms/debs on a system? Got a few ideas floating around in my head, but wanted to see if/what other folks have done .. you can already do this with: puppet resource package this will generate a manifests that represents all of the packages installed on a system. Let me re-phrase a bit, I'm trying to get a fact setup to collect this information and I can report of my Puppet DB. Was just thinking of doing an auto-increment so it would be something like package0 = package_name-version package1 = package_name-version etc. Parsing puppet resource package will make it easier for writing a single module for rpm/deb .. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- Join us for PuppetConf http://bit.ly/puppetconfsig, September 22nd and 23rd in Portland, OR. http://bit.ly/puppetconfsig -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] deliberately causing template failure?
using the fail function should work: content = inline_template('%= fail(doh) %') On Wed, Sep 21, 2011 at 12:56 PM, Daniel Pittman dan...@puppetlabs.comwrote: On Wed, Sep 21, 2011 at 12:00, Christopher Wood christopher_w...@pobox.com wrote: How do I cause template failure in the erb ruby? I'd like the same kind of failure as for a template syntax issue, where puppet keeps going. I know I can use exit in a template, but I haven't yet tested if that will simply cause my puppet agent to exit altogether. I believe you should be able to `raise Puppet::Error, your message here` and have that fail in the way you desire. Daniel -- ⎋ Puppet Labs Developer – http://puppetlabs.com ♲ Made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- Join us for PuppetConf http://bit.ly/puppetconfsig, September 22nd and 23rd in Portland, OR. http://bit.ly/puppetconfsig -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] CloudPack's node install .... ignores certname
We recently noticed the same issue. I have a feeling that is may be related to the version of puppet that is running. What version are you running? We have actually been actively working on a fix in the following pull request: https://github.com/puppetlabs/puppetlabs-cloud-provisioner/pull/16 a fix should be available in master soon On Wed, Sep 21, 2011 at 2:13 PM, Hamoun gh hamoun...@gmail.com wrote: although in cloudpack.rb::install(...) user specified certname is supprted (i.e. options[:certname] ||= Guid.new.to_s), the certname is not passed to the method when supplied through command line. any idea? tx -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- Join us for PuppetConf http://bit.ly/puppetconfsig, September 22nd and 23rd in Portland, OR. http://bit.ly/puppetconfsig -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] automatic certificate signing for CloudPack
On Mon, Sep 19, 2011 at 4:56 PM, hamoun hamoun...@gmail.com wrote: Hi All Despite several tries I have been unable to setup automatic certificate signing for CloudPack. This is part of typical output: warning: peer certificate won't be verified in this SSL session warning: peer certificate won't be verified in this SSL session warning: peer certificate won't be verified in this SSL session warning: peer certificate won't be verified in this SSL session notice: Did not receive certificate warning: peer certificate won't be verified in this SSL session notice: Did not receive certificate ^CCancelling startup when I run: puppet node install ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com -- login ec2-user --keyfile x --install-script gems --puppet-version 2.7.3 --debug --certname cloudadmin Although in the master I can see that the certificate is requested by client, I couldnt figure out where and how the automatic signing takes place. I looked into modules/cloud_provisioner/lib/puppet/cloudpack.rb where install is handled and thought maybe provisioner pulls cert requests and signs them but I could not find any code or log. right now, certificate signing is a step that needs to be performed after the installation script runs. The controller node (or the node from which you invoke puppet node) should be authorized to remotely sign certificates For this, you need to add the following line to the master's auth.conf path /certificate_status method save auth yes allow #{controller.to_s} you also need to ensure that auth is set to any on the following config sections: # allow access to the master CA path /certificate/ca auth any method find allow * path /certificate/ auth any method find allow * path /certificate_request auth any method find, save allow * Once the controller node has permission to sign certificates, you can run: puppet certificate sign #{agent_certname} --ca-location remote --mode agent the bootstrap action should be able to create nodes in ec2, run install and sign the certs in one action hope this helps -Dan Thank you -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- Join us for PuppetConf http://bit.ly/puppetconfsig, September 22nd and 23rd in Portland, OR. http://bit.ly/puppetconfsig -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Requiring a package to satisfy a provider requirement
On Tue, Sep 20, 2011 at 5:27 AM, Matthew Willsher matthew.wills...@gmail.com wrote: On Sep 20, 1:02 pm, Matthew Willsher matthew.wills...@gmail.com wrote: On Sep 19, 4:06 pm, Matt matthew.wills...@gmail.com wrote: On Sep 19, 3:52 pm, John Kennedy skeb...@gmail.com wrote: Would it be possible to create a class to install Glassfish and require that class to be fulfilled before? I actually thought that require = Package['glassfish'] would have the desired effect... That's what I was expecting but it fails when it can't find asadmin then if I create a dummy asadmin it files when it can't find passwordfile. Further reading reveals this to be a function of the provider suitability checks. Apparently the use of stages (=2.6) can be used to resolve this, so there's my way forward. Sorry to post to my own reply and so soon afterwards, but stages appear not to have resolved this. It seems that the provider tests are done irrespective of stages, so at this point it looks as though it's not possible to use providers that exist as the result of the action of another resource. stages were definitely not designed to solve this. It has been a known issue for a while and has a few work-arounds. The pip provider works around this by not using the commands method, and instead implements lazy pip. Another example of a work around if to create a default provider that does nothing except determine suitability, then you can explicitly specify provider = 'real_provider' during compile time you can see an example of this approach in the rabbitmq provider https://github.com/puppetlabs/puppetlabs-rabbitmq -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- Join us for PuppetConf http://bit.ly/puppetconfsig, September 22nd and 23rd in Portland, OR. http://bit.ly/puppetconfsig -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Handling ENC / Class interface changes
On Mon, Aug 8, 2011 at 5:51 AM, Oliver Hookins ohook...@gmail.com wrote: Hi all, Recently I've hit against this problem which is proving to be a formidable foe. We have an in-house developed ENC and use parameterised classes just about everywhere and as a result enjoy a fairly flexible way of handing out configurations and very well- defined interfaces between components. We also quite strictly version our Puppet code but there isn't a fixed versioning between the ENC YAML and the Puppet code that it drives. Whenever we want to add additional parameters to certain classes, unless we update that class and the YAML that drives it atomically everywhere, we end up in a situation where the YAML does not match the parameterised class and causes errors. Perhaps it is best shown as code: YAML: classes: foo: var1: foo var2: bar Puppet: class foo ( $var1, $var2 ) { ... } Now we want to add a new parameter to this class for a certain subset of nodes that need new functionality: class foo ( $var1, $var2, $var3 = 'somedefault' ) { ... } Since we have module versioning, we only need to worry about the new nodes getting this version of the class. Unfortunately the YAML that drives them is the same. The problem now is that adding the new parameter to the YAML will break any machine that uses the old class - additional parameters that don't exist in the class interface will cause a failure. We've thought of a few solutions: * pass all the parameters as a hash (breaks the interface consistency and verification, requires additional hash parameter handling) * hack Puppet to not complain about additional unexpected parameters (breaks the concept of well-defined interfaces) * hack Puppet to take an arg* final parameter (an awful combination of the above two) * version our YAML interfaces in lockstep with Puppet classes (removes our ability to benefit from inheritance of common class definitions in the ENC) * never add new parameters to anything unless we can atomically change it everywhere at once this is something that may be worth considering. If you know all of your possible environments in advance, you could copy your data hierarchy (or more reasonably branch) and version it to match those environments. This would ensure that the final resulting data should only match the current interfaces of the environment. * using class introspection, generate class interface YAML that is read and used by our ENC instead of using a separate configuration specification, store this with the versioned Puppet classes. this would be my vote, the resource_type interface provides all of the information you need to do this, and its all possible through a well defined interface. Since you are generating the environment on the fly, you should have all of the information that you need to query for mismatches against the current interfaces. The final data set could be munged and produce warnings if there are data mismatches. I guess this could constitute a fairly solid argument against the parameterised class interface benefits I've been arguing for and a theoretical vote for Hiera ;) Anyway any thoughts or abuse are welcome! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- Join us for PuppetConf http://bit.ly/puppetconfsig, September 22nd and 23rd in Portland, OR. http://bit.ly/puppetconfsig -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Moving config to an ENC
On Tue, Jul 12, 2011 at 10:43 AM, Justin Lambert jlamb...@localmatters.comwrote: I have just gotten to playing with this and am doing something wrong, probably very basic. On the puppetmaster (which for my testing is also the client) I have create_resources.rb in /var/lib/puppet/lib/puppet/parser/functions. I wrote a new ENC that will just output a very basic YAML to test this, the output is: classes: yumreposerver: yumreposerver::locations: centos5: distro: centos version: 5.6 it should be something like: yumreposerver: instances: centos5: distro: ... there is no yumreposerver parameter in the yum server class, only an instances parameter In my modules directory I have yumreposerver/manifests/locations.pp: class yumreposerver::locations ( $instances = {} ) { create_resources('yumreposerver::location', $instances) } yumreposerver/manifests/location.pp: define yumreposerver::location( $distro, $version ) { . } puppet agent -t --noop returns: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter yumreposerver::locations on node name I agree that this is not a very clear error message, can you run with --trace? Puppet version 2.6.9 on SL6. Any insight as to where I have gone wrong? Thanks, jl On Wed, Jul 6, 2011 at 7:22 AM, Justin Lambert jlamb...@localmatters.comwrote: This looks exactly like what I was looking for, thank you. This might be worth mentioning on the ENC page so people like myself can find it easier. On Tue, Jul 5, 2011 at 10:42 PM, Dan Bode d...@puppetlabs.com wrote: Hi J, The create resources function was created to serve this exact use case (the README actually mentions your exact use case :) ) https://github.com/puppetlabs/puppetlabs-create_resources This will require 2.6.5 or higher to work (That is the first version where ENC's support param classes) The function was also merged into core in 2.7.0 -Dan On Tue, Jul 5, 2011 at 1:40 PM, Justin Lambert jlamb...@localmatters.com wrote: I have recently started moving the config of our puppet hosts out of the nodes files and into an ENC so they can be managed through a web UI by someone with less technical experience without the fear of a typo causing a failure of all catalogs to compile. As a result, I have been looking at which modules need to be rewritten to support this. The problem I have run into is, how do you do something such as add multiple virtual hosts using the YAML output of an ENC? I currently have something like: node 'web01.company.com' { apache::virtualhost { 'site1': location = '/hosted/site1', url = ' http://site1.com' } apache::virtualhost { 'site2': location = '/hosted/site2', url = ' http://site2.com' } } This uses 'define apache::virtualhost' in order to create multiple sites, works fine. The YAML from an ENC (referencing http://docs.puppetlabs.com/guides/external_nodes.html) doesn't look to support this kind of definition so I need to find an alternative. My next thought was that I can pass parameters to a parameterized class. No love there as you can't instantiate a class multiple times with different parameters. How are others solving this issue? Thanks, jl -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Moving config to an ENC
Hi J, The create resources function was created to serve this exact use case (the README actually mentions your exact use case :) ) https://github.com/puppetlabs/puppetlabs-create_resources This will require 2.6.5 or higher to work (That is the first version where ENC's support param classes) The function was also merged into core in 2.7.0 -Dan On Tue, Jul 5, 2011 at 1:40 PM, Justin Lambert jlamb...@localmatters.comwrote: I have recently started moving the config of our puppet hosts out of the nodes files and into an ENC so they can be managed through a web UI by someone with less technical experience without the fear of a typo causing a failure of all catalogs to compile. As a result, I have been looking at which modules need to be rewritten to support this. The problem I have run into is, how do you do something such as add multiple virtual hosts using the YAML output of an ENC? I currently have something like: node 'web01.company.com' { apache::virtualhost { 'site1': location = '/hosted/site1', url = ' http://site1.com' } apache::virtualhost { 'site2': location = '/hosted/site2', url = ' http://site2.com' } } This uses 'define apache::virtualhost' in order to create multiple sites, works fine. The YAML from an ENC (referencing http://docs.puppetlabs.com/guides/external_nodes.html) doesn't look to support this kind of definition so I need to find an alternative. My next thought was that I can pass parameters to a parameterized class. No love there as you can't instantiate a class multiple times with different parameters. How are others solving this issue? Thanks, jl -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] rabbitmq puppet module
Hi all, I have been working on a puppet module for managing rabbitmq. It should be ready enough for people to try out. I just cut a 2.0.0rc1 release: https://github.com/puppetlabs/puppetlabs-rabbitmq It has two external dependencies: https://github.com/puppetlabs/puppetlabs-stdlib https://github.com/puppetlabs/puppet-apt Feedback would be greatly appreciated, and best facilitated as issues through github or via email regards, Dan Bode -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: [Puppet-dev] Open Source Team planning meeting summary 2011-06-1
Hi, I just wanted to clarify something from this email. Although the best way to get traction for a ticket in the future will be voting in the ticketing system, people are always welcome to highlight particular tickets in order to solicit votes. With that in mind, a quick list of things that I have found particularly frustrating about Puppet: https://projects.puppetlabs.com/issues/4408 Puppet should at least warn (or better yet fail) when you try to use an undefined variable (it should not warn/fail, however if a variable was explicitly set to undef) http://projects.puppetlabs.com/issues/3910 a +1 to ENCs being authoritative over environments. I have done some ugly hacks that I am ashamed of to work around this. http://projects.puppetlabs.com/issues/4908 listing the internal resources in the reports creates lots of unnecessary (and useless) data in reports On Wed, Jun 1, 2011 at 2:46 PM, Jacob Helwig ja...@puppetlabs.com wrote: Thanks to everyone that provided their feedback on what they would like to see worked on. We've gone through the suggestions, and re-prioritized our back-log to take into account the various suggestions, and the state of each of the tickets. Next week, I don't plan on directly soliciting with a call for tickets like I did this week, but I definitely wish to encourage everyone to comment on these if they have anything they would like to bring up. The main reason for not having a call for tickets next week is that I'd like to encourage everyone to take advantage of the voting functionality of the ticketing system to help us figure out what the most important things are. I've created a public saved search[1] to easily see what the current top voted issues are, in case you're interested in what that list looks like. There are a few suggestions that aren't listed here, but we haven't forgotten about them. We just didn't want to end up trying to stuff a ton of things into our backlog, when we already knew we wouldn't be able to get to everything this week. The current Open Source Team backlog: * #2128 - Allow arbitrary fact as node_name identifier * #7127 - prerun_command don't stop puppet on error * #650 - puppet replaces configuration directories when they are symlinks * #4416 - Resources cannot be used on the run where they are synced * #7742 - Package type V2 - apt * #7224 - Bad english: hostname was not match with the server certificate * #5517 - behavior change within 2.6 makes it impossible to override class parameters of included parametrized classes * #7743 - Package type V2 - dpkg * #7744 - Package type V2 - aptitude [1] http://projects.puppetlabs.com/projects/puppet/issues?query_id=147 -- Jacob Helwig -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iQGcBAEBAgAGBQJN5rMnAAoJEHJabXWGiqEB/m8MAJ0lcfe6CQPLZRDsW1MBuS+h 1KNZI0vTmZ72RKhvQ2JebjwacA1hQ7yalnPf/g/1rFc+HXY+4v1IZHin8vbjWBJZ 1kdgZf6OUxpSZo9UTs143rToLo07BzC0c+KIOkR8GOXVtgOqspRRcqdjvEayAkD8 zrVTGbikIDYbSi8xWTCzvS+KakEZ3BTpWyMSnc8KvnTMMr1AKpDye1zHsT3DblX6 n960LgY88oqmQty3T9nrtXnFBzoQNz5UoscwG+R+Uxl6Bg0hENNlnWKS1ZEDf/Zk H4aM3HgGjReTJYJg9wojV5kD8w6+aolM+wU8MrE8AjRNuD2d95aQevRduTJZmZp8 7IhdMKgJQ95K1uzDpTCx1XxTQPeYSEJLtMHgJ5ZLXS+JwFFxK/QVu9ngm11SmEws h53t54doxcbo0wjuV/n002PeGczFO+v+0A5XJ7KRaVhF3Qq20SCET5wNxGEKydjH M3taWRNpPHRl5lkM4Dt+ZaRaMmW8Pve1pQ/2fHLZNg== =0cpB -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] configuration history
On Tue, Jun 14, 2011 at 7:47 AM, puppeter puppe...@centrum.cz wrote: Hi people, I have a quite interesting problem here. We are using Puppet for deploying configuration files (among others) and GIT for keeping version history of templates. But now we got a request to keep also history of files that are already interpreted and deployed. Does somebody have an idea how to collect such files? the filebucket can be used to centrally store any files that puppet changes. In fact, we are asked to keep history of configurations across all our Linux systems with a possibility to roll back to some previous state. In general, I consider rollback to be a dirty word. Its something that looks great as a bullet point, but quickly falls apart when you start to think about all of the technical implementations. For example, how do you roll back a service restart, how do you revert the state of you application data? Taking a copy from backup does not make the trick. We are in state of defining requirements so I'm looking for some prepared solution. The best solutions is probably to write a catalog terminus that stores historical versions of your catalog. The only trick to it is that you would have to write some code that can do diffs between catalogs (so that you only store catalogs that are different from the last version). Although you could store this history, it is unlikely that you would be able to rollback any machines from these catalogs. It would be more reasonable to build new machines and get them into the running state by applying the old catalogs. Thanks in advance! Regards -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] two possibilities for declaring resources with hashes [was: Virtual resources and hashes]
On Mon, Jun 13, 2011 at 10:18 AM, Randall Hansen rand...@puppetlabs.comwrote: I think Aaron lays out the options pretty well. This issue has been hanging fire for quite a while, and it would be nice to come to a decision about what our path forward is. Who else cares about this? What do you think? r On Wed, Jun 8, 2011 at 1:36 PM, Aaron Grewell aaron.grew...@gmail.com wrote: We've looked at two different possibilities thus far: 1) Make all resource types hash-aware. This is what I was originally asking for. It would mean changing the way resources are declared so that in the case of a hash their representation of $name was appropriate for use with defines and virtuals. This could either be done by requiring the hash to have a 'name' key and using that or by creating a metaparameter like hash_key so it could be user-specified. The hash itself would need to be passed to the resource in the same way as $name but with a different identifier so that its keys could be accessed inside the resource as e.g. $data[key]. The upside of this is that it should work universally and conceptually match the rest of Puppet, the downsides I see so far are that its implementation might well be intrusive and it might also add to the DSL. 2) Create a hash - resource transformation function. If I understood John correctly this is what he was in favor of. The upside of this is it should be less intrusive, easier to implement, and require no DSL changes. The downside is that it still makes hashes special and requires separate handling of them. As an additional upside, this already exists in 2.7 and is called create_resources There is discussion around this topic at: http://projects.puppetlabs.com/issues/5909 -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] RFC: Adding implicit stages to Puppet
On Thu, Jun 9, 2011 at 6:42 PM, Nigel Kersten ni...@puppetlabs.com wrote: https://projects.puppetlabs.com/issues/7697 One problem people producing modules that make use of stages are hitting is that it's difficult to create something reusable that integrates seamlessly into existing setups. This feature request is to add several more implicit stages to Puppet so we have: bootstrap pre main post existing by default, making it easier for authors to specify stages in their modules. I agree it would be convenient to have implicit stages (and I opened the ticket :) ). Even with these implicit stages, it would still be hard to use them in a reusable way in modules b/c stages can only be applied to param classes. Thoughts? -- Nigel Kersten Product, Puppet Labs @nigelkersten -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] ruby dsl manifests
you should be able to do something like: call_function(:defined, 'Foo['bar']') just keep in mind that the defined function (or anything for resource detection) is parse order dependent which can lead to unexpected results. On Wed, Jun 1, 2011 at 9:04 PM, Matt mjbl...@gmail.com wrote: I've been searching and havent found an answer yet. Is there a scope or variable that I can parse to find out if a resource is defined? I know there is the defined command in puppet manifests. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] ralsh - unable to pass alias array for host resource
On Tue, May 31, 2011 at 8:34 AM, PBWebGuy pbweb...@gmail.com wrote: I'm trying create an entry in the /etc/hosts file but when trying to use the 'alias' parameter I'm getting a munge error because it can't parse the array passed from the command-line. I've tried all sorts of ways to define the array but nothing seems to work. Does anyone know how to define the array on the command-line? Here is the command that I run and the output: # ralsh host puppet.domain.local ip=10.11.12.13 ensure=present alias=puppet alias was changed to host_aliases a while back b/c alias is a meta parameter Could not run: Parameter alias failed: Munging failed for value puppet in class alias: Cannot add aliases without a catalog TIA, John -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Cross-module dependencies
On Sun, May 22, 2011 at 11:06 PM, Matthew Macdonald-Wallace li...@truthisfreedom.org.uk wrote: Hi all, I've got modules for NGINX and PHP-FPM which are working fine, the issue I'm running into is that quite often NGinx will start before php-fpm is even installed. I'm wondering if there's a way in the nginx module to Require the PHP-FPM service is started as a dependency of the nginx service, something like the following: class nginx { service { 'nginx': require = Service['php-fpm::php-fpm'], if the name of the service is php-fpm, you can just reference it as: service { 'nginx': require = Service['php-fpm'] } in general though, it is a little more maintainable to specify inter-module deps at the class level: service { 'nginx': require = Class['php'] } running = true; } } Is this possible in puppet 0.25 on CentOS? Thanks in advance, Matt -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Going to publish custom modules : Request for comments
On Sun, May 15, 2011 at 7:34 AM, Matthias Saou th...@spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net wrote: Hi, I've been using puppet for a while now, and over time I've created many classes and definitions for a whole bunch of different things. It's all very RHEL4, RHEL5 (and now RHEL6) centric, but since lots of people use that (or clones like CentOS), I'm sure it could all be reused by many. The license will be Apache 2.0, just like puppet itself. Most of my ugly-ish code has already been cleaned up as modules, but in order to release something really easy to be reused, I'm now looking into the best way to document everything cleanly. The obvious choice seems to be using puppetdoc, so I've started with a simple xinetd module I had, making all of the relevant changes, and here is the result : https://github.com/thias/puppet-modules Comments about what I'm doing right and what I'm doing wrong would be very welcome. I really want to know that everything's optimal before investing time in publishing more modules, to not have to later waste time going over all modules again. The code is very easy to read and understand (which is one of the most important criteria) I have an implementation question: 1. Why are you doing the chkconfig exec: exec { chkconfig ${title} on: notify = Service[xinetd], path = [ /sbin, /bin ], onlyif = chkconfig --list ${title} | egrep -q 'off$', } why doesnt: service { $title: enable = 'true' } work for this? If there are people familiar with puppetdoc here : Is it possible to generate clean doc for my modules with only relative links to be included in the repo? I do not understand this question. My testing with 0.25.5 (don't ask...) isn't going so well. Matthias -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] variable scope for templates
Hi, the issue is related to how scoping works for nodes in Puppet. The variable defined in your child nodes is not accessible from within the basenode node and is thus not available in its included classes. In order for the variable to be availble to the template, you would have to move the include ntp call to the child classes. This is one of the main reasons that people wind up using either an external node classifier or extlookup for modeling data. regards, Dan On Thu, May 12, 2011 at 7:43 AM, andreash hilb...@gmail.com wrote: I have the following nodes definitions: node basenode { include hosts include ntp include resolvconf } node 'dom1.mydomain.com' inherits basenode { $ntp_role = SERVER } node 'stove1.mydomain.com' inherits basenode { $ntp_role = CLIENT } in the ntp class, the ntpd.conf file template looks like this: % if ntp_role == SERVER % listen on %= ntp_server % server ptbtime1.ptb.de server ptbtime2.ptb.de server ptbtime3.ptb.de % elsif ntp_role == CLIENT % % ntp_servers.each do |ntp_server| -% server %= ntp_server % % end % % end % However, on both clients, I get the error Failed to parse template ntp/ntpd.conf.erb: Could not find value for 'ntp_role' at /etc/puppet/ modules/ntp/manifests/init.pp:17 on node stove1.mydomain.com. What am I doing wrong here? Cheers, Andreas -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: extlookup == bad?
On Thu, Apr 14, 2011 at 12:24 AM, Felix Frank felix.fr...@alumni.tu-berlin.de wrote: Hi John, On 04/13/2011 05:47 PM, jcbollinger wrote: Given my position that the good use cases for parameterized classes are specialized and few, I tend to agree about different uses. That parameterized and ordinary classes are different concepts appears to be more a de facto result than a design decision, however. Other aspects of Puppet tend to obscure such a distinction. Consider: snip You raise very good points that I won't argue about. I think often what you might like to do is declare a class's parameters once, and elsewhere allow other classes to include that class without redeclaring the parameters. For instance, perhaps you have a user::virtual class that on some nodes declares virtual LDAP users, but on other nodes delares the same virtual users as local. Such a class might provide a parameter by which the User provider can be specified. Other classes that want to realize users should include user::virtual, but they don't care which User provider is in play. You get something similar by having some resources in each type of node require (by metaparameter, not by function) the class in question. No, it won't get auto-included with default parameter values, but you do get a meaningful error message. Now that I came up with that example, I realize that it points to an improvement that might be doable right away: allow the include statement to be used with parameterized classes. That could be achieved by slightly (but backwards-compatibly) changing the semantics of include: 1) The include statement expresses a requirement that the specified class be included in the resulting catalog, but it says nothing about the class's parameters. 2) If a class is named in at least one include statement that is executed while compiling a catalog, then the effect depends on whether the named class is declared elsewhere in the manifest: 2a) If the class is declared, then include statements referencing it have no additional effect. 2b) If the class is not declared, then it is treated as if the class were declared, without any explicit parameters, at the point where the first include statement appears. (Fixing the class declaration to the first include statement is intended to provide backwards compatibility.) If such a class declares a parameter for which it does not define a default value, then an error results. +1 +1 ! Thanks for laying out your position so carefully. Speaking for myself, I learned quite a bit from your posting. Nigel: It would be nice to get the developers' position on these proposals. We started having this conversation back in October, but no design decision was ever made. Here are some links to tickets related to how include and param classes working together: http://projects.puppetlabs.com/issues/5046 Perhaps with the pending changes to dynamic scoping its worth revisiting this ticket and seeing how include and param classes can work together. http://projects.puppetlabs.com/issues/5089 http://projects.puppetlabs.com/issues/5074 Cheers, Felix -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Puppet resource type notify and Puppet Dashboard
On Thu, Apr 14, 2011 at 7:35 AM, JohnW boerma@gmail.com wrote: Hello, I'm using the following call in my default profile: notify { development: message = Puppet environment development, loglevel = info; } with similar entries in other environments. This works as expected with one exception, the way puppetmaster deals with the message. It still registers the message as a change in the system and sets the orange star on the report, where I was expecting an Unchanged entry (nothing was changed on the system). This notify event always synchronizes, so it will always show up as a changed event in the dashboard. What about using file title to achieve the same thing? file { '/tmp/environment/${environment}': ensure = present } This would still allow you see your environment in the report(b/c the resource will always be listed) and would only cause the node to be in a changed state if you change the environment (or the first time Puppet runs) Eventually, the environment should be accessible in the report, #3910 gets us a little closer to that. I'm using Puppet 2.6.7 and Puppet Dashboard 1.1.0. Is there any way to change this behaviour in the dashboard? grtz John -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] extlookup == bad?
Hi all, Thanks for the input On Tue, Apr 12, 2011 at 12:54 AM, R.I.Pienaar r...@devco.net wrote: - Original Message - On Mon, Apr 11, 2011 at 9:25 PM, John Warburton jwarbur...@gmail.com wrote: OK, I'll bite In the newly published Style Guide ( http://docs.puppetlabs.com/guides/style_guide.html ), right at the end it says Modules should avoid the use of extlookup() in favor of ENCs or other alternatives For clarity, this should read: in favor of ENCs in combination with parameterized classes But there is no reason as to why. that is partly my fault. the following is my opinion, and may or may not express the opinions of PuppetLabs, although I can be pretty persuasive :) Extlookup provided some necessary pre-2.6.x functionality, namely, a sane way to get around dynamic scoping. This is not what extlookup is for. Yes it effectively works around the Wacky Scope problems but that is not its reason for existing. It exists primarily to: - allow the data - lets call it the model - to live separate from the code (controller?) and the templates (view?) Let me clarify this: I understand this is not what extlookup is for, I was saying here that this is why is was 'necessary' pre 2.6.x (as a sane alternative to dynamic scoping), I apologize, because obviously my intent here was not clear . The kind of data modeling you mention has been possible with an ENC for as long as I have been using Puppet. - it is easy to grasp, easy to train members of a team and with a bit of discipline its trivial to look at a class and know how you can configure it. The fact that you have to look at the class to understand what data it accepts is my main complaint. I have not found parameterized classes problematic to teach, do you have some specific experiences around this? - It doesnt require any code changes to change the way the data behaves which is great for shared code like those found on the forge. Unlike the layered class approach I am not sue what you mean here - To replace almost all case statements I also agree that Puppet should have as little conditional logic as possible, I have recently been solving this with a combination of an ENC and ::param namespaced classes (an entirely different topic). - To be an appropriate level of complexity for the average Puppet user. Compare experiences in #puppet with newbies learning extlookup vs the layered classes approach. I don't have any data related to this, but would be interested on further perspective. Yes the layered classes approach is elegant and less hacky but it is by no means understandable by newbies. The last point is the big one, Puppet has always been a language for sysadmins who want to automate their infrastructure. The layered class approach is something that you only get once sat in a class and taught. In this regard Puppet has lost its way. That is a really strong assertion RI. We are doing our best to create reasonable practices that 'we' can use to create modules, we have shared our first reasonable version of those with the community so that we can work to make it better. It is not awesome though, there are limits to how you can configure the data the approach it takes isn't flexible enough really but it solves most of the problems it set out to solve. You cant programatically figure out what a class requires like you can with param classes if you dig deep enough. I hope we do a better job of exposing those APIs in the future So an alternative was proposed - Puppet Data Language[1] that combines with param classes to address this properly. given the option between parameterized class combined with an ENC vs. extlookup, I choose parameterized classes+ENC. The reason is readability and encapsulation. In order to understand an implementation of Puppet using extlookup, you have to understand all of your code in its entirety. After all, any code anywhere in your modulepath could be calling extlookup and accessing data. (I would be very interested to hear if anyone has a good pattern for this) With param classes, you can build a layered architecture of classes that pass data to each other through their explicit interfaces. How easy is it to adjust how you layer these classes? I do not understand this question How sharable is this set of layered classes with other teams, other business or event entirely unrelated 3rd parties via the forge? this is one of the main reasons that I like param classes, explicit interfaces should make sharing/collaboration easier. How many inheritance related bugs have gone reported but never fixed? inheritance is not something that I recommend in general, although I would appreciate a short list of these are the broken things about inheritance. How will the often mooted changes to puppets internal scoping affect already written code? How
Re: [Puppet Users] extlookup == bad?
On Tue, Apr 12, 2011 at 8:00 AM, R.I.Pienaar r...@devco.net wrote: - Original Message - On 04/12/2011 04:41 PM, R.I.Pienaar wrote: - Original Message - On Tue, Apr 12, 2011 at 12:54 AM, R.I.Pienaar r...@devco.net wrote: The PDL is a *much* more desirable solution than either layered classes or extlookup, why it has gone un-implemented I dont know and why the current suggestion is that layered classes somehow represents an effective alternative to the PDL I do not understand at all - since surely why bother with the PDL at all then? I'll answer this one. The obvious, and correct, answer is, because it's a lot of work to do this. For Puppetlabs to do this, they're going to have to invest a lot of time and energy, because their implementation *must* be backwards-compatible or else provide an automated tool for doing the conversion. Further, the PDL proposal hasn't actually been around all that long. Puppetlabs isn't Microsoft and doesn't have a thousand developers on hand to write stuff up. Their staff is small and no matter how talented they are, there is limited time with each day. Even a user-contributed patch set probably will take time to vet simply because of the compatibility requirements. I get that, I wasnt intending to say 'why has it not been coded yet' but more wondering why extlookup is being downplayed in the absence of a solution that solves the same problem as effectively. Many big users out there today says they cant live without extlookup, simply because it's effective at solving the problem. So I think the original question is very valid - why tell people not to use a feature that is available in the core language? if it sux, remove it. Hi, I can see how this is a soft spot for you, but it wasn't suggested that extlookup was doing a poor job. We're talking the *Style* guide here. I think you miss understand me, I dont care for extlookup one way or the other, I've never really run the one in the core distro as I have some other enhancements that isn't in Puppet. I do care what recommendations are made to the community - not just those who pay for training so they can understand complex data modeling with OO like inheritance. I care for a simple to understand, simple to explain CM language, one suitable for traditional systems adminis - the kind of guys I care for and who I want to help - and I think we're failing them with ever more complex recommendations. After all, ENC+param classes are available if clumsy (as you put it). Rather than use a feature that exist and solve the problem, the recommendation is that each user should *write their own ENC that models their data* and this is somehow more effective than just using the existing extlookup while the PDL is being developed? I agree with this. One huge problem with this recommendation is that we have still not shipped a feature complete ENC that can serve as a replacement to the data modeling that extlookup provides. This argument would be a lot more compeling if it was use param classes, and Puppetlabs super cool ENC. I have spent some time working with customers to explain how to build these, and I have been working on one that supports the model that I have in mind... -- R.I.Pienaar -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] extlookup == bad?
On Tue, Apr 12, 2011 at 11:24 AM, R.I.Pienaar r...@devco.net wrote: - Original Message - Hi all, Thanks for the input On Tue, Apr 12, 2011 at 12:54 AM, R.I.Pienaar r...@devco.net wrote: - Original Message - On Mon, Apr 11, 2011 at 9:25 PM, John Warburton jwarbur...@gmail.com wrote: OK, I'll bite In the newly published Style Guide ( http://docs.puppetlabs.com/guides/style_guide.html ), right at the end it says Modules should avoid the use of extlookup() in favor of ENCs or other alternatives For clarity, this should read: in favor of ENCs in combination with parameterized classes But there is no reason as to why. that is partly my fault. the following is my opinion, and may or may not express the opinions of PuppetLabs, although I can be pretty persuasive :) Extlookup provided some necessary pre-2.6.x functionality, namely, a sane way to get around dynamic scoping. This is not what extlookup is for. Yes it effectively works around the Wacky Scope problems but that is not its reason for existing. It exists primarily to: - allow the data - lets call it the model - to live separate from the code (controller?) and the templates (view?) Let me clarify this: I understand this is not what extlookup is for, I was saying here that this is why is was 'necessary' pre 2.6.x (as a sane alternative to dynamic scoping), I apologize, because obviously my intent here was not clear . The kind of data modeling you mention has been possible with an ENC for as long as I have been using Puppet. Solving this problem with an ENC is suitable for people who can program. You are saying 'puppet cannot do this on its own, please write a whole bunch of code in $language to address the shortcoming' is this the message to send people who do not want to pay someone to come write that ENC? In the context of the question: do we use extlookup to solve this problem or do we use an ENC to solve the problem. Your answer here is extlookup isnt needed, just write your own ENC. I am saying this is a very un newbie friendly message to send to the user base when there is a way to solve the problem now while puppetlabs works on either a good ENC that we can download or work on finishing the PDL. I completely agree that this recommendation is a little lacking without an existing ENC to back it up. - it is easy to grasp, easy to train members of a team and with a bit of discipline its trivial to look at a class and know how you can configure it. The fact that you have to look at the class to understand what data it accepts is my main complaint. today, the day your recommendations are up there for everyone to adhere to and the scope of the question from the OP, this is no different with parametrized classes. There is no released introspection tool, It is a little rough around the edges, but there I have released (or at publised code for) an introspection tool (its just not very well advertised), It probably has a few bugs, and I am happy to address those via github issues. https://github.com/puppetlabs/interface-utils have a look at parser get_classes it needs a little polish, but it works against 2.6.5 or higher this tool relies on an existing indirector (resource_type) which should have this functionality built-in in Statler http://projects.puppetlabs.com/issues/6851 there is no ability in dashboard to just ask the information it needs, to use a paramterized module, u need to open its classes and look at its params. Is this not the case? have a look at: puppet dashboard import_classes --dashboard_path-/usr/local/dev/puppet-dashboard from the same repo. This is admittedly a prototype and something not ready for prime-time, I just want to highlight that I understand these concerns and am actively working to address them. You seem to say here's a set of recommendations for how to use puppet, we think this is how you should do it and our reasons for saying so is that there's a bunch of unreleased features that makes it awesome. This may be the major point of confusion. This document was written internally to specify how we will be writing modules. We are sharing it with the outside world b/c we try to be open. As we develop our internal modules, it is reasonable that we can write tools to make the process easier or improve Puppet to make the process easier. There is perhaps one point that we missed in this process: if we choose a path that is forward looking and not how people currently develop modules, then how are they going to use these modules, this is something that needs a little more effort. I have not found parameterized classes problematic to teach, do you have some specific experiences around this? No hard evidence, gut feel is if you go ask in #puppet or get together a representative group
Re: [Puppet Users] extlookup == bad?
On Mon, Apr 11, 2011 at 9:25 PM, John Warburton jwarbur...@gmail.comwrote: OK, I'll bite In the newly published Style Guide ( http://docs.puppetlabs.com/guides/style_guide.html), right at the end it says Modules should avoid the use of extlookup() in favor of ENCs or other alternatives For clarity, this should read: in favor of ENCs in combination with parameterized classes But there is no reason as to why. that is partly my fault. the following is my opinion, and may or may not express the opinions of PuppetLabs, although I can be pretty persuasive :) Extlookup provided some necessary pre-2.6.x functionality, namely, a sane way to get around dynamic scoping. given the option between parameterized class combined with an ENC vs. extlookup, I choose parameterized classes+ENC. The reason is readability and encapsulation. In order to understand an implementation of Puppet using extlookup, you have to understand all of your code in its entirety. After all, any code anywhere in your modulepath could be calling extlookup and accessing data. (I would be very interested to hear if anyone has a good pattern for this) With param classes, you can build a layered architecture of classes that pass data to each other through their explicit interfaces. This means that in any given layer, you only have to understand the specified class interfaces and not their internals. It should be clear from the interface how data effects the behavior of a class. At the highest level, you can build composite classess that expose which data can effect the behavior of all of your Puppet code. class { 'myplatform': ntp = 'foo' foo_data = 'foo' foo_server = ''foo } class { 'myapp': appvar1 = '1' appvar2 = '2' } Allowing you to have a single view of how data effects the behavior of your configuration components. as an added benefit, using an ENC with param classes maintains the classes together with all of their passed parameters in $yamldir/node/ for the last run of each node I look forward to further debate :) We have a rule of thumb where we use the ENC to set specific information for a host, and extlookup for groups of servers (based on class, location, etc set in the ENC). It works well, and we even received a thumbs up in a recent Puppet Labs audit of our manifests as we have clear separation of configuration and data. So, why should we avoid extlookup()? What should we use instead? John -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] poor mans puppet, can puppet work with a offline puppetmaster?
On Sat, Apr 2, 2011 at 3:54 AM, Cosimo Streppone cos...@streppone.itwrote: On Sat, 02 Apr 2011 08:27:35 +1100, Nigel Kersten ni...@puppetlabs.com wrote: On Fri, Apr 1, 2011 at 5:00 AM, S Ahmed sahmed1...@gmail.com wrote: Could I use my local laptop as a puppet master, and only start up the puppetmaster when I have a change I want to send over to the nodes? Say I only have 1 server, and I don't want or even need a puppetmaster running all the time. Is this or something close to this type of setup possible? You can just run puppet against local manifests. External nodes script included? puppet apply also works with external nodes (Assuming that the external nodes script is distributed in /etc/puppet/bin and doesn't depend on anything other than /etc/puppet contents?) -- Cosimo -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Optional requires?
On Fri, Apr 1, 2011 at 6:34 AM, Robin Lee Powell rlpow...@digitalkingdom.org wrote: A discussion on IRC about having classes that depend on each other sometimes (i.e. a munin class that needs to do mysql-specific things on those hosts where mysql is installed) reminded me of a feature I've wanted for some time in puppet, that I don't think I ever actually shared/asked about: I've been wanting something like require = that only kicksoff if the required thing is actually defined. So you could do: file { munin.d/mysql-config: require_if_exists = Package[mysql] } you could achieve the same things like this: file { munin.d/mysql-config: ... } Package| title == 'mysql' | { before = File['munin.d/mysql-config'] } and if Package[mysql] isn't set up anywhere, nothing happens. Does this seem reasonable to people? If so, where should I put it in as a feature request? -Robin -- http://singinst.org/ : Our last, best hope for a fantastic future. Lojban (http://www.lojban.org/): The language in which this parrot is dead is ti poi spitaki cu morsi, but this sentence is false is na nei. My personal page: http://www.digitalkingdom.org/rlp/ -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] test manifests?
On Thu, Mar 31, 2011 at 8:20 AM, Clay Caviness ccavin...@gmail.com wrote: Reading through the recently published style guide, I see http://docs.puppetlabs.com/guides/style_guide.html#tests saying: All manifests should have a corresponding test manifest in the module’s tests directory. the idea is to have maintain basic tests written in Puppet for all of your manifests in a module. they can serve not only as basic smoke tests, but also as a reference for example code of how a class/define should be used. the simplest tests would be: class{ 'foo': } more complicated tests would involve specifying required dependencies and parameters. Is there any documentation on how these work? I couldn't find anything in the documentation on puppetlabs or any mention in release notes. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] test manifests?
On Thu, Mar 31, 2011 at 8:37 AM, Clay Caviness ccavin...@gmail.com wrote: On Thu, Mar 31, 2011 at 11:29, Dan Bode d...@puppetlabs.com wrote: On Thu, Mar 31, 2011 at 8:20 AM, Clay Caviness ccavin...@gmail.comwrote: Reading through the recently published style guide, I see http://docs.puppetlabs.com/guides/style_guide.html#tests saying: All manifests should have a corresponding test manifest in the module’s tests directory. the idea is to have maintain basic tests written in Puppet for all of your manifests in a module. they can serve not only as basic smoke tests, but also as a reference for example code of how a class/define should be used. But when/how are these tests run? the tests should be run during development, I usually run them with --noop I have been working on some other utilities as well for integrating these smoke tests into a build pipeline https://github.com/puppetlabs/interface-utils the simplest tests would be: class{ 'foo': } more complicated tests would involve specifying required dependencies and parameters. Are there examples and documentation on how they should work available anywhere? probably not, I am more than happy to discuss either here or bodepd on freenode :( Is there any documentation on how these work? I couldn't find anything in the documentation on puppetlabs or any mention in release notes. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] way of importing .pp file or some string that contain class definition in ruby dsl
Have a look at external node classifiers, I believe this is a more appropriate approach for what you are trying to accomplish: http://docs.puppetlabs.com/guides/external_nodes.html On Wed, Mar 23, 2011 at 7:47 AM, junaid_malik junaidmali...@gmail.comwrote: I'm finding the way to import a file or a class stored in string in ruby manifest. I have tried following code to parse the class having packages and services. pp = Puppet::Parser::Parser.new(development) pp.string = class webhttpd{package { 'httpd': ensure = installed, } service { 'httpd': ensure = running, enable = true, require = Package['httpd'] } } pp.parse pp = pp = Puppet::Parser::Parser.new(development) pp.file = web.pp pp.parse My idea is to re-use the classes written in the pp file style and they are stored in database. I just want to load those classes depending on 'FQDN' name of a node and then create a node in ruby like this. node name_of_the_node{ create_resource :class, httpd } I hope now you get what i'm trying to do in the ruby manifest. If its still not clear then please ask me to explain more about what i want to achieve from this. Thanks. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Proposal: strict mode for manifests
This is a huge +1 from me On Mon, Mar 14, 2011 at 9:41 PM, Kevin Beckford lazy...@gmail.com wrote: This certainly explains a lot. A very good idea, IMO. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Berlin Puppet meet-up?
Hi Puppeteers, I will be in Berlin for the next couple of weeks and was wondering if any Puppet users would be interested in getting together for beer, trading Puppet stories, etc... -Dan -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: Berlin Puppet meet-up?
On Mon, Mar 14, 2011 at 10:32 AM, Dan Bode d...@puppetlabs.com wrote: Hi all, I posted the invitation for Berlin Puppet meetup here: http://www.meetup.com/Puppet/Berlin-DE/80813/?ed=descr sorry, wrong link: http://www.meetup.com/Puppet/Berlin-DE/ please RSVP so I can get an idea about how much space we need. also, recommendations for locations in the city center would be greatly appreciated. -Dan On Mon, Mar 14, 2011 at 8:22 AM, Dan Bode d...@puppetlabs.com wrote: Hi Puppeteers, I will be in Berlin for the next couple of weeks and was wondering if any Puppet users would be interested in getting together for beer, trading Puppet stories, etc... -Dan -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: Berlin Puppet meet-up?
Hi all, I posted the invitation for Berlin Puppet meetup here: http://www.meetup.com/Puppet/Berlin-DE/80813/?ed=descr please RSVP so I can get an idea about how much space we need. also, recommendations for locations in the city center would be greatly appreciated. -Dan On Mon, Mar 14, 2011 at 8:22 AM, Dan Bode d...@puppetlabs.com wrote: Hi Puppeteers, I will be in Berlin for the next couple of weeks and was wondering if any Puppet users would be interested in getting together for beer, trading Puppet stories, etc... -Dan -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Defines in External node classifier
HI Matthew, Have a look at this custom function that I wrote: https://github.com/puppetlabs/create_resources The README has an example of how to pass defined resources as class parameters through an ENC. On Mon, Mar 7, 2011 at 8:53 PM, Cashdollar, Matthew mcashdol...@orbitz.comwrote: Hello, Does anyone know if external node classifiers support defined resource types? I am able to do it through the internal 'node X { }' but I'm not sure if this is possible with the external node yaml. I started by doing it with parameterized classes as described here: http://projects.puppetlabs.com/issues/5045 However I found some cases where there were multiple instances of the same thing running on the server with slightly different parameters. For this reason I had to use define instead of class. Thanks Matt -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Puppet dsl
On Fri, Mar 4, 2011 at 8:50 AM, Kevin Beckford lazy...@gmail.com wrote: Is the puppet dsl a complete Turing capable language? Puppet is not a general purpose programming language, it is a tool that manages infrastructure, you could probably mathematically prove that it is Turing complete, but its end result is a single data format. Perhaps it would be better to ask can Puppet do X As I understand it, the chain is dsl - compiled thing - actions. Architecturally, it is better to think of Puppet as a system that can transform between various data formats: Code that creates data: Data: Facts Terminus (Facter) Facts: Node Terminus Nodes Catalog Terminus (compiler) Catalog Resource Abstraction Layer Events What language is the compiled thing in? Ruby? The compiled artifact is not code, it is data that describes the desired state of your system, in the above chart, the artifact you are asking about is the catalog. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Puppet Parse Trees (for a lint checker)
Hi Nick (long time :) ) On Tue, Mar 1, 2011 at 3:14 AM, Nick Moffitt n...@zork.net wrote: I mean to write a lint checker for my manifests, but I am not a ruby developer to any degree of proficiency. What I think I would like is some kind of serialization of the AST for a given .pp file, which I can then import into my own Python code and analyze for undesirable patterns. It is possible to parse a given file and get an ASTArray back, is that sufficient? I am pretty sure you are going to have to get your hands into the Ruby code to really figure this out. There kinds of questions make more sense to be posted to puppet-dev Is there any way to get a dump or serialization or marshalling of the parse tree for a given .pp file? Or is there already some easily-modifiable lint checker elsewhere? -- A: No. Q: Should I put my reply above quoted text? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Test driven manifests?
On Fri, Feb 25, 2011 at 9:24 AM, Darren Worrall d...@darrenworrall.co.ukwrote: Firstly, forgive me if I get my terminology mixed up. Being sold on the virtues of TDD, I have a growing itch to test our puppet manifests. Now by this I dont mean testing, say, the mechanics of a define to test that the right things *happen*, I mean being able to say that given a collection of classes and parameters for a node, the following resources should be created and the relationship between them should be xyz. How would I go about this? Is it a case of generating a catalog from the manifest, parsing that and then making assertions on the result? Does puppet already have a framework or API to enable this sort of testing? this is what cucumber-puppet does. https://github.com/nistude/cucumber-puppet Some pseudo code to perhaps explain what I'd like to achieve: c = generate_catalog( classes=['foo', 'bar'], parameters={ 'a':1, 'b':2 }), assertEqual( c.resources.get(File['/foo/bar/baz']).mode, 777, ) assertTrue(c.resources.get(File['/foo/bar/baz']).parent is c.resources.get(File['/foo/bar'])) -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.