Steven Wagner
2010-Jul-13 22:42 UTC
[Puppet Users] "Basic Windows support" in Rowlf (2.6.0 RC*) ?
I''m a pretty good candidate for a Puppet-fer-Windows guinea pig here as I''d be able to get a lot of mileage out of just being able to use the File, Service and Exec types on that platform ("Is game server running?" "Has configuration been updated?" etc.) ... but I haven''t found much in puppet-users about what the current state is of Puppet and Facter for Windows. So here''s what I''ve done so far on my Windows 7 desktop, just for fun: * Installed the latest version of Ruby via RubyInstaller: http://files.rubyforge.vm.bytemark.co.uk/rubyinstaller/rubyinstaller-1.9.1-p429.exe * Added ruby to my default path. * Downloaded and expanded the puppet 2.6.0RC2 tarball. * Ran the rakefile, watched it die. (oops) * Ran install.rb, watched it choke on the nonexistence of C: \Ruby191\sbin ... * Created that directory, re-ran it, watched it choke on the nonexistence of gzip. * Decided to give up on the installer and see how far I could get in running Puppet. * Oh. No Facter installed. * Pulled facter from github, latest revision so that maaaybe it''ll run on Windows: http://download.github.com/reductivelabs-facter-1.5.7-35-g1bd2ca2.zip * Expanded and ran facter''s install.rb. Hmmm, seems like it worked... * Facter''s not in my path. Oh. Maybe running this command will work: ruby C:\Ruby191\bin\facter ... * OMG! : Could not retrieve puppetversion: Cannot determine basic system flavour domain => myactualdomain.local facterversion => 1.5.7 fqdn => zod.myactualdomain.local hardwaremodel => i686 hostname => zod ipaddress => myactualipaddress kernel => windows kernelmajversion => 6.1 kernelrelease => 6.1.7600 kernelversion => 6.1.7600 macaddress => myactualmacaddress operatingsystem => windows operatingsystemrelease => 6.1.7600 path => C:\Ruby191\bin;c:\Program Files (x86)\NVIDIA Corporation\PhysX \Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C: \Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Windows Imaging\ ps => ps -ef rubyversion => 1.9.1 timezone => Central Daylight Time * Tried to run Puppet in the same way: ruby C:\Ruby191\bin\puppet describe * Awww: C:/Ruby191/lib/ruby/site_ruby/1.9.1/puppet/feature/base.rb:47:in `<top (required)>'': Cannot determine basic system flavour (Puppet::Error) from C:/Ruby191/lib/ruby/site_ruby/1.9.1/puppet.rb:53:in `require'' from C:/Ruby191/lib/ruby/site_ruby/1.9.1/puppet.rb:53:in `<module:Puppet>'' from C:/Ruby191/lib/ruby/site_ruby/1.9.1/puppet.rb:26:in `<top (required)>'' from C:/Ruby191/lib/ruby/site_ruby/1.9.1/puppet/application.rb: 292:in `require'' from C:/Ruby191/lib/ruby/site_ruby/1.9.1/puppet/application.rb: 292:in `initialize'' from C:/Ruby191/lib/ruby/site_ruby/1.9.1/puppet/util/ command_line.rb:55: in `new'' from C:/Ruby191/lib/ruby/site_ruby/1.9.1/puppet/util/ command_line.rb:55: in `execute'' from C:/ruby191/bin/puppet:4:in `<main>'' I''m assuming this is some kind of path problem and is therefore inherent to my Ruby install, not so much a "Puppet is freaking out because it''s on Windows" problem. I thought I''d share my experience here to see how far other people have gotten ... I''m not in the habit of developing or running Ruby on Windows at all, and I know there are multiple flavors of installer. I assume they behave differently. Before I pour much more effort into this project -- I would LOVE to bash my Windows game servers with the Puppet stick, it would make pushing patches 2,415 times better -- I wanted to post and compare notes with anyone else who was working on this. And if *nobody''s* trying this yet, and they''re looking through The Google ... I hope this helps you get it working. -steve -- 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.
Patrick Mohr
2010-Jul-13 23:19 UTC
Re: [Puppet Users] "Basic Windows support" in Rowlf (2.6.0 RC*) ?
On Jul 13, 2010, at 3:42 PM, Steven Wagner wrote:> I''m a pretty good candidate for a Puppet-fer-Windows guinea pig here > as I''d be able to get a lot of mileage out of just being able to use > the File, Service and Exec types on that platform ("Is game server > running?" "Has configuration been updated?" etc.) ... but I haven''t > found much in puppet-users about what the current state is of Puppet > and Facter for Windows. >You might want to take a look at http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Windows It looks like some people have gotten farther than you. -- 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.
steve .
2010-Jul-14 05:26 UTC
Re: [Puppet Users] "Basic Windows support" in Rowlf (2.6.0 RC*) ?
On Tue, Jul 13, 2010 at 6:19 PM, Patrick Mohr <kc7zzv@gmail.com> wrote:> You might want to take a look at http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Windows > > It looks like some people have gotten farther than you.Thanks for the link! Again in the hopes of sharing my "user experience" with the community, I''m noting my progress in getting Puppet running on a 64-bit Windows 7 desktop machine (my target platform is Server 2008 and Server 2008 R2, so I don''t think my choice of guinea pig platforms is *entirely* insane... ). I started over with the instructions at the wiki (and checked the URL referenced there), but I still ended up getting the error about not being able to determine the "basic system flavour." I think I may have introduced a couple of issues by installing the gems and the (newer) tarballs side-by-side. Gem Puppet runs up to the point where it complains about not being able to import the syslog module (which doesn''t exist on Windows). I assume this is a stale dependency that''s been evolved out of the new version. Sure enough, after ripping out the gems I got back to the flavour issue. After further investigation, I cleared this up by adding a couple more gems via: gem install win32-security gem install win32-process gem install win32-dir gem install sys-admin Now I am seeing the following error:>ruby puppet applyThe system cannot find the path specified. C:/Ruby186/lib/ruby/site_ruby/1.8/puppet/external/event-loop/event-loop.rb:78:in `initialize'': uninitialized constant Fcntl::F_SETFD (NameError) from C:/Ruby186/lib/ruby/site_ruby/1.8/puppet/external/event-loop/event-loop.rb:31:in `new'' from C:/Ruby186/lib/ruby/site_ruby/1.8/puppet/external/event-loop/event-loop.rb:31:in `default'' from C:/Ruby186/lib/ruby/site_ruby/1.8/puppet/external/event-loop/event-loop.rb:35:in `current'' from C:/Ruby186/lib/ruby/site_ruby/1.8/puppet/external/event-loop/event-loop.rb:279:in `initialize'' from C:/Ruby186/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:560:in `new'' from C:/Ruby186/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:560:in `set_filetimeout_timer'' from C:/Ruby186/lib/ruby/site_ruby/1.8/puppet/util/settings.rb:311:in `parse'' from C:/Ruby186/lib/ruby/site_ruby/1.8/puppet/application.rb:299:in `run'' from C:/Ruby186/lib/ruby/site_ruby/1.8/puppet/application.rb:398:in `exit_on_fail'' from C:/Ruby186/lib/ruby/site_ruby/1.8/puppet/application.rb:299:in `run'' from C:/Ruby186/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:55:in `execute'' from puppet:4 A little digging shows that I needed to install the MinGW dev kit: http://files.rubyforge.vm.bytemark.co.uk/rubyinstaller/devkit-3.4.5r3-20091110.7z After installing it according to the RubyInstaller docs, I was able to build my own native extensions to the gems listed above by adding the "--platform win32" switch. But now I''m getting a DLL error requiring a Ruby 1.8 DLL ... it''s ignorable, but things aren''t working right. Next I find I''m hung up inside Puppet (and Facter, for that matter, which exits with the same error while importing the puppetversion fact!), and this one is just Ruby enough to stump me:>ruby puppet docC:/Ruby191/lib/ruby/site_ruby/1.9.1/puppet/application/kick.rb: C:/Ruby191/lib/ruby/site_ruby/1.9.1/puppet/application/kick.rb:107: Invalid next (SyntaxError) As a last-ditch effort, I went back to the Puppet-team-recommended 1.8.6 installer, which is now considered "old" but there appear to be some gem support issues on Windows with the newer distributions of Ruby. I''m going to leave things here for now on this project. If anyone with experience in these matters has gotten Puppet to run on a fairly recent Windows platform, I''d love to hear how you did it ... :) -- 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.