Mais conteúdo relacionado
Semelhante a San Antonio Chef Users Meetup, Jun 2014 - Chef Metal (20)
San Antonio Chef Users Meetup, Jun 2014 - Chef Metal
- 1. San Antonio Chef Users
June 2014
SAChefUsers
Hart Hoover / Josh O'Brien
@SAChefUsers
@hhoover @OBrienCommaJosh
- 8. What does Chef Metal do?
Provides a 'machine' resource
Allows cluster management in Chef
VERSION CONTROL
- 12. More Advanced Chef Metal
machine 'db' do
recipe 'apt'
recipe 'mysql'
recipe 'application_cookbook::db_master'
tag 'dbmaster'
notifies 'converge', 'machine[web]', 'delayed'
end
machine 'web' do
recipe 'apt'
recipe 'apache'
recipe 'application_cookbook::webapp'
tag 'webserver'
attributes(
rackspace: {
cloud_credentials: {
username: Chef::Config[:rackspace_api_username],
api_key: Chef::Config[:rackspace_api_key]
}
}
)
action 'nothing'
end
- 16. Cloud Recipe Walkthrough
with_driver 'fog:Rackspace:https://identity.api.rackspacecloud.com/v2.0',
compute_options: {
rackspace_api_key: Chef::Config[:rackspace_api_key],
rackspace_username: Chef::Config[:rackspace_api_username],
rackspace_region: Chef::Config[:rackspace_region]
}
fog_key_pair metal-key
with_machine_options ssh_username: 'root',
bootstrap_options: {
key_name: metal-key,
flavor_id: 'performance1-2',
image_id: 'ffa476b1-9b14-46bd-99a8-862d1d94eb7a'
}
- 17. Cloud Recipe Walkthrough
# Read Chef Config from knife.rb
with_chef_server Chef::Config[:chef_server_url],
client_name: Chef::Config[:node_name],
signing_key_filename: Chef::Config[:client_key]