poolparty 0.2.69 → 0.2.84
Sign up to get free protection for your applications and to get access to all the features.
- data/Capfile +1 -0
- data/History.txt +6 -0
- data/Manifest.txt +140 -143
- data/PostInstall.txt +1 -1
- data/README.txt +2 -0
- data/bin/cloud-configure +5 -2
- data/bin/cloud-handle-load +3 -3
- data/bin/cloud-maintain +3 -3
- data/bin/cloud-provision +6 -5
- data/bin/cloud-rsync +28 -0
- data/bin/cloud-setup-dev +25 -0
- data/bin/cloud-spec +40 -0
- data/bin/cloud-start +5 -3
- data/bin/server-clean-cert-for +15 -0
- data/bin/server-rerun +0 -1
- data/bin/server-start-client +1 -1
- data/bin/server-start-master +1 -1
- data/bin/server-start-node +1 -1
- data/bin/server-update-hosts +4 -3
- data/bin/server-write-new-nodes +26 -0
- data/generators/poolspec/USAGE +2 -2
- data/generators/poolspec/poolspec_generator.rb +1 -1
- data/lib/erlang/messenger/Makefile +15 -0
- data/lib/erlang/messenger/ebin/client_app.beam +0 -0
- data/lib/erlang/messenger/ebin/client_server.beam +0 -0
- data/lib/erlang/messenger/ebin/erl_crash.dump +10326 -0
- 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_client_old.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_client_supervisor.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_cluster.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_event_manager.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_master.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_master_event_handler.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/pm_spawner.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_strings.beam +0 -0
- data/lib/erlang/messenger/ebin/utils.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/Makefile +28 -0
- 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 +46 -0
- data/lib/erlang/messenger/src/pm_master.erl +5 -0
- data/lib/erlang/messenger/src/pm_node.erl +2 -3
- data/lib/erlang/messenger/src/pm_spawner.erl +213 -0
- data/lib/poolparty/base_packages/heartbeat.rb +57 -43
- data/lib/poolparty/base_packages/poolparty.rb +18 -15
- data/lib/poolparty/capistrano.rb +18 -0
- data/lib/poolparty/core/class.rb +24 -0
- data/lib/poolparty/core/kernel.rb +7 -0
- data/lib/poolparty/core/module.rb +2 -2
- data/lib/poolparty/core/string.rb +1 -1
- data/lib/poolparty/dependency_resolutions/puppet.rb +10 -2
- data/lib/poolparty/exceptions/ProvisionerException.rb +5 -0
- data/lib/poolparty/extra/deployments.rb +31 -0
- data/lib/poolparty/helpers/binary.rb +14 -2
- data/lib/poolparty/helpers/optioner.rb +61 -22
- data/lib/poolparty/helpers/ruberl.rb +33 -0
- data/lib/poolparty/modules/cloud_dsl.rb +2 -1
- data/lib/poolparty/modules/cloud_resourcer.rb +30 -6
- data/lib/poolparty/modules/configurable.rb +2 -0
- data/lib/poolparty/modules/file_writer.rb +4 -4
- data/lib/poolparty/modules/resourcing_dsl.rb +5 -5
- data/lib/poolparty/monitors/base_monitor.rb +1 -1
- data/lib/poolparty/monitors/monitors/cpu_monitor.rb +2 -2
- data/lib/poolparty/net/messenger.rb +1 -1
- data/lib/poolparty/net/remote.rb +2 -2
- data/lib/poolparty/net/remote_bases/ec2.rb +51 -11
- data/lib/poolparty/net/remote_instance.rb +7 -3
- data/lib/poolparty/net/remoter.rb +72 -24
- data/lib/poolparty/net/remoter_base.rb +10 -0
- data/lib/poolparty/plugins/deploydirectory.rb +10 -5
- data/lib/poolparty/plugins/git.rb +51 -0
- data/lib/poolparty/{pool → poolparty}/base.rb +4 -2
- data/lib/poolparty/{pool → poolparty}/cloud.rb +32 -10
- data/lib/poolparty/{pool → poolparty}/plugin_model.rb +4 -4
- data/lib/poolparty/{pool → poolparty}/pool.rb +2 -2
- data/lib/poolparty/{pool → poolparty}/resource.rb +33 -15
- data/lib/poolparty/{pool → poolparty}/resources/class_package.rb +3 -3
- data/lib/poolparty/{pool → poolparty}/resources/directory.rb +6 -3
- data/lib/poolparty/{pool → poolparty}/resources/exec.rb +2 -5
- data/lib/poolparty/{pool → poolparty}/resources/file.rb +3 -3
- data/lib/poolparty/{pool → poolparty}/resources/package.rb +1 -1
- data/lib/poolparty/{pool → poolparty}/resources/remote_file.rb +1 -1
- data/lib/poolparty/poolparty/resources/remote_user.rb +17 -0
- data/lib/poolparty/{pool → poolparty}/resources/sshkey.rb +5 -1
- data/lib/poolparty/{pool → poolparty}/script.rb +1 -1
- data/lib/poolparty/provisioners/capistrano/capistrano.rb +127 -0
- data/lib/poolparty/provisioners/capistrano/capistrano_configurer.rb +58 -0
- data/lib/poolparty/provisioners/capistrano/recipies/base.rb +104 -0
- data/lib/poolparty/provisioners/capistrano/recipies/master.rb +121 -0
- data/lib/poolparty/provisioners/capistrano/recipies/slave.rb +12 -0
- data/lib/poolparty/provisioners/provisioner_base.rb +204 -0
- data/lib/poolparty/spec/core/string.rb +16 -0
- data/lib/poolparty/spec/matchers/a_spec_extensions_base.rb +26 -0
- data/lib/poolparty/spec/matchers/have_cron.rb +28 -0
- data/lib/poolparty/spec/matchers/have_deploydirectory.rb +15 -0
- data/lib/poolparty/spec/matchers/have_directory.rb +31 -0
- data/lib/poolparty/spec/matchers/have_exec.rb +28 -0
- data/lib/poolparty/spec/matchers/have_file.rb +28 -0
- data/lib/poolparty/spec/matchers/have_gempackage.rb +28 -0
- data/lib/poolparty/spec/matchers/have_git.rb +28 -0
- data/lib/poolparty/spec/matchers/have_host.rb +28 -0
- data/lib/poolparty/spec/matchers/have_mount.rb +28 -0
- data/lib/poolparty/spec/matchers/have_package.rb +28 -0
- data/lib/poolparty/spec/matchers/have_remotefile.rb +28 -0
- data/lib/poolparty/spec/matchers/have_rsyncmirror.rb +28 -0
- data/lib/poolparty/spec/matchers/have_service.rb +28 -0
- data/lib/poolparty/spec/matchers/have_sshkey.rb +28 -0
- data/lib/poolparty/spec/matchers/have_symlink.rb +28 -0
- data/lib/poolparty/spec/matchers/have_variable.rb +32 -0
- data/lib/poolparty/spec/spec/dynamic_matchers.rb +63 -0
- data/lib/poolparty/spec/spec/ensure_matchers_exist.rb +7 -0
- data/lib/poolparty/spec/templates/have_base.rb +28 -0
- data/lib/poolparty/templates/authkeys +1 -1
- data/lib/poolparty/templates/gem +12 -10
- data/lib/poolparty/templates/ha.cf +9 -11
- data/lib/poolparty/templates/haresources +1 -1
- data/lib/poolparty/templates/logd.cf +42 -0
- data/lib/poolparty/templates/puppet.conf +18 -8
- data/lib/poolparty/templates/puppetcleaner +9 -3
- data/lib/poolparty/templates/puppetrerun +16 -3
- data/lib/poolparty/templates/puppetrunner +1 -1
- data/lib/poolparty/version.rb +1 -1
- data/lib/poolparty.rb +12 -8
- data/lib/poolpartyspec.rb +34 -0
- data/poolparty.gemspec +151 -149
- data/spec/poolparty/aska/aska_spec.rb +0 -5
- data/spec/poolparty/bin/console_spec.rb +3 -0
- data/spec/poolparty/extra/deployments_spec.rb +64 -0
- data/spec/poolparty/helpers/binary_spec.rb +1 -1
- data/spec/poolparty/helpers/optioner_spec.rb +17 -4
- data/spec/poolparty/modules/cloud_resourcer_spec.rb +19 -2
- data/spec/poolparty/modules/configurable_spec.rb +2 -2
- data/spec/poolparty/net/remote_bases/ec2_spec.rb +5 -2
- data/spec/poolparty/net/remote_instance_spec.rb +5 -0
- data/spec/poolparty/net/remote_spec.rb +24 -31
- data/spec/poolparty/net/remoter_base_spec.rb +11 -6
- data/spec/poolparty/net/remoter_spec.rb +55 -27
- data/spec/poolparty/plugins/deploydirectory_spec.rb +1 -0
- data/spec/poolparty/plugins/git_spec.rb +45 -0
- data/spec/poolparty/{pool → poolparty}/cloud_spec.rb +41 -0
- data/spec/poolparty/{pool → poolparty}/plugin_spec.rb +1 -1
- data/spec/poolparty/{pool → poolparty}/pool_spec.rb +1 -1
- data/spec/poolparty/{pool → poolparty}/resource_spec.rb +15 -2
- data/spec/poolparty/poolparty/resources/user_spec.rb +38 -0
- data/spec/poolparty/poolparty/test_plugins/virtual_host_template.erb +0 -0
- data/spec/poolparty/poolparty_spec.rb +1 -1
- data/spec/poolparty/provisioners/capistrano/capistrano_spec.rb +27 -0
- data/spec/poolparty/provisioners/provisioner_base_spec.rb +120 -0
- data/spec/poolparty/spec/core/string_spec.rb +57 -0
- data/spec/poolparty/spec_helper.rb +48 -6
- data/tasks/deployment.rake +3 -5
- data/tasks/spec.rake +2 -3
- data/website/index.html +2 -2
- metadata +150 -148
- data/lib/erlang/messenger/lib/eunit/.svn/all-wcprops +0 -53
- data/lib/erlang/messenger/lib/eunit/.svn/entries +0 -140
- data/lib/erlang/messenger/lib/eunit/.svn/format +0 -1
- data/lib/erlang/messenger/lib/eunit/.svn/prop-base/NOTES.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/AUTHORS.svn-base +0 -2
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/CHANGELOG.svn-base +0 -14
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/COPYING.svn-base +0 -504
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/NOTES.svn-base +0 -276
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/README.svn-base +0 -3
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/sys.config.svn-base +0 -9
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/vsn.mk.svn-base +0 -1
- data/lib/erlang/messenger/lib/eunit/doc/.svn/all-wcprops +0 -59
- data/lib/erlang/messenger/lib/eunit/doc/.svn/entries +0 -142
- data/lib/erlang/messenger/lib/eunit/doc/.svn/format +0 -1
- data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/erlang.png.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/eunit.html.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/index.html.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/modules-frame.html.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/overview-summary.html.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/packages-frame.html.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/edoc-info.svn-base +0 -3
- 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 +0 -172
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/index.html.svn-base +0 -17
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/modules-frame.html.svn-base +0 -12
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/overview-summary.html.svn-base +0 -984
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/overview.edoc.svn-base +0 -980
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/packages-frame.html.svn-base +0 -11
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/stylesheet.css.svn-base +0 -55
- data/lib/erlang/messenger/lib/eunit/ebin/.svn/all-wcprops +0 -5
- data/lib/erlang/messenger/lib/eunit/ebin/.svn/dir-prop-base +0 -8
- data/lib/erlang/messenger/lib/eunit/ebin/.svn/entries +0 -28
- data/lib/erlang/messenger/lib/eunit/ebin/.svn/format +0 -1
- data/lib/erlang/messenger/lib/eunit/examples/.svn/all-wcprops +0 -23
- data/lib/erlang/messenger/lib/eunit/examples/.svn/entries +0 -66
- data/lib/erlang/messenger/lib/eunit/examples/.svn/format +0 -1
- data/lib/erlang/messenger/lib/eunit/examples/.svn/prop-base/eunit_examples.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/examples/.svn/prop-base/fib.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/examples/.svn/text-base/eunit_examples.erl.svn-base +0 -339
- data/lib/erlang/messenger/lib/eunit/examples/.svn/text-base/fib.erl.svn-base +0 -19
- data/lib/erlang/messenger/lib/eunit/examples/.svn/text-base/tests.txt.svn-base +0 -1
- data/lib/erlang/messenger/lib/eunit/include/.svn/all-wcprops +0 -11
- data/lib/erlang/messenger/lib/eunit/include/.svn/entries +0 -41
- data/lib/erlang/messenger/lib/eunit/include/.svn/format +0 -1
- data/lib/erlang/messenger/lib/eunit/include/.svn/prop-base/eunit.hrl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/include/.svn/text-base/eunit.hrl.svn-base +0 -313
- data/lib/erlang/messenger/lib/eunit/src/.svn/all-wcprops +0 -113
- data/lib/erlang/messenger/lib/eunit/src/.svn/entries +0 -259
- data/lib/erlang/messenger/lib/eunit/src/.svn/format +0 -1
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/autoload.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/code_monitor.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_autoexport.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_data.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_internal.hrl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_lib.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_proc.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_serial.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_server.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_striptests.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_test.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_tests.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_tty.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/file_monitor.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/autoload.erl.svn-base +0 -388
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/code_monitor.erl.svn-base +0 -243
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit.app.src.svn-base +0 -21
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit.appup.src.svn-base +0 -1
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit.erl.svn-base +0 -196
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_autoexport.erl.svn-base +0 -102
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_data.erl.svn-base +0 -798
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_internal.hrl.svn-base +0 -48
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_lib.erl.svn-base +0 -682
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_proc.erl.svn-base +0 -552
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_serial.erl.svn-base +0 -157
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_server.erl.svn-base +0 -340
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_striptests.erl.svn-base +0 -64
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_test.erl.svn-base +0 -334
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_tests.erl.svn-base +0 -45
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_tty.erl.svn-base +0 -272
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/file_monitor.erl.svn-base +0 -409
- data/lib/erlang/messenger/src/pm_client_old.erl +0 -52
- data/lib/poolparty/helpers/provisioner_base.rb +0 -346
- data/lib/poolparty/helpers/provisioners/master.rb +0 -205
- data/lib/poolparty/helpers/provisioners/slave.rb +0 -64
- data/spec/poolparty/helpers/provisioner_base_spec.rb +0 -134
- data/spec/poolparty/helpers/provisioners/master_spec.rb +0 -54
- data/spec/poolparty/helpers/provisioners/slave_spec.rb +0 -28
- /data/lib/poolparty/{pool → poolparty}/custom_resource.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/loggable.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/plugin.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/resources/conditional.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/resources/cron.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/resources/custom_service.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/resources/gem_package.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/resources/host.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/resources/mount.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/resources/service.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/resources/symlink.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/resources/variable.rb +0 -0
- /data/log/{pool.logs → pool.log} +0 -0
- /data/spec/poolparty/{pool/test_plugins/virtual_host_template.erb → net/log/pool.log} +0 -0
- /data/spec/poolparty/{pool → poolparty}/base_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/configurers/files/ruby_basic.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/configurers/files/ruby_plugins.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/configurers/ruby_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/custom_resource_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/example_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/plugin_model_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/class_package_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/conditional_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/cron_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/directory_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/exec_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/file_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/gem_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/host_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/package_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/remote_file_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/service_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/sshkey_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/symlink_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/variable_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/script_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/test_plugins/sshkey_test +0 -0
- /data/spec/poolparty/{pool → poolparty}/test_plugins/webserver.rb +0 -0
@@ -0,0 +1,120 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
2
|
+
|
3
|
+
include Provisioner
|
4
|
+
|
5
|
+
describe "ProvisionerBase" do
|
6
|
+
before(:each) do
|
7
|
+
@cloud = cloud :app do;end
|
8
|
+
@remote_instance = PoolParty::Remote::RemoteInstance.new({:ip => "192.168.0.1", :status => "running", :name => "master"}, @cloud)
|
9
|
+
@pb = PoolParty::Provisioner::ProvisionerBase.new(@remote_instance, @cloud)
|
10
|
+
stub_list_from_remote_for(@cloud)
|
11
|
+
stub_remoting_methods_for(@cloud)
|
12
|
+
end
|
13
|
+
describe "class methods" do
|
14
|
+
it "should have install" do
|
15
|
+
ProvisionerBase.respond_to?(:install).should == true
|
16
|
+
end
|
17
|
+
it "should have configure" do
|
18
|
+
ProvisionerBase.respond_to?(:configure).should == true
|
19
|
+
end
|
20
|
+
describe "in action" do
|
21
|
+
it "should call a new ProvisionerBase" do
|
22
|
+
ProvisionerBase.should_receive(:new).with(@remote_instance, @cloud).and_return @pb
|
23
|
+
ProvisionerBase.install(@remote_instance, @cloud)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
describe "instance methods" do
|
28
|
+
before(:each) do
|
29
|
+
@pb = PoolParty::Provisioner::ProvisionerBase.new(@remote_instance, @cloud)
|
30
|
+
stub_list_from_remote_for(@pb)
|
31
|
+
stub_list_from_remote_for(@cloud)
|
32
|
+
stub_remoting_methods_for(@pb)
|
33
|
+
end
|
34
|
+
it "should store the instance on the ProvisionerBase" do
|
35
|
+
@pb.instance.should == @remote_instance
|
36
|
+
end
|
37
|
+
it "should store the cloud on the ProvisionerBase" do
|
38
|
+
@pb.cloud.should == @cloud
|
39
|
+
end
|
40
|
+
it "should say provision_master? is true if the remote instance name is master" do
|
41
|
+
@pb.provision_master?.should == true
|
42
|
+
end
|
43
|
+
it "should say the provision_master? is false if the remote instance is not the master" do
|
44
|
+
@remote_instance.stub!(:master?).and_return false
|
45
|
+
@pb.provision_master?.should == false
|
46
|
+
end
|
47
|
+
it "should say the provision_master? is false if the remote instance is nil" do
|
48
|
+
PoolParty::Provisioner::ProvisionerBase.new(nil, @cloud).provision_master?.should == false
|
49
|
+
end
|
50
|
+
describe "custom tasks" do
|
51
|
+
it "should call custom_configure_tasks_for on the cloud with the instance" do
|
52
|
+
@cloud.should_receive(:custom_configure_tasks_for).with(@remote_instance).and_return []
|
53
|
+
@pb.custom_configure_tasks
|
54
|
+
end
|
55
|
+
it "should call custom_install_tasks_for on the cloud with the instance" do
|
56
|
+
@cloud.should_receive(:custom_install_tasks_for).with(@remote_instance).and_return []
|
57
|
+
@pb.custom_install_tasks
|
58
|
+
end
|
59
|
+
end
|
60
|
+
describe "installation" do
|
61
|
+
it "should have an install method" do
|
62
|
+
@pb.respond_to?(:install).should == true
|
63
|
+
end
|
64
|
+
it "should call error if it is not valid" do
|
65
|
+
@pb.stub!(:valid?).and_return false
|
66
|
+
lambda {@pb.install}.should raise_error
|
67
|
+
end
|
68
|
+
it "should not raise an exception if it is valid" do
|
69
|
+
@pb.stub!(:valid?).and_return true
|
70
|
+
lambda {@pb.install(true)}.should_not raise_error
|
71
|
+
end
|
72
|
+
it "should call before_install with the instance" do
|
73
|
+
@pb.should_receive(:before_install).with(@remote_instance).and_return true
|
74
|
+
@pb.install
|
75
|
+
end
|
76
|
+
it "should call setup_runner" do
|
77
|
+
@pb.should_receive(:setup_runner).and_return true
|
78
|
+
@pb.install
|
79
|
+
end
|
80
|
+
it "should call process_install! with the testing" do
|
81
|
+
@pb.should_receive(:process_install!).with(false).and_return true
|
82
|
+
@pb.install
|
83
|
+
end
|
84
|
+
it "should call after_install with the instance" do
|
85
|
+
@pb.should_receive(:after_install).with(@remote_instance).and_return true
|
86
|
+
@pb.install
|
87
|
+
end
|
88
|
+
end
|
89
|
+
describe "configuration" do
|
90
|
+
it "should have a configure method" do
|
91
|
+
@pb.respond_to?(:configure).should == true
|
92
|
+
end
|
93
|
+
it "should call error if it is not valid" do
|
94
|
+
@pb.stub!(:valid?).and_return false
|
95
|
+
lambda {@pb.configure}.should raise_error
|
96
|
+
end
|
97
|
+
it "should not raise an exception if it is valid" do
|
98
|
+
@pb.stub!(:valid?).and_return true
|
99
|
+
lambda {@pb.configure(true)}.should_not raise_error
|
100
|
+
end
|
101
|
+
it "should call before_configure with the instance" do
|
102
|
+
@pb.should_receive(:before_configure).with(@remote_instance).and_return true
|
103
|
+
@pb.configure
|
104
|
+
end
|
105
|
+
it "should call setup_runner" do
|
106
|
+
@pb.should_receive(:setup_runner).and_return true
|
107
|
+
@pb.configure
|
108
|
+
end
|
109
|
+
it "should call process_configure! with the testing" do
|
110
|
+
@pb.should_receive(:process_configure!).with(false).and_return true
|
111
|
+
@pb.configure
|
112
|
+
end
|
113
|
+
it "should call after_configure with the instance" do
|
114
|
+
@pb.should_receive(:after_configure).with(@remote_instance).and_return true
|
115
|
+
@pb.configure
|
116
|
+
end
|
117
|
+
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
require File.dirname(__FILE__) + '/../../../../lib/poolparty/spec/core/string'
|
3
|
+
|
4
|
+
describe "Spec strings" do
|
5
|
+
before(:each) do
|
6
|
+
@str=<<-EOE
|
7
|
+
exec { "install_passenger_script":
|
8
|
+
unless => 'test -f /etc/apache2/conf.d/passenger.conf',
|
9
|
+
path => '/usr/bin:/bin:/usr/local/bin:$PATH',
|
10
|
+
command => '/usr/bin/ruby /var/poolparty/install_passenger.rb'
|
11
|
+
}
|
12
|
+
service { "apache2":
|
13
|
+
require => Package['apache2'],
|
14
|
+
name => 'apache2',
|
15
|
+
ensure => 'running'
|
16
|
+
}
|
17
|
+
|
18
|
+
exec { "force-reload-apache2":
|
19
|
+
path => '/usr/bin:/bin:/usr/local/bin:$PATH',
|
20
|
+
command => '/etc/init.d/apache2 force-reload',
|
21
|
+
refreshonly => 'true'
|
22
|
+
}
|
23
|
+
EOE
|
24
|
+
end
|
25
|
+
it "should have the method grab_entry_for" do
|
26
|
+
"hi".respond_to?(:grab_entry_for).should == true
|
27
|
+
end
|
28
|
+
describe "grab_entry_for" do
|
29
|
+
it "should be able to grab the entry for the apache2 service" do
|
30
|
+
@str.grab_entry_for(:service, "apache2").gsub(/[\n\t ]+/, '').should == "service{\"apache2\":require=>Package['apache2'],name=>'apache2',ensure=>'running'}"
|
31
|
+
end
|
32
|
+
it "should be able to grab the entry for the install_passenger_script exec" do
|
33
|
+
@str.grab_entry_for(:exec, "install_passenger_script").gsub(/[\n\t ]+/, '').should == "exec{\"install_passenger_script\":unless=>'test-f/etc/apache2/conf.d/passenger.conf',path=>'/usr/bin:/bin:/usr/local/bin:$PATH',command=>'/usr/bin/ruby/var/poolparty/install_passenger.rb'}"
|
34
|
+
end
|
35
|
+
it "should return an empty string if there is no entry" do
|
36
|
+
@str.grab_entry_for(:pocket, "rangers").should == ""
|
37
|
+
end
|
38
|
+
end
|
39
|
+
describe "grab_key_value_for" do
|
40
|
+
it "should be able to say the service apache2 is set to ensure running" do
|
41
|
+
@str.grab_key_value_for(:service, "apache2", :ensure).should == "'running'"
|
42
|
+
end
|
43
|
+
it "should be able to say the exec force-reload-apache2 has the command '/etc/init.d/apache2 force-reload'" do
|
44
|
+
@str.grab_key_value_for(:exec, "force-reload-apache2", :command).should == "'/etc/init.d/apache2 force-reload'"
|
45
|
+
end
|
46
|
+
it "should be able to grab them with strings with quotes" do
|
47
|
+
"exec { \"a2enmod ssl\":
|
48
|
+
command => 'a2enmod ssl',
|
49
|
+
require => [ Package['apache2-common'], Package['openssl'] ],
|
50
|
+
path => '/usr/bin:/bin:/usr/local/bin:$PATH',
|
51
|
+
unless => '/usr/bin/test -L /etc/apache2/mods-enabled/ssl.load',
|
52
|
+
notify => Exec['restart-apache2']
|
53
|
+
}
|
54
|
+
".grab_key_value_for(:exec, "a2enmod ssl", :notify).should == "Exec['restart-apache2']"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -16,6 +16,24 @@ ENV["POOL_SPEC"] = nil
|
|
16
16
|
include PoolParty
|
17
17
|
extend PoolParty
|
18
18
|
|
19
|
+
def are_too_many_instances_running?
|
20
|
+
end
|
21
|
+
def are_any_nodes_exceeding_minimum_runtime?
|
22
|
+
end
|
23
|
+
def are_too_few_instances_running?
|
24
|
+
end
|
25
|
+
|
26
|
+
class TestClass < PoolParty::Cloud::Cloud
|
27
|
+
include CloudResourcer
|
28
|
+
attr_accessor :parent
|
29
|
+
def initialize(&block)
|
30
|
+
super :test_cloud, nil, &block
|
31
|
+
end
|
32
|
+
def keypair
|
33
|
+
"fake_keypair"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
19
37
|
def setup
|
20
38
|
PoolParty::Messenger.stub!(:messenger_send!).and_return false
|
21
39
|
end
|
@@ -51,7 +69,16 @@ def read_file(path)
|
|
51
69
|
require "open-uri"
|
52
70
|
open(path).read
|
53
71
|
end
|
72
|
+
def sample_instances_list
|
73
|
+
@sample_instances_lister ||= [
|
74
|
+
{:ip => "127.0.0.1", :name => "master", :launching_time => 2.days.ago},
|
75
|
+
{:ip => "127.0.0.2", :name => "node1", :launching_time => 2.days.ago}
|
76
|
+
]
|
77
|
+
end
|
54
78
|
|
79
|
+
def sample_instances
|
80
|
+
sample_instances_list.map {|h| PoolParty::Remote::RemoteInstance.new(h) }
|
81
|
+
end
|
55
82
|
def stub_list_from_local_for(o)
|
56
83
|
@list =<<-EOS
|
57
84
|
master 192.168.0.1
|
@@ -61,25 +88,38 @@ def stub_list_from_local_for(o)
|
|
61
88
|
@file.stub!(:read).and_return @list
|
62
89
|
o.stub!(:get_working_listing_file).and_return @file
|
63
90
|
o.stub!(:open).and_return @file
|
64
|
-
|
91
|
+
|
65
92
|
@ris = @list.split(/\n/).map {|line| PoolParty::Remote::RemoteInstance.new(line) }
|
66
93
|
end
|
67
94
|
def stub_remoter_for(o)
|
68
|
-
o.stub!(:ec2).and_return EC2::Base.new( :access_key_id => "not a key", :secret_access_key => "even more not a key")
|
95
|
+
o.stub!(:ec2).and_return EC2::Base.new( :access_key_id => "not a key", :secret_access_key => "even more not a key")
|
96
|
+
o.stub!(:list_of_running_instances).and_return sample_instances
|
69
97
|
end
|
70
98
|
def stub_list_from_remote_for(o, launch_stub=true)
|
71
99
|
stub_remoter_for(o)
|
72
|
-
@sample_instances_list = [{:ip => "127.0.0.1", :name => "master"}, {:ip => "127.0.0.2", :name => "node1"}]
|
73
|
-
@ris = @sample_instances_list.map {|h| PoolParty::Remote::RemoteInstance.new(h) }
|
74
100
|
o.stub!(:access_key).and_return "NOT A KEY"
|
75
101
|
o.stub!(:secret_access_key).and_return "NOT A SECRET"
|
76
102
|
# o.stub!(:list_from_remote).and_return ris
|
77
103
|
# o.stub!(:remote_instances_list).once.and_return ris
|
78
104
|
# o.stub!(:master).and_return @ris[0]
|
79
|
-
o.stub!(:launch_new_instance!).and_return
|
105
|
+
o.stub!(:launch_new_instance!).and_return sample_instances.first if launch_stub
|
80
106
|
stub_list_of_instances_for(o)
|
107
|
+
stub_remoting_methods_for(o)
|
108
|
+
end
|
109
|
+
def stub_remoting_methods_for(o)
|
110
|
+
o.stub!(:keypair).and_return "fake_keypair"
|
111
|
+
o.stub!(:keypair_path).and_return "~/.ec2/fake_keypair"
|
112
|
+
o.stub!(:other_clouds).and_return []
|
113
|
+
o.stub!(:expand_when).and_return "cpu > 10"
|
114
|
+
o.stub!(:copy_file_to_storage_directory).and_return true
|
115
|
+
o.stub!(:rsync_storage_files_to).and_return true
|
116
|
+
o.stub!(:minimum_runnable_options).and_return []
|
117
|
+
o.stub!(:build_and_store_new_config_file).and_return true
|
118
|
+
o.stub!(:process_clean_reconfigure_for!).and_return true
|
119
|
+
o.stub!(:before_install).and_return true
|
120
|
+
o.stub!(:process_install).and_return true
|
121
|
+
o.stub!(:after_install).and_return true
|
81
122
|
end
|
82
|
-
|
83
123
|
def stub_list_of_instances_for(o)
|
84
124
|
# o.stub!(:list_of_running_instances).once.and_return running_remote_instances
|
85
125
|
o.stub!(:keypair).and_return "fake_keypair"
|
@@ -109,7 +149,9 @@ end
|
|
109
149
|
def add_stub_instance_to(o, num, status="running")
|
110
150
|
reset_response!
|
111
151
|
response_list_of_instances << stub_instance(num, status)
|
152
|
+
sample_instances_list << stub_instance(num, status)
|
112
153
|
stub_list_of_instances_for o
|
154
|
+
stub_remoter_for(o)
|
113
155
|
end
|
114
156
|
def ris
|
115
157
|
@ris ||= response_list_of_instances.collect {|h| PoolParty::Remote::RemoteInstance.new(h) }
|
data/tasks/deployment.rake
CHANGED
@@ -10,9 +10,7 @@ end
|
|
10
10
|
# desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
|
11
11
|
# task :local_deploy => []
|
12
12
|
desc "Deploy the gem locally"
|
13
|
-
task :local_deploy => [:website_generate, :
|
14
|
-
sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
|
15
|
-
end
|
13
|
+
task :local_deploy => [:website_generate, :build_local_gem, :install_gem_no_doc]
|
16
14
|
|
17
15
|
task :check_version do
|
18
16
|
unless ENV['VERSION']
|
@@ -26,7 +24,7 @@ task :check_version do
|
|
26
24
|
end
|
27
25
|
|
28
26
|
desc 'Install the package as a gem, without generating documentation(ri/rdoc)'
|
29
|
-
task :install_gem_no_doc
|
27
|
+
task :install_gem_no_doc do
|
30
28
|
sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
|
31
29
|
end
|
32
30
|
|
@@ -36,7 +34,7 @@ str =<<-EOE
|
|
36
34
|
---
|
37
35
|
publish_on_announce: true
|
38
36
|
exclude: !ruby/regexp
|
39
|
-
/tmp$|\.git
|
37
|
+
/tmp$|\.git$|log$|local/.*\.rb$|Makefile|\.beam$/
|
40
38
|
EOE
|
41
39
|
hoerc_path = ::File.join( ENV["HOME"], ".hoerc" )
|
42
40
|
::File.open(hoerc_path, "w+") {|f| f << str } unless ::File.file?(hoerc_path)
|
data/tasks/spec.rake
CHANGED
@@ -4,14 +4,13 @@ require 'spec/rake/spectask'
|
|
4
4
|
task :default => :spec
|
5
5
|
|
6
6
|
Spec::Rake::SpecTask.new(:spec) do |t|
|
7
|
-
t.warning =
|
8
|
-
t.rcov = false
|
7
|
+
t.warning = t.rcov = false
|
9
8
|
t.spec_files = Dir["spec/**/*_spec.rb"]
|
10
9
|
end
|
11
10
|
|
12
11
|
Spec::Rake::SpecTask.new(:spec_v) do |t|
|
13
12
|
t.rcov = true
|
14
|
-
t.rcov_opts = ['--exclude', 'gems*,spec*']
|
13
|
+
t.rcov_opts = ['--exclude', 'gems*,spec*,website*,test*']
|
15
14
|
t.ruby_opts = []
|
16
15
|
t.spec_files = Dir["spec/**/*_spec.rb"]
|
17
16
|
end
|
data/website/index.html
CHANGED
@@ -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.
|
37
|
+
<a href="http://rubyforge.org/projects/poolparty" class="numbers">0.2.83</a>
|
38
38
|
</div>
|
39
39
|
<h1>‘Easy cloud computing’</h1>
|
40
40
|
<h2>What</h2>
|
@@ -96,7 +96,7 @@ rake install_gem</pre></p>
|
|
96
96
|
<h2>Contact</h2>
|
97
97
|
<p>Comments are welcome. Send an email to <a href="mailto:ari.lerner@citrusbyte.com">Ari Lerner</a> email via the <a href="http://groups.google.com/group/PoolParty">forum</a></p>
|
98
98
|
<p class="coda">
|
99
|
-
<a href="http://blog.citrusbyte.com">Ari Lerner</a> at <a href="http://citrusbyte.com">CitrusByte</a>,
|
99
|
+
<a href="http://blog.citrusbyte.com">Ari Lerner</a> at <a href="http://citrusbyte.com">CitrusByte</a>, 15th October 2008<br>
|
100
100
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
101
101
|
</p>
|
102
102
|
</div>
|