Skip to content

Commit

Permalink
Support for cluster compute nodes, and injection of an HVM-virtualiza…
Browse files Browse the repository at this point in the history
…tion AMI that mostly works. Have initial work to allow placement group specification, but unfortunately Fog is not passign things through correctly, will have to dive in and figure that out. sigh.
  • Loading branch information
Philip (flip) Kromer committed Apr 28, 2012
1 parent 38dd643 commit 46aa391
Show file tree
Hide file tree
Showing 5 changed files with 189 additions and 118 deletions.
15 changes: 8 additions & 7 deletions lib/chef/knife/cluster_kick.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ class ClusterKick < Chef::Knife::ClusterSsh
:description => "Where to find the pid file. Typically /var/run/chef/client.pid (init.d) or /etc/sv/chef-client/supervise/pid (runit)",
:default => "/etc/sv/chef-client/supervise/pid"

def run
@name_args = [ @name_args.join('-') ]
config[:display_target] = true
script = Erubis::Eruby.new(KICKSTART_SCRIPT).result(:config => config)
@name_args[1] = script
super
end

unless defined?(KICKSTART_SCRIPT)
KICKSTART_SCRIPT = <<EOF
#!/bin/bash
Expand Down Expand Up @@ -83,13 +91,6 @@ class ClusterKick < Chef::Knife::ClusterSsh
EOF
end

def run
@name_args = [ @name_args.join('-') ]
script = Erubis::Eruby.new(KICKSTART_SCRIPT).result(:config => config)
@name_args[1] = script
super
end

end
end
end
3 changes: 2 additions & 1 deletion lib/ironfan/chef_layer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ module DryRunnable
# Run given block unless in dry_run mode (Ironfan.chef_config[:dry_run]
# is true)
def unless_dry_run
if Ironfan.chef_config[:dry_run]
if Ironfan.dry_run?
ui.info(" ... but not really (#{ui.color("dry run", :bold, :yellow)} for server #{name})")
return nil
else
yield
end
Expand Down
Loading

0 comments on commit 46aa391

Please sign in to comment.