{"id":977,"date":"2010-12-21T15:51:14","date_gmt":"2010-12-21T20:51:14","guid":{"rendered":"http:\/\/www.kickflop.net\/blog\/?p=977"},"modified":"2011-03-02T16:38:03","modified_gmt":"2011-03-02T21:38:03","slug":"quality-control-puppet","status":"publish","type":"post","link":"https:\/\/www.kickflop.net\/blog\/2010\/12\/21\/quality-control-puppet\/","title":{"rendered":"Quality Control : Puppet"},"content":{"rendered":"<p><i>Quality Control is an ongoing series of blog posts where I am moved in rare circumstances to document what is wrong with software or anything else I find significantly rough.  The posts are meant to be constructive, and I hope others can see through the likely presence of frustration in my tone to get there.<\/i><!--more--><\/p>\n<pre>\r\nfacter-1.5.8:beijing> ruby install.rb --destdir=\/net\/silmaril\/export\/puppet\r\n...\r\nfacter-1.5.8:beijing>\r\n<\/pre>\n<p>Good.<\/p>\n<pre>\r\npuppet-2.6.4:beijing> more README\r\nDocumentation (and detailed install instructions) can be found\r\nonline at http:\/\/docs.puppetlabs.com\/.\r\n\r\nAdditional documentation can also be found at the Puppet Wiki:\r\n\r\nhttp:\/\/projects.puppetlabs.com\/projects\/puppet\/wiki\/\r\n\r\nGenerally, you need the following things installed:\r\n\r\n* Ruby >= 1.8.1 (earlier releases might work but probably not)\r\n\r\n* The Ruby OpenSSL library.  For some reason, this often isn't included\r\n  in the main ruby distributions.  You can test for it by running\r\n  'ruby -ropenssl -e \"puts :yep\"'.  If that errors out, you're missing the\r\n  library.\r\n\r\n  If your distribution doesn't come with the necessary library (e.g., on Debian\r\n  and Ubuntu you need to install libopenssl-ruby), then you'll probably have to\r\n  compile Ruby yourself, since it's part of the standard library and not\r\n  available separately.  You could probably just compile and install that one\r\n  library, though.\r\n\r\n* The Ruby XMLRPC client and server libraries.  For some reason, this often\r\n  isn't included in the main ruby distributions.  You can test for it by\r\n  running 'ruby -rxmlrpc\/client -e \"puts :yep\"'.  If that errors out, you're\r\n  missing the library.\r\n\r\n* Facter => 1.5.1\r\n  You can get this from < http:\/\/puppetlabs.com\/projects\/facter >\r\n<\/pre>\n<p>Maybe there&#8217;s a good reason, but why are you telling me all of these minimum requirements instead of just checking for it in the build\/install process?<\/p>\n<pre>\r\npuppet-2.6.4:beijing> ruby install.rb --destdir=\/net\/silmaril\/export\/puppet\r\nwhich: no ronn in (\/usr\/bin:\/bin:\/sbin:\/usr\/sbin:\/net\/silmaril\/export\/puppet\/usr\/bin)\r\nCould not load facter; cannot install\r\npuppet-2.6.4:beijing>\r\n<\/pre>\n<p>WTF is &#8216;ronn&#8217;?  This is a fully loaded RHEL 5.5 box I am on.<\/p>\n<pre>\r\npuppet-2.6.4:beijing> ruby install.rb --help\r\nwhich: no ronn in (\/usr\/bin:\/bin:\/sbin:\/usr\/sbin:\/net\/silmaril\/export\/puppet\/usr\/bin)\r\nCould not load facter; cannot install\r\npuppet-2.6.4:beijing>\r\n<\/pre>\n<p>Awesome!<\/p>\n<pre>\r\npuppet-2.6.4:beijing> ruby install.rb --fdgfsdgfds\r\nwhich: no ronn in (\/usr\/bin:\/bin:\/sbin:\/usr\/sbin:\/net\/silmaril\/export\/puppet\/usr\/bin)\r\ninstall: invalid option: --fdgfsdgfds\r\ninstall.rb:92:in `mkdir': Permission denied - \/etc\/puppet (Errno::EACCES)\r\n        from install.rb:92:in `do_configs'\r\n        from install.rb:492\r\npuppet-2.6.4:beijing>\r\n<\/pre>\n<p>So you got an invalid argument, and continued to try to mkdir?  That doesn&#8217;t seem smart.<\/p>\n<p>I guess I&#8217;ll look at the source for install.rb in order to find the ronn reference?<\/p>\n<pre>\r\n# install.rb\r\n# ...\r\nbegin\r\n  if $haverdoc\r\n    ronn = %x{which ronn}\r\n    $haveman = true\r\n  else\r\n    $haveman = false\r\n  end\r\nrescue\r\n  puts \"Missing ronn; skipping man page creation\"\r\n  $haveman = false\r\nend\r\n# ...\r\n<\/pre>\n<p>So much for displaying that error message.  Why wouldn&#8217;t you also display that along with &#8216;$haveman = false&#8217; after the else clause?<\/p>\n<p>Whatever, let&#8217;s just try to address the fact that Facter is not found.  I&#8217;m not chasing the ronn rabbit down a hole, even though it&#8217;s not clear to me if I need it or not or what the hell it is.<\/p>\n<pre>\r\npuppet-2.6.4:beijing> find \/net\/silmaril\/export\/puppet\/usr -name fac\\*\r\n\/net\/silmaril\/export\/puppet\/usr\/bin\/facter\r\n\/net\/silmaril\/export\/puppet\/usr\/lib\/ruby\/site_ruby\/1.8\/facter.rb\r\n\/net\/silmaril\/export\/puppet\/usr\/lib\/ruby\/site_ruby\/1.8\/facter\r\n\/net\/silmaril\/export\/puppet\/usr\/lib\/ruby\/site_ruby\/1.8\/facter\/facterversion.rb\r\n\/net\/silmaril\/export\/puppet\/usr\/lib\/ruby\/site_ruby\/1.8\/facter\/util\/fact.rb\r\npuppet-2.6.4:beijing>\r\n<\/pre>\n<p>Apparently \/net\/silmaril\/export\/puppet\/usr\/bin being in my PATH does not mean anything to the Ruby library search logic.  This obviously isn&#8217;t Puppet&#8217;s fault.<\/p>\n<p>Digging around, I find that I can set RUBYLIB for non-standard places holding Ruby libraries\/modules.<\/p>\n<pre>\r\nexport RUBYLIB=\/net\/silmaril\/export\/puppet\/usr\/lib\r\n    ruby install.rb --destdir=\/net\/silmaril\/export\/puppet = FAIL\r\nexport RUBYLIB=\/net\/silmaril\/export\/puppet\/usr\/lib\/ruby\r\n    ruby install.rb --destdir=\/net\/silmaril\/export\/puppet = FAIL\r\nexport RUBYLIB=\/net\/silmaril\/export\/puppet\/usr\/lib\/ruby\/site_ruby\r\n    ruby install.rb --destdir=\/net\/silmaril\/export\/puppet = FAIL\r\nexport RUBYLIB=\/net\/silmaril\/export\/puppet\/usr\/lib\/ruby\/site_ruby\/1.8\r\nSUCCESS\r\n<\/pre>\n<p>And apparently search for Ruby libraries only works at some unknown-to-me level of directory traversal.  This, too, obviously isn&#8217;t Puppet&#8217;s fault.<\/p>\n<p>So far, this is a pantload of fun.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Quality Control is an ongoing series of blog posts where I am moved in rare circumstances to document what is&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,17,34,11],"tags":[],"class_list":["post-977","post","type-post","status-publish","format-standard","hentry","category-musings","category-products","category-quality-control","category-sysadmin"],"_links":{"self":[{"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/posts\/977","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/comments?post=977"}],"version-history":[{"count":10,"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/posts\/977\/revisions"}],"predecessor-version":[{"id":1231,"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/posts\/977\/revisions\/1231"}],"wp:attachment":[{"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/media?parent=977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/categories?post=977"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/tags?post=977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}