Skip to content

Instantly share code, notes, and snippets.

@jessehu
Created February 21, 2013 03:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jessehu/5001819 to your computer and use it in GitHub Desktop.
Save jessehu/5001819 to your computer and use it in GitHub Desktop.
a ruby script for calling Ironfan's cluster class.
#!/usr/bin/env ruby
require 'chef'
require 'chef/knife'
require 'ironfan'
require 'chef/knife/cluster_bootstrap.rb'
knife = Chef::Knife::ClusterBootstrap.new
knife.class.load_deps
knife.class.chef_config_dir
knife.config[:config_file] = '/path/to/.chef/knife.rb'
knife.configure_chef
Chef::Config[:distro] = 'centos5'
options = '--yes'.split
knife.parse_options(options)
knife.name_args = [ 'cluster[-facet[-index]]' ]
knife.config[:verbosity] = 2
Chef::Log.level = :warn
knife.run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment