[Puppet Users] Puppet Custom Provider. Class level and instance level methods/variable access issues
To all, My ruby is failing me as I try to create a custom provider. I have a custom provider I am writing that uses the net-ldap gem that will, based on the custom type create, destroy and modify LDAP entries. What I am struggling with is the difference between the class level methods: self.instance and self.prefetch and instance level methods: create, destroy, etc. As things currently stand I have in my custom provider code def self.ldap_connection ## Class level method Puppet.debug(Creating new LDAP connection) unless @ldap_connection @ldap_conection = Net::LDAP.new( :host = '127.0.01', ... @ldap_connection end def self.prefetch ## Class level method ldap_connection.search(:base = Services_Base, :filter = searchFilter ) do |entry| code to parse output results new ( ) results end def create ## Instance level method self.class.ldap_connection.add(:dn = mydn, :attributes = myattr) end The above all works fine, I can create and destory LDAP entries and modify attributes based on my custom type without a problem. But if you look at the self.ldap_connection I hard-coded the host. What I want to do, is create a parameter in the type, called ldapserver, which I then can use in self.ldap_connect. I tried @ldap_conection = Net::LDAP.new( :host = @resource[:ldapserver], But when I debug @resource[:ldapserver] it is nil so I'm obviously not access it correctly. I also tried @@resource[:ldapserver] thinking resource is a class level variable, but still no luck. I've also tried to make def ldap_connection, so it is an instance level method,but the I run into issues in self.instances where I need to open a LDAP connection to prefetch, and the method is instance level, so not available at the class level, self.instances. Thanks Len -- 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/d2eb2130-374c-4292-9412-cd01a32355c1%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Some of my OS X clients stop checking in with puppet master.
I have a strange problem with some of my puppet clients. After a while they stop reporting in with the master. If i run the puppet agent manually with command (sudo puppet agent -t) everthings looks fine. The puppet agent is started at boot by the launch daemon that is described at puppetlabs.com. I have checked that it's running in the background. So it seems to me that there is a issue with the puppet schedule. The issue is not relatet to OS, because i have multiple clients running both 10.8 and 10.9 that's working... If anyone have any suggestions how to fix this i would be thrilled.. Cheers, Kristian -- 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/7fe947e6-7e94-4b01-a159-fdc8a2f3bf54%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Modify class variable in puppet
Hi I would like to modify a class variable. This variable contains a list of packages to install The goal is to make this list of packages different for each type of os (case $operatingsystem) Here uis my code class pack_utils { $packages = [ curl, htop, lshw, lsof ] case $operatingsystem { debian, ubuntu : { # Here i would like to add packages name in array packages defined above notice(value of packages: $packages) } } package { $packages: ensure = present, } } How i can do to modify the value of $packages ? Thanks in advance CedrX -- 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/6ec5d28a-8bc5-4c13-96c0-2c08d78ea928%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Modify class variable in puppet
I have the answer. I read here : https://groups.google.com/forum/#!topic/puppet-users/I9Y-p3UY8JE that variables are immutable Le mercredi 12 février 2014 14:16:33 UTC+1, CedrX a écrit : Hi I would like to modify a class variable. This variable contains a list of packages to install The goal is to make this list of packages different for each type of os (case $operatingsystem) Here uis my code class pack_utils { $packages = [ curl, htop, lshw, lsof ] case $operatingsystem { debian, ubuntu : { # Here i would like to add packages name in array packages defined above notice(value of packages: $packages) } } package { $packages: ensure = present, } } How i can do to modify the value of $packages ? Thanks in advance CedrX -- 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/61285dae-5535-4794-8cd4-293081d13196%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: Modify class variable in puppet
have a look at hiera ta achieve what you want. If you have an hierarchy like %{::osfamily} You can create some yaml files in etc/puppet/hieradata/RedHat.yaml --- pack_util::packages: - curl - htop and in /etc/puppet hieradata/Debian.yaml --- pack_util::packages: - curl_deb - htop_deb And so on. Assuming you are using puppet 3 This is one possible way, and check the docs for the correct syntax and usage, but is shouls get you going Hope this helps Jo On 02/12/2014 02:52 PM, CedrX wrote: I have the answer. I read here : https://groups.google.com/forum/#!topic/puppet-users/I9Y-p3UY8JE that variables are immutable Le mercredi 12 février 2014 14:16:33 UTC+1, CedrX a écrit : Hi I would like to modify a class variable. This variable contains a list of packages to install The goal is to make this list of packages different for each type of os (case $operatingsystem) Here uis my code class pack_utils { $packages = [ curl, htop, lshw, lsof ] case $operatingsystem { debian, ubuntu : { # Here i would like to add packages name in array packages defined above notice(value of packages: $packages) } } package { $packages: ensure = present, } } How i can do to modify the value of $packages ? Thanks in advance CedrX -- 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/61285dae-5535-4794-8cd4-293081d13196%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- 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: Zabbix Certified Training | http://www.open-future.be/zabbix-certified-training-10-till-12th-march Zabbix for Large Environments Training | http://www.open-future.be/zabbix-large-environments-training-13-till-14th-march Puppet Intruction Course | http://www.open-future.be/puppet-introduction-course-14th-april Puppet Advanced Training | http://www.open-future.be/puppet-advanced-training-15-till-17th-april 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/52FB8040.7070107%40open-future.be. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Modify class variable in puppet
Em quarta-feira, 12 de fevereiro de 2014 11h52min38s UTC-2, CedrX escreveu: I have the answer. I read here : https://groups.google.com/forum/#!topic/puppet-users/I9Y-p3UY8JE that variables are immutable Le mercredi 12 février 2014 14:16:33 UTC+1, CedrX a écrit : Hi I would like to modify a class variable. This variable contains a list of packages to install The goal is to make this list of packages different for each type of os (case $operatingsystem) Here uis my code class pack_utils { $packages = [ curl, htop, lshw, lsof ] case $operatingsystem { debian, ubuntu : { # Here i would like to add packages name in array packages defined above notice(value of packages: $packages) } } package { $packages: ensure = present, } } How i can do to modify the value of $packages ? Thanks in advance CedrX I think this is the best way! # Class packages class pack_utils { case $operatingsystem { 'debian','ubuntu' : {$packages = 'apache2'} 'redhat','centos' : {$packages = 'httpd'} } package { $packages: ensure = installed, } } -- 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/fa09bb25-3b86-41ff-a506-bf9003bb16d9%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: puppet custom function throwing private gsub error
Em quarta-feira, 12 de fevereiro de 2014 11h21min30s UTC-2, kashif escreveu: I have written a small custom function to replace '.' to '_' of all element of an array and return an converted array. module Puppet::Parser::Functions newfunction(:convert_vo, :type = :rvalue, :doc = -'ENDOFDOC' This function takes an array of vo and replace '.' with '_' and return an converted array ENDOFDOC ) do |arguments| require 'rubygems' vo_list = arguments.clone unless vo_list.is_a?(Array) raise(Puppet::ParseError, 'convert_vo requires an array') end converted_vo = Array.new() vo_list.each do |vo| converted_vo.push(vo.gsub(/\./, '_')) end return converted_vo end end I am calling it like this from init.p $vo = ['dteam', 'vo.southgrid.ac.uk'] $converted_vo = convert_vo($vo) Puppet run on client machine fails with this error Error: Could not retrieve catalog from remote server: Error 400 on SERVER: private method `gsub' called for [dteam, vo.southgrid.ac.uk]:Array at /etc/puppet/modules/voms_client/manifests/init.pp I ran this script on client and server machines seperately and it worked perfectly. I am not sure that what I am missing? Thanks Kashif Did you do this? In order to make your custom functions available to your puppetmaster: - Place the function in a MODULEPATH/MODULENAME/lib/puppet/parser/functions directory. - Enable pluginsync in /etc/puppet/puppet.conf on client and server. [main] pluginsync = true factpath = $vardir/lib/facter -- 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/28a1cf6a-22e8-4236-962d-ff27f113edb2%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Debugging a Node form site.pp?
On Tuesday, February 11, 2014 6:05:54 PM UTC-6, Joaquin Menchaca wrote: I was wondering is there is a way to see what puppet things a node resource is, such as classes it includes. Somehow in our environment it is picking up a class that we did not specify. I could believe that you are getting a class that you did not realize you were declaring, or that you did not declare directly in manifest code written by you. I could believe that the agent is applying a cached catalog that contains a class that once was declared for the target node, but no longer is. I do not believe that the catalog compiler is randomly throwing in classes that were not in some way declared for the target node. With that said, it's not altogether clear to me what you're actually asking. I suspect that what you really want is to determine is where the unexpected class is declared, and for that purpose the 'grep' command is your friend. Search for the class's unqualified, lowercase name in your manifests and hiera data. If you use an ENC then you can run that manually and grep for the class name in its output. 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/c35a6a5c-4653-4126-874e-eb4d2c0b8eb6%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: puppet custom function throwing private gsub error
Hi Rafael Yes, I have setup all paths correctly. I have other custom functions which are working. Thanks Kashif On Wednesday, February 12, 2014 2:15:19 PM UTC, Rafael Cristaldo wrote: Em quarta-feira, 12 de fevereiro de 2014 11h21min30s UTC-2, kashif escreveu: I have written a small custom function to replace '.' to '_' of all element of an array and return an converted array. module Puppet::Parser::Functions newfunction(:convert_vo, :type = :rvalue, :doc = -'ENDOFDOC' This function takes an array of vo and replace '.' with '_' and return an converted array ENDOFDOC ) do |arguments| require 'rubygems' vo_list = arguments.clone unless vo_list.is_a?(Array) raise(Puppet::ParseError, 'convert_vo requires an array') end converted_vo = Array.new() vo_list.each do |vo| converted_vo.push(vo.gsub(/\./, '_')) end return converted_vo end end I am calling it like this from init.p $vo = ['dteam', 'vo.southgrid.ac.uk'] $converted_vo = convert_vo($vo) Puppet run on client machine fails with this error Error: Could not retrieve catalog from remote server: Error 400 on SERVER: private method `gsub' called for [dteam, vo.southgrid.ac.uk]:Array at /etc/puppet/modules/voms_client/manifests/init.pp I ran this script on client and server machines seperately and it worked perfectly. I am not sure that what I am missing? Thanks Kashif Did you do this? In order to make your custom functions available to your puppetmaster: - Place the function in a MODULEPATH/MODULENAME/lib/puppet/parser/functions directory. - Enable pluginsync in /etc/puppet/puppet.conf on client and server. [main] pluginsync = true factpath = $vardir/lib/facter -- 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/8c6ebab8-ea07-4132-a164-140751b353a1%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Strange behavior from puppetforge firewall module
Hi, Puppet master is 3.0.2 Puppet agent is 3.0.2 OS is RHEL6 Node manifests are flat files under a GIT repo. Overarching firewall rules are applied by an ssh module from manifests/init.pp to allow ssh access from management servers, this works all the time. Service specific firewall rules are laid down from a services module. I tried calling the *service*::firewall.pp from the* service*::init.pp but this resulted in the above behaviour. I ended up having to do an include of the *service*::firewall from the node manifest On Thursday, 6 February 2014 11:02:27 UTC, Felix.Frank wrote: Hi, this hasn't been solved yet, has it? What version of puppet is this (master+agent), how is the master laid out (passenger?) and how are your manifests structured? Are you relying on import somewhere e.g.? Thanks, Felix On 01/16/2014 04:40 PM, Chris W wrote: If I do iptables -F on the box, these are reliably applied but, during a random Puppet Agent run they are subsequently removed. Later, again at random, they are reapplied. I've just updated the firewall module, so we are running on version 0.4.2. Anyone else seen this sort of behaviour or have any suggestions? -- 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/1c5e0f24-94d7-49c5-ac4f-45ec529df47f%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Tags and dependencies
Hi, I'm using tags in resource defaults to define resource ordering inside a single class, preventing at the same time dependency cycles with other classes, like this: class myname::myclass { # defaults User { tag = this_class } File { tag = this_class } Service{ tag = this_class } # dependencies User | tag == this_class | - File | tag == this_class | - Service| tag == this_class | # resources, many of each type user { ... } file { ... } service { ... } } But this doesn't seem to work: I get errors, and by looking at the report I can see that the errors are due to dependencies not being respected, e.g. some service resources are applied before some file resources and so on. Am I missing anything? BTW, I was supposing there are no problems with nested dependencies, right? I mean, the class itself is part of a dependency chain together with other classes, and the chain works fine. But I suppose there is no problem with creating dependencies contained inside a class which is part of the higher chain. Thanks. Marco -- 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/c654e019-a720-4176-8390-161eee2a323c%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] classe uses two defines but second is ignored
Dear all, ich habe a defined class, that is called two times in on class but only the first call is executed. baader::replace {'access notConfigGroup' is done, but not baader::replace {'com2sec notConfigUser': And baader::replace {'view all included': is done. Can somebody please explain the reason and how can I solve this? define baader::replace($file, $old, $new, $ensure = 'replace') { $grep='/bin/grep' $sed='/bin/sed' case $ensure { default : { err ( unknown ensure value ${ensure} ) } replace : { exec { ${sed} -i -e's/${old}/${new}/' '${file}': unless = ${grep} -qFx '${old}' '${file}', onlyif = /usr/bin/test -f '${file}', } } insert_after : { exec { ${sed} -i -e's/${old}/\\n${new}/' '${file}': unless = ${grep} -qFx '${old}' '${file}', onlyif = /usr/bin/test -f '${file}', } } } } class snmp::config{ case $::osfamily { redhat:{ baader::replace {'access notConfigGroup': ensure = 'replace', file = '/etc/snmp/snmpd.conf', old= 'access notConfigGroup \\ any noauth exact systemview none none', new= 'access notConfigGroup \\ any noauth exact all none none', } baader::replace {'com2sec notConfigUser': ensure = 'replace', file = '/etc/snmp/snmpd.conf', old= 'com2sec notConfigUser default public', new= 'com2sec notConfigUser default Baad01', } baader::replace {'view all included': ensure = 'insert_after', file = '/etc/snmp/snmpd.conf', old= '# name incl\/excl subtree mask(optional)', new= 'viewallincluded .1', } } ... Best regards Andreas -- 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/d095eb0d-3167-4e6d-906a-eab9d7783f83%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Strange behavior from puppetforge firewall module
Hi, the manifest layout sounds sane enough. Is this a passenger setup? On 02/12/2014 03:56 PM, Chris W wrote: Puppet master is 3.0.2 Puppet agent is 3.0.2I ended up having to do an include of the /service/::firewall from the node manifest So is this working for you now? If not, I seem to remember that 3.0.x had certain issues, not sure if this kind of craziness was among them. Can you try upgrading to 3.2 or later? Cheers, Felix -- 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/52FB9215.2000206%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] puppet post install launchd osx
Hi Moses, I was able to successfully uninstall the previous versions of gem installed 'puppet'. i did reinstall with dmg but and still having puppetd exit with a code of 1. what am i doing wrong? here is my updated plist and manifest to start launchctl http://pastebin.com/CX56cucf http://pastebin.com/NuurLgvq On Tuesday, February 11, 2014 12:21:59 PM UTC-8, Moses Mendoza wrote: Hi Rudy, To uninstall a gem, just do `gem uninstall gem name(s)`, e.g. `gem uninstall puppet.`. Just to clarify, the directory you pointed out isn't the gem dir, it's the Mavericks system ruby site dir. As you discovered, OSX, the path /usr/lib/ruby/site_ruby is actually a symlink to the directory /Library/Ruby/Site. This directory is where the dmg's of puppet, hiera, and facter install to (as shown in your image). Prior to Puppet 3.4.0 and Facter 1.7.5, the dmgs would install in the ruby-version-specific subdirectory, /Library/Ruby/Site/1.8, but we've moved away from that, as /Library/Ruby/Site is in the load path in OSX versions going awhile back and won't break when ruby versions change. The gem dir is actually a separate location, where rubygems stores information about itself, including all of your installed gems. To see the system gem dir, do `/usr/bin/ruby -e 'puts Gem::dir'`. This should show you /Library/Ruby/Gems/2.0.0/, which contains a subdirectory (gems) with all of your installed gems. Hope that helps. Moses On Tue, Feb 11, 2014 at 9:23 AM, Rudy McComb vale...@thnkbig.comjavascript: wrote: https://lh4.googleusercontent.com/-1Y6RPiM0C2A/UvpcG1v6NCI/AAs/OXNKqoF8KHk/s1600/Screen+Shot+2014-02-11+at+9.16.58+AM.png Moses, can i rm puppet facter and hiera from the gem dir (usr/lib/ruby/site_ruby) w/o breaking puppet dmg installed in correct location? or is there another remedy you propose? thanks On Tuesday, February 11, 2014 8:42:31 AM UTC-8, Moses Mendoza wrote: Hi Rudy, Installing puppet,facter via dmg and also via gem is almost certainly a contributing factor to your issues. The dmg installs to ruby's sitedir (in the load path) and the gem installs to rubygems' gem dir (also in the load path). This means you have two installs of puppet at separate versions in the same ruby load path. This will break things! Charlie explains briefly why this won't work, here: https://projects.puppetlabs.com/issues/19670. You should install from gem or dmg, but not both:) Also, just to be clear, the dmg creates the puppet user, but the gem does not. Finally, facter 1.7.5 was released yesterday, which has mavericks compatibility when installed via dmg. Also, my apologies for calling you 'Ryan'! cheers Moses On Mon, Feb 10, 2014 at 12:14 PM, Rudy McComb vale...@thnkbig.com wrote: Hi Moses, I'm on Puppet 3.4.2, Facter 1.7.4, Mavericks 10.9.1 and installed with the dmg. I also keep puppet updated using gem update puppet. ill install puppet and facter with the dmg and then gem install puppet so that it creates the nec users groups etc for puppet. I have updated the plist to point to the newer version of ruby since upgraded macs keep both directories. On Monday, February 10, 2014 11:49:54 AM UTC-8, Moses Mendoza wrote: On Mon, Feb 10, 2014 at 10:55 AM, Rudy McComb vale...@thnkbig.com wrote: I'm having a an issue with running puppet as launchd. I'm using this http://docs.puppetlabs.com/guides/files/com.puppetlabs.puppet.plistand on some macs it will run and start at reboot and on others it doesnt. According to the logs puppet is exiting with a code of 1. What can i due to ensure that the puppet launchd mod runs uninhibited. http://pastebin.com/raw.php?i=CX56cucf I've also tried using a modified version of this ?xml version=1.0 encoding=UTF-8? !DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd; plist version=1.0 dict keyEnvironmentVariables/key dict keyPATH/key string/sbin:/usr/sbin:/bin:/usr/bin/string keyRUBYLIB/key string/usr/lib/ruby/site_ruby/1.8//string /dict keyLabel/key stringcom.puppetlabs.puppet/string keyKeepAlive/key true/ keyProgramArguments/key array string/usr/bin/puppet/string stringagent/string string--verbose/string string--no-daemonize/string string--logdest/string stringconsole/string /array keyRunAtLoad/key true/ keyServiceDescription/key stringPuppet Daemon/string keyServiceIPC/key false/ keyStandardErrorPath/key
[Puppet Users] Submit at talk for PuppetConf or an upcoming camp
I wanted to remind everyone that we have several open CFPs for upcoming events, and I would love to see more people submitting talk proposals for them! PuppetConf: September 23 - 24 in San Francisco CFP Deadline: March 18 https://docs.google.com/spreadsheet/viewform?formkey=dEVOeUdUOW9HeHpFekc4eDI4SUx4QUE6MA http://puppetlabs.com/blog/submit-talk-puppetconf-2014 Puppet Camp London: April 4 CFP Deadline: February 20 https://docs.google.com/spreadsheet/viewform?formkey=dGNFWVpFZjdJdEN6UDFyNE9EU3B6Ymc6MA Puppet Camp Paris: April 8 CFP Deadline: February 20 https://docs.google.com/spreadsheet/viewform?formkey=dFRCXzM5YTVHV0pESGhxLU12cVlHb1E6MA Puppet Camp Berlin: April 11 CFP Deadline: February 16 https://docs.google.com/spreadsheet/viewform?formkey=dG9qaEZZX3ZfMkNqNnhxSVZjMGk3N2c6MA Puppet Camp Tokyo (At LinuxCon): May 19 CFP Deadline: March 15 https://docs.google.com/spreadsheet/viewform?formkey=dHd6MmJqRmRILXpGSkgxci1CT2FMYmc6MA Let me know if you have any questions. Thanks, Dawn Foster Director of Community http://puppetlabs.com/community -- 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/CAPUeXZrW4qR4uB5mbGNc13h5uj2jYxe9b1QSmcPEcQ7%2BPhyrrg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: introducing puppetboard 0.0.1
Hi Daniele Sluijters, I've build some archlinux packages to test this out, and it works very well on Archlinux. https://aur.archlinux.org/packages/python2-puppetboard/ https://aur.archlinux.org/packages/python2-pypuppetdb/ Op woensdag 7 augustus 2013 14:47:23 UTC+2 schreef Daniele Sluijters: Hello everyone, It’s a lovely grey and rainy day here in the Dutch summer, as good a day as any to release a new little project. Its name is Puppetboard and has as aim to replace Puppet Dashboard’s reporting functionality. It does not nor will it include ENC features. It does all this without storing any data itself but querying PuppetDB instead. The whole thing is built in Python and relies on Flask and WTForms. The communication logic has been split of in its own library called pypuppetdb which makes heavy use of the requests library. The interface is powered by Twitter Bootstrap with the Flatly theme. Though I’ve pushed all the code out and made it public it’s all very young but it works fairly well. However, I’ve committed numerous barbarities in the code just to get things working and to figure out how to handle certain things. For the foreseeable time in the future I’ll be working on cleaning all this up and figuring out what I can do on my side and on PuppetDB’s side to make all this work a little better. Especially when it comes to dealing with big responses from PuppetDB... This is the first time I’m open sourcing a project so that too is all new to me. I’d welcome the feedback and if someone feels brave enough even commits on the projects but try and be gentle about it :-). I’ll also be at PuppetConf including the Developer Day so feel free to reach out to me in person. To the code: * puppetboard: https://github.com/nedap/puppetboard * pypuppetdb: https://github.com/nedap/pypuppetdb I realise that puppetboard doesn't have a test suite right now but it will soon. In order to do so I have to restructure a few things about it first. The installation documentation will improve with it. Pypuppetdb's test suite will be expanding the coming days once I'm done mocking the HTTP requests _query() makes and manage to get a decent and big enough set of test data to feed into PuppetDB. This will allow me to run integration tests and benchmark certain changes I have in mind. I’m hoping to be able to get a release out every month with improvements to both projects, perhaps even faster in the beginning but it remains to be seen how much time I’ll be able to spend on it. A special thanks goes out to Ken Barber for helping out with all things PuppetDB and coming up with a way to run PuppetDB on Travis so we can run integration tests. Hunter, thank you for being so interested in this project and pushing me to release it. — Daniele Sluijters Nedap | Steppingstone -- 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/6e95c3f7-3825-4bfc-a912-88b1ef08337e%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: introducing puppetboard 0.0.1
Hey, I lost this instruction ( was not in the group in august) Really nice software, being using it for a couple of months, although I think it lacks some things to be even more useful( at least for me): - in the main page nodes are in unchanged, changed or error state, would be nice to have the outofsync state( although I don't know if you can get this state without analyzing the full report) - in the nodes page be able to filter to show last changed reports, last error reports and so on, showing only last ten reports I think is not useful enough. And that it's :) Thanks, El 12/02/2014 21:45, Niels Abspoel abo...@gmail.com escribió: Hi Daniele Sluijters, I've build some archlinux packages to test this out, and it works very well on Archlinux. https://aur.archlinux.org/packages/python2-puppetboard/ https://aur.archlinux.org/packages/python2-pypuppetdb/ Op woensdag 7 augustus 2013 14:47:23 UTC+2 schreef Daniele Sluijters: Hello everyone, It's a lovely grey and rainy day here in the Dutch summer, as good a day as any to release a new little project. Its name is Puppetboard and has as aim to replace Puppet Dashboard's reporting functionality. It does not nor will it include ENC features. It does all this without storing any data itself but querying PuppetDB instead. The whole thing is built in Python and relies on Flask and WTForms. The communication logic has been split of in its own library called pypuppetdb which makes heavy use of the requests library. The interface is powered by Twitter Bootstrap with the Flatly theme. Though I've pushed all the code out and made it public it's all very young but it works fairly well. However, I've committed numerous barbarities in the code just to get things working and to figure out how to handle certain things. For the foreseeable time in the future I'll be working on cleaning all this up and figuring out what I can do on my side and on PuppetDB's side to make all this work a little better. Especially when it comes to dealing with big responses from PuppetDB... This is the first time I'm open sourcing a project so that too is all new to me. I'd welcome the feedback and if someone feels brave enough even commits on the projects but try and be gentle about it :-). I'll also be at PuppetConf including the Developer Day so feel free to reach out to me in person. To the code: * puppetboard: https://github.com/nedap/puppetboard * pypuppetdb: https://github.com/nedap/pypuppetdb I realise that puppetboard doesn't have a test suite right now but it will soon. In order to do so I have to restructure a few things about it first. The installation documentation will improve with it. Pypuppetdb's test suite will be expanding the coming days once I'm done mocking the HTTP requests _query() makes and manage to get a decent and big enough set of test data to feed into PuppetDB. This will allow me to run integration tests and benchmark certain changes I have in mind. I'm hoping to be able to get a release out every month with improvements to both projects, perhaps even faster in the beginning but it remains to be seen how much time I'll be able to spend on it. A special thanks goes out to Ken Barber for helping out with all things PuppetDB and coming up with a way to run PuppetDB on Travis so we can run integration tests. Hunter, thank you for being so interested in this project and pushing me to release it. -- Daniele Sluijters Nedap | Steppingstone -- 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/6e95c3f7-3825-4bfc-a912-88b1ef08337e%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/CAF_B3dcQ6B-D-Uu_9kHuJMpTVoWZXapiQkvNybMzmXXqrKbHCQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Debugging a Node form site.pp?
Is there a way to blow away the cache and refresh? We don't use ENC in this environment, just a simple site.pp, which references nodes.pp. Segue, what I like about ENC is that you can call your homegrown script, get a yaml of params, classes for that node. I wish I could get something similar with site.pp. It would just be another level of debugging that could prove helpful. This is what I have in a nutshell (simplified version): nodes.pp node /^stg-resque[0-9][0-9].mycompany.com$/ inherits base { $packages = [ 'ImageMagick', 'git', 'libxml2-devel', 'libxslt-devel', ... ] include network, nrpe, deployenv, deployenv::rvm, ... } The problem, is that there are deployenv, deployenv::passenger, and deployenv::rvm. Somehow, deployenv::passenger is being picked up, even though it is not explicitly specified in the nodes.pp. deployent/manifests/rvm.pp class deployenv::rvm () { exec { gems: ... } exec { bundler: ... } } deployent/manifests/init.pp class deployenv { group { deploy: ...} user { deploy: ...} file { .ssh: ...} file { deploy_dirs: ... } } deployent/manifests/passenger.pp class deployenv::passenger () { file { nginx.conf: ... } exec { nginx_install: ...} } On Wednesday, February 12, 2014 6:27:15 AM UTC-8, jcbollinger wrote: On Tuesday, February 11, 2014 6:05:54 PM UTC-6, Joaquin Menchaca wrote: I was wondering is there is a way to see what puppet things a node resource is, such as classes it includes. Somehow in our environment it is picking up a class that we did not specify. I could believe that you are getting a class that you did not realize you were declaring, or that you did not declare directly in manifest code written by you. I could believe that the agent is applying a cached catalog that contains a class that once was declared for the target node, but no longer is. I do not believe that the catalog compiler is randomly throwing in classes that were not in some way declared for the target node. With that said, it's not altogether clear to me what you're actually asking. I suspect that what you really want is to determine is where the unexpected class is declared, and for that purpose the 'grep' command is your friend. Search for the class's unqualified, lowercase name in your manifests and hiera data. If you use an ENC then you can run that manually and grep for the class name in its output. 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/e4e9efe1-1ac9-432f-a7aa-5a8204ede731%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Debugging a Node form site.pp?
Alright, I found the source of my problem, at least I think. The puppetmaster includes path to modules based on an environment (staging, production, qa) and a global path shared by all environments. The deployenv was in both locations, global and the environmental ones. The module shared by everyone had import passenger in it. I still wish there was an easy way to generate a list from the site.pp manifests for debugging, similar to how an ENC can generate a YAML file of classes/params for the node. What I did was go into /var/lib/puppet/client_data/catalog and looked at the json file to get some hints. -- 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/cb4ad96c-f8af-4d04-84fb-83c0398cb6c9%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] moving from previous manual install to puppet/chocolatey
I have a bunch of windows servers with NewRelic installed on them and I want to start managing those installs with Puppet. Seemed like the thing to do would be to have chocolatey uninstall what is there and reinstall within the framework of chocolatey so that I get addressable version information and the like. I created the following chocolatey package and it works fine when run from the command line using cinst: any existing version is removed and the new version, managed by chocolatey, gets put in its place. However, when I run it from Puppet, it does the uninstall ok, but the install never happens, even though chocolatey seems to think that the package is installed. stop-service LiveVault Backup Service $app = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -match New Relic Server Monitor } $app.Uninstall() $licensekey = XX $packageName = 'NewRelic_ServerMonitor' $installerType = 'MSI' $url = 'http://download.newrelic.com/windows_server_monitor/release/NewRelicServerMonitor_x86_2.0.0.198.msi' $url64 = 'http://download.newrelic.com/windows_server_monitor/release/NewRelicServerMonitor_x64_2.0.0.198.msi' $validExitCodes = @(0) $silentArgs = /L*v install_Agent.log /qn NR_LICENSE_KEY=`$licensekey` Install-ChocolateyPackage $packageName $installerType $silentArgs $url $url64 -validExitCodes $validExitCodes start-service LiveVault Backup Service Start-service New Relic Server Monitor -- 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/56fe586f-6c6e-49fb-a432-3a814ac3e65e%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
RE: [Puppet Users] RHEL4 + puppet 3.x?
Thanks for the hack, works like a charm! -- 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/12d339e3-4885-460d-9e09-38b664c00a2b%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users]
Hey all, I'm getting the following puppet error on only one of my hosts. The rest are all producing clean puppet runs. Can anyone please clarify for me the meaning of this error and if it's innocuous or not? Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve information from environment production source(s) puppet://puppet.mydomain.com/plugin Thanks, Tim -- GPG me!! gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B -- 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/CAOZy0emKvV1wbNnRGeQ7rndit%3DDTF3V1M_%2BhczEPb%3DR%3DY4CPzA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] client certs won't remain relevant after foreman install
Hey all, I've just got foreman setup today. And I've had to recreate my certs on the client hosts in order to get that to happen. However I'm facing an usual issue with my client ssl certs since installing foreman. I previously had a puppet server that was working well in my environment. But I wanted to get a working web gui onto that setup for a while. So I ended up having to blow away my current puppet config on the puppet server (it's ok because I had it both backed up traditionally and stored in SVN). I then proceeded with the foreman install. Everything went well, until... It seems that when I first certify a client host it works as anticipated. But on the second run, the newly created cert seems *invalid *and the error message confusingly asks you to remove the puppet servers cert. As if the client itself thinks it's the puppet server. Weird. To make this a ltlle more clear I'm going to walk through this scenario which is happening on every one of my servers since the foreman install. Trying to give this server a fresh start I find it's cert on the puppet server: [root@puppet:~] #puppet cert --list --all | grep beta + beta.mydomain.com(E5:82:A8:CC:8D:AE:F9:3C:85:36:00:E6:3D:10:CD:F6) Then remove the cert from the puppet server: [root@puppet:~] #puppet cert clean beta.mydomain.com notice: Revoked certificate with serial 21 notice: Removing file Puppet::SSL::Certificate beta.mydomain.com at '/var/lib/puppet/ssl/ca/signed/beta.mydomain.com.pem' notice: Removing file Puppet::SSL::Certificate beta.mydomain.com at '/var/lib/puppet/ssl/certs/beta.mydomain.com.pem' Back on the client host I remove the certs: [root@beta:~] #find /var/lib/puppet/ssl -type f -exec rm -f {} \; And when I go to get a new cert an error pops up complaining that the cert is invalid. And it asks me to remove the *puppet server's cert on the client host.* [root@beta:~] #puppet agent --test --waitforcert 60 --server puppet.mydomain.cominfo: Creating a new SSL key for puppet.mydomain.com info: Caching certificate for ca info: Caching certificate for *puppet.mydomain.com http://puppet.mydomain.com ##*--why puppet.mydomain.com? err: Could not request certificate: The certificate retrieved from the master does not match the agent's private key. Certificate fingerprint: BB:F6:61:88:56:AD:CD:63:74:62:3B:BA:1A:B3:BD:CD To fix this, remove the certificate from both the master and the agent and then start a puppet run, which will automatically regenerate a certficate. On the master: puppet cert clean *puppet.mydomain.com http://puppet.mydomain.com *## --why puppet.mydomain.com On the agent: rm -f /var/lib/puppet/ssl/certs/*puppet.mydomain.com.pem *## --why puppet.mydomain.com puppet agent -t And still on the client host I look for a cert named after the puppet server (not the client) it is indeed there: [root@beta:~] #ls -l /var/lib/puppet/ssl/certs/puppet.mydomain.com.pem -rw-r- 1 puppet puppet 1976 Feb 12 23:48 /var/lib/puppet/ssl/certs/puppet.mydomain.com.pem So my question at this point is, why at this point is this process creating an invalid cert named after the puppet server on the client host? And how can I remedy this rather odd situation. Thanks, Tim -- GPG me!! gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B -- 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/CAOZy0ekwspFtZ4k7m2X8%3DotZ2H5_4%2B7miL7UXd0NLfVit_QfaA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.