z, ? | toggle help (this) |
space, → | next slide |
shift-space, ← | previous slide |
d | toggle debug mode |
## <ret> | go to slide # |
c, t | table of contents (vi) |
f | toggle footer |
r | reload slides |
n | toggle notes |
p | run preshow |
bash "install mypackage" do
cwd "#{Chef::Config[:file_cache_path]}"
code <<-EOH
wget http://example.com/mypackage-1.0.tar.gz
tar xzf mypackage-1.0.tar.gz
cd mypackage-1.0
./configure && make && make install
EOH
not_if { File.exists?("/usr/bin/mypackage") }
end
filename =
"mypackage-#{node[:mypackage][:version]}.tar.gz"
bash "install mypackage" do
cwd "#{Chef::Config[:file_cache_path]}"
code <<-EOH
wget http://example.com/#{filename}
tar xzf #{filename}
cd mypackage-#{node[:mypackage][:version]}
./configure && make && make install
EOH
not_if { File.exists?("/usr/bin/mypackage") }
end
template "/etc/mypackage.conf" do
source "mypackage.conf.erb"
mode "0644"
variables(
:database => node[:mypackage][:database],
:user => node[:mypackage][:user],
:password => node[:mypackage][:password]
)
include_recipe "mypackage::default"
# Include different recipes based on
# nodes characteristics
if node['datacenter'] != 'BWD'
include_recipe "mypackage::db_auth"
else
include_recipe "mypackage::ad_auth"
end
glassfish_mq_destination "WildfireStatus queue" do
queue "Fireweb.WildfireStatus"
config {'validateXMLSchemaEnabled' => true,
'XMLSchemaURIList' => 'http://...'}
host 'localhost'
port 7676
end
glassfish_mq "MessageBroker Instance" do
instance "MessageBroker"
users {...}
access_control_rules {...}
config {...}
queues {
"Fireweb.WildfireStatus" =>
{'validateXMLSchemaEnabled' => true,
'XMLSchemaURIList' => 'http://...'}
}
port 7676
admin_port 7677
jms_port 7678
jmx_port 8087
stomp_port 8088
end
queues = []
search(:node, 'omq_dests_queues:* AND ' +
'NOT name:' + node.name) do |n|
queues.merge( n['omq']['dests']['queues'].to_hash )
end
queues.merge( node['omq']['dests']['queues'].to_hash )
queues.each_pair do |key, value|
glassfish_mq_destination key do
queue key
config value
host 'localhost'
port 7676
end
end
search(:node, 'omq_dests_queues:* AND ' +
'NOT name:' + node.name) do |n|
n.to_hash.each_pair do |key, value|
node.override['omq']['dests']['queues'][key] = value
end
end
include_recipe "glassfish::attribute_driven_mq"
node.override['graphite']...['schema_search']['filter'] =
"monitor_environment:#{node.chef_environment}"
include_recipe "graphite::search_based"