poolparty 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/bin/cloud-contract +1 -0
- data/bin/cloud-expand +1 -2
- data/bin/cloud-reboot +0 -2
- data/bin/cloud-rsync +28 -0
- data/bin/cloud-show +2 -1
- data/examples/chef_cloud.rb +4 -9
- data/examples/simple.rb +1 -1
- data/lib/cloud_providers/cloud_provider.rb +5 -15
- data/lib/cloud_providers/connections.rb +1 -9
- data/lib/cloud_providers/ec2/ec2.rb +47 -39
- data/lib/cloud_providers/ec2/ec2_instance.rb +5 -1
- data/lib/cloud_providers/ec2/helpers/authorize.rb +2 -2
- data/lib/core/object.rb +23 -1
- data/lib/poolparty/cloud.rb +16 -9
- data/vendor/gems/xml-simple/lib/xmlsimple.rb +1028 -0
- metadata +184 -189
- data/README.rdoc +0 -117
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/README.rdoc +0 -9
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/attributes/collectd.rb +0 -3
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/files/ubuntu/collectd.default +0 -17
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/metadata.rb +0 -6
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/recipes/default.rb +0 -62
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/templates/default/collectd.conf.erb +0 -107
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/templates/default/collection.conf.erb +0 -2
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/templates/default/collection3.conf.erb +0 -4
- /data/examples/chef_cloud/{chef-repo → chef_repo}/README +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/Rakefile +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/certificates/README +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/config/client.rb.example +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/config/rake.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/config/server.rb.example +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/config/solo.rb.example +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/README +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/README.rdoc +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/attributes/apache.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/definitions/apache_conf.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/definitions/apache_module.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/definitions/apache_site.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/definitions/web_app.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/files/default/apache2_module_conf_generate.pl +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/metadata.json +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/metadata.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/default.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/god_monitor.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_alias.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_auth_basic.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_auth_digest.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_authn_file.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_authnz_ldap.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_authz_default.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_authz_groupfile.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_authz_host.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_authz_user.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_autoindex.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_cgi.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_dav.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_dav_svn.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_deflate.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_dir.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_env.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_expires.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_fcgid.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_headers.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_ldap.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_log_config.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_mime.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_negotiation.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_php5.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_proxy.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_proxy_ajp.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_proxy_balancer.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_proxy_connect.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_proxy_http.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_python.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_rails.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_rewrite.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_setenvif.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_ssl.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/recipes/mod_status.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/a2dismod.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/a2dissite.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/a2enmod.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/a2ensite.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/apache2.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/apache2.god.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/charset.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/default-site.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/mods/README +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/mods/alias.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/mods/autoindex.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/mods/deflate.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/mods/dir.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/mods/fcgid.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/mods/mime.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/mods/negotiation.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/mods/proxy.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/mods/setenvif.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/mods/ssl.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/mods/status.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/port_apache.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/ports.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/security.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apache2/templates/default/web_app.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apt/files/default/apt-cacher +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apt/files/default/apt-cacher.conf +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apt/files/default/apt-proxy-v2.conf +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apt/metadata.json +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apt/metadata.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apt/recipes/cacher.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apt/recipes/default.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/apt/recipes/proxy.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/bootstrap/README.rdoc +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/bootstrap/attributes/bootstrap.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/bootstrap/metadata.json +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/bootstrap/metadata.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/bootstrap/recipes/client.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/bootstrap/recipes/default.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/bootstrap/recipes/server.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/bootstrap/templates/default/client.rb.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/bootstrap/templates/default/server.rb.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/bootstrap/templates/default/sv-chef-client-log-run.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/bootstrap/templates/default/sv-chef-client-run.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/bootstrap/templates/default/sv-chef-indexer-log-run.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/bootstrap/templates/default/sv-chef-indexer-run.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/bootstrap/templates/default/sv-chef-server-log-run.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/bootstrap/templates/default/sv-chef-server-run.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/chef/README.rdoc +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/chef/attributes/chef.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/chef/metadata.json +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/chef/metadata.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/chef/recipes/client.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/chef/recipes/default.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/chef/recipes/server.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/chef/recipes/server_proxy.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/chef/templates/default/chef_server.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/chef/templates/default/client.rb.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/chef/templates/default/server.rb.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ec2/attributes/ec2_metadata.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ec2/attributes/ec2_recipe_options.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ec2/metadata.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ec2/recipes/default.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ganglia/README.rdoc +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ganglia/attributes/default.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ganglia/metadata.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ganglia/recipes/default.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ganglia/recipes/gmetad.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ganglia/recipes/monitor_sshd.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ganglia/recipes/monitor_watson.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ganglia/recipes/web.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ganglia/templates/default/bin/gmetad.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ganglia/templates/default/bin/gmond.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ganglia/templates/default/bin/monitors/sshd_ganglia.sh.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ganglia/templates/default/bin/monitors/watson_channels.sh.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ganglia/templates/default/ganglia-web-conf.php.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ganglia/templates/default/gmetad.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ganglia/templates/default/gmond.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ganglia/templates/default/jaunty.sources.list.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ntp/attributes/ntp.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ntp/metadata.json +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ntp/metadata.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ntp/recipes/default.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/ntp/templates/default/ntp.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/rsyslog/README.rdoc +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/rsyslog/attributes/rsyslog.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/rsyslog/files/default/rsyslog.default +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/rsyslog/files/ubuntu-8.04/rsyslog.default +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/rsyslog/files/ubuntu-9.10/rsyslog.default +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/rsyslog/metadata.json +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/rsyslog/metadata.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/rsyslog/recipes/client.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/rsyslog/recipes/default.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/rsyslog/recipes/server.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/rsyslog/templates/default/remote.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/rsyslog/templates/default/rsyslog.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/rsyslog/templates/default/server.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/rsyslog/templates/ubuntu-9.10/50-default.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/rsyslog/templates/ubuntu-9.10/remote.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/rsyslog/templates/ubuntu-9.10/server.conf.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/runit/attributes/sv_bin.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/runit/definitions/runit_service.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/runit/files/ubuntu-6.10/runsvdir +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/runit/files/ubuntu-7.04/runsvdir +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/runit/files/ubuntu-7.10/runsvdir +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/runit/files/ubuntu-8.04/runsvdir +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/runit/metadata.json +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/runit/metadata.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/cookbooks/runit/recipes/default.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/roles/README +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/roles/chef-upgrade.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/site-cookbooks/README +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/site-cookbooks/hosts/attributes/hosts.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/site-cookbooks/hosts/metadata.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/site-cookbooks/hosts/recipes/default.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/site-cookbooks/hosts/templates/default/hosts.erb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/site-cookbooks/sysadmin/recipes/default.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/site-cookbooks/ubuntu/metadata.json +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/site-cookbooks/ubuntu/metadata.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/site-cookbooks/ubuntu/recipes/default.rb +0 -0
- /data/examples/chef_cloud/{chef-repo → chef_repo}/site-cookbooks/ubuntu/templates/default/sources.list.erb +0 -0
- /data/examples/chef_cloud/{sample → user_data} +0 -0
data/VERSION.yml
CHANGED
data/bin/cloud-contract
CHANGED
data/bin/cloud-expand
CHANGED
data/bin/cloud-reboot
CHANGED
@@ -11,13 +11,11 @@ Usage: #{$0} #{all_options_string}
|
|
11
11
|
Cycle through nodes in the cloud and wait for the autoscaler to reboot
|
12
12
|
EOS
|
13
13
|
|
14
|
-
opt :configure, "Configure the cloud before rebooting", :type => :bool, :default => false
|
15
14
|
short_desc "Cycle the instances"
|
16
15
|
|
17
16
|
run do |command|
|
18
17
|
|
19
18
|
@loaded_clouds.each do |cld|
|
20
|
-
cld.run if command[:configure]
|
21
19
|
cld.reboot!
|
22
20
|
end
|
23
21
|
|
data/bin/cloud-rsync
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
$:.unshift(File.dirname(__FILE__) + "/../lib")
|
3
|
+
require "poolparty"
|
4
|
+
|
5
|
+
require 'git-style-binary/command'
|
6
|
+
|
7
|
+
GitStyleBinary.command do
|
8
|
+
banner <<-EOS
|
9
|
+
Usage: #{$0} #{all_options_string}
|
10
|
+
|
11
|
+
ssh into an instance of the cloud
|
12
|
+
EOS
|
13
|
+
|
14
|
+
short_desc "ssh into an instance of the cloud"
|
15
|
+
opt :to, "To this directory", :default => "~"
|
16
|
+
|
17
|
+
run do |command|
|
18
|
+
cloud = @loaded_clouds.first
|
19
|
+
dir = command.argv.pop
|
20
|
+
|
21
|
+
if !cloud.nodes.empty?
|
22
|
+
cloud.rsync(dir, command[:to])
|
23
|
+
else
|
24
|
+
puts "No running instances can be found"
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
data/bin/cloud-show
CHANGED
@@ -30,7 +30,8 @@ EOS
|
|
30
30
|
"Running on: #{cld.cloud_provider.name}",
|
31
31
|
"Keypair: #{cld.keypair.basename}",
|
32
32
|
"Security group: #{cld.cloud_provider.security_group_names}",
|
33
|
-
"Availability zones: #{cld.cloud_provider.availability_zones}"
|
33
|
+
"Availability zones: #{cld.cloud_provider.availability_zones}",
|
34
|
+
"User: #{cld.user}"
|
34
35
|
]
|
35
36
|
|
36
37
|
if cld.load_balancers.size > 0
|
data/examples/chef_cloud.rb
CHANGED
@@ -1,20 +1,15 @@
|
|
1
|
-
$:.unshift("#{File.dirname(__FILE__)}/../lib")
|
2
|
-
require "rubygems"
|
3
|
-
require "poolparty"
|
4
1
|
|
5
2
|
pool "poolparty" do
|
6
3
|
|
7
4
|
cloud "chef" do
|
8
5
|
instances 1
|
9
6
|
using :ec2
|
10
|
-
chef_repo "
|
7
|
+
chef_repo File.dirname(__FILE__)+"/chef_cloud/chef_repo"
|
11
8
|
recipe "apache2"
|
9
|
+
recipe "rsyslog::server"
|
10
|
+
recipe "collectd"
|
12
11
|
chef_attributes :apache2 => {:listen_ports => ["80", "8080"]}
|
13
|
-
|
14
|
-
user_data <<-EOE
|
15
|
-
#!/bin/bash -x
|
16
|
-
echo "New User Data! ho."
|
17
|
-
EOE
|
12
|
+
user_data open(File.dirname(__FILE__)+"/chef_cloud/user_data").read
|
18
13
|
security_group do
|
19
14
|
authorize :from_port => "22", :to_port => "22"
|
20
15
|
authorize :from_port => "80", :to_port => "80"
|
data/examples/simple.rb
CHANGED
@@ -18,7 +18,7 @@ pool "poolparty" do
|
|
18
18
|
# {:port=>3000..3006, :protocol=>'tcp' :group=>'monitor' },
|
19
19
|
# {:port=>53, :protocol=>'udp' }
|
20
20
|
# ]
|
21
|
-
security_group do
|
21
|
+
security_group "dummy-test-security-group" do
|
22
22
|
%w(22 80 443 8642).each {|port| authorize :from_port => port, :to_port => port}
|
23
23
|
end
|
24
24
|
load_balancer do
|
@@ -5,6 +5,11 @@ module CloudProviders
|
|
5
5
|
class CloudProvider
|
6
6
|
include Dslify
|
7
7
|
|
8
|
+
default_options(
|
9
|
+
:image_id => 'ami-ed46a784',
|
10
|
+
:user => "root"
|
11
|
+
)
|
12
|
+
|
8
13
|
attr_reader :name, :init_opts
|
9
14
|
|
10
15
|
def initialize(name, init_opts={}, &block)
|
@@ -55,20 +60,5 @@ module CloudProviders
|
|
55
60
|
init_opts.has_key?(:cloud) ? init_opts[:cloud] : nil
|
56
61
|
end
|
57
62
|
|
58
|
-
def progress_bar_until(msg=nil, &block)
|
59
|
-
print "#{msg}" if msg
|
60
|
-
loop do
|
61
|
-
if block.call
|
62
|
-
break
|
63
|
-
else
|
64
|
-
$stdout.print "."
|
65
|
-
$stdout.flush
|
66
|
-
sleep 1
|
67
|
-
end
|
68
|
-
end
|
69
|
-
print " OK" if msg
|
70
|
-
puts "" if msg
|
71
|
-
end
|
72
|
-
|
73
63
|
end
|
74
64
|
end
|
@@ -54,7 +54,6 @@ module CloudProviders
|
|
54
54
|
end
|
55
55
|
|
56
56
|
default_options(
|
57
|
-
:image_id => 'ami-ed46a784',
|
58
57
|
:instance_type => 'm1.small',
|
59
58
|
:addressing_type => "public",
|
60
59
|
:availability_zones => ["us-east-1a"],
|
@@ -73,7 +72,6 @@ module CloudProviders
|
|
73
72
|
:kernel_id => nil,
|
74
73
|
:ramdisk_id => nil,
|
75
74
|
:block_device_mappings => nil,
|
76
|
-
:elastic_ips => [], # An array of the elastic ips
|
77
75
|
:ebs_volumes => [] # The volume id of an ebs volume # TODO: ensure this is consistent with :block_device_mappings
|
78
76
|
)
|
79
77
|
|
@@ -83,8 +81,8 @@ module CloudProviders
|
|
83
81
|
self.send(type).each {|ele| ele.create! }
|
84
82
|
end
|
85
83
|
end
|
86
|
-
|
87
|
-
def run
|
84
|
+
|
85
|
+
def run
|
88
86
|
puts " for cloud: #{cloud.name}"
|
89
87
|
puts " minimum_instances: #{minimum_instances}"
|
90
88
|
puts " maximum_instances: #{maximum_instances}"
|
@@ -120,27 +118,6 @@ module CloudProviders
|
|
120
118
|
end
|
121
119
|
reset!
|
122
120
|
# ELASTIC IPS
|
123
|
-
unless _elastic_ips.empty?
|
124
|
-
unused_elastic_ip_addresses = ElasticIp.unused_elastic_ips(self).map {|i| i.public_ip }
|
125
|
-
used_elastic_ip_addresses = ElasticIp.elastic_ips(self).map {|i| i.public_ip }
|
126
|
-
|
127
|
-
elastic_ip_objects = ElasticIp.unused_elastic_ips(self).select {|ip_obj| _elastic_ips.include?(ip_obj.public_ip) }
|
128
|
-
|
129
|
-
assignee_nodes = nodes.select {|n| !ElasticIp.elastic_ips(self).include?(n.public_ip) }
|
130
|
-
|
131
|
-
elastic_ip_objects.each_with_index do |eip, idx|
|
132
|
-
# Only get the nodes that do not have elastic ips associated with them
|
133
|
-
begin
|
134
|
-
if assignee_nodes[idx]
|
135
|
-
puts "Assigning elastic ip: #{eip.public_ip} to node: #{assignee_nodes[idx].instance_id}"
|
136
|
-
ec2.associate_address(:instance_id => assignee_nodes[idx].instance_id, :public_ip => eip.public_ip)
|
137
|
-
end
|
138
|
-
rescue Exception => e
|
139
|
-
p [:error, e.inspect]
|
140
|
-
end
|
141
|
-
reset!
|
142
|
-
end
|
143
|
-
end
|
144
121
|
else
|
145
122
|
autoscalers.each do |a|
|
146
123
|
puts " autoscaler: #{a.name}"
|
@@ -156,9 +133,7 @@ module CloudProviders
|
|
156
133
|
end
|
157
134
|
end
|
158
135
|
|
159
|
-
|
160
|
-
from_ports = security_groups.map {|a| a.authorizes.map {|t| t.from_port.to_i }.flatten }.flatten
|
161
|
-
|
136
|
+
from_ports = security_groups.map {|a| a.authorizes.map {|t| t.from_port.to_i }.flatten }.flatten
|
162
137
|
if from_ports.include?(22)
|
163
138
|
progress_bar_until("Waiting for the instances to be accessible by ssh") do
|
164
139
|
running_nodes = nodes.select {|n| n.running? }
|
@@ -169,6 +144,7 @@ module CloudProviders
|
|
169
144
|
end
|
170
145
|
end
|
171
146
|
|
147
|
+
assign_elastic_ips
|
172
148
|
end
|
173
149
|
|
174
150
|
def teardown
|
@@ -191,8 +167,16 @@ module CloudProviders
|
|
191
167
|
:base64_encoded => true,
|
192
168
|
:cloud => cloud
|
193
169
|
})
|
170
|
+
progress_bar_until("Waiting for node to launch...") do
|
171
|
+
wait_for_node(e)
|
172
|
+
end
|
173
|
+
all_nodes.select {|n| n.instance_id == e.instance_id }.first
|
174
|
+
end
|
175
|
+
|
176
|
+
def wait_for_node(instance)
|
194
177
|
reset!
|
195
|
-
|
178
|
+
inst = all_nodes.select {|n| n.instance_id == instance.instance_id }.first
|
179
|
+
inst.running?
|
196
180
|
end
|
197
181
|
|
198
182
|
def contract_by(num=1)
|
@@ -224,6 +208,30 @@ module CloudProviders
|
|
224
208
|
end
|
225
209
|
end
|
226
210
|
|
211
|
+
def assign_elastic_ips
|
212
|
+
unless elastic_ips.empty?
|
213
|
+
unused_elastic_ip_addresses = ElasticIp.unused_elastic_ips(self).map {|i| i.public_ip }
|
214
|
+
used_elastic_ip_addresses = ElasticIp.elastic_ips(self).map {|i| i.public_ip }
|
215
|
+
|
216
|
+
elastic_ip_objects = ElasticIp.unused_elastic_ips(self).select {|ip_obj| elastic_ips.include?(ip_obj.public_ip) }
|
217
|
+
|
218
|
+
assignee_nodes = nodes.select {|n| !ElasticIp.elastic_ips(self).include?(n.public_ip) }
|
219
|
+
|
220
|
+
elastic_ip_objects.each_with_index do |eip, idx|
|
221
|
+
# Only get the nodes that do not have elastic ips associated with them
|
222
|
+
begin
|
223
|
+
if assignee_nodes[idx]
|
224
|
+
puts "Assigning elastic ip: #{eip.public_ip} to node: #{assignee_nodes[idx].instance_id}"
|
225
|
+
ec2.associate_address(:instance_id => assignee_nodes[idx].instance_id, :public_ip => eip.public_ip)
|
226
|
+
end
|
227
|
+
rescue Exception => e
|
228
|
+
p [:error, e.inspect]
|
229
|
+
end
|
230
|
+
reset!
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
227
235
|
def nodes
|
228
236
|
all_nodes.select {|i| i.in_service? }#describe_instances.select {|i| i.in_service? && security_groups.include?(i.security_groups) }
|
229
237
|
end
|
@@ -251,17 +259,17 @@ module CloudProviders
|
|
251
259
|
|
252
260
|
# Extras!
|
253
261
|
|
254
|
-
def load_balancer(
|
255
|
-
load_balancers << ElasticLoadBalancer.new(
|
262
|
+
def load_balancer(given_name=cloud.proper_name, o={}, &block)
|
263
|
+
load_balancers << ElasticLoadBalancer.new(given_name, sub_opts.merge(o || {}), &block)
|
256
264
|
end
|
257
|
-
def autoscale(
|
258
|
-
autoscalers << ElasticAutoScaler.new(
|
265
|
+
def autoscale(given_name=cloud.proper_name, o={}, &block)
|
266
|
+
autoscalers << ElasticAutoScaler.new(given_name, sub_opts.merge(o || {}), &block)
|
259
267
|
end
|
260
|
-
def security_group(
|
261
|
-
security_groups << SecurityGroup.new(
|
268
|
+
def security_group(given_name=cloud.proper_name, o={}, &block)
|
269
|
+
security_groups << SecurityGroup.new(given_name, sub_opts.merge(o || {}), &block)
|
262
270
|
end
|
263
271
|
def elastic_ip(*ips)
|
264
|
-
ips.each {|ip|
|
272
|
+
ips.each {|ip| elastic_ips << ip}
|
265
273
|
end
|
266
274
|
|
267
275
|
# Proxy to the raw Grempe amazon-aws @ec2 instance
|
@@ -290,6 +298,9 @@ module CloudProviders
|
|
290
298
|
def autoscalers
|
291
299
|
@autoscalers ||= []
|
292
300
|
end
|
301
|
+
def elastic_ips
|
302
|
+
@elastic_ips ||= []
|
303
|
+
end
|
293
304
|
|
294
305
|
# Clear the cache
|
295
306
|
def reset!
|
@@ -301,9 +312,6 @@ module CloudProviders
|
|
301
312
|
def sub_opts
|
302
313
|
dsl_options.merge(:parent => self, :cloud => cloud)
|
303
314
|
end
|
304
|
-
def _elastic_ips
|
305
|
-
@_elastic_ips ||= []
|
306
|
-
end
|
307
315
|
def generate_keypair(n=nil)
|
308
316
|
puts "[EC2] generate_keypair is called with #{default_keypair_path/n}"
|
309
317
|
begin
|
@@ -41,7 +41,7 @@ module CloudProviders
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def run!
|
44
|
-
cloud_provider.ec2.run_instances(:image_id => image_id,
|
44
|
+
r = cloud_provider.ec2.run_instances(:image_id => image_id,
|
45
45
|
:min_count => min_count,
|
46
46
|
:max_count => max_count,
|
47
47
|
:key_name => keypair.basename,
|
@@ -50,6 +50,10 @@ module CloudProviders
|
|
50
50
|
:instance_type => instance_type,
|
51
51
|
:availability_zone => availability_zone,
|
52
52
|
:base64_encoded => true)
|
53
|
+
r.instancesSet.item.map do |i|
|
54
|
+
inst_options = i.merge(r.merge(:cloud => cloud)).merge(cloud.cloud_provider.dsl_options)
|
55
|
+
Ec2Instance.new(inst_options)
|
56
|
+
end.first
|
53
57
|
end
|
54
58
|
def self.run!(hsh); new(hsh).run!; end
|
55
59
|
|
@@ -9,7 +9,7 @@ module CloudProviders
|
|
9
9
|
:owner_id => nil})
|
10
10
|
|
11
11
|
def run
|
12
|
-
puts "Authorizing: #{
|
12
|
+
puts "Authorizing: #{name} for #{protocol} to #{from_port}:#{to_port} #{network}"
|
13
13
|
options =
|
14
14
|
if group_name
|
15
15
|
{:authorize_security_group_ingress => group_name, :source_security_group_owner_id => owner_id}
|
@@ -21,7 +21,7 @@ module CloudProviders
|
|
21
21
|
|
22
22
|
def to_hash
|
23
23
|
{
|
24
|
-
:group_name =>
|
24
|
+
:group_name => name,
|
25
25
|
:ip_protocol => protocol,
|
26
26
|
:from_port => from_port,
|
27
27
|
:to_port => to_port,
|
data/lib/core/object.rb
CHANGED
@@ -7,5 +7,27 @@ class Object
|
|
7
7
|
def reset!
|
8
8
|
@@pool = nil
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
|
+
def print_msg(msg_arr)
|
12
|
+
msg_arr.each do |line|
|
13
|
+
puts line
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def progress_bar_until(msg=nil, &block)
|
18
|
+
print "#{msg}" if msg
|
19
|
+
loop do
|
20
|
+
if block.call
|
21
|
+
break
|
22
|
+
else
|
23
|
+
$stdout.print "."
|
24
|
+
$stdout.flush
|
25
|
+
sleep 1
|
26
|
+
end
|
27
|
+
end
|
28
|
+
print " OK" if msg
|
29
|
+
puts "" if msg
|
30
|
+
end
|
31
|
+
|
32
|
+
|
11
33
|
end
|
data/lib/poolparty/cloud.rb
CHANGED
@@ -91,7 +91,9 @@ You did not specify a cloud provider in your clouds.rb. Make sure you have a blo
|
|
91
91
|
puts "Copying the chef-repo into the base directory from #{chef_repo}"
|
92
92
|
FileUtils.mkdir_p base_directory/"roles"
|
93
93
|
if File.directory?(chef_repo)
|
94
|
-
FileUtils.cp_r chef_repo, base_directory
|
94
|
+
FileUtils.cp_r "#{chef_repo}/.", base_directory
|
95
|
+
else
|
96
|
+
raise "#{chef_repo} chef repo directory does not exist"
|
95
97
|
end
|
96
98
|
puts "Creating the dna.json"
|
97
99
|
chef_attributes.to_dna [], base_directory/"dna.json", {:run_list => ["role[#{name}]"]}
|
@@ -101,7 +103,7 @@ You did not specify a cloud provider in your clouds.rb. Make sure you have a blo
|
|
101
103
|
|
102
104
|
def write_solo_dot_rb(to=tmp_path/"etc"/"chef"/"solo.rb")
|
103
105
|
content = <<-EOE
|
104
|
-
cookbook_path ["/etc/chef/
|
106
|
+
cookbook_path ["/etc/chef/site-cookbooks", "/etc/chef/cookbooks"]
|
105
107
|
role_path "/etc/chef/roles"
|
106
108
|
log_level :info
|
107
109
|
EOE
|
@@ -138,9 +140,11 @@ log_level :info
|
|
138
140
|
(class << self; self; end).class_eval do
|
139
141
|
@cloud_provider.public_methods(false).each do |meth|
|
140
142
|
next if respond_to?(meth) || method_defined?(meth) || private_method_defined?(meth)
|
141
|
-
|
142
|
-
|
143
|
-
|
143
|
+
eval <<-EOE
|
144
|
+
def #{meth}(*args, &block)
|
145
|
+
@cloud_provider.send(:#{meth}, *args, &block)
|
146
|
+
end
|
147
|
+
EOE
|
144
148
|
end
|
145
149
|
end
|
146
150
|
end
|
@@ -201,17 +205,19 @@ log_level :info
|
|
201
205
|
|
202
206
|
def reboot!
|
203
207
|
orig_nodes = nodes
|
204
|
-
num_nodes = nodes.size
|
205
208
|
if autoscalers.empty?
|
206
209
|
puts <<-EOE
|
207
210
|
No autoscalers defined
|
208
211
|
Launching new nodes and then shutting down original nodes
|
209
212
|
EOE
|
210
|
-
# Start new nodes
|
211
|
-
expand_by(num_nodes)
|
212
213
|
# Terminate the nodes
|
213
|
-
orig_nodes.
|
214
|
+
orig_nodes.each_with_index do |node, i|
|
215
|
+
# Start new nodes
|
216
|
+
print "Starting node: #{i}...\n"
|
217
|
+
expand_by(1)
|
218
|
+
print "Terminating node: #{i}...\n"
|
214
219
|
node.terminate!
|
220
|
+
puts ""
|
215
221
|
end
|
216
222
|
else
|
217
223
|
# Terminate the nodes
|
@@ -229,6 +235,7 @@ No autoscalers defined
|
|
229
235
|
end
|
230
236
|
end
|
231
237
|
end
|
238
|
+
run
|
232
239
|
puts ""
|
233
240
|
end
|
234
241
|
|