poolparty 0.2.18 → 0.2.69
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +142 -47
- data/PostInstall.txt +5 -5
- data/README.txt +25 -4
- data/Rakefile +46 -2
- data/bin/cloud +12 -21
- data/bin/cloud-add-keypair +18 -13
- data/bin/cloud-configure +11 -18
- data/bin/cloud-contract +7 -17
- data/bin/cloud-ensure-provisioning +39 -0
- data/bin/cloud-expand +9 -17
- data/bin/cloud-handle-load +27 -0
- data/bin/cloud-list +3 -9
- data/bin/cloud-maintain +12 -18
- data/bin/cloud-osxcopy +3 -9
- data/bin/cloud-provision +20 -21
- data/bin/cloud-refresh +4 -13
- data/bin/cloud-run +3 -4
- data/bin/cloud-ssh +3 -2
- data/bin/cloud-start +18 -21
- data/bin/cloud-stats +17 -0
- data/bin/cloud-terminate +4 -7
- data/bin/messenger-get-current-nodes +14 -0
- data/bin/pool +12 -12
- data/bin/pool-describe +0 -1
- data/bin/{pool-spec → pool-generate} +1 -0
- data/bin/pool-init +28 -0
- data/bin/pool-list +14 -12
- data/bin/pool-start +11 -17
- data/bin/server-build-messenger +13 -6
- data/bin/server-fire-cmd +1 -1
- data/bin/server-get-load +5 -16
- data/bin/server-list-active +3 -10
- data/bin/server-rerun +4 -4
- data/bin/server-send-command +18 -0
- data/bin/server-show-stats +17 -0
- data/bin/server-start-client +29 -0
- data/bin/server-start-master +13 -14
- data/bin/server-start-node +14 -15
- data/bin/server-stop-client +3 -0
- data/bin/server-stop-master +3 -0
- data/bin/server-stop-node +3 -0
- data/bin/server-update-hosts +48 -0
- data/config/hoe.rb +4 -3
- data/examples/plugin_without_plugin_directory.rb +1 -2
- data/generators/poolspec/USAGE +2 -2
- data/generators/poolspec/poolspec_generator.rb +2 -1
- data/generators/poolspec/templates/pool_spec_template.erb +3 -2
- data/lib/erlang/messenger/Rakefile +12 -0
- data/lib/erlang/messenger/ebin/client.app +19 -0
- data/lib/erlang/messenger/ebin/master.app +1 -1
- data/lib/erlang/messenger/ebin/node.app +1 -1
- data/lib/erlang/messenger/ebin/pm_client_rel-0.1.rel +1 -0
- data/lib/erlang/messenger/ebin/pm_master_rel-0.1.rel +1 -1
- data/lib/erlang/messenger/ebin/pm_node_rel-0.1.rel +1 -1
- data/lib/erlang/messenger/include/defines.hrl +27 -0
- data/lib/erlang/messenger/lib/eunit/.svn/all-wcprops +53 -0
- data/lib/erlang/messenger/lib/eunit/.svn/entries +140 -0
- data/lib/erlang/messenger/lib/eunit/.svn/format +1 -0
- data/lib/erlang/messenger/lib/eunit/.svn/prop-base/NOTES.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/AUTHORS.svn-base +2 -0
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/CHANGELOG.svn-base +14 -0
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/COPYING.svn-base +504 -0
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/NOTES.svn-base +276 -0
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/README.svn-base +3 -0
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/sys.config.svn-base +9 -0
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/vsn.mk.svn-base +1 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/all-wcprops +59 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/entries +142 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/format +1 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/erlang.png.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/eunit.html.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/index.html.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/modules-frame.html.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/overview-summary.html.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/packages-frame.html.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/edoc-info.svn-base +3 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/erlang.png.svn-base +0 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/eunit.html.svn-base +172 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/index.html.svn-base +17 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/modules-frame.html.svn-base +12 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/overview-summary.html.svn-base +984 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/overview.edoc.svn-base +980 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/packages-frame.html.svn-base +11 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/stylesheet.css.svn-base +55 -0
- data/lib/erlang/messenger/lib/eunit/ebin/.svn/all-wcprops +5 -0
- data/lib/erlang/messenger/lib/eunit/ebin/.svn/dir-prop-base +8 -0
- data/lib/erlang/messenger/lib/eunit/ebin/.svn/entries +28 -0
- data/lib/erlang/messenger/lib/eunit/ebin/.svn/format +1 -0
- data/lib/erlang/messenger/lib/eunit/examples/.svn/all-wcprops +23 -0
- data/lib/erlang/messenger/lib/eunit/examples/.svn/entries +66 -0
- data/lib/erlang/messenger/lib/eunit/examples/.svn/format +1 -0
- data/lib/erlang/messenger/lib/eunit/examples/.svn/prop-base/eunit_examples.erl.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/examples/.svn/prop-base/fib.erl.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/examples/.svn/text-base/eunit_examples.erl.svn-base +339 -0
- data/lib/erlang/messenger/lib/eunit/examples/.svn/text-base/fib.erl.svn-base +19 -0
- data/lib/erlang/messenger/lib/eunit/examples/.svn/text-base/tests.txt.svn-base +1 -0
- data/lib/erlang/messenger/lib/eunit/include/.svn/all-wcprops +11 -0
- data/lib/erlang/messenger/lib/eunit/include/.svn/entries +41 -0
- data/lib/erlang/messenger/lib/eunit/include/.svn/format +1 -0
- data/lib/erlang/messenger/lib/eunit/include/.svn/prop-base/eunit.hrl.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/include/.svn/text-base/eunit.hrl.svn-base +313 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/all-wcprops +113 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/entries +259 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/format +1 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/autoload.erl.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/code_monitor.erl.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit.erl.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_autoexport.erl.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_data.erl.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_internal.hrl.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_lib.erl.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_proc.erl.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_serial.erl.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_server.erl.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_striptests.erl.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_test.erl.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_tests.erl.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_tty.erl.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/file_monitor.erl.svn-base +5 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/autoload.erl.svn-base +388 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/code_monitor.erl.svn-base +243 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit.app.src.svn-base +21 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit.appup.src.svn-base +1 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit.erl.svn-base +196 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_autoexport.erl.svn-base +102 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_data.erl.svn-base +798 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_internal.hrl.svn-base +48 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_lib.erl.svn-base +682 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_proc.erl.svn-base +552 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_serial.erl.svn-base +157 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_server.erl.svn-base +340 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_striptests.erl.svn-base +64 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_test.erl.svn-base +334 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_tests.erl.svn-base +45 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_tty.erl.svn-base +272 -0
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/file_monitor.erl.svn-base +409 -0
- data/lib/erlang/messenger/pm_client_rel-0.1.boot +0 -0
- data/lib/erlang/messenger/pm_client_rel-0.1.script +238 -0
- data/lib/erlang/messenger/pm_master_rel-0.1.boot +0 -0
- data/lib/erlang/messenger/pm_master_rel-0.1.script +82 -85
- data/lib/erlang/messenger/pm_node_rel-0.1.boot +0 -0
- data/lib/erlang/messenger/pm_node_rel-0.1.script +80 -85
- data/lib/erlang/messenger/src/client_app.erl +39 -0
- data/lib/erlang/messenger/src/client_server.erl +60 -0
- data/lib/erlang/messenger/src/pm_client.erl +48 -18
- data/lib/erlang/messenger/src/pm_client_old.erl +52 -0
- data/lib/erlang/messenger/src/pm_client_supervisor.erl +38 -0
- data/lib/erlang/messenger/src/pm_cluster.erl +20 -16
- data/lib/erlang/messenger/src/pm_event_manager.erl +27 -0
- data/lib/erlang/messenger/src/pm_master.erl +126 -34
- data/lib/erlang/messenger/src/pm_master_event_handler.erl +72 -0
- data/lib/erlang/messenger/src/pm_master_supervisor.erl +9 -10
- data/lib/erlang/messenger/src/pm_node.erl +107 -30
- data/lib/erlang/messenger/src/pm_node_supervisor.erl +13 -15
- data/lib/erlang/messenger/src/pm_packager.erl +5 -2
- data/lib/erlang/messenger/src/pm_strings.erl +11 -0
- data/lib/erlang/messenger/src/utils.erl +43 -8
- data/lib/erlang/messenger/useful_snippets +17 -0
- data/lib/poolparty/aska/aska.rb +150 -0
- data/lib/poolparty/base_packages/haproxy.rb +19 -26
- data/lib/poolparty/base_packages/heartbeat.rb +48 -47
- data/lib/poolparty/base_packages/poolparty.rb +88 -36
- data/lib/poolparty/base_packages/runit.rb +21 -0
- data/lib/poolparty/config/postlaunchmessage.txt +5 -0
- data/lib/poolparty/core/array.rb +4 -1
- data/lib/poolparty/core/class.rb +2 -0
- data/lib/poolparty/core/exception.rb +2 -1
- data/lib/poolparty/core/hash.rb +2 -2
- data/lib/poolparty/core/kernel.rb +3 -3
- data/lib/poolparty/core/metaid.rb +15 -0
- data/lib/poolparty/core/object.rb +42 -2
- data/lib/poolparty/core/string.rb +21 -6
- data/lib/poolparty/core/symbol.rb +9 -0
- data/lib/poolparty/dependency_resolutions/puppet.rb +20 -7
- data/lib/poolparty/exceptions/CloudNotFoundException.rb +7 -0
- data/lib/poolparty/exceptions/LoadRulesException.rb +7 -0
- data/lib/poolparty/exceptions/MasterException.rb +10 -0
- data/lib/poolparty/helpers/binary.rb +37 -4
- data/lib/poolparty/helpers/console.rb +25 -8
- data/lib/poolparty/helpers/nice_printer.rb +36 -0
- data/lib/poolparty/helpers/optioner.rb +51 -16
- data/lib/poolparty/helpers/provisioner_base.rb +117 -28
- data/lib/poolparty/helpers/provisioners/master.rb +102 -35
- data/lib/poolparty/helpers/provisioners/slave.rb +25 -9
- data/lib/poolparty/modules/cloud_dsl.rb +13 -0
- data/lib/poolparty/modules/cloud_resourcer.rb +51 -8
- data/lib/poolparty/modules/configurable.rb +1 -1
- data/lib/poolparty/modules/definable_resource.rb +2 -2
- data/lib/poolparty/modules/file_writer.rb +37 -6
- data/lib/poolparty/modules/method_missing_sugar.rb +8 -3
- data/lib/poolparty/modules/pretty_printer.rb +1 -0
- data/lib/poolparty/modules/resourcing_dsl.rb +4 -2
- data/lib/poolparty/modules/thread_pool.rb +106 -0
- data/lib/poolparty/monitors/base_monitor.rb +65 -6
- data/lib/poolparty/monitors/monitors/cpu_monitor.rb +1 -1
- data/lib/poolparty/monitors/monitors/memory_monitor.rb +28 -1
- data/lib/poolparty/monitors/monitors/web_monitor.rb +18 -0
- data/lib/poolparty/net/messenger.rb +72 -0
- data/lib/poolparty/net/remote.rb +5 -2
- data/lib/poolparty/net/remote_bases/ec2/ec2_response_object.rb +66 -0
- data/lib/poolparty/net/remote_bases/ec2.rb +133 -131
- data/lib/poolparty/net/remote_instance.rb +28 -6
- data/lib/poolparty/net/remoter.rb +117 -64
- data/lib/poolparty/net/remoter_base.rb +49 -11
- data/lib/poolparty/plugins/deploydirectory.rb +66 -0
- data/lib/poolparty/plugins/line.rb +5 -4
- data/lib/poolparty/plugins/rsyncmirror.rb +26 -0
- data/lib/poolparty/plugins/runit.rb +96 -0
- data/lib/poolparty/plugins/svn.rb +1 -1
- data/lib/poolparty/pool/base.rb +47 -18
- data/lib/poolparty/pool/cloud.rb +121 -65
- data/lib/poolparty/pool/custom_resource.rb +4 -20
- data/lib/poolparty/pool/loggable.rb +3 -8
- data/lib/poolparty/pool/plugin.rb +14 -19
- data/lib/poolparty/pool/plugin_model.rb +8 -8
- data/lib/poolparty/pool/pool.rb +28 -11
- data/lib/poolparty/pool/resource.rb +109 -40
- data/lib/poolparty/pool/resources/class_package.rb +74 -33
- data/lib/poolparty/pool/resources/conditional.rb +32 -10
- data/lib/poolparty/pool/resources/custom_service.rb +30 -0
- data/lib/poolparty/pool/resources/exec.rb +6 -5
- data/lib/poolparty/pool/resources/gem_package.rb +52 -0
- data/lib/poolparty/pool/resources/mount.rb +22 -0
- data/lib/poolparty/pool/resources/package.rb +13 -3
- data/lib/poolparty/pool/resources/sshkey.rb +1 -1
- data/lib/poolparty/pool/resources/variable.rb +4 -0
- data/lib/poolparty/pool/script.rb +8 -6
- data/lib/poolparty/templates/haproxy.conf +1 -1
- data/lib/poolparty/templates/messenger/client/log-run.erb +2 -0
- data/lib/poolparty/templates/messenger/client/run.erb +4 -0
- data/lib/poolparty/templates/messenger/master/log-run.erb +2 -0
- data/lib/poolparty/templates/messenger/master/run.erb +4 -0
- data/lib/poolparty/templates/messenger/node/log-run.erb +2 -0
- data/lib/poolparty/templates/messenger/node/run.erb +4 -0
- data/lib/poolparty/templates/poolparty.monitor +1 -1
- data/lib/poolparty/templates/puppet.conf +0 -0
- data/lib/poolparty/templates/puppetcleaner +6 -0
- data/lib/poolparty/templates/puppetrerun +9 -0
- data/lib/poolparty/templates/puppetrunner +8 -0
- data/lib/poolparty/templates/yaws.conf +19 -0
- data/lib/poolparty/version.rb +1 -1
- data/lib/poolparty.rb +35 -6
- data/lib/poolpartycl.rb +4 -0
- data/log/pool.logs +0 -0
- data/poolparty.gemspec +574 -61
- data/spec/poolparty/aska/aska_spec.rb +122 -0
- data/spec/poolparty/bin/console_spec.rb +18 -0
- data/spec/poolparty/core/hash_spec.rb +4 -4
- data/spec/poolparty/core/object_spec.rb +29 -0
- data/spec/poolparty/core/string_spec.rb +6 -0
- data/spec/poolparty/core/time_spec.rb +0 -3
- data/spec/poolparty/helpers/binary_spec.rb +2 -2
- data/spec/poolparty/helpers/optioner_spec.rb +1 -4
- data/spec/poolparty/helpers/provisioner_base_spec.rb +14 -1
- data/spec/poolparty/helpers/provisioners/master_spec.rb +3 -3
- data/spec/poolparty/modules/cloud_resourcer_spec.rb +3 -3
- data/spec/poolparty/modules/configurable_spec.rb +4 -1
- data/spec/poolparty/monitors/base_monitor_spec.rb +94 -2
- data/spec/poolparty/monitors/monitors/cpu_monitor_spec.rb +0 -1
- data/spec/poolparty/monitors/monitors/memory_monitor_spec.rb +47 -0
- data/spec/poolparty/{helpers → net}/messenger_spec.rb +3 -1
- data/spec/poolparty/net/remote_bases/ec2_spec.rb +46 -5
- data/spec/poolparty/net/remote_instance_spec.rb +2 -1
- data/spec/poolparty/net/remote_spec.rb +30 -8
- data/spec/poolparty/net/remoter_base_spec.rb +4 -1
- data/spec/poolparty/net/remoter_spec.rb +11 -108
- data/spec/poolparty/plugins/deploydirectory_spec.rb +51 -0
- data/spec/poolparty/pool/base_spec.rb +43 -33
- data/spec/poolparty/pool/cloud_spec.rb +299 -248
- data/spec/poolparty/pool/custom_resource_spec.rb +10 -5
- data/spec/poolparty/pool/example_spec.rb +0 -84
- data/spec/poolparty/pool/plugin_model_spec.rb +3 -2
- data/spec/poolparty/pool/plugin_spec.rb +89 -62
- data/spec/poolparty/pool/pool_spec.rb +17 -2
- data/spec/poolparty/pool/resource_spec.rb +341 -236
- data/spec/poolparty/pool/resources/class_package_spec.rb +102 -66
- data/spec/poolparty/pool/resources/conditional_spec.rb +65 -26
- data/spec/poolparty/pool/resources/cron_spec.rb +3 -2
- data/spec/poolparty/pool/resources/exec_spec.rb +1 -1
- data/spec/poolparty/pool/resources/gem_spec.rb +18 -14
- data/spec/poolparty/pool/resources/remote_file_spec.rb +1 -1
- data/spec/poolparty/pool/resources/variable_spec.rb +1 -1
- data/spec/poolparty/pool/script_spec.rb +58 -37
- data/spec/poolparty/pool/test_plugins/webserver.rb +1 -0
- data/spec/poolparty/spec_helper.rb +16 -5
- data/tasks/deployment.rake +19 -3
- data/tasks/development.rake +11 -2
- data/tasks/ec2.rake +9 -1
- data/website/index.html +2 -2
- metadata +167 -70
- data/bin/pool-provision +0 -34
- data/erl_crash.dump +0 -8409
- data/examples/with_apache_plugin.rb +0 -22
- data/lib/erlang/messenger/Makefile +0 -15
- data/lib/erlang/messenger/ebin/master_app.beam +0 -0
- data/lib/erlang/messenger/ebin/node_app.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_client.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_cluster.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_event_handler.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_master.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_master_supervisor.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_node.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_node_supervisor.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_packager.beam +0 -0
- data/lib/erlang/messenger/ebin/utils.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/Makefile +0 -28
- data/lib/erlang/messenger/lib/eunit/ebin/autoload.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/code_monitor.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_autoexport.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_data.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_lib.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_proc.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_serial.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_server.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_striptests.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_test.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_tests.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_tty.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/file_monitor.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/src/Makefile +0 -46
- data/lib/erlang/messenger/src/pm_event_handler.erl +0 -21
- data/lib/poolparty/config/allowed_commands.yml +0 -1
- data/lib/poolparty/helpers/messenger.rb +0 -29
- data/lib/poolparty/plugins/git.rb +0 -39
- data/lib/poolparty/pool/resources/gem.rb +0 -28
- data/lib/poolparty/pool/tmp/.ppkeys +0 -3
- data/lib/poolparty/pool/tmp/happydayz +0 -1
- data/lib/poolparty/pool/tmp/install_master.sh +0 -33
- data/lib/poolparty/pool/tmp/pool.spec +0 -11
- data/lib/poolparty/pool/tmp/poolparty.pp +0 -600
- data/lib/poolparty/pool/tmp/tc-instances.list +0 -1
- data/lib/poolparty/templates/fileserver.conf +0 -4
- data/spec/poolparty/plugins/git_spec.rb +0 -33
- data/test_manifest.pp +0 -658
@@ -14,7 +14,7 @@ describe "Custom Resource" do
|
|
14
14
|
lambda {
|
15
15
|
define_resource(:rockstar) do
|
16
16
|
def has_a_line_in_file(line="line_in_file", file="file")
|
17
|
-
|
17
|
+
call_custom_function "line(#{file}, #{line})"
|
18
18
|
end
|
19
19
|
custom_function <<-EOF
|
20
20
|
define line($file, $line, $ensure = 'present') {
|
@@ -28,7 +28,7 @@ describe "Custom Resource" do
|
|
28
28
|
before(:each) do
|
29
29
|
define_resource(:rockstar) do
|
30
30
|
def has_a_line_in_file(line="line_in_file", file="file")
|
31
|
-
|
31
|
+
call_custom_function "line(#{file}, #{line})"
|
32
32
|
end
|
33
33
|
custom_function <<-EOF
|
34
34
|
define line($file, $line, $ensure = 'present') {
|
@@ -49,7 +49,7 @@ describe "Custom Resource" do
|
|
49
49
|
reset_resources!
|
50
50
|
define_resource(:rockstar) do
|
51
51
|
def has_a_line_in_file(line="line_in_file", file="file")
|
52
|
-
|
52
|
+
call_custom_function "line(#{file}, #{line})"
|
53
53
|
end
|
54
54
|
custom_function <<-EOF
|
55
55
|
define line($file, $line, $ensure = 'present') {
|
@@ -69,17 +69,22 @@ describe "Custom Resource" do
|
|
69
69
|
@resource.instance_eval do
|
70
70
|
has_a_line_in_file("hi", "filename")
|
71
71
|
end
|
72
|
-
@resource.resource(:call_function).to_string.should == "line(filename, hi)"
|
72
|
+
@resource.resource(:call_function).first.to_string.should == "line(filename, hi)"
|
73
73
|
end
|
74
74
|
it "should be stored in an array" do
|
75
75
|
resource(:rockstar).class.should == Array
|
76
76
|
end
|
77
77
|
describe "call function" do
|
78
|
+
before(:each) do
|
79
|
+
@res = Class.new
|
80
|
+
@res.stub!(:class_name_sym).and_return :bunk
|
81
|
+
@res.stub!(:key).and_return "bunk"
|
82
|
+
end
|
78
83
|
it "should have the class CallFunction available" do
|
79
84
|
lambda {PoolParty::Resources::CallFunction}.should_not raise_error
|
80
85
|
end
|
81
86
|
it "should create a new CallFunction instance when calling call_function with a string" do
|
82
|
-
PoolParty::Resources::CallFunction.should_receive(:new).and_return
|
87
|
+
PoolParty::Resources::CallFunction.should_receive(:new).and_return @res
|
83
88
|
add_resource(:call_function, :name => "line")
|
84
89
|
end
|
85
90
|
it "should create a call function in the function call array" do
|
@@ -24,89 +24,5 @@ describe "basic" do
|
|
24
24
|
end
|
25
25
|
it "should set the minimum_instances on the db cloud to 3" do
|
26
26
|
pool(:app).cloud(:db).minimum_instances.should == 3
|
27
|
-
end
|
28
|
-
describe "with_apache_plugin" do
|
29
|
-
before(:each) do
|
30
|
-
reset!
|
31
|
-
PoolParty::Script.inflate(open(@example_dir + "/with_apache_plugin.rb").read, File.dirname(__FILE__))
|
32
|
-
end
|
33
|
-
it "should have one pool called :app" do
|
34
|
-
pool(:app).should_not be_nil
|
35
|
-
end
|
36
|
-
it "should have a cloud called :app" do
|
37
|
-
pool(:app).cloud(:app).should_not be_nil
|
38
|
-
end
|
39
|
-
it "should have a cloud called :db" do
|
40
|
-
pool(:app).cloud(:db).should_not be_nil
|
41
|
-
end
|
42
|
-
it "should set the minimum_instances on the cloud to 2 (overriding the pool options)" do
|
43
|
-
pool(:app).cloud(:app).minimum_instances.should == 2
|
44
|
-
end
|
45
|
-
it "should set the maximum_instances on the cloud to 10" do
|
46
|
-
pool(:app).cloud(:app).maximum_instances.should == 10
|
47
|
-
end
|
48
|
-
it "should set the minimum_instances on the db cloud to 2" do
|
49
|
-
pool(:app).cloud(:db).minimum_instances.should == 2
|
50
|
-
end
|
51
|
-
it "should have included the apache plugin and given the class a method by the name of the plugin" do
|
52
|
-
pool(:app).cloud(:app).methods.include?("apache").should == true
|
53
|
-
end
|
54
|
-
describe "apache plugin" do
|
55
|
-
before(:each) do
|
56
|
-
@c = pool(:app).cloud(:app)
|
57
|
-
end
|
58
|
-
it "should have apache as the ApacheClass" do
|
59
|
-
@c.apache.class.should == PoolPartyApacheClass
|
60
|
-
end
|
61
|
-
it "should set php == true on the apache plugin" do
|
62
|
-
@c.apache.php.should == true
|
63
|
-
end
|
64
|
-
it "should store the method in options if it's not defined on the plugin" do
|
65
|
-
@c.enable_asp true
|
66
|
-
@c.options[:enable_asp].should == true
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
describe "plugin_without_plugin_directory" do
|
71
|
-
before(:each) do
|
72
|
-
reset!
|
73
|
-
PoolParty::Script.inflate(open(@example_dir + "/plugin_without_plugin_directory.rb").read, File.dirname(__FILE__))
|
74
|
-
end
|
75
|
-
it "should have one pool called :app" do
|
76
|
-
pool(:app).should_not be_nil
|
77
|
-
end
|
78
|
-
it "should have a cloud called :app" do
|
79
|
-
pool(:app).cloud(:app).should_not be_nil
|
80
|
-
end
|
81
|
-
it "should have a cloud called :db" do
|
82
|
-
pool(:app).cloud(:db).should_not be_nil
|
83
|
-
end
|
84
|
-
it "should set the minimum_instances on the cloud to 2 (overriding the pool options)" do
|
85
|
-
pool(:app).cloud(:app).minimum_instances.should == 2
|
86
|
-
end
|
87
|
-
it "should set the maximum_instances on the cloud to 10" do
|
88
|
-
pool(:app).cloud(:app).maximum_instances.should == 10
|
89
|
-
end
|
90
|
-
it "should set the minimum_instances on the db cloud to 2" do
|
91
|
-
pool(:app).cloud(:db).minimum_instances.should == 2
|
92
|
-
end
|
93
|
-
it "should have included the apache plugin and given the class a method by the name of the plugin" do
|
94
|
-
pool(:app).cloud(:app).methods.include?("apache").should == true
|
95
|
-
end
|
96
|
-
describe "apache plugin" do
|
97
|
-
before(:each) do
|
98
|
-
@c = pool(:app).cloud(:app)
|
99
|
-
end
|
100
|
-
it "should have apache as the ApacheClass" do
|
101
|
-
@c.apache.class.should == PoolPartyApacheClass
|
102
|
-
end
|
103
|
-
it "should set php == true on the apache plugin" do
|
104
|
-
@c.apache.php.should == true
|
105
|
-
end
|
106
|
-
it "should store the method in options if it's not defined on the plugin" do
|
107
|
-
@c.enable_asp true
|
108
|
-
@c.options[:enable_asp].should == true
|
109
|
-
end
|
110
|
-
end
|
111
27
|
end
|
112
28
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/../spec_helper'
|
2
|
+
include PoolParty::Resources
|
2
3
|
require File.dirname(__FILE__) + '/test_plugins/webserver'
|
3
4
|
|
4
5
|
describe "Plugin" do
|
@@ -55,8 +56,8 @@ describe "Plugin" do
|
|
55
56
|
@plugin.respond_to?(:site).should == true
|
56
57
|
end
|
57
58
|
it "should be able to call the plugin method site" do
|
58
|
-
@plugin.should_receive(:virtual_host).
|
59
|
-
@plugin.
|
59
|
+
@plugin.should_receive(:virtual_host).with("hop", {:document_root => "/root"})
|
60
|
+
@plugin.virtual_host("hop", {:document_root => "/root"})
|
60
61
|
end
|
61
62
|
end
|
62
63
|
end
|
@@ -1,85 +1,112 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/../spec_helper'
|
2
|
+
|
3
|
+
include PoolParty::Resources
|
2
4
|
require File.dirname(__FILE__) + '/test_plugins/webserver'
|
3
5
|
|
4
6
|
describe "Plugin" do
|
5
|
-
|
6
7
|
before(:each) do
|
7
|
-
|
8
|
-
pool :poolpartyrb do
|
9
|
-
cloud :app do
|
10
|
-
apache do
|
11
|
-
enable_php
|
12
|
-
site("heady", {
|
13
|
-
:document_root => "/root"
|
14
|
-
})
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
@p = pool :poolpartyrb
|
19
|
-
@c = @p.cloud(:app)
|
20
|
-
end
|
21
|
-
|
22
|
-
it "should allow access to the pool on the cloud" do
|
23
|
-
@c.parent.should == @p
|
8
|
+
reset_resources!
|
24
9
|
end
|
25
|
-
describe "
|
10
|
+
describe "wrapped" do
|
26
11
|
before(:each) do
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
12
|
+
reset!
|
13
|
+
pool :poolpartyrb do
|
14
|
+
cloud :app do
|
15
|
+
apache do
|
16
|
+
enable_php
|
17
|
+
site("heady", {
|
18
|
+
:document_root => "/root"
|
19
|
+
})
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
@p = pool :poolpartyrb
|
24
|
+
@c = @p.cloud(:app)
|
34
25
|
end
|
35
|
-
|
36
|
-
|
26
|
+
|
27
|
+
it "should allow access to the pool on the cloud" do
|
28
|
+
@c.parent.should == @p
|
37
29
|
end
|
38
|
-
describe "
|
39
|
-
before(:each) do
|
40
|
-
@plugin.
|
41
|
-
enable_php
|
42
|
-
has_gempackage(:name => "aska")
|
43
|
-
end
|
44
|
-
end
|
45
|
-
it "should call enable_php on the class" do
|
46
|
-
@plugin.php.should == true
|
30
|
+
describe "instance" do
|
31
|
+
before(:each) do
|
32
|
+
@plugin = @c.apache
|
47
33
|
end
|
48
|
-
it "should
|
49
|
-
@plugin.
|
34
|
+
it "should not be empty" do
|
35
|
+
@plugin.class.should == PoolPartyApacheClass
|
50
36
|
end
|
51
|
-
it "should have
|
52
|
-
@plugin.
|
37
|
+
it "should have access to the cloud's container" do
|
38
|
+
@plugin.parent.should == @c
|
53
39
|
end
|
54
|
-
it "should have
|
55
|
-
@plugin.
|
40
|
+
it "should have enable_php as a method" do
|
41
|
+
@plugin.respond_to?(:enable_php).should == true
|
56
42
|
end
|
57
|
-
|
58
|
-
|
43
|
+
describe "after eval'ing" do
|
44
|
+
before(:each) do
|
45
|
+
@plugin.instance_eval do
|
46
|
+
enable_php
|
47
|
+
has_gempackage(:name => "aska")
|
48
|
+
end
|
49
|
+
end
|
50
|
+
it "should call enable_php on the class" do
|
51
|
+
@plugin.php.should == true
|
52
|
+
end
|
53
|
+
it "should have resources attached to it" do
|
54
|
+
@plugin.resources.class.should == Hash
|
55
|
+
end
|
56
|
+
it "should have an array of gem resources" do
|
57
|
+
@plugin.resource(:gempackage).class.should == Array
|
58
|
+
end
|
59
|
+
it "should have 1 gem in the resources defined" do
|
60
|
+
@plugin.resource(:gempackage).size.should == 1
|
61
|
+
end
|
62
|
+
it "should have the gem named aska in the gem resource" do
|
63
|
+
@plugin.get_resource(:gempackage, "aska").name.should == "aska"
|
64
|
+
end
|
65
|
+
it "should have its resources visible to its parent" do
|
66
|
+
@plugin.parent = @c
|
67
|
+
@c.resources
|
68
|
+
end
|
59
69
|
end
|
60
|
-
|
61
|
-
|
62
|
-
|
70
|
+
describe "before eval'ing" do
|
71
|
+
before(:each) do
|
72
|
+
reset!
|
73
|
+
@plugin = "apache".class_constant.new(@c)
|
74
|
+
end
|
75
|
+
it "should call has_line_in_file" do
|
76
|
+
@plugin.should_receive(:php).and_return true
|
77
|
+
end
|
78
|
+
it "should call site" do
|
79
|
+
@plugin.should_receive(:site).with("frank").and_return true
|
80
|
+
end
|
81
|
+
after do
|
82
|
+
@plugin.instance_eval do
|
83
|
+
enable_php
|
84
|
+
site("frank")
|
85
|
+
end
|
86
|
+
end
|
63
87
|
end
|
64
88
|
end
|
65
|
-
describe "
|
66
|
-
|
67
|
-
|
68
|
-
@plugin = "apache".class_constant.new(@c)
|
69
|
-
end
|
70
|
-
it "should call has_line_in_file" do
|
71
|
-
@plugin.should_receive(:php).and_return true
|
89
|
+
describe "DSL" do
|
90
|
+
it "should have a cloud method from within the plugin" do
|
91
|
+
@plugin.respond_to?(:cloud).should == true
|
72
92
|
end
|
73
|
-
it "should
|
74
|
-
@plugin.
|
93
|
+
it "should get a hold of the containing cloud" do
|
94
|
+
@plugin.cloud.should == @c
|
75
95
|
end
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
96
|
+
describe "enable" do
|
97
|
+
before(:each) do
|
98
|
+
reset!
|
99
|
+
@plugin = PoolParty::Plugin::Plugin.new
|
100
|
+
Kernel::PoolPartyApacheClass.stub!(:new).and_return @plugin
|
101
|
+
end
|
102
|
+
it "should call enable on calling realize! when there is no block included" do
|
103
|
+
@plugin.should_receive(:enable).and_return true
|
104
|
+
@cloud = cloud :app do
|
105
|
+
apache
|
106
|
+
end
|
107
|
+
@cloud.realize_plugins!
|
80
108
|
end
|
81
109
|
end
|
82
|
-
|
83
110
|
end
|
84
111
|
end
|
85
112
|
end
|
@@ -36,7 +36,7 @@ describe "Pool" do
|
|
36
36
|
plugin_directory "yaway"
|
37
37
|
end
|
38
38
|
end
|
39
|
-
it "should call Dir when the plugin directory is set" do
|
39
|
+
it "should call Dir when the plugin directory is set" do
|
40
40
|
Dir.should_receive(:[]).with("yaway/*/*.rb").once.and_return []
|
41
41
|
end
|
42
42
|
end
|
@@ -78,6 +78,21 @@ describe "Pool" do
|
|
78
78
|
@pool.maximum_instances.should == 5
|
79
79
|
end
|
80
80
|
end
|
81
|
-
end
|
81
|
+
end
|
82
|
+
describe "with clouds" do
|
83
|
+
before(:each) do
|
84
|
+
reset!
|
85
|
+
@pool = Pool.new :test do
|
86
|
+
cloud :app
|
87
|
+
cloud :db
|
88
|
+
end
|
89
|
+
end
|
90
|
+
it "should have 2 clouds in the pool when there are 2 described" do
|
91
|
+
@pool.clouds.size.should == 2
|
92
|
+
end
|
93
|
+
it "should be able to tel the other clouds from within one cloud" do
|
94
|
+
cloud(:app).other_clouds.should == [cloud(:db)]
|
95
|
+
end
|
96
|
+
end
|
82
97
|
end
|
83
98
|
end
|