[Puppet Users] Hiera data repetition
Hello. Sometimes it is desirable to define Hiera variables for usage in Hiera itself, i.e. variables that won't be looked up from Puppet manifests. We do this to avoid repetition. Here's an example of a variable used only in the file it is defined: _internal_api_host: 'int.api.example.com' profile::keepalived::vrrp_script: ping_internal_api: script: "curl https://%{lookup('_internal_api_host')}/ping" profile::nginx::servers: "%{alias('_internal_api_host')}": ... Sometimes we also define this kind of variables in one file but do lookups somewhere else: hieradata/project/foo.yaml: profile::base::network::interfaces: eth0: method: 'static' address: "%{lookup('_INTERNAL_IP')}/24" hieradata/project/foo/foo1.yaml: _INTERNAL_IP: '10.1.2.3' For us this became an issue. There are no conventions, and therefore no consistency in our quite large hiera. Sometimes we can't even tell whether some variable is looked up from manifests or is "local" for Hiera. For example, the "_INTERNAL_IP" above is named "profile::base::network::intern_ip" in some projects. The question is... Is this a normal practice? How do other folks handle these cases? I couldn't find any information regarding this. 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/282b3812-287a-4eb0-a838-591f2c3f925an%40googlegroups.com.
[Puppet Users] Accessing internal read-only parameters
Hi, I'd like to access read-only parameter package::status in my manifest. The only reference about RO-parameters usage I found is some irrelevant post in puppet-dev group (https://groups.google.com/d/msg/puppet-dev/XiEexgGGwHc/P1_s7OQo59kJ) from Y2008: citate And as definition attributes they would provide a nice way of accessing internal read-only parameters (e.g. package::platform) which is not possible today AFAIK. /citate So, is it possible to use them at all nowdays? If so, then how? Thank you. -- Dmitry Musatov -- 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/943aabb1-4a43-4913-9067-440928e5a716%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] pluginsync removes module specific facts
Hi, I observe the issue ,that by turning pluginsync on, it is no more possible to store module specific facts to /var/lib/puppet/lib/facter/. If some module has distributed some facts by File[] to /var/lib/puppet/lib/facter/ (at the puppet server this facts are not in modulepath/lib/facter, but somewhere else), then a run with pluginsync would remove such facts from there. It is possible to avoid this? Is it possible to add custom facts by File to /var/lib/puppet/lib/facter/. ? Regards Dimitri -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/cdoQYMoJI0EJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] pluginsync removes module specific facts
because we have facts, that are module specific and only hosts should get them, that include this module. Pluginsync distribute ALL facts, doesn't matter if the modue is included in host configuration or not. Thats why we are diong it currenlty with File{}. On Saturday, October 27, 2012 12:26:10 PM UTC+2, R.I. Pienaar wrote: - Original Message - From: Dmitry Nilsen dmitry...@googlemail.com javascript: To: puppet...@googlegroups.com javascript: Sent: Saturday, October 27, 2012 11:13:01 AM Subject: [Puppet Users] pluginsync removes module specific facts Hi, I observe the issue ,that by turning pluginsync on, it is no more possible to store module specific facts to /var/lib/puppet/lib/facter/. If some module has distributed some facts by File[] to /var/lib/puppet/lib/facter/ (at the puppet server this facts are not in modulepath/lib/facter, but somewhere else), then a run with pluginsync would remove such facts from there. It is possible to avoid this? Is it possible to add custom facts by File to /var/lib/puppet/lib/facter/. ? Why do you distribute facts with the file type? You should not be distributing facts using file{}, pluginsync can distribute all facts when they are stored in the modules lib dir -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/gFiqp90B7XUJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] serialized call for defines by naming them with array (ordering for the output )
Hi.. I have following issue: If calling a define with an array as names, then it applyes defines in parallel way (which is logical by puppet structure) example: # define a function define func(){ exec{/bin/echo $name /tmp/file} } # call it func{[a,b,c,d]: } then my file would have an ordering like: # cat /tmp/file b a d c but how to do this in a serialized way? so, that, at the end, my file has an ordering structure exactly as an array, so: a b c d any idea? Its realy usefull for config files where the ordering of parameter does matter. Regards Dimitri -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/gf5K3PAgYPoJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: About puppet report
PS: my tagmail.conf file contains: warning: m...@email.tld On Feb 16, 9:44 am, Dmitry trtrmi...@gmail.com wrote: Hello! I am using puppet-2.7.6 under FreeBSD. Here is my config file: [agent] server = some.server.tld splay = true [master] reportfrom = s...@email.tld reports = store, tagmail ssl_client_header = SSL_CLIENT_S_DN ssl_client_verify_header = SSL_CLIENT_VERIFY If client is unable to sync files with master, I want to receive e- mail with problem description. Recently I made a mistake in my server config (wrong path to a file). I got error in client's log: puppet-agent[82214]: (/Stage[main]/Suggest-test/File[/etc/rc.conf.d/ lighttpd]) Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/bsd/etc/rc.conf.d/lighttpd at /usr/local/etc/puppet/modules/bsd/manifests/init.pp:16 but no e-mail so this problem was unnoticed until I found it in log. What should I do in order to receive e-mail from puppet next time I make similar mistake? Thanks! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] About puppet report
Hello! I am using puppet-2.7.6 under FreeBSD. Here is my config file: [agent] server = some.server.tld splay = true [master] reportfrom = s...@email.tld reports = store, tagmail ssl_client_header = SSL_CLIENT_S_DN ssl_client_verify_header = SSL_CLIENT_VERIFY If client is unable to sync files with master, I want to receive e- mail with problem description. Recently I made a mistake in my server config (wrong path to a file). I got error in client's log: puppet-agent[82214]: (/Stage[main]/Suggest-test/File[/etc/rc.conf.d/ lighttpd]) Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/bsd/etc/rc.conf.d/lighttpd at /usr/local/etc/puppet/modules/bsd/manifests/init.pp:16 but no e-mail so this problem was unnoticed until I found it in log. What should I do in order to receive e-mail from puppet next time I make similar mistake? Thanks! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Could not retrieve catalog fro m remote server: execution expired
Hello! I am using puppet-2.7.6 on FreeBSD. master is running with apache22 and passenger. I have about 50 clients which share about 20 config files via puppet. agents are configured to query master every 30 minutes with splay=true. After 2-3 days of running, server stops to respond. I see in puppet logs: Nov 30 22:46:33 host puppet-agent[22554]: Could not retrieve catalog fro m remote server: execution expired Nov 30 22:46:33 host puppet-agent[22554]: Using cached catalog Nov 30 22:46:33 host puppet-agent[22554]: Could not retrieve catalog; sk ipping run Nov 30 22:48:34 host puppet-agent[22554]: Could not run Puppet configura tion client: execution expired On master machine I see 12 idle ruby processes (spawned by passenger). The only way I found to fix the problem is to restart apache, but it is not a solution. What could be the reason for this problem? Thanks! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Could not retrieve metadata
I am having the same problem now with puppet-2.7.6 on FreeBSD. That original post by Chris has no response since may. Developers, do you have any idea why that happenes? Thanks! -- Forwarded message -- From: Chris Phillips ch...@untrepid.com Date: May 10, 1:35 am Subject: Could not retrieve metadata - 2.6.7 / RHEL4 / remote site To: Puppet Users Hi, I've got a 2.6.7 server and client setup running pretty nicely in a single site on a few rhel5 and 6 boxes, and today branched out with a RHEL4 node on a remote site. This was installing 2.6.7 (and facter 1.5.8) from source due to the lack of el4 rpms (el5's from yum.puppetlabs.com on all other RHEL boxes so far), with oldish official ruby 1.8.1 el4 rpms. On this new node I'm getting about a 30-40% failure rate in terms of runs, with errors in retrieving metadata: Mon May 09 22:16:12 +0100 2011 /Stage[main]/Nss-ldap/File[/etc/nsswitch.conf] (err): Could not evaluate: Could not retrieve file metadata for puppet:///modules/nss-ldap/nsswitch.conf: at /etc/puppet/modules/nss-ldap/manifests/init.pp:37 This happens on various different modules, but always the same error, trying to get a file for a source reference. I'm aware there are a few new variables I've thrown in, but the WAN connectivity seems to be fine, no packet loss or anything, and also as these errors are reported on the server and client, it's not like it's actually losing connection with the puppet server. Does this intermittent error ring any bells? With tagmail reports telling us about this, it's not really ignorable for us. Thanks Chris -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: Could not retrieve metadata
Example: Nov 21 22:56:35 comp01 puppet-agent[46828]: (/Stage[main]/Bsd/File[/ etc/inetd.conf]) Could not evaluate: end of file reached Could not retrieve file metadata for puppet:///modules/bsd/etc/inetd.conf: end of file reached at /usr/local/etc/puppet/modules/bsd/manifests/init.pp: 80 This messages appear for random clients for random lines in init.pp. On Nov 21, 11:35 pm, Dmitry trtrmi...@gmail.com wrote: I am having the same problem now with puppet-2.7.6 on FreeBSD. That original post by Chris has no response since may. Developers, do you have any idea why that happenes? Thanks! -- Forwarded message -- From: Chris Phillips ch...@untrepid.com Date: May 10, 1:35 am Subject: Could not retrieve metadata - 2.6.7 / RHEL4 / remote site To: Puppet Users Hi, I've got a 2.6.7 server and client setup running pretty nicely in a single site on a few rhel5 and 6 boxes, and today branched out with a RHEL4 node on a remote site. This was installing 2.6.7 (and facter 1.5.8) from source due to the lack of el4 rpms (el5's from yum.puppetlabs.com on all other RHEL boxes so far), with oldish official ruby 1.8.1 el4 rpms. On this new node I'm getting about a 30-40% failure rate in terms of runs, with errors in retrieving metadata: Mon May 09 22:16:12 +0100 2011 /Stage[main]/Nss-ldap/File[/etc/nsswitch.conf] (err): Could not evaluate: Could not retrieve file metadata for puppet:///modules/nss-ldap/nsswitch.conf: at /etc/puppet/modules/nss-ldap/manifests/init.pp:37 This happens on various different modules, but always the same error, trying to get a file for a source reference. I'm aware there are a few new variables I've thrown in, but the WAN connectivity seems to be fine, no packet loss or anything, and also as these errors are reported on the server and client, it's not like it's actually losing connection with the puppet server. Does this intermittent error ring any bells? With tagmail reports telling us about this, it's not really ignorable for us. Thanks Chris -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Atomic update of several config files
Hello! Imagine I have some service which config is split into several config files. How should I configure puppet to manage those files so that: 1) service is restarted only once after all configs were synced 2) if some error occurs during update (network error, disk full, any other) I want to be sure that either all config files are refreshed or none of them are (so that service is always in consistent state). Thanks! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: How does puppet copy files?
On Nov 11, 9:46 pm, Peter Meier peter.me...@immerda.ch wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 When agent notices that master.passwd should be refreshed, how exactly does copy process happen? Is it atomic (e.g. fetch to some temp filename on local filesystem and then rename)? it does it this way. Okay, thanks. Imagine now that I want to update several config files related to each other. It would be error to update some of them and leave others in older state. So I want either all of them to be refreshed, or, if disk is full, to keep all them untouched. How can I accomplish this? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] How does puppet copy files?
Hello! Imagine that I have the following in my puppet manifest: file { '/etc/master.passwd': mode = 0600, source = 'puppet:///modules/test/etc/master.passwd', } When agent notices that master.passwd should be refreshed, how exactly does copy process happen? Is it atomic (e.g. fetch to some temp filename on local filesystem and then rename)? Or it will fetch the file over the net to the destination name (and so there is some short period of time when target file is in inconsistent state)? Thanks! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Connection reset by peer
Thank you!!! It was a problem with DNS-server. The second DNS-server, that was in resolv.conf, don't answer for requests. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Connection reset by peer
Hi, everyone All works normally, but sometimes I get error like: err: Could not run Puppet configuration client: Connection reset by peer Could not retrieve file metadata for puppet:///modules/port_bind9/example.com: Connection reset by peer at /usr/local/etc/puppet/modules/port_bind9/manifests/templates.pp:36 And each time the file that couldn't be retreived is different. Sometimes it completed without errors. Server is mongrel with nginx. It's strange that at access.log there are 5 requests of the each file like this: 192.168.0.23 - - [29/Apr/2011:17:50:20 +0400] GET /production/file_metadata/modules/jail_at_space/resolv.conf HTTP/1.1 200 317 - - 192.168.0.23 - - [29/Apr/2011:17:50:20 +0400] GET /production/file_metadata/modules/jail_at_space/resolv.conf HTTP/1.1 200 317 - - 192.168.0.23 - - [29/Apr/2011:17:50:20 +0400] GET /production/file_metadata/modules/jail_at_space/resolv.conf HTTP/1.1 200 317 - - 192.168.0.23 - - [29/Apr/2011:17:50:20 +0400] GET /production/file_metadata/modules/jail_at_space/resolv.conf HTTP/1.1 200 317 - - 192.168.0.23 - - [29/Apr/2011:17:50:20 +0400] GET /production/file_metadata/modules/jail_at_space/resolv.conf HTTP/1.1 200 317 - - 192.168.0.23 - - [29/Apr/2011:17:50:20 +0400] GET /production/file_metadata/modules/jail_at_space/resolv.conf HTTP/1.1 200 317 - - Also I have checked traffic using wireshark. At the result file there is only the same that I can found at access.log. The trace also don't give me a information: debug: Finishing transaction 17213724860 debug: Loaded state in 0.01 seconds debug: Using cached certificate for ca debug: Using cached certificate for dns.space.lenobl.com debug: Using cached certificate_revocation_list for ca debug: catalog supports formats: b64_zlib_yaml dot marshal pson raw yaml; using pson info: Caching catalog for dns.space.lenobl.com debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; using pson debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; using pson debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; using pson debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; using pson debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; using pson debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; using pson debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; using pson debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; using pson debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; using pson debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; using pson debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; using pson /usr/local/lib/ruby/site_ruby/1.8/puppet/parameter.rb:171:in `fail' /usr/local/lib/ruby/site_ruby/1.8/puppet/type/file/source.rb:153:in `init_metadata' /usr/local/lib/ruby/site_ruby/1.8/puppet/type/file/source.rb:145:in `each' /usr/local/lib/ruby/site_ruby/1.8/puppet/type/file/source.rb:145:in `init_metadata' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:106:in `send' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:106:in `cached_value' /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:98:in `cached_value' /usr/local/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:48:in `metadata' /usr/local/lib/ruby/site_ruby/1.8/puppet/type/file/source.rb:109:in `copy_source_values' /usr/local/lib/ruby/site_ruby/1.8/puppet/type/file.rb:622:in `retrieve' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:703:in `retrieve_resource' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1874:in `to_trans' /usr/local/lib/ruby/site_ruby/1.8/puppet/type/file.rb:691:in `to_trans' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1899:in `to_resource' /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:203:in `uniqueness_key' /usr/local/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:83:in `add_resource' /usr/local/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:72:in `each' /usr/local/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:72:in `add_resource' /usr/local/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:561:in `to_catalog' /usr/local/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:531:in `each' /usr/local/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:531:in `to_catalog' /usr/local/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:468:in `to_ral' /usr/local/lib/ruby/site_ruby/1.8/puppet/configurer.rb:113:in `convert_catalog' /usr/local/lib/ruby/site_ruby/1.8/puppet/configurer.rb:108:in `retrieve_catalog' /usr/local/lib/ruby/site_ruby/1.8/puppet/configurer.rb:139:in `run' /usr/local/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run' /usr/local/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:21:in `lock' /usr/local/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
Re: [Puppet Users] is puppet the right tool for me?
Evan Hisey wrote: Regardless of if puppet is intended to manage multiple similar hosts, it is still useful when you have a smaller number of unique hosts. If every host is completely unique then you get one some benefits of puppet: * you have a single place to review your configuration * you can make changes without having to do it by hand * puppet checks nothing has changed, and puts it back if something has However, I bet that all your hosts are a *lot* more alike than you think: * you probably use the same web server (apache, or so), and *mostly* have it set up the same way on each machine, right? * you probably use the same MTA on most machines * you probably use the same log watching and checking stuff on 'em all * you probably have similar needs for installing PHP and some extra PHP modules, which are usually configured more or less the same.[1] * you probably do a bunch of install mysql, configure like this stuff the same on each host. You forgot a biggy bonus of puppet, no matter what size you support. I have several small ( as in 1-3) groups of very different machines, and with puppet I can rebuild them very quickly on when they need to be replaced or upgraded. doing it by hand takes most of a day or 2. That's great! And what to do with various passwords, private keys and so on? Should I put them in manifest? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] is puppet the right tool for me?
Nigel Kersten wrote: On Wed, Apr 7, 2010 at 12:10 PM, Dmitry V'yal akam...@gmail.com mailto:akam...@gmail.com wrote: Hello, I'm currently administering a vps running a dozen of php-sites. I use several scripts for deploying new sites, updating them, taking the backups and so on. All the system is quite fragile and error-prone. I'm thinking about some more integrated solution. Can puppet be useful in my situation? Or is it primarily intended for managing big number of similarly configured hosts? What do your scripts do? One of the typical tasks is deploying the new site. It involves creating the system user, creating the database and the database user, setting up the repository, pushing changes to it, adding the customized(domain and path to log files changes) config file for nginx, setting awstats config and so on. Also, I need to remove sites sometimes. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] is puppet the right tool for me?
Bruce Richardson wrote: On Wed, Apr 07, 2010 at 12:10:07PM -0700, Dmitry V'yal wrote: Hello, I'm currently administering a vps running a dozen of php-sites. I use several scripts for deploying new sites, updating them, taking the backups and so on. All the system is quite fragile and error-prone. I'm thinking about some more integrated solution. Can puppet be useful in my situation? Or is it primarily intended for managing big number of similarly configured hosts? The latter, but that doesn't necessarily mean puppet couldn't be useful to you. After all, puppet lets you define dependencies so that you can specify that action A is triggered when file B is modified, action C happens if acion A is successful and so on, which must describe half of what your scripts do. It also lets you define templates and then create multiple instances based on those templates and different configurations, which must be the other half of what you do. So I think it can help you. And you may find other things about your vps that it can configure for you. I would create a definition that describes your site layout. Each time you invoke that definition in your script, with different parameters, it'll create the site for you and trigger any necessary actions (like restarting apache). You can also have the directory hierarchy that contains your sites managed by puppet in such a way that it will delete any files that weren't created by your current puppet config. That way, all you have to do is remove the description of a site from your config and all the files previously generated for it will be removed the next time puppet is run. Looks very promising to me :) One of the problems with my current setup, is what there is no central storage of configuration After one ran the script, the only way to see what's is currently served is to manually look at all these config files and site directories. Another problem, is what from time to time after I made some enhancements all the configs must be modified a bit. For example, I setup a log analyzing utility and now it must be enabled for all the sites. Such an operation is extremely painful right now. You don't need a puppetmaster to run puppet, you can run it on a single host from local standalone scripts. So you don't need to incur the overhead of running puppetmaster and puppet daemons just for your sites. Great ) Some time ago I looked at Chef, but even in it's minimal configuration it looked like an overkill for my needs. Of course, you can do this yourself by choosing your own templating system and writing scripts to manipulate it, but puppet can make it much simpler. Yeah, I'm already fed up with my current sed-based templates and wanted to move to ERB, but it reminded my reinventing the wheel the second time in a row :) Thank you very much for all the suggestions -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] is puppet the right tool for me?
Daniel Pittman wrote: Dmitry V'yal akam...@gmail.com writes: I'm currently administering a vps running a dozen of php-sites. I use several scripts for deploying new sites, updating them, taking the backups and so on. All the system is quite fragile and error-prone. I'm thinking about some more integrated solution. Can puppet be useful in my situation? Or is it primarily intended for managing big number of similarly configured hosts? Puppet can be useful to you, but you might also have to change the way you approach things. I'm always ready. Anyway, to answer the specific questions: Yes, puppet is useful to you. (IMO, obviously.) Regardless of if puppet is intended to manage multiple similar hosts, it is still useful when you have a smaller number of unique hosts. If every host is completely unique then you get one some benefits of puppet: * you have a single place to review your configuration * you can make changes without having to do it by hand * puppet checks nothing has changed, and puts it back if something has However, I bet that all your hosts are a *lot* more alike than you think: * you probably use the same web server (apache, or so), and *mostly* have it set up the same way on each machine, right? * you probably use the same MTA on most machines * you probably use the same log watching and checking stuff on 'em all * you probably have similar needs for installing PHP and some extra PHP modules, which are usually configured more or less the same.[1] * you probably do a bunch of install mysql, configure like this stuff the same on each host. Hmm, you're right, I didn't thought about it, but each member of our team has a desktop machine he uses for development and testing. And as it comes to web related things, the setup is intentionally almost the same as on the server. Also, currently we're planning to change the geographic location of vps and to move from gentoo to ubuntu. Looks like a perfect time for big changes. So, even at the scale you are looking I bet there is a whole lot of same between the machines you can exploit — and if you actively look for that you can create a whole lot more same. (Plus, once your hosts are more similar than different you can spend all your time focused on getting the software right rather than working out how you set up this particular machine. :) Yeah, I'm beginning to understand that :) Thanks for the ideas. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] is puppet the right tool for me?
Hello, I'm currently administering a vps running a dozen of php-sites. I use several scripts for deploying new sites, updating them, taking the backups and so on. All the system is quite fragile and error-prone. I'm thinking about some more integrated solution. Can puppet be useful in my situation? Or is it primarily intended for managing big number of similarly configured hosts? Best wishes, Dmitry -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.