4. Convergence
•The process of actions
configures a specific part of the
system.
•Provide this process to end-
users settings (email, www,
etc.) ...?
13年7月27日土曜日
14. Implementation (2)
#
lib/agile_solo/consumer.rb
module
AgileSolo
class
Consumer
<
Command
attr_reader
:name,
:run_list,
:data,
:chef_repo
..
snip
..
def
execute
begin
update_data_bag
chef_solo.run
rescue
=>
e
puts
e.backtrace.join("n")
end
end
def
update_data_bag
File.open(file_path,
'w')
{
|f|
f.write(data)
}
end
..
snip
..
end
13年7月27日土曜日
15. Implementation (3)
#
lib/agile_solo/application/solo.rb
require
'chef/application/solo'
module
AgileSolo
module
Application
class
Solo
<
Chef::Application::Solo
attr_reader
:chef_solo_json
def
run_application
begin
run_chef_client
rescue
SystemExit
=>
e
raise
rescue
Exception
=>
e
Chef::Application.fatal!("#{e.class}:
#{e.message}",
1)
end
end
end
end
end
13年7月27日土曜日
16. Wrap up
•Convergence for everyone
•Interface for End-users
•HTTP PUT Request (Sync)
•Kicks chef-solo (run_list,
data_bags)
13年7月27日土曜日
17. More efficient ...
•AMQP instead of HTTP
•Parallel convergence
•Async
•Agility
•Scalability
13年7月27日土曜日