[Puppet Users] puppet testing
Hi There, I am kind of lost, understood something wrong. I have written a module. Now how can I test this module? Do I need to copy it to agent or server? Is it possible to test it as a standalone module where I have a machine with puppet agent or server installed? It is a simple module I dont want complicate things with cucumber or some rspec etc. How can I test it with puppet apply command? When I run this it say everything complied but no work done and no errors too. Thanks Raj -- 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/5ef065b1-8a57-4f40-a43c-3e989da23101%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Master cannot see nodes after install
Hi I'm new to puppet I've install the master and one node with no issues. the installs are all on Suse Linux server and workstation. When I installed another node today I got the message in the in the console of (node request 1) and clicked accept to this and it all looked ok and a licence key was used as it went up by one. however I cannot see the node on the console and cannot find any logs to check what the error is. I also have another node that almost has the same issue but I can see it in the console but it has a yellow triangle and it say's has not reported. can you help? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/78b8ece2-346f-40f0-961c-e4ba0ff3974c%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Continuous Integration Questions for Modules
Have you seen such a problems or is just an assumption? I've worked on a few puppet implementations and changing puppet master manifests on the go has never been an issue. I might be misunderstanding your question, can you develop more around your deployment process? On Tuesday, November 19, 2013 9:01:27 PM UTC, gilbertc777 wrote: Hi All, Using Jenkins to perform CI as well as automated deployment of puppet modules to our master. One thing that I am trying to figure out, is what is the best way when deploying the modules to have puppet not error out communication wise if nodes happen to check in while the deployment is ongoing. I thought of using mcollective to stop puppet on all the nodes, then roll the new modules, then restart (puppet is in splay mode so should not overwhelm it). Any thoughts/suggestions are appreciated! Thanks! Chuck -- 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/7c7871f0-186e-4f02-9e5a-ba497dd1de4a%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Help with configuring Puppet Proxies using Apache
Hi Karl, here following are apache conf that work, afaik (any comment is welcomed): - puppetserver: direct and indirect access - proxy server You can have direct and proxied clients: clients | tcp/8140 | Puppet Server | tcp/8141 ---firewall | RP | tcp/8140 | remote clients Please note: (disclaimer) this setup, intended for internal networks, does not have imho evident security issues, however you have to understand what issues could arise if you do not manage a trust chain, that is ensure security on certificates, ssl, network communication, puppetserver access. More: - To operate this setup you must already have certificates generated by Puppet CA. - Certificates must contain all relevant DNS names used by servers, and correct CN. - Pay attention on header variables and tcp/8141 access restriction, to be not vulnerable to man-in-the-middle attacks. - You should update CRL on proxy. - (This setup does not have SSL client validation for RP when connecting to puppetserver; SSLVerifyClient on VH 8141 recommended.) Verify you have in your server's puppet.conf: ssl_client_header = HTTP_X_PUPPET_CLIENT_DN ssl_client_verify_header = HTTP_X_PUPPET_CLIENT_VERIFY (Change servernames and ACL as requested) #Puppet server--- Listen 8141 VirtualHost *:8141 ServerName my_puppet_servername ServerAlias my_puppet_servername SSLEngine on SSLProtocol -ALL +SSLv3 +TLSv1 SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP SSLCertificateKeyFile /var/lib/puppet/ssl/private_keys/my_puppet_servername.pem SSLCertificateFile /var/lib/puppet/ssl/certs/my_puppet_servername.pem SSLCACertificateFile /var/lib/puppet/ssl/ca/ca_crt.pem SSLCertificateChainFile /var/lib/puppet/ssl/ca/ca_crt.pem SSLCARevocationFile /var/lib/puppet/ssl/ca/ca_crl.pem # Passenger options that can be set in a virtual host configuration block. PassengerHighPerformance on PassengerStatThrottleRate 120 PassengerUseGlobalQueue on RackAutoDetect Off RailsAutoDetect Off RackBaseURI / # X-Client variables required to verify client authentication # Values are coming from (trusted) Reverse Proxy that verifies client certificate # For correct CA emission, and CRL status SetEnvIf X-RP-Client-DN (.*) HTTP_X_PUPPET_CLIENT_DN=$1 SetEnvIf X-RP-Client-Verify (.*) HTTP_X_PUPPET_CLIENT_VERIFY=$1 SetEnvIf X-Forwarded-For (.*) REMOTE_ADDR=$1 DocumentRoot /etc/puppet/rack/public Location / Options None Order deny,allow # List IP address of your proxy Allow from my_proxy_IP_address Deny from all /Location /VirtualHost Listen 8140 VirtualHost *:8140 SSLEngine on SSLProtocol -ALL +SSLv3 +TLSv1 SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP SSLCertificateKeyFile /var/lib/puppet/ssl/private_keys/my_puppet_servername.pem SSLCertificateFile /var/lib/puppet/ssl/certs/my_puppet_servername.pem SSLCACertificateFile /var/lib/puppet/ssl/ca/ca_crt.pem SSLCertificateChainFile /var/lib/puppet/ssl/ca/ca_crt.pem SSLCARevocationFile /var/lib/puppet/ssl/ca/ca_crl.pem SSLVerifyClient optional SSLVerifyDepth 1 SSLOptions +StdEnvVars # Passenger options that can be set in a virtual host configuration block. PassengerHighPerformance on PassengerStatThrottleRate 120 PassengerUseGlobalQueue on RackAutoDetect Off RailsAutoDetect Off RackBaseURI / RequestHeader set X-SSL-Subject %{SSL_CLIENT_S_DN}e RequestHeader set X-PUPPET-Client-DN %{SSL_CLIENT_S_DN}e RequestHeader set X-PUPPET-Client-Verify %{SSL_CLIENT_VERIFY}e DocumentRoot /etc/puppet/rack/public Directory /etc/puppet/rack/ Options None AllowOverride None Order allow,deny Allow from all /Directory /VirtualHost #---END Puppet Server- #RP- Listen 8140 VirtualHost *:8140 ServerName my_RP_servername:8140 SSLEngine on SSLCipherSuite SSLv2:-LOW:-EXPORT:RC4+RSA SSLProtocol -ALL +SSLv3 +TLSv1 SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP SSLCertificateFile /var/lib/puppet/ssl/certs/my_RP_servername.pem SSLCertificateKeyFile /var/lib/puppet/ssl/private_keys/my_RP_servername.pem SSLCertificateChainFile /var/lib/puppet/ssl/certs/ca.pem SSLCACertificateFile /var/lib/puppet/ssl/ca/ca_crt.pem SSLCARevocationFile /var/lib/puppet/ssl/ca/ca_crl.pem SSLVerifyClient optional SSLVerifyDepth 1 SSLOptions +StdEnvVars ErrorLog logs/error_puppet_rp_log TransferLog logs/access_puppet_rp_log LogLevel warn CustomLog logs/ssl_request_puppet_rp_log %t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \%r\ %b RequestHeader set X-SSL-Subject %{SSL_CLIENT_S_DN}e RequestHeader set X-Client-DN %{SSL_CLIENT_S_DN}e
[Puppet Users] Re: Help with configuring Puppet Proxies using Apache
Very cool, thank you so much! I'll be reviewing this and will give it a try as soon as I can. Karl On Wednesday, November 20, 2013 6:41:17 AM UTC-5, pdpinfo wrote: Hi Karl, here following are apache conf that work, afaik (any comment is welcomed): - puppetserver: direct and indirect access - proxy server You can have direct and proxied clients: clients | tcp/8140 | Puppet Server | tcp/8141 ---firewall | RP | tcp/8140 | remote clients Please note: (disclaimer) this setup, intended for internal networks, does not have imho evident security issues, however you have to understand what issues could arise if you do not manage a trust chain, that is ensure security on certificates, ssl, network communication, puppetserver access. More: - To operate this setup you must already have certificates generated by Puppet CA. - Certificates must contain all relevant DNS names used by servers, and correct CN. - Pay attention on header variables and tcp/8141 access restriction, to be not vulnerable to man-in-the-middle attacks. - You should update CRL on proxy. - (This setup does not have SSL client validation for RP when connecting to puppetserver; SSLVerifyClient on VH 8141 recommended.) Verify you have in your server's puppet.conf: ssl_client_header = HTTP_X_PUPPET_CLIENT_DN ssl_client_verify_header = HTTP_X_PUPPET_CLIENT_VERIFY (Change servernames and ACL as requested) #Puppet server--- Listen 8141 VirtualHost *:8141 ServerName my_puppet_servername ServerAlias my_puppet_servername SSLEngine on SSLProtocol -ALL +SSLv3 +TLSv1 SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP SSLCertificateKeyFile /var/lib/puppet/ssl/private_keys/my_puppet_servername.pem SSLCertificateFile /var/lib/puppet/ssl/certs/my_puppet_servername.pem SSLCACertificateFile /var/lib/puppet/ssl/ca/ca_crt.pem SSLCertificateChainFile /var/lib/puppet/ssl/ca/ca_crt.pem SSLCARevocationFile /var/lib/puppet/ssl/ca/ca_crl.pem # Passenger options that can be set in a virtual host configuration block. PassengerHighPerformance on PassengerStatThrottleRate 120 PassengerUseGlobalQueue on RackAutoDetect Off RailsAutoDetect Off RackBaseURI / # X-Client variables required to verify client authentication # Values are coming from (trusted) Reverse Proxy that verifies client certificate # For correct CA emission, and CRL status SetEnvIf X-RP-Client-DN (.*) HTTP_X_PUPPET_CLIENT_DN=$1 SetEnvIf X-RP-Client-Verify (.*) HTTP_X_PUPPET_CLIENT_VERIFY=$1 SetEnvIf X-Forwarded-For (.*) REMOTE_ADDR=$1 DocumentRoot /etc/puppet/rack/public Location / Options None Order deny,allow # List IP address of your proxy Allow from my_proxy_IP_address Deny from all /Location /VirtualHost Listen 8140 VirtualHost *:8140 SSLEngine on SSLProtocol -ALL +SSLv3 +TLSv1 SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP SSLCertificateKeyFile /var/lib/puppet/ssl/private_keys/my_puppet_servername.pem SSLCertificateFile /var/lib/puppet/ssl/certs/my_puppet_servername.pem SSLCACertificateFile /var/lib/puppet/ssl/ca/ca_crt.pem SSLCertificateChainFile /var/lib/puppet/ssl/ca/ca_crt.pem SSLCARevocationFile /var/lib/puppet/ssl/ca/ca_crl.pem SSLVerifyClient optional SSLVerifyDepth 1 SSLOptions +StdEnvVars # Passenger options that can be set in a virtual host configuration block. PassengerHighPerformance on PassengerStatThrottleRate 120 PassengerUseGlobalQueue on RackAutoDetect Off RailsAutoDetect Off RackBaseURI / RequestHeader set X-SSL-Subject %{SSL_CLIENT_S_DN}e RequestHeader set X-PUPPET-Client-DN %{SSL_CLIENT_S_DN}e RequestHeader set X-PUPPET-Client-Verify %{SSL_CLIENT_VERIFY}e DocumentRoot /etc/puppet/rack/public Directory /etc/puppet/rack/ Options None AllowOverride None Order allow,deny Allow from all /Directory /VirtualHost #---END Puppet Server- #RP- Listen 8140 VirtualHost *:8140 ServerName my_RP_servername:8140 SSLEngine on SSLCipherSuite SSLv2:-LOW:-EXPORT:RC4+RSA SSLProtocol -ALL +SSLv3 +TLSv1 SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP SSLCertificateFile /var/lib/puppet/ssl/certs/my_RP_servername.pem SSLCertificateKeyFile /var/lib/puppet/ssl/private_keys/my_RP_servername.pem SSLCertificateChainFile /var/lib/puppet/ssl/certs/ca.pem SSLCACertificateFile /var/lib/puppet/ssl/ca/ca_crt.pem SSLCARevocationFile /var/lib/puppet/ssl/ca/ca_crl.pem SSLVerifyClient optional SSLVerifyDepth 1 SSLOptions +StdEnvVars ErrorLog
Re: [Puppet Users] puppet testing
Hi Raj, when running puppet apply on your module init.pp you will only compile the module but you will not instantiate the module. (google for definition vs. declaration) You need to create another init.pp file (normally you put them into yourmodule/tests/init.pp). In this file you declare the module (e.g. using include yourmodule) hth, Martin On 20 Nov 2013, at 11:59, Raj kumar V vijayarajku...@gmail.com wrote: Martin, Still same no work done or no errors. To explain further, simply I wrote a module. Nad it is inside /etc/puppetlabs/puppet/modules/mymodule 2 files: init.pp and params.pp when I compile or execute it root@nfaxen-ubu1:/etc/puppetlabs/puppet/modules/site24x7# puppet apply init.pp Notice: Compiled catalog for nfaxen-ubu1.csez.zohocorpin.com in environment production in 0.06 seconds Notice: Finished catalog run in 0.27 seconds Thts the output and no work done. Are you saying I have to create a another pp file and add this in include mymodule and execute it with --noop? On Wednesday, 20 November 2013 16:14:33 UTC+5:30, Martin Alfke wrote: Hi Raj, you can do smoketsts for your module http://docs.puppetlabs.com/guides/tests_smoke.html Simply use your module (e.g. by include modulename) The you run a local puppet apply smoketestfile —noop —noop ensures that you simulate the puppet run only. hth, Martin On 20 Nov 2013, at 11:34, Raj kumar V vijayar...@gmail.com wrote: Hi There, I am kind of lost, understood something wrong. I have written a module. Now how can I test this module? Do I need to copy it to agent or server? Is it possible to test it as a standalone module where I have a machine with puppet agent or server installed? It is a simple module I dont want complicate things with cucumber or some rspec etc. How can I test it with puppet apply command? When I run this it say everything complied but no work done and no errors too. Thanks Raj -- 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/5ef065b1-8a57-4f40-a43c-3e989da23101%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/3e6e08c5-2047-4424-9581-435909d23fbc%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/AE76D01D-AB1F-4733-A626-FC355AA09368%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] puppet testing
Hi Raj, when running puppet apply on your module init.pp you will only compile the module but you will not instantiate the module. (google for definition vs. declaration) You need to create another init.pp file (normally you put them into yourmodule/tests/init.pp). In this file you declare the module (e.g. using include yourmodule) hth, Martin On 20 Nov 2013, at 11:59, Raj kumar V vijayarajku...@gmail.com wrote: Martin, Still same no work done or no errors. To explain further, simply I wrote a module. Nad it is inside /etc/puppetlabs/puppet/modules/mymodule 2 files: init.pp and params.pp when I compile or execute it root@nfaxen-ubu1:/etc/puppetlabs/puppet/modules/site24x7# puppet apply init.pp Notice: Compiled catalog for nfaxen-ubu1.csez.zohocorpin.com in environment production in 0.06 seconds Notice: Finished catalog run in 0.27 seconds Thts the output and no work done. Are you saying I have to create a another pp file and add this in include mymodule and execute it with --noop? On Wednesday, 20 November 2013 16:14:33 UTC+5:30, Martin Alfke wrote: Hi Raj, you can do smoketsts for your module http://docs.puppetlabs.com/guides/tests_smoke.html Simply use your module (e.g. by include modulename) The you run a local puppet apply smoketestfile —noop —noop ensures that you simulate the puppet run only. hth, Martin On 20 Nov 2013, at 11:34, Raj kumar V vijayar...@gmail.com wrote: Hi There, I am kind of lost, understood something wrong. I have written a module. Now how can I test this module? Do I need to copy it to agent or server? Is it possible to test it as a standalone module where I have a machine with puppet agent or server installed? It is a simple module I dont want complicate things with cucumber or some rspec etc. How can I test it with puppet apply command? When I run this it say everything complied but no work done and no errors too. Thanks Raj -- 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/5ef065b1-8a57-4f40-a43c-3e989da23101%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/3e6e08c5-2047-4424-9581-435909d23fbc%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/AE4C49D1-6066-4891-8E09-68000CF2612A%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] undefined method `enum_lsdev' for Facter::Util::Processor:Module
Hi All, I'm facing the following error on an Ubuntu 12.04 install with Puppet 3.3.2 Error: Could not retrieve local facts: undefined method `enum_lsdev' for Facter::Util::Processor:Module Facter is the latest version installed using gem. I have seen this was a bug, is it still or again ? Thanks! Matt -- 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/b84a1416-3394-4b36-be0e-47de5154d8b0%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Yum Related Versioning Issue
I'll wager that Michael is correct here (based on what he says, not just his knowledge of packaging). Can you provide the actual, full names of the package in question, or the rpm -qi output? My guess, based on having the same problem, is that if ensure = '5.35.0-3_el5' is failing, then you'll have success with ensure = '5.35.0-3_el5.x86_64' I can't find the supporting documentation at the moment, but based on how the package is built (well, the values of certain fields/parameters in the spec file), there are only certain substrings of the full package name (packagename-X.Y.Z-release.dist.arch) that yum recognizes. My memory of this is that you can either specify the version (X.Y.Z) or you have to specify *everything* in the package name/version/release/dist/arch. Or you can specify name.arch and a version, as Michael suggested. -jantman On 11/19/2013 05:09 PM, Michael Stahnke wrote: Sometimes yum (and things calling it) do better when using package-name.arch like openldap-libs.i386 vs openldap-libs.x86_64 if that makes sense. I think that's what's happening. On Tue, Nov 19, 2013 at 5:43 AM, Dan White y...@comcast.net wrote: Did you try yum update --verbose package as suggested ? “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin Hobbes) From: Richie Rees richard.ree...@gmail.com To: puppet-users@googlegroups.com Sent: Tuesday, November 19, 2013 8:33:35 AM Subject: Re: [Puppet Users] Yum Related Versioning Issue Hello again Ygor, Its a 64 bit internal package, its only built for the 64 bit platform. there are a number of different versions in the repo but none of the same major build so can't see why it would be getting confused. Thanks, Richie. On Tuesday, 19 November 2013 13:23:47 UTC, Ygor wrote: Details, please. What is the package in question ? Are you running 32 bit or 64 bit ? “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin Hobbes) From: Richie Rees richard...@gmail.com To: puppet...@googlegroups.com Sent: Tuesday, November 19, 2013 4:48:48 AM Subject: [Puppet Users] Yum Related Versioning Issue Hi All, Come to borrow some of your collective wisdom again, Seeing a problem installing an rpm using a fairly basic class on a RHEL 5 box using yum as the provider, I am seeing the following error message :- Error: Could not update: Failed to update to version 5.35.0-3_el5 , got version 5.35.0-3_el5 instead This is reported as a fail so all the resources that are dependent on the package installing including the service and config files are not set as the class states they should be. -- 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/4e79b8ce-ee3d-4b01-a28c-32ce3e401838%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/11708b3a-6ad4-40b5-afa6-ca3d52c844e5%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/545694092.4619408.1384868583959.JavaMail.root%40sz0126a.westchester.pa.mail.comcast.net. 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/528CA98B.5090007%40jasonantman.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: Continuous Integration Questions for Modules
I've got to agree with JuanBrein, I've been using puppet since 0.24.5 and I don't remember ever seeing a problem like this. How are you deploying your modules? Even if you have a time consuming deploy process (i.e. not just a git fetch and pull), and inconsistent state on disk is a valid concern, you could easily bypass this by staging the deploy to a path and then either renaming or switching symlinks to instantly activate the newly deployed code/artifact. -jantman On 11/20/2013 06:39 AM, JuanBrein wrote: Have you seen such a problems or is just an assumption? I've worked on a few puppet implementations and changing puppet master manifests on the go has never been an issue. I might be misunderstanding your question, can you develop more around your deployment process? On Tuesday, November 19, 2013 9:01:27 PM UTC, gilbertc777 wrote: Hi All, Using Jenkins to perform CI as well as automated deployment of puppet modules to our master. One thing that I am trying to figure out, is what is the best way when deploying the modules to have puppet not error out communication wise if nodes happen to check in while the deployment is ongoing. I thought of using mcollective to stop puppet on all the nodes, then roll the new modules, then restart (puppet is in splay mode so should not overwhelm it). Any thoughts/suggestions are appreciated! Thanks! Chuck -- 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/7c7871f0-186e-4f02-9e5a-ba497dd1de4a%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/528CAB19.8070900%40jasonantman.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] package conflict resolution method:
Matt, I can't speak for exactly what John was implying, but I've been working on something similar recently, and facing more or less the same problems that you're implying below, so I'll give you my take on it. 1) Yes, it means factoring all possibly-shared resources out into discrete classes. The definition of all is flexible depending on how fine-grained your package management needs to be, and how willing you are to possibly have some extra packages floating around. 2) Including modules from the Forge is another beast. At this point, at $work, we're moving in the direction of *only* writing our own modules if there isn't a suitable Forge module. So, we've ended up with a few cases where we have two conflicting modules that can't be used on the same node (usually a Forge module that is intended to replace an older in-house module as it's phased out). The proper way to manage this is when you add a Forge module that replaces existing functionality, you should remove any existing declarations of those resources and replace them with a require, or something like that. A specific example... we recently started using the puppetlabs-postgresql Forge module (https://github.com/puppetlabs/puppetlabs-postgresql/). It has a postgresql::lib::python class that installs the python-psycopg2 package (the python postgres driver), and a postgresql::lib::devel class that installs postgresql-devel. So, when we decided we were going to use the new Forge module, we grepped through all of our existing modules, and replaced any Package resources for these packages with require postgresql::lib::python and require postgresql::lib::devel, respectively. I assume I speak for many in saying that I hope that with the ever-increasing usefulness of the Forge, the community begins to converge on a single canonical module for a given use case or package. -jason antman On 11/19/2013 02:48 PM, Matt Simmons wrote: Hi John, I'm new around here, but I'm also in the same situation as Tom, who started this thread. I was wondering if you could expound a little bit on the better solution that you mention. I write what I could refer to as third grade puppet, but I'd like to get better. When you suggest factoring out these resources into separate classes and modules, do you mean that, in essence, all possibly-shared resources should be in discrete modules or classes? How does that jive with modules included from Puppet Forge? Doesn't that mean refactoring everything you include there, as well? Thanks, and sorry for what I'm sure is an overly-basic question, --Matt Simmons -- 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/7f66b5b7-6e20-4835-a057-b62c1add08e7%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/528CAF44.1050205%40jasonantman.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Want to restrict puppet module execute every 30mins
Hi, I have created a puppet module that performs below steps: 1. stop application service 2. take backup of existing application 3. download application artifact 4. install the application 5. some configuration stuff 6. start the application service Since the agent will poll the master every 30mins all these steps are executed every 30mins which I do not want. I want to enforce the puppet module execution only upon module change. Can I possibly do that? If not how can resolve this situation? Thanks Aravind -- 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/32dc1990-2593-4817-8841-30ab1cab55e0%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] How to parse same template with differen values each time
Hi, I need to parse the a template, with different values, to generate different config files in each country I need to config. The template is used inside a define, this define is used one time for each country. I need that each time y execute this define, the vars used by the template have different values, depending on the parameter country I cant find a nice solution for this (like using Hiera). Actually I use a custom function that loads a key/value file on my scope each time y execute de define, and I change the key/value file using the parameter country. *Example:* define tomcat::context( $path, $country, ){ * //My custom function I want to replace* dynamicVariableCreator(context_${country}.conf) //This template needs to generate different content for each country file {${path}_${country}.xml: content = template(context), ensure = present, } } Thanks -- 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/0a77e20e-8850-4bf1-835b-a62338af87e0%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Want to restrict puppet module execute every 30mins
You can create some sort of a trigger file. Like this: file { /some/folder/file_trigger ensure = present, content = version01, … } Add refreshonly = true to your resources. Then subscribe your resources to this file. Once the file is changed, your code will be executed. -- Best regards, Sergey Arlashin On Nov 20, 2013, at 6:18 PM, Aravind Valluru aravind.vall...@pearson.com wrote: Hi, I have created a puppet module that performs below steps: 1. stop application service 2. take backup of existing application 3. download application artifact 4. install the application 5. some configuration stuff 6. start the application service Since the agent will poll the master every 30mins all these steps are executed every 30mins which I do not want. I want to enforce the puppet module execution only upon module change. Can I possibly do that? If not how can resolve this situation? Thanks Aravind -- 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/32dc1990-2593-4817-8841-30ab1cab55e0%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/24A5F54F-71F2-499B-A943-7138D5580FB6%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] How to parse same template with differen values each time
Hi, you can use a hash, either from hiera or in your manifest. $config = { country1 = { option1 = value1, option2 = ... }, country2 = { option1 = ... } ... } In the template, you can access it like this e.g. % data = config[country] -% ... ListenAddress=%= data[option3] % ... Careful, this is untested example code. HTH, Felix On 11/20/2013 02:56 PM, Jordan Cabral wrote: Hi, I need to parse the a template, with different values, to generate different config files in each country I need to config. The template is used inside a define, this define is used one time for each country. I need that each time y execute this define, the vars used by the template have different values, depending on the parameter country I cant find a nice solution for this (like using Hiera). Actually I use a custom function that loads a key/value file on my scope each time y execute de define, and I change the key/value file using the parameter country. _Example:_ define tomcat::context( $path, $country, ){ *//My custom function I want to replace* dynamicVariableCreator(context_${country}.conf) //This template needs to generate different content for each country file {${path}_${country}.xml: content = template(context), ensure = present, } } Thanks -- 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/528CE072.6050706%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Yum Related Versioning Issue
On Wednesday, November 20, 2013 6:22:35 AM UTC-6, Jason Antman wrote: I'll wager that Michael is correct here (based on what he says, not just his knowledge of packaging). Can you provide the actual, full names of the package in question, or the rpm -qi output? My guess, based on having the same problem, is that if ensure = '5.35.0-3_el5' is failing, then you'll have success with ensure = '5.35.0-3_el5.x86_64' This does resemble a package architecture issue, but after analyzing the provider source, I don't think that's it. The relevant line appears to be this one: raise Puppet::Error, Failed to update to version #{should}, got version #{is[:ensure]} instead if should should != is[:ensure] Note in particular that that error will be raised only if 'should' is unequal to 'is[:ensure]', but the error message Richie reports does not appear to show the two differing. My best guess as as to how to resolve the apparent discrepancy is that the two strings are rendered unequal by an encoding mismatch. (Thanks a lot, Ruby, for per-string encodings. :-( ) Alternatively, it might be that the 'should' string contains a non-printing character. I would check the relevant manifest file for non-printing characters first, as that should be relatively easy to do. I am uncertain how an encoding mismatch might crop up here, or how best to resolve it if it did, but my first attempt would be to ensure that all manifests are encoded in the text encoding for the locale in which the master runs (probably the system's default locale, but verify). By the way, if you want to specify package arch in a resource declaration, then you must append the .arch to the resource title, not add it to the 'ensure' value. I can't find the supporting documentation at the moment, but based on how the package is built (well, the values of certain fields/parameters in the spec file), there are only certain substrings of the full package name (packagename-X.Y.Z-release.dist.arch) that yum recognizes. My memory of this is that you can either specify the version (X.Y.Z) or you have to specify *everything* in the package name/version/release/dist/arch. Or you can specify name.arch and a version, as Michael suggested. Yum understands name and name-version-release, with or without .arch. It does not understand name-version (without -release), with or without the arch. 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/10c210a4-43ec-48f3-a499-0fb1d175e9d6%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Puppet: a way to secure certain files
On Wednesday, November 20, 2013 12:06:35 AM UTC-6, Rich Burroughs wrote: You can use hiera gpg for ssh keys too. See this example: https://groups.google.com/d/msg/puppet-users/jHcuKQXT9cQ/g23Lmf4e6b8J But you would be unwise to do that in conjunction with Puppet 3, unless you fall into one of a small number of special cases. If you add the hiera-gpg back end to your hiera configuration then the encrypted file will be decrypted once for each class parameter that is neither explicitly assigned a value nor resolved in a higher-priority back end. Decrypting the file is very expensive, and if you do it many times then you will see a very noticeable impact on catalog compilation performance. There have been reports on this group of such decryption adding several minutes of compilation time for catalogs that otherwise take a few seconds. That decryption overhead will not affect you if you use few (or no) parameterized classes (watch out for third-party modules!), if you take care to assign values to all class parameters of every declared class (again, beware third party modules here), or if you are using Puppet 2 rather than Puppet 3. You should consider whether it really makes sense to encrypt at all, vs. simply securing the master against unauthorized users. If you encrypt then you must record the plaintext decryption key somewhere that the master can read it, and if you hypothesize an assailant that is savvy enough to track down sensitive information in your Puppet configs then you should assume that that assailant can also find the decryption key. In fact, such an assailant must also break your access controls to reach the sensitive information, meaning that they must have gained root access to your server before encryption is even a factor. If an assailant gains root then it's already game over. 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/59d9ed61-8fb3-4b51-bf1d-5d96feab83d8%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] How come that module is not executed in Windows?
I have the following in vagrantfile in WIndows system. config.vm.provision :puppet do |puppet| puppet.manifests_path = manifests puppet.manifest_file = base-hadoop.pp puppet.module_path = modules end when i run vagrant provision, i do see manifest and module folders are mounted and ssh into vm, I can find files in the following path [default] -- /tmp/vagrant-puppet/manifests [default] -- /tmp/vagrant-puppet/modules-0 I do see base-hadoop.pp is executed and things are installed. But init.pp under module folder is not executed my file structure in windows is %HOME_PATH%\hadoop\ (under this i have vagrant file) \manifests (under this I have base_hadoop.pp) \modules \hadoop \manifests (under this i have a init.pp) any idea? Thanks Roger -- 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/5c5553f3-7a9a-474a-a13d-e80e68d2c905%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] cloudstack_resources not working as expected
Hello, I have cloned the cloudstack_resources git repo into my puppet modules directory. I have a working cloudstack management server up and going. here is my modules/infra/manifests/init.pp file class infra { cloudstack_instance { 'foo': ensure=present, flavor = 'Small Instance', zone = 'ash-dev-xs-zone', image = 'FreeBSD10 Puppet Install', group ='role=transit', } } here is my site.pp node 'dev.mydomain.local' {include infra } where dev.mydomain.local is the hostname of my puppetmaster box. And here is the error I get when I 'puppet apply site.pp' on my puppetmaster box Any help is appreciated. Error trace follows Thanks! Debug: Prefetching default resources for cloudstack_instance Error: Could not prefetch cloudstack_instance provider 'default': undefined method `[]' for nil:NilClass /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet_x/cloudstack/transport.rb:24:in `retrieve' /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet/provider/cloudstack.rb:27:in `connection' /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet/provider/cloudstack_instance/default.rb:11:in `instances' /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet/provider/cloudstack.rb:15:in `prefetch' /usr/lib/ruby/vendor_ruby/puppet/transaction.rb:264:in `prefetch' /usr/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `prefetch_if_necessary' /usr/lib/ruby/vendor_ruby/puppet/transaction.rb:62:in `block in evaluate' /usr/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:116:in `call' /usr/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:116:in `traverse' /usr/lib/ruby/vendor_ruby/puppet/transaction.rb:95:in `evaluate' /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:164:in `block in apply' /usr/lib/ruby/vendor_ruby/puppet/util/log.rb:147:in `with_destination' /usr/lib/ruby/vendor_ruby/puppet/transaction/report.rb:108:in `as_logging_destination' /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:163:in `apply' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:125:in `block in apply_catalog' /usr/lib/ruby/vendor_ruby/puppet/util.rb:182:in `block in benchmark' /usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime' /usr/lib/ruby/vendor_ruby/puppet/util.rb:181:in `benchmark' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:124:in `apply_catalog' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:190:in `run' /usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:273:in `apply_catalog' /usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:223:in `main' /usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:151:in `run_command' /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block (2 levels) in run' /usr/lib/ruby/vendor_ruby/puppet/application.rb:457:in `plugin_hook' /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block in run' /usr/lib/ruby/vendor_ruby/puppet/util.rb:511:in `exit_on_fail' /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run' /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run' /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:86:in `execute' /usr/bin/puppet:4:in `main' Error: Could not set 'present' on ensure: undefined method `[]' for nil:NilClass at 8:/work/ac/tools/puppet/dev-puppetmaster/modules/infra/manifests/init.pp /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet_x/cloudstack/transport.rb:24:in `retrieve' /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet/provider/cloudstack.rb:27:in `connection' /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet/provider/cloudstack.rb:31:in `connection' /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet/provider/cloudstack.rb:52:in `get_id_from_model' /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet/provider/cloudstack_instance/default.rb:96:in `get_flavor_id' /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet/provider/cloudstack_instance/default.rb:41:in `create' /usr/lib/ruby/vendor_ruby/puppet/property/ensure.rb:16:in `block in defaultvalues' /usr/lib/ruby/vendor_ruby/puppet/property.rb:197:in `call_valuemethod' /usr/lib/ruby/vendor_ruby/puppet/property.rb:498:in `set' /usr/lib/ruby/vendor_ruby/puppet/property.rb:581:in `sync' /usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:113:in `apply_parameter' /usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:55:in `perform_changes' /usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:138:in `evaluate' /usr/lib/ruby/vendor_ruby/puppet/transaction.rb:161:in `apply' /usr/lib/ruby/vendor_ruby/puppet/transaction.rb:174:in `eval_resource' /usr/lib/ruby/vendor_ruby/puppet/transaction.rb:104:in `call'
Re: [Puppet Users] How come that module is not executed in Windows?
On Wed, Nov 20, 2013 at 11:01 AM, Roger Yu rogery...@gmail.com wrote: when i run vagrant provision, i do see manifest and module folders are mounted and ssh into vm, I can find files in the following path [default] -- /tmp/vagrant-puppet/manifests [default] -- /tmp/vagrant-puppet/modules-0 I do see base-hadoop.pp is executed and things are installed. But init.pp under module folder is not executed Does a manifest exist which correctly assigns classes to the machine? Usually the puppet.manifest_file setting is used for this purpose, such as including other *.pp files which then assign like so: http://docs.puppetlabs.com/puppet/2.7/reference/lang_node_definitions.html, is one way to do it. -- 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/CAEUKkZ9v0cOoogUGNMuxS5BVTLXRgb2K-ZQfDfhhmsV2DKHSsA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] How to parse same template with differen values each time
I tried that, but in that way I cant override internal vars of the hash (option1) in different files of the hiera hierarchy, because I need to ask to hiera for the entire hash. El miércoles, 20 de noviembre de 2013 13:16:50 UTC-3, Felix.Frank escribió: Hi, you can use a hash, either from hiera or in your manifest. $config = { country1 = { option1 = value1, option2 = ... }, country2 = { option1 = ... } ... } In the template, you can access it like this e.g. % data = config[country] -% ... ListenAddress=%= data[option3] % ... Careful, this is untested example code. HTH, Felix On 11/20/2013 02:56 PM, Jordan Cabral wrote: Hi, I need to parse the a template, with different values, to generate different config files in each country I need to config. The template is used inside a define, this define is used one time for each country. I need that each time y execute this define, the vars used by the template have different values, depending on the parameter country I cant find a nice solution for this (like using Hiera). Actually I use a custom function that loads a key/value file on my scope each time y execute de define, and I change the key/value file using the parameter country. _Example:_ define tomcat::context( $path, $country, ){ *//My custom function I want to replace* dynamicVariableCreator(context_${country}.conf) //This template needs to generate different content for each country file {${path}_${country}.xml: content = template(context), ensure = present, } } Thanks -- 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/5da45387-847d-4b66-8c7d-51a80eab1677%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Permissions for Windows Files Sourced from Puppet Master
With the changes for http://projects.puppetlabs.com/issues/18931 (Don't set mode on Windows if not specified) http://projects.puppetlabs.com/issues/5240 (Default ownership for files when uid/gid are unspecified), we've created the ability to specify whether to use source permissions, use when creating or ignore. We've left the default to :use so things work as expected. However with Windows, when things download they will not use source permissions as it is not supported in Windows at all. So what you get is a warning for sourced items: Warning: Copying owner/mode/group from the puppet master to Windows agents is not supported; use source_permissions = ignore. That warning will go away when you've updated all sourced files to add that in your manifests. Would anyone be at odds with us moving the default for windows for sourced items to ignore the source permissions? This would remove the warning that gets displayed in the upcoming version until you would change all sourced files to add `source_permissions = :ignore`. That way you would only see the warning if you tried to explicitly set the source_permissions for a file. -- Rob Reynolds Developer, Puppet Labs Join us at PuppetConf 2014, September 23-24 in San Francisco -- 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/CAMJiBK6o-3dTkvFbsUsk5guZBTY0S0ZrNqqEJ8WCtQpoWvW8VA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: cloudstack_resources not working as expected
Well apparently my transport.yaml file was not formatted correcly. I had everything starting at column zero, and when I added a tab to make the spacing for the lines under cloudstack: be indented, it worked. :shrug: On Wednesday, November 20, 2013 12:22:11 PM UTC-5, Derek Cole wrote: Hello, I have cloned the cloudstack_resources git repo into my puppet modules directory. I have a working cloudstack management server up and going. here is my modules/infra/manifests/init.pp file class infra { cloudstack_instance { 'foo': ensure=present, flavor = 'Small Instance', zone = 'ash-dev-xs-zone', image = 'FreeBSD10 Puppet Install', group ='role=transit', } } here is my site.pp node 'dev.mydomain.local' {include infra } where dev.mydomain.local is the hostname of my puppetmaster box. And here is the error I get when I 'puppet apply site.pp' on my puppetmaster box Any help is appreciated. Error trace follows Thanks! Debug: Prefetching default resources for cloudstack_instance Error: Could not prefetch cloudstack_instance provider 'default': undefined method `[]' for nil:NilClass /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet_x/cloudstack/transport.rb:24:in `retrieve' /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet/provider/cloudstack.rb:27:in `connection' /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet/provider/cloudstack_instance/default.rb:11:in `instances' /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet/provider/cloudstack.rb:15:in `prefetch' /usr/lib/ruby/vendor_ruby/puppet/transaction.rb:264:in `prefetch' /usr/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `prefetch_if_necessary' /usr/lib/ruby/vendor_ruby/puppet/transaction.rb:62:in `block in evaluate' /usr/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:116:in `call' /usr/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:116:in `traverse' /usr/lib/ruby/vendor_ruby/puppet/transaction.rb:95:in `evaluate' /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:164:in `block in apply' /usr/lib/ruby/vendor_ruby/puppet/util/log.rb:147:in `with_destination' /usr/lib/ruby/vendor_ruby/puppet/transaction/report.rb:108:in `as_logging_destination' /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:163:in `apply' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:125:in `block in apply_catalog' /usr/lib/ruby/vendor_ruby/puppet/util.rb:182:in `block in benchmark' /usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime' /usr/lib/ruby/vendor_ruby/puppet/util.rb:181:in `benchmark' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:124:in `apply_catalog' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:190:in `run' /usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:273:in `apply_catalog' /usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:223:in `main' /usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:151:in `run_command' /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block (2 levels) in run' /usr/lib/ruby/vendor_ruby/puppet/application.rb:457:in `plugin_hook' /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block in run' /usr/lib/ruby/vendor_ruby/puppet/util.rb:511:in `exit_on_fail' /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run' /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run' /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:86:in `execute' /usr/bin/puppet:4:in `main' Error: Could not set 'present' on ensure: undefined method `[]' for nil:NilClass at 8:/work/ac/tools/puppet/dev-puppetmaster/modules/infra/manifests/init.pp /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet_x/cloudstack/transport.rb:24:in `retrieve' /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet/provider/cloudstack.rb:27:in `connection' /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet/provider/cloudstack.rb:31:in `connection' /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet/provider/cloudstack.rb:52:in `get_id_from_model' /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet/provider/cloudstack_instance/default.rb:96:in `get_flavor_id' /work/ac/tools/puppet/dev-puppetmaster/modules/cloudstack_resources/lib/puppet/provider/cloudstack_instance/default.rb:41:in `create' /usr/lib/ruby/vendor_ruby/puppet/property/ensure.rb:16:in `block in defaultvalues' /usr/lib/ruby/vendor_ruby/puppet/property.rb:197:in `call_valuemethod' /usr/lib/ruby/vendor_ruby/puppet/property.rb:498:in `set' /usr/lib/ruby/vendor_ruby/puppet/property.rb:581:in `sync' /usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:113:in `apply_parameter'
[Puppet Users] Re: Puppetlabs-dhcp - Failed to parse template dhcp/dhcp.pool.erb, undefined method each
When I change it to an array it injects a comma into the range and DHCP pukes. On Thursday, January 24, 2013 3:20:46 AM UTC-8, Peter wrote: Not sure if it is the reason but making the change seems to fix it. Just incase anyone else comes across this in the future. The init.pp file calling the Pool's template ( https://github.com/puppetlabs/puppetlabs-dhcp/blob/master/tests/init.pp) is passing a string not an array hence the variable not having an each method (see below for extract) dhcp::pool{ 'example.com': network = '10.1.1.0', mask= '255.255.255.0', range = *'10.1.1.100 10.1.1.200'*, gateway = '10.1.1.1', } By changing the underlined and bolded part to ['10.1.1.100', '10.1.1.200'] fixed the error ... go figure. Not sure some ruby setting on my end is not tweaked right or these things get through the test harness? Peter. On Thursday, 24 January 2013 09:55:57 UTC+11, Peter wrote: Hi List, After installing the puppetlabs-dhcp module and trying to run the tests/init.pp file I receive and error see below for sequence: puppet module install zleslie/dhcp Notice: Preparing to install into /etc/puppet/modules ... Notice: Downloading from https://forge.puppetlabs.com ... Notice: Installing -- do not interrupt ... /etc/puppet/modules âââ zleslie-dhcp (v1.1.0) (**Needed to install the concat dependacy for the Puppetlabs-dhcp module. Raised a github issue (#17) to include the dependency in the module**) puppet module install ripienaar/concat Notice: Preparing to install into /etc/puppet/modules ... Notice: Downloading from https://forge.puppetlabs.com ... Notice: Installing -- do not interrupt ... /etc/puppet/modules âââ ripienaar-concat (v0.2.0) puppet apply /etc/puppet/modules/dhcp/tests/init.pp --verbose Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/pe_version.rb Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/root_home.rb Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb Info: Loading facts in /etc/puppet/modules/concat/lib/facter/concat_basedir.rb Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults Error: Failed to parse template dhcp/dhcpd.pool.erb: Filepath: /etc/puppet/modules/dhcp/templates/dhcpd.pool.erb Line: 7 Detail: undefined method `each' for 10.1.1.100 10.1.1.200:String at /etc/puppet/modules/dhcp/manifests/pool.pp:15 on node creator.mgnt.local Error: Failed to parse template dhcp/dhcpd.pool.erb: Filepath: /etc/puppet/modules/dhcp/templates/dhcpd.pool.erb Line: 7 Detail: undefined method `each' for 10.1.1.100 10.1.1.200:String at /etc/puppet/modules/dhcp/manifests/pool.pp:15 on node creator.mgnt.local My question is what could be causing this? I assume that this is something to do with Puppet's DSL? Thanks, Peter -- 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/42592cc9-c180-48e6-976f-f70c705cc3e4%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Puppetlabs-dhcp - Failed to parse template dhcp/dhcp.pool.erb, undefined method each
Nevermind. I think the problem was that I was splitting it up into two members of an array with a comma as opposed to just keeping it one long string. So yeah, this fix worked. Thanks, Alex On Wednesday, November 20, 2013 12:24:03 PM UTC-8, Alex Scoble wrote: When I change it to an array it injects a comma into the range and DHCP pukes. On Thursday, January 24, 2013 3:20:46 AM UTC-8, Peter wrote: Not sure if it is the reason but making the change seems to fix it. Just incase anyone else comes across this in the future. The init.pp file calling the Pool's template ( https://github.com/puppetlabs/puppetlabs-dhcp/blob/master/tests/init.pp) is passing a string not an array hence the variable not having an each method (see below for extract) dhcp::pool{ 'example.com': network = '10.1.1.0', mask= '255.255.255.0', range = *'10.1.1.100 10.1.1.200'*, gateway = '10.1.1.1', } By changing the underlined and bolded part to ['10.1.1.100', '10.1.1.200'] fixed the error ... go figure. Not sure some ruby setting on my end is not tweaked right or these things get through the test harness? Peter. On Thursday, 24 January 2013 09:55:57 UTC+11, Peter wrote: Hi List, After installing the puppetlabs-dhcp module and trying to run the tests/init.pp file I receive and error see below for sequence: puppet module install zleslie/dhcp Notice: Preparing to install into /etc/puppet/modules ... Notice: Downloading from https://forge.puppetlabs.com ... Notice: Installing -- do not interrupt ... /etc/puppet/modules âââ zleslie-dhcp (v1.1.0) (**Needed to install the concat dependacy for the Puppetlabs-dhcp module. Raised a github issue (#17) to include the dependency in the module**) puppet module install ripienaar/concat Notice: Preparing to install into /etc/puppet/modules ... Notice: Downloading from https://forge.puppetlabs.com ... Notice: Installing -- do not interrupt ... /etc/puppet/modules âââ ripienaar-concat (v0.2.0) puppet apply /etc/puppet/modules/dhcp/tests/init.pp --verbose Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/pe_version.rb Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/root_home.rb Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb Info: Loading facts in /etc/puppet/modules/concat/lib/facter/concat_basedir.rb Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults Error: Failed to parse template dhcp/dhcpd.pool.erb: Filepath: /etc/puppet/modules/dhcp/templates/dhcpd.pool.erb Line: 7 Detail: undefined method `each' for 10.1.1.100 10.1.1.200:String at /etc/puppet/modules/dhcp/manifests/pool.pp:15 on node creator.mgnt.local Error: Failed to parse template dhcp/dhcpd.pool.erb: Filepath: /etc/puppet/modules/dhcp/templates/dhcpd.pool.erb Line: 7 Detail: undefined method `each' for 10.1.1.100 10.1.1.200:String at /etc/puppet/modules/dhcp/manifests/pool.pp:15 on node creator.mgnt.local My question is what could be causing this? I assume that this is something to do with Puppet's DSL? Thanks, Peter -- 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/1359ff59-460d-4d1c-8148-998eea162cbd%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] How to parse same template with differen values each time
Yes, that's a limitation you get from relying on hashes in your hierarchy. Tough call. Of course, you *could* override the entire hash where necessary. Or, you could cut out the top level of the hash and make each hash key a hiera key instead: countrydata_us: option1: option2: ... countrydata_uk: option1: ... ... This way you may get away with overriding only select countries. But I suggest you share more information about your data model, especially wrt. your hierarchical overriding needs. Perhaps we can find a more sensible approach for the problem as a whole. Cheers, Felix On 11/20/2013 07:31 PM, Jordan Cabral wrote: I tried that, but in that way I cant override internal vars of the hash (option1) in different files of the hiera hierarchy, because I need to ask to hiera for the entire hash. -- 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/528D2FD5.1050108%40Alumni.TU-Berlin.de. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] username/password combo for custom provider (couchbase)
On Tue, Jul 16, 2013 at 2:09 AM, Jakov Sosic jso...@srce.hr wrote: On 07/16/2013 02:56 AM, Nan Liu wrote: If that's not the issue, then I'm not sure. I'll try to put together the transport module when I get some spare time. Reference is not a problem, but fetching parameters from that resource is... As I can see in vmware modules, there is a PuppetX::PuppetLabs::Transport module with retrieve method, and I'm not sure if I'm supposed to write something along that lines for my 'transport-alike' resource also? This was long overdue, but finally had a opportunity to extend native puppet resource to manage remote resource via transport. The specific implementation uses ssh: transport { 'esx': username = $username, password = $password, server = $server, } service { 'SSH': ensure = 'running', provider = 'ssh', transport = Transport['esx'], } This was written to run against an ESXi server to update some sshd config: https://github.com/vmware/vmware-vmware_lib Thanks, Nan -- 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/CACqVBqCPKx%2Bnckx0Kb1fx1RvPry%2BpvYDcKBhNf9BpHk8RGDAkg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] How come that module is not executed in Windows?
Yes, if you look at the directory structure above I have base-hadoop.pp under manifests folder and init.pp under modules\hadoop\manifests folder. and init.pp content is listed below class hadoop { $hadoop_home = /opt/hadoop exec { download_hadoop: command = wget -O /tmp/hadoop.tar.gz http://apache.mirrors.timporter.net/hadoop/common/hadoop-1.0.3/hadoop-1.0.3.tar.gz;, path = $path, unless = ls /opt | grep hadoop-1.0.3, require = Package[openjdk-6-jdk] } exec { unpack_hadoop : command = tar -zxf /tmp/hadoop.tar.gz -C /opt, path = $path, creates = ${hadoop_home}-1.0.3, require = Exec[download_hadoop] } } Eugene Vilensky於 2013年11月20日星期三UTC-8上午9時31分30秒寫道: On Wed, Nov 20, 2013 at 11:01 AM, Roger Yu roge...@gmail.comjavascript: wrote: when i run vagrant provision, i do see manifest and module folders are mounted and ssh into vm, I can find files in the following path [default] -- /tmp/vagrant-puppet/manifests [default] -- /tmp/vagrant-puppet/modules-0 I do see base-hadoop.pp is executed and things are installed. But init.pp under module folder is not executed Does a manifest exist which correctly assigns classes to the machine? Usually the puppet.manifest_file setting is used for this purpose, such as including other *.pp files which then assign like so: http://docs.puppetlabs.com/puppet/2.7/reference/lang_node_definitions.html, is one way to do it. -- 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/44a5744a-6af7-4ca3-89e0-e480b605fa70%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Puppet Masterless on Windows
yes i installed vagrant windows version and use vagrant provision command to trigger puppet provisioner and as I mentioned above, manifest file base-hadoop.pp works fine, just init.pp under modules folder was not called Rob Reynolds於 2013年11月19日星期二UTC-8上午9時08分24秒寫道: For vagrant, are you kicking off the commands with the vagrant puppet provisioner? And are you using vagrant-windows plugin? On Tue, Nov 19, 2013 at 8:28 AM, Felix Frank felix...@alumni.tu-berlin.dejavascript: wrote: Hi, I haven't played with Vagrant, but your wording makes me ask: Is there indeed an agent (as in `puppet agent` as opposed to `puppet apply`) at work? Because that will never use a manifest from your local machine. Puppet agent has the sole purpose of connecting to a master. Cheers, Felix On 11/18/2013 09:28 PM, Spencer Thomason wrote: Hi all, I have been working on a configuration of a Masterless configuration on Windows. I am able to get individual jobs to run like: puppet apply path to my puppet .pp file However, I would like to spin up the Vagrant box off a base VM, and have a puppet manifest file in a location where puppet knows to look and provision based off that file. The obvious place seems to be C:\ProgramData\PuppetLabs\puppet\etc on Windows. However, I can't seem to get the agent configured right to look at a manifest file in that directory or another directory. Can someone provide some steps that I am missing for a hello world type puppet configuration for what I am talking about above? Thanks! Spencer -- 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 javascript:. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/528B7570.9070503%40alumni.tu-berlin.de . For more options, visit https://groups.google.com/groups/opt_out. -- Rob Reynolds Developer, Puppet Labs Join us at PuppetConf 2014, September 23-24 in San Francisco -- 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/6d7a58d1-b1c3-4e06-bcc8-9fc0bfacb68b%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.