auser-poolparty 0.1.2 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +22 -0
- data/License.txt +20 -0
- data/README.txt +52 -0
- data/Rakefile +4 -109
- data/bin/cloud +31 -0
- data/bin/cloud-add-keypair +23 -0
- data/bin/cloud-configure +35 -0
- data/bin/cloud-contract +27 -0
- data/bin/cloud-expand +27 -0
- data/bin/cloud-list +32 -0
- data/bin/cloud-maintain +36 -0
- data/bin/cloud-provision +30 -0
- data/bin/cloud-reconfigure +24 -0
- data/bin/cloud-ssh +18 -0
- data/bin/cloud-start +29 -0
- data/bin/pool +23 -75
- data/bin/pool-console +12 -0
- data/bin/pool-describe +9 -0
- data/bin/pool-list +28 -0
- data/bin/pool-provision +34 -0
- data/bin/pool-spec +17 -0
- data/bin/pool-start +32 -0
- data/examples/basic.rb +20 -0
- data/examples/plugin_without_plugin_directory.rb +13 -0
- data/examples/poolparty.rb +12 -0
- data/examples/with_apache_plugin.rb +22 -0
- data/generators/poolspec/USAGE +5 -0
- data/generators/poolspec/poolspec_generator.rb +65 -0
- data/generators/poolspec/templates/pool_spec_template.erb +9 -0
- data/lib/erlang/eb_server.erl +27 -0
- data/lib/poolparty.rb +40 -116
- data/lib/poolparty/base_packages/haproxy.rb +41 -0
- data/lib/poolparty/base_packages/heartbeat.rb +43 -0
- data/lib/poolparty/base_packages/poolparty.rb +18 -0
- data/lib/poolparty/base_packages/ruby.rb +27 -0
- data/lib/poolparty/core/array.rb +24 -0
- data/lib/{core → poolparty/core}/exception.rb +0 -0
- data/lib/{core → poolparty/core}/float.rb +0 -0
- data/lib/poolparty/core/hash.rb +29 -0
- data/lib/poolparty/core/kernel.rb +34 -0
- data/lib/{core → poolparty/core}/module.rb +18 -0
- data/lib/poolparty/core/my_open_struct.rb +18 -0
- data/lib/poolparty/core/object.rb +54 -0
- data/lib/poolparty/core/proc.rb +2 -0
- data/lib/poolparty/core/string.rb +72 -0
- data/lib/poolparty/core/symbol.rb +8 -0
- data/lib/{core → poolparty/core}/time.rb +15 -0
- data/lib/poolparty/exceptions/RemoteException.rb +12 -0
- data/lib/poolparty/exceptions/ResourceException.rb +7 -0
- data/lib/poolparty/exceptions/RuntimeException.rb +7 -0
- data/lib/poolparty/exceptions/SpecException.rb +7 -0
- data/lib/poolparty/exceptions/TemplateNotFound.rb +7 -0
- data/lib/poolparty/helpers/binary.rb +30 -0
- data/lib/poolparty/helpers/console.rb +30 -0
- data/lib/poolparty/helpers/display.rb +25 -0
- data/lib/poolparty/helpers/optioner.rb +61 -0
- data/lib/poolparty/helpers/provisioner_base.rb +226 -0
- data/lib/poolparty/helpers/provisioners/master.rb +120 -0
- data/lib/poolparty/helpers/provisioners/slave.rb +52 -0
- data/lib/poolparty/modules/cloud_resourcer.rb +72 -0
- data/lib/poolparty/modules/configurable.rb +34 -0
- data/lib/poolparty/modules/definable_resource.rb +59 -0
- data/lib/poolparty/modules/file_writer.rb +55 -0
- data/lib/poolparty/modules/method_missing_sugar.rb +17 -0
- data/lib/poolparty/modules/output.rb +13 -0
- data/lib/poolparty/modules/pretty_printer.rb +38 -0
- data/lib/{core/string.rb → poolparty/modules/s3_string.rb} +5 -29
- data/lib/{modules → poolparty/modules}/safe_instance.rb +0 -0
- data/lib/poolparty/monitors/base_monitor.rb +16 -0
- data/lib/poolparty/net/remote.rb +35 -0
- data/lib/poolparty/net/remote_bases/ec2.rb +145 -0
- data/lib/poolparty/net/remote_instance.rb +68 -0
- data/lib/poolparty/net/remoter.rb +209 -0
- data/lib/poolparty/net/remoter_base.rb +117 -0
- data/lib/poolparty/plugins/gem_package.rb +39 -0
- data/lib/poolparty/plugins/line.rb +76 -0
- data/lib/poolparty/plugins/svn.rb +48 -0
- data/lib/poolparty/pool/base.rb +74 -0
- data/lib/poolparty/pool/cloud.rb +132 -0
- data/lib/poolparty/pool/custom_resource.rb +61 -0
- data/lib/poolparty/pool/loggable.rb +29 -0
- data/lib/poolparty/pool/plugin.rb +42 -0
- data/lib/poolparty/pool/plugin_model.rb +48 -0
- data/lib/poolparty/pool/pool.rb +55 -0
- data/lib/poolparty/pool/resource.rb +235 -0
- data/lib/poolparty/pool/resources/class_package.rb +60 -0
- data/lib/poolparty/pool/resources/cron.rb +14 -0
- data/lib/poolparty/pool/resources/directory.rb +23 -0
- data/lib/poolparty/pool/resources/exec.rb +26 -0
- data/lib/poolparty/pool/resources/file.rb +23 -0
- data/lib/poolparty/pool/resources/gem.rb +14 -0
- data/lib/poolparty/pool/resources/host.rb +14 -0
- data/lib/poolparty/pool/resources/package.rb +14 -0
- data/lib/poolparty/pool/resources/remote_file.rb +20 -0
- data/lib/poolparty/pool/resources/service.rb +21 -0
- data/lib/poolparty/pool/resources/sshkey.rb +19 -0
- data/lib/poolparty/pool/resources/variable.rb +27 -0
- data/lib/poolparty/pool/script.rb +21 -0
- data/{config/heartbeat_authkeys.conf → lib/poolparty/templates/authkeys} +0 -0
- data/lib/poolparty/templates/cib.xml +1 -0
- data/lib/poolparty/templates/fileserver.conf +4 -0
- data/{config/heartbeat.conf → lib/poolparty/templates/ha.cf} +3 -1
- data/{config → lib/poolparty/templates}/haproxy.conf +13 -6
- data/lib/poolparty/templates/namespaceauth.conf +19 -0
- data/lib/poolparty/templates/puppet.conf +13 -0
- data/lib/poolparty/version.rb +9 -0
- data/lib/poolpartycl.rb +3 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/script/txt2html +82 -0
- data/{lib/poolparty/tasks → tasks}/cloud.rake +1 -1
- data/tasks/deployment.rake +34 -0
- data/tasks/development.rake +78 -0
- data/{lib/poolparty/tasks → tasks}/ec2.rake +1 -1
- data/tasks/environment.rake +7 -0
- data/{lib/poolparty/tasks → tasks}/instance.rake +0 -0
- data/{lib/poolparty/tasks → tasks}/server.rake +0 -0
- data/tasks/spec.rake +17 -0
- data/tasks/website.rake +17 -0
- metadata +154 -249
- data/CHANGELOG +0 -23
- data/LICENSE +0 -22
- data/README +0 -139
- data/assets/clouds.png +0 -0
- data/bin/instance +0 -68
- data/bin/poolnotify +0 -34
- data/config/cloud_master_takeover +0 -17
- data/config/create_proxy_ami.sh +0 -582
- data/config/installers/ubuntu_install.sh +0 -77
- data/config/monit.conf +0 -9
- data/config/monit/haproxy.monit.conf +0 -8
- data/config/monit/nginx.monit.conf +0 -0
- data/config/nginx.conf +0 -24
- data/config/reconfigure_instances_script.sh +0 -37
- data/config/sample-config.yml +0 -23
- data/config/scp_instances_script.sh +0 -12
- data/lib/core/array.rb +0 -16
- data/lib/core/hash.rb +0 -11
- data/lib/core/kernel.rb +0 -12
- data/lib/core/object.rb +0 -21
- data/lib/core/proc.rb +0 -15
- data/lib/helpers/plugin_spec_helper.rb +0 -58
- data/lib/modules/callback.rb +0 -133
- data/lib/modules/ec2_wrapper.rb +0 -108
- data/lib/modules/file_writer.rb +0 -38
- data/lib/modules/sprinkle_overrides.rb +0 -27
- data/lib/modules/vlad_override.rb +0 -83
- data/lib/poolparty/application.rb +0 -199
- data/lib/poolparty/init.rb +0 -6
- data/lib/poolparty/master.rb +0 -492
- data/lib/poolparty/monitors.rb +0 -11
- data/lib/poolparty/monitors/cpu.rb +0 -23
- data/lib/poolparty/monitors/memory.rb +0 -33
- data/lib/poolparty/monitors/web.rb +0 -29
- data/lib/poolparty/optioner.rb +0 -20
- data/lib/poolparty/plugin.rb +0 -78
- data/lib/poolparty/provider.rb +0 -104
- data/lib/poolparty/provider/essential.rb +0 -6
- data/lib/poolparty/provider/git.rb +0 -8
- data/lib/poolparty/provider/haproxy.rb +0 -9
- data/lib/poolparty/provider/heartbeat.rb +0 -6
- data/lib/poolparty/provider/rsync.rb +0 -8
- data/lib/poolparty/provider/ruby.rb +0 -65
- data/lib/poolparty/provider/s3fuse.rb +0 -22
- data/lib/poolparty/remote_instance.rb +0 -250
- data/lib/poolparty/remoter.rb +0 -171
- data/lib/poolparty/remoting.rb +0 -137
- data/lib/poolparty/scheduler.rb +0 -93
- data/lib/poolparty/tasks.rb +0 -47
- data/lib/poolparty/tasks/development.rake +0 -78
- data/lib/poolparty/tasks/plugins.rake +0 -30
- data/lib/poolparty/thread_pool.rb +0 -94
- data/lib/s3/s3_object_store_folders.rb +0 -44
- data/poolparty.gemspec +0 -71
- data/spec/files/describe_response +0 -37
- data/spec/files/multi_describe_response +0 -69
- data/spec/files/remote_desc_response +0 -37
- data/spec/helpers/ec2_mock.rb +0 -57
- data/spec/lib/core/core_spec.rb +0 -26
- data/spec/lib/core/kernel_spec.rb +0 -24
- data/spec/lib/core/string_spec.rb +0 -28
- data/spec/lib/modules/callback_spec.rb +0 -213
- data/spec/lib/modules/file_writer_spec.rb +0 -74
- data/spec/lib/poolparty/application_spec.rb +0 -135
- data/spec/lib/poolparty/ec2_wrapper_spec.rb +0 -110
- data/spec/lib/poolparty/master_spec.rb +0 -479
- data/spec/lib/poolparty/optioner_spec.rb +0 -34
- data/spec/lib/poolparty/plugin_spec.rb +0 -115
- data/spec/lib/poolparty/poolparty_spec.rb +0 -60
- data/spec/lib/poolparty/provider_spec.rb +0 -74
- data/spec/lib/poolparty/remote_instance_spec.rb +0 -178
- data/spec/lib/poolparty/remoter_spec.rb +0 -72
- data/spec/lib/poolparty/remoting_spec.rb +0 -148
- data/spec/lib/poolparty/scheduler_spec.rb +0 -70
- data/spec/monitors/cpu_monitor_spec.rb +0 -39
- data/spec/monitors/memory_spec.rb +0 -51
- data/spec/monitors/misc_monitor_spec.rb +0 -51
- data/spec/monitors/web_spec.rb +0 -40
- data/spec/spec_helper.rb +0 -53
data/spec/spec_helper.rb
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
lpwd = File.dirname(__FILE__)
|
2
|
-
$:.unshift(lpwd)
|
3
|
-
require File.join(lpwd, *%w[.. lib poolparty])
|
4
|
-
|
5
|
-
%w(spec).each do |library|
|
6
|
-
begin
|
7
|
-
require library
|
8
|
-
rescue
|
9
|
-
STDERR.puts "== Cannot run test without #{library}"
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
Dir["#{File.dirname(__FILE__)}/helpers/**"].each {|a| require a}
|
14
|
-
|
15
|
-
include PoolParty
|
16
|
-
extend PoolParty
|
17
|
-
|
18
|
-
Application.environment = "test"
|
19
|
-
Application.verbose = false
|
20
|
-
|
21
|
-
def stub_option_load
|
22
|
-
@str=<<-EOS
|
23
|
-
:access_key:
|
24
|
-
3.14159
|
25
|
-
:secret_access_key:
|
26
|
-
"pi"
|
27
|
-
EOS
|
28
|
-
@sio = StringIO.new
|
29
|
-
StringIO.stub!(:new).and_return @sio
|
30
|
-
Application.stub!(:open).with("http://169.254.169.254/latest/user-data").and_return @sio
|
31
|
-
@sio.stub!(:read).and_return @str
|
32
|
-
PoolParty.stub!(:timer).and_return Timeout
|
33
|
-
PoolParty.timer.stub!(:timeout).and_return lambda {YAML.load(open("http://169.254.169.254/latest/user-data").read)}
|
34
|
-
Application.reset!
|
35
|
-
end
|
36
|
-
|
37
|
-
def hide_output
|
38
|
-
begin
|
39
|
-
stdout_sv = STDOUT.dup
|
40
|
-
STDOUT.reopen(File.open((PLATFORM =~ /mswin/ ? "NUL" : "/dev/null"), 'w'))
|
41
|
-
yield if block_given?
|
42
|
-
ensure
|
43
|
-
STDOUT.flush
|
44
|
-
STDOUT.reopen(stdout_sv)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
def wait_launch(time=5)
|
49
|
-
pid = fork {yield}
|
50
|
-
wait time
|
51
|
-
Process.kill("INT", pid)
|
52
|
-
Process.wait(pid, 0)
|
53
|
-
end
|