Skip to content

Instantly share code, notes, and snippets.

@ramarnat
Created February 27, 2011 22:43
Show Gist options
  • Select an option

  • Save ramarnat/846650 to your computer and use it in GitHub Desktop.

Select an option

Save ramarnat/846650 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
#requires
require 'rubygems'
require 'erb'
require 'json'
require 'chef'
require 'chef/knife'
# Get validation key
knife = Chef::Knife.new
knife.configure_chef
bootstrap_template = IO.read("./centos-debug.erb")
bootstrap_script = ERB.new(bootstrap_template).result(binding).to_s
cf_template_erb = IO.read("./elasticBI.template.erb")
cf_template = ERB.new(cf_template_erb).result(binding)
template_file = File.new("elasticBICF.template",'w')
template_file.puts cf_template
template_file.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment