auser-poolparty 0.2.26 → 0.2.35

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. data/Manifest.txt +13 -2
  2. data/PostInstall.txt +2 -1
  3. data/Rakefile +8 -2
  4. data/bin/cloud-contract +1 -6
  5. data/bin/cloud-ensure-provisioning +33 -0
  6. data/bin/cloud-expand +1 -6
  7. data/bin/cloud-provision +22 -14
  8. data/bin/cloud-start +1 -0
  9. data/bin/messenger-get-load +26 -0
  10. data/bin/server-build-messenger +9 -2
  11. data/bin/server-fire-cmd +1 -1
  12. data/bin/server-get-load +4 -4
  13. data/bin/server-list-active +2 -2
  14. data/bin/server-rerun +4 -4
  15. data/bin/server-start-master +4 -4
  16. data/bin/server-start-node +4 -4
  17. data/lib/erlang/messenger/Rakefile +6 -0
  18. data/lib/erlang/messenger/ebin/master.app +1 -1
  19. data/lib/erlang/messenger/ebin/master_app.beam +0 -0
  20. data/lib/erlang/messenger/ebin/node.app +1 -1
  21. data/lib/erlang/messenger/ebin/node_app.beam +0 -0
  22. data/lib/erlang/messenger/ebin/pm_client.beam +0 -0
  23. data/lib/erlang/messenger/ebin/pm_cluster.beam +0 -0
  24. data/lib/erlang/messenger/ebin/pm_event_manager.beam +0 -0
  25. data/lib/erlang/messenger/ebin/pm_master_event_handler.beam +0 -0
  26. data/lib/erlang/messenger/ebin/pm_master_supervisor.beam +0 -0
  27. data/lib/erlang/messenger/ebin/pm_node_supervisor.beam +0 -0
  28. data/lib/erlang/messenger/ebin/pm_packager.beam +0 -0
  29. data/lib/erlang/messenger/include/defines.hrl +16 -0
  30. data/lib/erlang/messenger/pm_master.beam +0 -0
  31. data/lib/erlang/messenger/pm_node.beam +0 -0
  32. data/lib/erlang/messenger/src/pm_client.erl +35 -7
  33. data/lib/erlang/messenger/src/pm_cluster.erl +15 -12
  34. data/lib/erlang/messenger/src/pm_event_manager.erl +27 -0
  35. data/lib/erlang/messenger/src/pm_master.erl +44 -32
  36. data/lib/erlang/messenger/src/pm_master_event_handler.erl +72 -0
  37. data/lib/erlang/messenger/src/pm_master_supervisor.erl +9 -10
  38. data/lib/erlang/messenger/src/pm_node.erl +47 -27
  39. data/lib/erlang/messenger/src/pm_node_supervisor.erl +7 -9
  40. data/lib/erlang/messenger/src/utils.erl +20 -1
  41. data/lib/erlang/messenger/useful_snippets +6 -0
  42. data/lib/erlang/messenger/utils.beam +0 -0
  43. data/lib/poolparty/base_packages/haproxy.rb +6 -6
  44. data/lib/poolparty/base_packages/poolparty.rb +22 -43
  45. data/lib/poolparty/core/object.rb +3 -0
  46. data/lib/poolparty/helpers/console.rb +4 -0
  47. data/lib/poolparty/helpers/messenger.rb +14 -5
  48. data/lib/poolparty/helpers/optioner.rb +1 -1
  49. data/lib/poolparty/helpers/provisioner_base.rb +54 -15
  50. data/lib/poolparty/helpers/provisioners/master.rb +36 -8
  51. data/lib/poolparty/helpers/provisioners/slave.rb +5 -6
  52. data/lib/poolparty/net/remote_bases/ec2.rb +16 -18
  53. data/lib/poolparty/net/remote_instance.rb +4 -1
  54. data/lib/poolparty/net/remoter.rb +29 -10
  55. data/lib/poolparty/net/remoter_base.rb +2 -1
  56. data/lib/poolparty/plugins/git.rb +5 -6
  57. data/lib/poolparty/pool/base.rb +3 -2
  58. data/lib/poolparty/pool/cloud.rb +22 -14
  59. data/lib/poolparty/pool/plugin.rb +9 -0
  60. data/lib/poolparty/pool/pool.rb +2 -2
  61. data/lib/poolparty/pool/resources/class_package.rb +1 -1
  62. data/lib/poolparty/pool/resources/gem_package.rb +6 -4
  63. data/lib/poolparty/templates/puppetcleaner +6 -0
  64. data/lib/poolparty/version.rb +1 -1
  65. data/poolparty.gemspec +20 -6
  66. data/spec/poolparty/helpers/messenger_spec.rb +1 -1
  67. data/spec/poolparty/helpers/provisioner_base_spec.rb +3 -0
  68. data/spec/poolparty/net/remote_spec.rb +1 -0
  69. data/spec/poolparty/net/remoter_spec.rb +4 -1
  70. data/spec/poolparty/pool/cloud_spec.rb +2 -2
  71. data/spec/poolparty/pool/plugin_spec.rb +8 -1
  72. data/spec/poolparty/pool/resources/class_package_spec.rb +4 -4
  73. data/spec/poolparty/pool/resources/remote_file_spec.rb +1 -1
  74. data/website/index.html +1 -1
  75. metadata +20 -6
  76. data/lib/erlang/messenger/ebin/pm_event_handler.beam +0 -0
  77. data/lib/erlang/messenger/ebin/pm_master.beam +0 -0
  78. data/lib/erlang/messenger/ebin/pm_node.beam +0 -0
  79. data/lib/erlang/messenger/ebin/utils.beam +0 -0
  80. data/lib/erlang/messenger/src/pm_event_handler.erl +0 -21
@@ -9,6 +9,6 @@ describe "Messenger" do
9
9
  Messenger.respond_to?(:messenger_send!).should == true
10
10
  end
11
11
  it "should call send_cmd on the client" do
12
- Messenger.messenger_send!('send_cmd ["echo hi"]', true).should =~ /-run pm_client send_cmd/
12
+ hide_output {Messenger.messenger_send!('send_cmd ["echo hi"]', true).should =~ /-run pm_client send_cmd/}
13
13
  end
14
14
  end
@@ -102,6 +102,9 @@ describe "ProvisionerBase" do
102
102
  @cloud.stub!(:keypair_path).and_return "~/.ec2/fake_keypair"
103
103
  Provisioner::Master.stub!(:new).and_return @provisioner
104
104
  @cloud.stub!(:copy_file_to_storage_directory).and_return true
105
+ @cloud.stub!(:rsync_storage_files_to).and_return true
106
+ @provisioner.stub!(:build_and_store_new_config_file).and_return true
107
+ @provisioner.stub!(:process_clean_reconfigure_for!).and_return true
105
108
  end
106
109
  describe "provision_master" do
107
110
  it "should call write_install_file" do
@@ -282,6 +282,7 @@ describe "Remote" do
282
282
  before(:each) do
283
283
  @tc.stub!(:keypair).and_return "fake_keypair"
284
284
  @tc.stub!(:keypair_path).and_return "~/.ec2/fake_keypair"
285
+ @obj.stub!(:name).and_return "pop"
285
286
  end
286
287
  it "should call system on the kernel" do
287
288
  ::File.stub!(:exists?).with("#{File.expand_path(Base.base_keypair_path)}/id_rsa-funky").and_return true
@@ -45,7 +45,7 @@ describe "Remoter" do
45
45
  @ri.stub!(:ip).and_return "192.168.0.22"
46
46
  end
47
47
  it "should have rsync in the rsync_command" do
48
- @tc.rsync_command.should == "rsync --delete -azP --exclude cache -e '#{@tc.ssh_string}'"
48
+ @tc.rsync_command.should == "rsync -azP --exclude cache -e '#{@tc.ssh_string}'"
49
49
  end
50
50
  it "should be able to rsync storage commands" do
51
51
  @tc.rsync_storage_files_to_command(@ri).should == "#{@tc.rsync_command} #{Base.storage_directory}/ 192.168.0.22:/var/poolparty"
@@ -59,7 +59,10 @@ describe "Remoter" do
59
59
  @tc.stub!(:list_of_pending_instances).and_return []
60
60
  @tc.stub!(:list_of_running_instances).and_return []
61
61
  @tc.stub!(:master).and_return ris.first
62
+ @tc.stub!(:after_launched).and_return true
63
+ @tc.stub!(:verbose).and_return false
62
64
  Provisioner.stub!(:provision_master).and_return true
65
+ Provisioner.stub!(:reconfigure_master).and_return true
63
66
  end
64
67
  it "should have the method launch_master!" do
65
68
  @tc.respond_to?(:launch_and_configure_master!).should == true
@@ -288,7 +288,7 @@ describe "Cloud" do
288
288
  describe "building with an existing manifest" do
289
289
  before(:each) do
290
290
  @file = "/etc/puppet/manifests/nodes/nodes.pp"
291
- @file.stub!(:read).and_return "nodes"
291
+ @file.stub!(:read).and_return "nodes generate"
292
292
  ::FileTest.stub!(:file?).with("/etc/puppet/manifests/classes/poolparty.pp").and_return true
293
293
  @cloud.stub!(:open).with("/etc/puppet/manifests/classes/poolparty.pp").and_return @file
294
294
  end
@@ -297,7 +297,7 @@ describe "Cloud" do
297
297
  @cloud.build_manifest
298
298
  end
299
299
  it "should build from the existing file" do
300
- @cloud.build_manifest.should == "nodes"
300
+ @cloud.build_manifest.should == "nodes generate"
301
301
  end
302
302
  end
303
303
  end
@@ -84,7 +84,14 @@ describe "Plugin" do
84
84
  site("frank")
85
85
  end
86
86
  end
87
-
87
+ end
88
+ end
89
+ describe "DSL" do
90
+ it "should have a cloud method from within the plugin" do
91
+ @plugin.respond_to?(:cloud).should == true
92
+ end
93
+ it "should get a hold of the containing cloud" do
94
+ @plugin.cloud.should == @c
88
95
  end
89
96
  end
90
97
  end
@@ -81,9 +81,9 @@ describe "File" do
81
81
  @class2 = classpackage_with_self(self)
82
82
  @class2.resources.should_not be_empty
83
83
  end
84
- it "should leave zero resources on the parent" do
85
- @class2 = classpackage_with_self(self)
86
- resources.should be_empty
87
- end
84
+ # it "should leave zero resources on the parent" do
85
+ # @class2 = classpackage_with_self(self)
86
+ # resources.should be_empty
87
+ # end
88
88
  end
89
89
  end
@@ -24,7 +24,7 @@ describe "Remote file" do
24
24
  end
25
25
  end
26
26
  it "should have the source set to puppet" do
27
- @file.source.should == "puppet:///files/httpd.conf"
27
+ @file.source.should == "puppet://master/files/httpd.conf"
28
28
  end
29
29
  it "should use default values" do
30
30
  @file.name.should == "/www/conf/httpd.conf"
@@ -34,7 +34,7 @@
34
34
  <h1>PoolParty</h1>
35
35
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/poolparty"; return false'>
36
36
  <p>Get Version</p>
37
- <a href="http://rubyforge.org/projects/poolparty" class="numbers">0.2.26</a>
37
+ <a href="http://rubyforge.org/projects/poolparty" class="numbers">0.2.35</a>
38
38
  </div>
39
39
  <h1>&#8216;Easy cloud computing&#8217;</h1>
40
40
  <h2>What</h2>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auser-poolparty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.26
4
+ version: 0.2.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ari Lerner
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-27 00:00:00 -07:00
12
+ date: 2008-10-30 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: 1.7.0
53
+ version: 1.8.2
54
54
  version:
55
55
  description: Self-healing, auto-scaling cloud computing tool
56
56
  email:
@@ -60,6 +60,7 @@ executables:
60
60
  - cloud-add-keypair
61
61
  - cloud-configure
62
62
  - cloud-contract
63
+ - cloud-ensure-provisioning
63
64
  - cloud-expand
64
65
  - cloud-list
65
66
  - cloud-maintain
@@ -70,6 +71,7 @@ executables:
70
71
  - cloud-ssh
71
72
  - cloud-start
72
73
  - cloud-terminate
74
+ - messenger-get-load
73
75
  - pool
74
76
  - pool-console
75
77
  - pool-describe
@@ -106,6 +108,7 @@ files:
106
108
  - bin/cloud-add-keypair
107
109
  - bin/cloud-configure
108
110
  - bin/cloud-contract
111
+ - bin/cloud-ensure-provisioning
109
112
  - bin/cloud-expand
110
113
  - bin/cloud-list
111
114
  - bin/cloud-maintain
@@ -116,6 +119,7 @@ files:
116
119
  - bin/cloud-ssh
117
120
  - bin/cloud-start
118
121
  - bin/cloud-terminate
122
+ - bin/messenger-get-load
119
123
  - bin/pool
120
124
  - bin/pool-console
121
125
  - bin/pool-describe
@@ -145,6 +149,7 @@ files:
145
149
  - lib/erlang/messenger/README
146
150
  - lib/erlang/messenger/Rakefile
147
151
  - lib/erlang/messenger/control
152
+ - lib/erlang/messenger/ebin/erl_crash.dump
148
153
  - lib/erlang/messenger/ebin/master.app
149
154
  - lib/erlang/messenger/ebin/master_app.beam
150
155
  - lib/erlang/messenger/ebin/node.app
@@ -152,8 +157,9 @@ files:
152
157
  - lib/erlang/messenger/ebin/packager.app
153
158
  - lib/erlang/messenger/ebin/pm_client.beam
154
159
  - lib/erlang/messenger/ebin/pm_cluster.beam
155
- - lib/erlang/messenger/ebin/pm_event_handler.beam
160
+ - lib/erlang/messenger/ebin/pm_event_manager.beam
156
161
  - lib/erlang/messenger/ebin/pm_master.beam
162
+ - lib/erlang/messenger/ebin/pm_master_event_handler.beam
157
163
  - lib/erlang/messenger/ebin/pm_master_rel-0.1.rel
158
164
  - lib/erlang/messenger/ebin/pm_master_supervisor.beam
159
165
  - lib/erlang/messenger/ebin/pm_node.beam
@@ -162,6 +168,7 @@ files:
162
168
  - lib/erlang/messenger/ebin/pm_packager.beam
163
169
  - lib/erlang/messenger/ebin/utils.beam
164
170
  - lib/erlang/messenger/erl_crash.dump
171
+ - lib/erlang/messenger/include/defines.hrl
165
172
  - lib/erlang/messenger/lib/eunit/AUTHORS
166
173
  - lib/erlang/messenger/lib/eunit/CHANGELOG
167
174
  - lib/erlang/messenger/lib/eunit/COPYING
@@ -217,21 +224,26 @@ files:
217
224
  - lib/erlang/messenger/lib/eunit/src/file_monitor.erl
218
225
  - lib/erlang/messenger/lib/eunit/sys.config
219
226
  - lib/erlang/messenger/lib/eunit/vsn.mk
227
+ - lib/erlang/messenger/pm_master.beam
220
228
  - lib/erlang/messenger/pm_master_rel-0.1.boot
221
229
  - lib/erlang/messenger/pm_master_rel-0.1.script
230
+ - lib/erlang/messenger/pm_node.beam
222
231
  - lib/erlang/messenger/pm_node_rel-0.1.boot
223
232
  - lib/erlang/messenger/pm_node_rel-0.1.script
224
233
  - lib/erlang/messenger/src/master_app.erl
225
234
  - lib/erlang/messenger/src/node_app.erl
226
235
  - lib/erlang/messenger/src/pm_client.erl
227
236
  - lib/erlang/messenger/src/pm_cluster.erl
228
- - lib/erlang/messenger/src/pm_event_handler.erl
237
+ - lib/erlang/messenger/src/pm_event_manager.erl
229
238
  - lib/erlang/messenger/src/pm_master.erl
239
+ - lib/erlang/messenger/src/pm_master_event_handler.erl
230
240
  - lib/erlang/messenger/src/pm_master_supervisor.erl
231
241
  - lib/erlang/messenger/src/pm_node.erl
232
242
  - lib/erlang/messenger/src/pm_node_supervisor.erl
233
243
  - lib/erlang/messenger/src/pm_packager.erl
234
244
  - lib/erlang/messenger/src/utils.erl
245
+ - lib/erlang/messenger/useful_snippets
246
+ - lib/erlang/messenger/utils.beam
235
247
  - lib/poolparty.rb
236
248
  - lib/poolparty/base_packages/haproxy.rb
237
249
  - lib/poolparty/base_packages/heartbeat.rb
@@ -328,6 +340,7 @@ files:
328
340
  - lib/poolparty/templates/namespaceauth.conf
329
341
  - lib/poolparty/templates/poolparty.monitor
330
342
  - lib/poolparty/templates/puppet.conf
343
+ - lib/poolparty/templates/puppetcleaner
331
344
  - lib/poolparty/version.rb
332
345
  - lib/poolpartycl.rb
333
346
  - poolparty.gemspec
@@ -432,7 +445,8 @@ post_install_message: |-
432
445
  Please check out the documentation for any questions or check out the google groups at
433
446
  http://groups.google.com/group/poolpartyrb
434
447
 
435
- Tutorials are at http://poolpartyrb.com
448
+ More tutorials can be found at
449
+ http://poolpartyrb.com
436
450
 
437
451
  Don't forget to check out the plugin tutorial @ http://poolpartyrb.com to extend PoolParty for your needs!
438
452
 
@@ -1,21 +0,0 @@
1
- % Handles generic events
2
- -module (pm_event_handler).
3
- -export ([make/0, add_handler/1, event/1]).
4
-
5
- % Make a new event handler
6
- make() ->
7
- register(?MODULE, spawn(fun() -> handle_events(fun no_op/1) end )).
8
-
9
- add_handler(Fun) ->
10
- whereis(?MODULE) ! {add, Fun}.
11
-
12
- event(X) -> whereis(?MODULE) ! {event, X}.
13
-
14
- handle_events(Fun) ->
15
- receive
16
- {event, Any} ->
17
- (catch Fun(Any)),
18
- handle_events(Fun)
19
- end.
20
-
21
- no_op(_) -> void.