Brian Dunbar
2012-Dec-26 23:47 UTC
[Puppet Users] Avoiding a ball of yarn and technical debt
Backgrond: I''m one of two unix admins, we ''own'' 150 unix hosts. Most Solaris, but we''re starting to transition from that to Oracle Linux. I''ve got my puppet 2.7 running ''ok'' on my test hosts, have spent a fair bit of my time since September getting up to speed on Puppet. Starting January I''ll be ready to start rolling them out to my development, then production, hosts. Our deployment will be gradual, and slowly moving services and hosts from managed by bash script to managed by puppet as time permits. I''m taking advantage of the holidays to check my assumptions on ''how'' I''m building Puppet. My goals are - Enable my partner to understand ''what'' I''m up to i.e. make it as self-documenting as possible - Ditto the three other guys on my team who assist us in Unix chores part-time, and are our backups. - Prevent the whole mess from turning into a snarled yarn-ball. Questions: Would it be better pause for a few weeks and upgrade to Puppet 2.7 > 3 now? Is there consensus on the best way to avoid a yarn-ball of messy code? -- Brian Dunbar "Display some adaptability" -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Jakov Sosic
2012-Dec-27 17:57 UTC
Re: [Puppet Users] Avoiding a ball of yarn and technical debt
On 12/27/2012 12:47 AM, Brian Dunbar wrote:> Questions: > > Would it be better pause for a few weeks and upgrade to Puppet 2.7 > 3 now?If you can afford it - then absolutely.> Is there consensus on the best way to avoid a yarn-ball of messy code?Use at least puppet parser validate + puppet-lint in pre-commit hook, keep your code in modules and not in site.pp, and try to separate data from the code via hiera, and you''ll be pretty much OK. -- Jakov Sosic www.srce.unizg.hr -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hans van der Made
2013-Jan-01 11:50 UTC
[Puppet Users] Re: Avoiding a ball of yarn and technical debt
On Thursday, December 27, 2012 12:47:51 AM UTC+1, Brian Dunbar wrote:> - Enable my partner to understand ''what'' I''m up to i.e. make it as > self-documenting as possible > - Ditto the three other guys on my team who assist us in Unix chores > part-time, and are our backups. > - Prevent the whole mess from turning into a snarled yarn-ball. > > Questions: > > Would it be better pause for a few weeks and upgrade to Puppet 2.7 > 3 > now? > Is there consensus on the best way to avoid a yarn-ball of messy code? >I''m new here, but from my experience: * Make sure you understand the concept of encapsulation and watch out for inproper use of modules, variables, etc. Avoid the "quick fix" that cuts corners. * Don''t automate too much at once. I''d suggest to start bottom-up, with simple stuff like configuring syslog or sshd, or maybe create sysadmin users on all boxes. Things that are the same on all systems. But: put all aspects of a particular service in. Make sure you know what is puppetized and what isn''t. * When you''ve finished writing puppet code for a project, destroy the (virtual) server and deploy from scratch again. Make sure your work can be reproduced. * Actively tend to your code like you would a garden. Check for things to remove, clarify and improve. Keep it clean, clear and relevant. Your ideas and code will change over time, so start simple and get back to it every once in a while. * Write down what you''ve learned and actively coach your partner. It''s a learning process that you both need to go through. Never be the only one to know how things work or say goodbye to holidays :-) * Keep a consistent style in names, module structure, comments. Discuss with your partners and make sure you''re on the same page. Get a grip on change management (commits, testing, deployment, rollback). Keep in mind that you''re working on 150 boxes at once. * Use monitoring, use dashboard or at least centralized syslog of puppet agents. Make sure you know when boxes don''t have their puppet agent running. To the others: feel free to complain if I''m missing the boat here. First post... Best, Hans van der Made Utrecht University NL -- 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/-/Op1BlS0a_zIJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.