My talk at QCon São Paulo 2010.
In that opportunity, I talked about possible uses of the "automatable" infrastructure provided by most cloud vendors (like Locaweb, Amazon and Rackspace).
15. require "net/ssh"
Net::SSH.start("host", "user", options) do |ssh|
ssh_result = ssh.open_channel do |channel|
channel.exec command
channel.on_data do |ch, data|
ch[:out] << data
end
channel.on_request("exit-status") do |ch, req|
ch[:status] = req.read_long
end
end
ssh.loop
end
48. quem pode?
to: installer@servidor
frontend@servidor installer@servidor/A
...
installer@servidor/B
49. quem pode?
to: installer@servidor
installer@servidor/A
frontend@servidor eu posso!
from: installer@servidor/A
...
eu posso!
from: installer@servidor/B
installer@servidor/B
50. quem pode?
to: installer@servidor
installer@servidor/A
frontend@servidor eu posso!
from: installer@servidor/A
...
eu posso!
from: installer@servidor/B
ok, então instala!
to: installer@servidor/B
installer@servidor/B
51. quem pode?
to: installer@servidor
installer@servidor/A
frontend@servidor eu posso!
from: installer@servidor/A
...
...
eu posso!
from: installer@servidor/B
ok, então instala!
to: installer@servidor/B
frontend@servidor installer@servidor/B
57. file "/etc/myapp.conf" do
owner www-data
group www-data
mode "0600"
action :create
end
package "mysql-server" do
action :install
end
execute "open http port" do
command "iptables -I INPUT -p tcp --dport 80 -j ACCEPT"
creates "/var/run/http_port_opened"
end
58. package "sudo" do
action :upgrade
end
user "sshservice" do
system true
action :create
end
template "/etc/sudoers" do
source "sudoers.erb"
mode 0440
owner "root"
group "root"
variables(:user => "sshservice")
action :create
end
73. • novas linguagens (programação e consulta)
• preprocessador/otimizador de queries
• analise continua de logs
• monitoramento de queries executadas no banco
74. Gregos e Troianos
• clients must be demanding 8 different things;
• doing 6 of them is easy;
• handling 7 of them requires real thought;
• dealing with all 8 usually results in a worse system;