Skip to content

Instantly share code, notes, and snippets.

@johntdyer
Created December 5, 2011 21:22
Show Gist options
  • Select an option

  • Save johntdyer/1435411 to your computer and use it in GitHub Desktop.

Select an option

Save johntdyer/1435411 to your computer and use it in GitHub Desktop.
module Rayo
%w(json yaml optparse fileutils awesome_print fog rainbow logger spice ostruct erubis terminal-table/import).each{|lib| require lib}
Dir[File.dirname(__FILE__) + "/lib/*.rb"].each{|file| require file }
CONFIG = Rayo::Config.new(File.open("config.yml") { |file| YAML.load(file) })
include Aws
Spice.setup do |s|
s.server_url = CONFIG.chef.server
s.client_name = CONFIG.chef.api_key_name
s.raw_key = CONFIG.chef.api_key
end
Spice.connect!
end
include Rayo
#p Rayo::CONFIG
a = Rayo::Aws::create_server({
:hostname=>'dyer',
:domain=>'test.rayo.voxeolabs.net',
:tags=>{:hostname=>'dyer',:fqdn=>'dyer.test.rayo.voxeolabs.net',:role=>'awesome'}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment