Skip to content

Commit

Permalink
added secure clouds.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
jashmenn committed Jul 10, 2009
1 parent 6ceca2b commit b790238
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions secure/clouds.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
Dir["#{File.dirname(__FILE__)}/plugins/*/*"].each{|l| $:.unshift l }
$:.unshift "#{File.dirname(__FILE__)}/../../poolparty-extensions/lib"
require 'rubygems'
require "poolparty"
require 'poolparty-extensions'
require 'extensions/tripwire/tripwire.rb'
require 'extensions/shorewall/shorewall.rb'

pool(:cloud) do

cloud(:secure) do
instances 1

using :vmrun do
vmx_hash({
"/Users/nmurray/Documents/VMware/Ubuntu-jaunty.vmwarevm/Ubuntu-jaunty.vmx" => "192.168.133.128"
})
end

# using :ec2 do
# security_group [SECURITY_GROUP]
# end

# keypair "#{KEYPAIR_PREFIX}_master"

has_convenience_helpers
has_gem_package("bjeanes-ghost")
has_gem_package("technicalpickles-jeweler")
has_development_gem('poolparty-extensions', :from => "#{File.dirname(__FILE__)}/../../poolparty-extensions")

apache do
has_line_in_file :file => "/etc/apache2/sites-enabled/default", :line => "
<Directory /var/www/>
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
RedirectMatch ^/\$ /ganglia/
</Directory>"
enable_php5 do
extras :gd
end
end

has_package "nmap"
has_package "git-core"

tripwire do
root_dir "/usr/wpt" # CHANGE THIS to something obscure. The idea is you *dont* want tripwire to be in a standard location.
mailto "admin@emaildomain"
smtp_settings "host", "username", "password"
end

shorewall do
rule "Web/ACCEPT net $FW"
rule "SSH/ACCEPT net $FW"
end

end # cloud :hadoop_master

after_all_loaded do
# get the master ips on the slaves
# clouds[:hadoop_slave].run_in_context do
# hadoop.perform_just_in_time_operations
# ganglia.perform_after_all_loaded_for_slave
# end

# clouds[:hadoop_master].run_in_context do
# hadoop.perform_just_in_time_operations
# ganglia.perform_after_all_loaded_for_master
# end
end

end # pool


# vim: ft=ruby

0 comments on commit b790238

Please sign in to comment.