Last active
August 29, 2015 14:02
-
-
Save hhoover/1c2518522b5e7818d4dc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node.set['apt']['compile_time_update'] = true | |
include_recipe 'apt' | |
node.set['build-essential']['compile_time'] = true | |
include_recipe 'build-essential' | |
chef_gem 'chef-metal' do | |
version '0.11.2' | |
action :install | |
end | |
chef_gem 'chef-metal-fog' do | |
version '0.5.3' | |
action :install | |
end | |
require 'chef_metal' | |
require 'chef_metal_fog' | |
require 'cheffish' | |
require 'fog' | |
rackspace = Chef::DataBagItem.load('secrets', 'raxcloud') | |
username = rackspace['username'] | |
apikey = rackspace['apikey'] | |
with_driver 'fog:Rackspace:https://identity.api.rackspacecloud.com/v2.0', | |
:compute_options => { | |
:rackspace_api_key => apikey, | |
:rackspace_username => username, | |
:rackspace_region => 'ord', | |
} | |
fog_key_pair 'metal-key' | |
with_machine_options ssh_username: 'root', | |
:bootstrap_options => { | |
:key_name => 'metal-key', | |
:flavor_id => 'performance1-2', # 2GB Performance | |
:image_id => '5cc098a5-7286-4b96-b3a2-49f4c4f82537' # Ubuntu 14.04 | |
} | |
machine 'cloud2' do | |
recipe 'apache2' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment