[chef] Re: Re: Re: Re: Re: Thinking out loud


Chronological Thread 
  • From: Daniel DeLeo <dan@kallistec.com>
  • To: chef@lists.opscode.com
  • Subject: [chef] Re: Re: Re: Re: Re: Thinking out loud
  • Date: Wed, 29 Jul 2009 12:48:57 -0600

I think this SSH integration is super awesome. At the Chef preso at Denver's derailed, everyone I talked to seemed pretty hot on the idea of making the client install as close to 100% automated as possible.

Graeme et. al.,
Your script is pretty impressive, but I think there might be a simpler way. I'm currently looking at making the chef client distributable as a tarball using Wycats' new bundler project.

http://github.com/wycats/bundler/tree/master

My first crack at this (embarrassingly simple) is here: http://gist.github.com/158274  If you put that somewhere and name it ``Gemfile'' and install bundler (github clone only for now), then you can run gem_bundler and it will get all the gems, and vendor them for you, resulting in something you could tar up and download. I'm pretty excited about this, as it would allow for some magical possibilities like having chef itself install rubygems.

The caveats right now are:
* The resulting vendored gems are architecture-dependent. This is because the JSON gem has C extensions. I'll be exploring workarounds for this.
* The executables expect themselves to be located in a particular directory. For example, the chef-solo command generated by bundler looks like this:

#!/usr/bin/env ruby1.8
require "/home/ddeleo/ruby/travelling-chef/vendor/gems/environments/default"
load "/home/ddeleo/ruby/travelling-chef/vendor/gems/gems/chef-0.7.4/bin/chef-solo"

I got in touch with wycats about this, but no resolution yet. The best way to deal with this for now is to do everything in /tmp.

Cheers, 
Dan DeLeo

On Wed, Jul 29, 2009 at 10:58 AM, Ian Ragsdale <ian.ragsdale@gmail.com> wrote:
I actually did something similar myself, but totally in ruby.  It creates a Net::SSH connection over which it can run commands, runs the commands remotely, and evaluates the results locally.

It figures out if apt-get or yum are installed, installs the necessary packages to run chef-solo, then copies over the chef-solo config (the really cool thing is that Net::SCP can happen over the same SSH connection) and runs the specified recipe.

- Ian


On Jul 29, 2009, at 11:50 AM, Adam Jacob wrote:

I dig it!  It's already pretty generic, but seeing something like this
for all the various platforms we support is a great idea.  Reminds me
of the old Gnome installer from back in the day.  Another variant on
this would be using Capistrano to do it remotely..

Adam

--
Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-7449 E: adam@opscode.com






Archive powered by MHonArc 2.6.16.

§