fairchild-poolparty 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.txt +0 -12
- data/Rakefile +17 -1
- data/VERSION.yml +1 -1
- data/bin/cloud +20 -1
- data/bin/cloud-bootstrap +14 -4
- data/bin/cloud-configure +26 -9
- data/bin/cloud-contract +7 -7
- data/bin/cloud-describe +28 -0
- data/bin/cloud-expand +13 -6
- data/bin/cloud-list +3 -5
- data/bin/cloud-osxcopy +1 -1
- data/bin/cloud-provision +1 -1
- data/bin/cloud-show +6 -5
- data/bin/cloud-ssh +1 -3
- data/bin/cloud-start +8 -6
- data/bin/cloud-terminate +9 -7
- data/bin/server-cloud-elections +29 -18
- data/bin/server-ensure-provisioning +24 -29
- data/bin/server-list-active +10 -5
- data/bin/server-monitor.ru +18 -1
- data/bin/server-update-hosts +3 -3
- data/bin/server-write-new-nodes +1 -1
- data/config/jeweler.rb +12 -3
- data/lib/poolparty/aska/aska.rb +1 -12
- data/lib/poolparty/base_packages/haproxy.rb +26 -18
- data/lib/poolparty/base_packages/poolparty.rb +1 -1
- data/lib/poolparty/capistrano.rb +1 -1
- data/lib/poolparty/core/array.rb +12 -0
- data/lib/poolparty/core/hash.rb +12 -5
- data/lib/poolparty/core/nil.rb +8 -0
- data/lib/poolparty/core/object.rb +15 -5
- data/lib/poolparty/core/string.rb +28 -2
- data/lib/poolparty/dependency_resolver/chef_resolver.rb +106 -79
- data/lib/poolparty/dependency_resolver/dependency_resolver.rb +1 -1
- data/lib/poolparty/dependency_resolver/dependency_resolver_cloud_extensions.rb +5 -4
- data/lib/poolparty/dependency_resolver/puppet_resolver.rb +44 -17
- data/lib/poolparty/helpers/console.rb +1 -1
- data/lib/poolparty/helpers/optioner.rb +9 -2
- data/lib/poolparty/lite.rb +12 -2
- data/lib/poolparty/modules/callbacks.rb +44 -0
- data/lib/poolparty/modules/cloud_dsl.rb +17 -11
- data/lib/poolparty/modules/cloud_resourcer.rb +29 -21
- data/lib/poolparty/modules/definable_resource.rb +1 -1
- data/lib/poolparty/modules/pinger.rb +28 -0
- data/lib/poolparty/modules/resourcing_dsl.rb +7 -3
- data/lib/poolparty/modules/thread_pool.rb +107 -106
- data/lib/poolparty/modules/user_helpers.rb +20 -0
- data/lib/poolparty/monitors/base_monitor.rb +32 -81
- data/lib/poolparty/monitors/monitor_rack.rb +60 -69
- data/lib/poolparty/monitors/monitors/favicon_monitor.rb +12 -0
- data/lib/poolparty/monitors/monitors/load_monitor.rb +9 -15
- data/lib/poolparty/monitors/monitors/memory_monitor.rb +48 -48
- data/lib/poolparty/monitors/monitors/neighborhood_monitor.rb +77 -0
- data/lib/poolparty/monitors/{stats_monitor.rb → monitors/stats_monitor.rb} +29 -24
- data/lib/poolparty/monitors/monitors/time_monitor.rb +15 -0
- data/lib/poolparty/net/messenger.rb +2 -0
- data/lib/poolparty/net/remoter/cloud_control.rb +177 -227
- data/lib/poolparty/net/remoter/connections.rb +10 -18
- data/lib/poolparty/net/remoter/interactive.rb +24 -90
- data/lib/poolparty/net/remoter_base.rb +98 -25
- data/lib/poolparty/net/remoter_bases/ec2/ec2.rb +83 -66
- data/lib/poolparty/net/remoter_bases/vmrun/utilities/vm_disk.rb +12 -0
- data/lib/poolparty/net/remoter_bases/vmrun/utilities/vmx.rb +33 -0
- data/lib/poolparty/net/remoter_bases/vmrun/utilities/vmx_file.rb +117 -0
- data/lib/poolparty/net/remoter_bases/vmrun/vmrun.rb +165 -0
- data/lib/poolparty/net/remoter_bases/vmrun/vmrun_instance.rb +71 -0
- data/lib/poolparty/{base_packages → plugins}/bind.rb +1 -1
- data/lib/poolparty/plugins/chef.rb +71 -71
- data/lib/poolparty/plugins/chef_deploy.rb +58 -0
- data/lib/poolparty/plugins/{deploydirectory.rb → deploy_directory.rb} +12 -3
- data/lib/poolparty/plugins/dynomite.rb +14 -0
- data/lib/poolparty/plugins/gem_package.rb +37 -0
- data/lib/poolparty/plugins/line_in_file.rb +1 -0
- data/lib/poolparty/plugins/nanite.rb +41 -0
- data/lib/poolparty/{base_packages → plugins}/tokyo_tyrant.rb +1 -1
- data/lib/poolparty/poolparty/cloud.rb +36 -35
- data/lib/poolparty/poolparty/default.rb +2 -11
- data/lib/poolparty/poolparty/key.rb +15 -12
- data/lib/poolparty/poolparty/neighborhoods.rb +54 -21
- data/lib/poolparty/poolparty/plugin.rb +6 -9
- data/lib/poolparty/poolparty/plugin_model.rb +5 -5
- data/lib/poolparty/poolparty/pool.rb +8 -4
- data/lib/poolparty/poolparty/poolparty_base_class.rb +20 -11
- data/lib/poolparty/poolparty/resource.rb +9 -5
- data/lib/poolparty/poolparty/service.rb +3 -1
- data/lib/poolparty/provision/boot_strapper.rb +47 -24
- data/lib/poolparty/provision/configurations/chef.rb +7 -4
- data/lib/poolparty/provision/dr_configure.rb +80 -25
- data/lib/poolparty/resources/cron.rb +8 -0
- data/lib/poolparty/resources/directory.rb +1 -1
- data/lib/poolparty/resources/file.rb +16 -0
- data/lib/poolparty/resources/package.rb +7 -2
- data/lib/poolparty/resources/service.rb +4 -3
- data/lib/poolparty/resources/symlink.rb +0 -8
- data/lib/poolparty/schema.rb +35 -20
- data/lib/poolparty/templates/haproxy.conf +27 -25
- data/lib/poolparty/templates/monitor.ru +3 -3
- data/lib/poolparty/verification/verifier_base.rb +17 -0
- data/lib/poolparty/verification/verifiers/ping.rb +17 -0
- data/lib/poolparty/verification/verify.rb +74 -0
- data/lib/poolparty.rb +8 -9
- data/lib/poolpartycl.rb +14 -0
- data/spec/bin/server-list-active_spec.rb +2 -0
- data/spec/poolparty/base_packages/haproxy_spec.rb +1 -1
- data/spec/poolparty/core/array_spec.rb +3 -1
- data/spec/poolparty/core/ordered_hash_spec.rb +2 -2
- data/spec/poolparty/dependency_resolver/chef_resolver_spec.rb +9 -15
- data/spec/poolparty/dependency_resolver/dependency_resolver_cloud_extensions_spec.rb +6 -6
- data/spec/poolparty/dependency_resolver/puppet_resolver_spec.rb +121 -124
- data/spec/poolparty/net/remote_spec.rb +287 -286
- data/spec/poolparty/net/remoter_bases/ec2_mocks_and_stubs.rb +1 -1
- data/spec/poolparty/net/remoter_bases/ec2_remote_instance_spec.rb +7 -8
- data/spec/poolparty/net/remoter_bases/ec2_spec.rb +22 -7
- data/spec/poolparty/net/remoter_spec.rb +48 -45
- data/spec/poolparty/poolparty/cloud_spec.rb +15 -22
- data/spec/poolparty/poolparty/key_spec.rb +4 -4
- data/spec/poolparty/poolparty/neighborhoods_spec.rb +1 -2
- data/spec/poolparty/poolparty/plugin_spec.rb +2 -2
- data/spec/poolparty/poolparty/resource_spec.rb +4 -5
- data/spec/poolparty/poolparty_base_class_spec.rb +82 -78
- data/spec/poolparty/resources/package_spec.rb +0 -3
- data/spec/poolparty/spec_helper.rb +4 -4
- data/tasks/development.rake +9 -0
- data/test/poolparty/core/array_test.rb +21 -0
- data/test/poolparty/core/hash_test.rb +14 -1
- data/test/poolparty/core/string_test.rb +29 -0
- data/test/poolparty/dependency_resolver/puppet_resolver_test.rb +106 -0
- data/test/poolparty/modules/callbacks_test.rb +40 -0
- data/test/poolparty/modules/cloud_dsl_test.rb +25 -0
- data/test/poolparty/net/remoter_bases/vmrun/vmrun_test.rb +50 -0
- data/test/poolparty/net/remoter_test.rb +14 -0
- data/test/poolparty/poolparty/neighborhood_test.rb +23 -0
- data/test/poolparty/poolparty/poolparty_base_class_test.rb +84 -0
- data/test/poolparty/verification/verify_test.rb +49 -0
- data/test/test_helper.rb +4 -1
- data/test/test_poolparty.rb +6 -5
- data/vendor/chef/apache2/attributes/apache.rb +1 -1
- data/vendor/chef/apache2/templates/default/default-site.erb +1 -1
- data/vendor/chef/chef-deploy/LICENSE +201 -0
- data/vendor/chef/chef-deploy/README.rdoc +24 -0
- data/vendor/chef/chef-deploy/Rakefile +57 -0
- data/vendor/chef/chef-deploy/TODO +4 -0
- data/vendor/chef/chef-deploy/lib/chef-deploy/cached_deploy.rb +230 -0
- data/vendor/chef/chef-deploy/lib/chef-deploy/git.rb +132 -0
- data/vendor/chef/chef-deploy/lib/chef-deploy/subversion.rb +98 -0
- data/vendor/chef/chef-deploy/lib/chef-deploy.rb +183 -0
- metadata +57 -252
- data/bin/cloud-run +0 -18
- data/bin/cloud-stats +0 -17
- data/bin/ec2-list-active +0 -24
- data/bin/pool +0 -31
- data/bin/pool-describe +0 -8
- data/bin/pool-generate +0 -18
- data/bin/pool-init +0 -28
- data/bin/pool-list +0 -30
- data/bin/pool-start +0 -26
- data/bin/server-list-instances +0 -15
- data/lib/erlang/messenger/Emakefile +0 -1
- data/lib/erlang/messenger/Makefile +0 -15
- data/lib/erlang/messenger/README +0 -5
- data/lib/erlang/messenger/Rakefile +0 -72
- data/lib/erlang/messenger/control +0 -11
- data/lib/erlang/messenger/ebin/client.app +0 -19
- data/lib/erlang/messenger/ebin/master.app +0 -19
- data/lib/erlang/messenger/ebin/node.app +0 -19
- data/lib/erlang/messenger/ebin/packager.app +0 -19
- data/lib/erlang/messenger/ebin/pm_client_rel-0.1.rel +0 -1
- data/lib/erlang/messenger/ebin/pm_master_rel-0.1.rel +0 -1
- data/lib/erlang/messenger/ebin/pm_node_rel-0.1.rel +0 -1
- data/lib/erlang/messenger/include/defines.hrl +0 -27
- data/lib/erlang/messenger/lib/eunit/AUTHORS +0 -2
- data/lib/erlang/messenger/lib/eunit/CHANGELOG +0 -14
- data/lib/erlang/messenger/lib/eunit/COPYING +0 -504
- data/lib/erlang/messenger/lib/eunit/Makefile +0 -28
- data/lib/erlang/messenger/lib/eunit/NOTES +0 -276
- data/lib/erlang/messenger/lib/eunit/README +0 -3
- data/lib/erlang/messenger/lib/eunit/doc/edoc-info +0 -3
- data/lib/erlang/messenger/lib/eunit/doc/erlang.png +0 -0
- data/lib/erlang/messenger/lib/eunit/doc/eunit.html +0 -172
- data/lib/erlang/messenger/lib/eunit/doc/index.html +0 -17
- data/lib/erlang/messenger/lib/eunit/doc/modules-frame.html +0 -12
- data/lib/erlang/messenger/lib/eunit/doc/overview-summary.html +0 -984
- data/lib/erlang/messenger/lib/eunit/doc/overview.edoc +0 -980
- data/lib/erlang/messenger/lib/eunit/doc/packages-frame.html +0 -11
- data/lib/erlang/messenger/lib/eunit/doc/stylesheet.css +0 -55
- 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.app +0 -21
- data/lib/erlang/messenger/lib/eunit/ebin/eunit.appup +0 -1
- 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/examples/eunit_examples.erl +0 -339
- data/lib/erlang/messenger/lib/eunit/examples/fib.erl +0 -19
- data/lib/erlang/messenger/lib/eunit/examples/tests.txt +0 -1
- data/lib/erlang/messenger/lib/eunit/include/eunit.hrl +0 -313
- data/lib/erlang/messenger/lib/eunit/src/Makefile +0 -46
- data/lib/erlang/messenger/lib/eunit/src/autoload.erl +0 -388
- data/lib/erlang/messenger/lib/eunit/src/code_monitor.erl +0 -243
- data/lib/erlang/messenger/lib/eunit/src/eunit.app.src +0 -21
- data/lib/erlang/messenger/lib/eunit/src/eunit.appup.src +0 -1
- data/lib/erlang/messenger/lib/eunit/src/eunit.erl +0 -196
- data/lib/erlang/messenger/lib/eunit/src/eunit_autoexport.erl +0 -102
- data/lib/erlang/messenger/lib/eunit/src/eunit_data.erl +0 -798
- data/lib/erlang/messenger/lib/eunit/src/eunit_internal.hrl +0 -48
- data/lib/erlang/messenger/lib/eunit/src/eunit_lib.erl +0 -682
- data/lib/erlang/messenger/lib/eunit/src/eunit_proc.erl +0 -552
- data/lib/erlang/messenger/lib/eunit/src/eunit_serial.erl +0 -157
- data/lib/erlang/messenger/lib/eunit/src/eunit_server.erl +0 -340
- data/lib/erlang/messenger/lib/eunit/src/eunit_striptests.erl +0 -64
- data/lib/erlang/messenger/lib/eunit/src/eunit_test.erl +0 -334
- data/lib/erlang/messenger/lib/eunit/src/eunit_tests.erl +0 -45
- data/lib/erlang/messenger/lib/eunit/src/eunit_tty.erl +0 -272
- data/lib/erlang/messenger/lib/eunit/src/file_monitor.erl +0 -409
- data/lib/erlang/messenger/lib/eunit/sys.config +0 -9
- data/lib/erlang/messenger/lib/eunit/vsn.mk +0 -1
- data/lib/erlang/messenger/pm_client_rel-0.1.boot +0 -0
- data/lib/erlang/messenger/pm_client_rel-0.1.script +0 -238
- data/lib/erlang/messenger/pm_master_rel-0.1.boot +0 -0
- data/lib/erlang/messenger/pm_master_rel-0.1.script +0 -239
- data/lib/erlang/messenger/pm_node_rel-0.1.boot +0 -0
- data/lib/erlang/messenger/pm_node_rel-0.1.script +0 -237
- data/lib/erlang/messenger/src/client_app.erl +0 -39
- data/lib/erlang/messenger/src/client_server.erl +0 -60
- data/lib/erlang/messenger/src/master_app.erl +0 -39
- data/lib/erlang/messenger/src/node_app.erl +0 -39
- data/lib/erlang/messenger/src/pm_client.erl +0 -49
- data/lib/erlang/messenger/src/pm_client_supervisor.erl +0 -38
- data/lib/erlang/messenger/src/pm_cluster.erl +0 -61
- data/lib/erlang/messenger/src/pm_event_manager.erl +0 -27
- data/lib/erlang/messenger/src/pm_master.erl +0 -215
- data/lib/erlang/messenger/src/pm_master_event_handler.erl +0 -72
- data/lib/erlang/messenger/src/pm_master_supervisor.erl +0 -39
- data/lib/erlang/messenger/src/pm_node.erl +0 -200
- data/lib/erlang/messenger/src/pm_node_supervisor.erl +0 -38
- data/lib/erlang/messenger/src/pm_packager.erl +0 -76
- data/lib/erlang/messenger/src/pm_spawner.erl +0 -213
- data/lib/erlang/messenger/src/pm_strings.erl +0 -11
- data/lib/erlang/messenger/src/utils.erl +0 -72
- data/lib/erlang/messenger/useful_snippets +0 -17
- data/lib/poolparty/monitors/monitors/server_monitor.rb +0 -7
- data/lib/poolparty/monitors/monitors/web_monitor.rb +0 -18
- data/lib/poolparty/monitors/neighborhood_monitor.rb +0 -24
- data/lib/poolparty/monitors.rb +0 -6
- data/lib/poolparty/net/remoter/lists.rb +0 -12
- data/lib/poolparty/poolparty/custom_resource.rb +0 -45
- data/lib/poolparty/resources/custom_service.rb +0 -30
- data/lib/poolparty/services/gem_package.rb +0 -52
- data/lib/poolparty/version.rb +0 -15
- data/spec/poolparty/plugins/svn_spec.rb +0 -16
- data/spec/poolparty/poolparty/custom_resource_spec.rb +0 -79
- data/vendor/gems/butterfly/History.txt +0 -4
- data/vendor/gems/butterfly/PostInstall.txt +0 -2
- data/vendor/gems/butterfly/README.rdoc +0 -48
- data/vendor/gems/butterfly/Rakefile +0 -62
- data/vendor/gems/butterfly/VERSION.yml +0 -4
- data/vendor/gems/butterfly/bin/flutter +0 -4
- data/vendor/gems/butterfly/butterfly.gemspec +0 -37
- data/vendor/gems/butterfly/examples/config.ru +0 -15
- data/vendor/gems/butterfly/examples/my_app.rb +0 -12
- data/vendor/gems/butterfly/lib/butterfly.rb +0 -14
- data/vendor/gems/butterfly/lib/handler.rb +0 -48
- data/vendor/gems/butterfly/lib/request.rb +0 -29
- data/vendor/gems/butterfly/lib/response.rb +0 -49
- data/vendor/gems/butterfly/script/console +0 -10
- data/vendor/gems/butterfly/script/destroy +0 -14
- data/vendor/gems/butterfly/script/generate +0 -14
- data/vendor/gems/butterfly/test/test_adapter_base.rb +0 -23
- data/vendor/gems/butterfly/test/test_butterfly_request.rb +0 -46
- data/vendor/gems/butterfly/test/test_butterfly_response.rb +0 -43
- data/vendor/gems/butterfly/test/test_butterfly_server.rb +0 -16
- data/vendor/gems/butterfly/test/test_default.rb +0 -12
- data/vendor/gems/butterfly/test/test_helper.rb +0 -6
- data/vendor/gems/dslify/History.txt +0 -4
- data/vendor/gems/dslify/Manifest.txt +0 -25
- data/vendor/gems/dslify/PostInstall.txt +0 -5
- data/vendor/gems/dslify/README.txt +0 -60
- data/vendor/gems/dslify/Rakefile +0 -56
- data/vendor/gems/dslify/config/hoe.rb +0 -73
- data/vendor/gems/dslify/config/requirements.rb +0 -15
- data/vendor/gems/dslify/dslify.gemspec +0 -40
- data/vendor/gems/dslify/lib/dslify/dslify.rb +0 -69
- data/vendor/gems/dslify/lib/dslify/version.rb +0 -10
- data/vendor/gems/dslify/lib/dslify.rb +0 -7
- data/vendor/gems/dslify/script/console +0 -10
- data/vendor/gems/dslify/script/destroy +0 -14
- data/vendor/gems/dslify/script/generate +0 -14
- data/vendor/gems/dslify/script/txt2html +0 -82
- data/vendor/gems/dslify/setup.rb +0 -1585
- data/vendor/gems/dslify/tasks/deployment.rake +0 -34
- data/vendor/gems/dslify/tasks/environment.rake +0 -7
- data/vendor/gems/dslify/tasks/website.rake +0 -17
- data/vendor/gems/dslify/test/test_dslify.rb +0 -114
- data/vendor/gems/dslify/website/index.html +0 -86
- data/vendor/gems/dslify/website/index.txt +0 -83
- data/vendor/gems/dslify/website/javascripts/rounded_corners_lite.inc.js +0 -285
- data/vendor/gems/dslify/website/stylesheets/screen.css +0 -138
- data/vendor/gems/dslify/website/template.html.erb +0 -48
- data/vendor/gems/parenting/History.txt +0 -4
- data/vendor/gems/parenting/Manifest.txt +0 -13
- data/vendor/gems/parenting/PostInstall.txt +0 -2
- data/vendor/gems/parenting/README.rdoc +0 -47
- data/vendor/gems/parenting/Rakefile +0 -28
- data/vendor/gems/parenting/lib/parenting/base.rb +0 -65
- data/vendor/gems/parenting/lib/parenting.rb +0 -10
- data/vendor/gems/parenting/parenting.gemspec +0 -39
- data/vendor/gems/parenting/script/console +0 -10
- data/vendor/gems/parenting/script/destroy +0 -14
- data/vendor/gems/parenting/script/generate +0 -14
- data/vendor/gems/parenting/test/file_to_eval.rb +0 -9
- data/vendor/gems/parenting/test/test_helper.rb +0 -5
- data/vendor/gems/parenting/test/test_parenting.rb +0 -89
- data/vendor/gems/suitcase/LICENSE +0 -20
- data/vendor/gems/suitcase/README.rdoc +0 -31
- data/vendor/gems/suitcase/Rakefile +0 -57
- data/vendor/gems/suitcase/VERSION.yml +0 -4
- data/vendor/gems/suitcase/lib/suitcase/unzipper.rb +0 -15
- data/vendor/gems/suitcase/lib/suitcase/zipper.rb +0 -119
- data/vendor/gems/suitcase/lib/suitcase.rb +0 -5
- data/vendor/gems/suitcase/suitcase.gemspec +0 -32
- data/vendor/gems/suitcase/test/suitcase_test.rb +0 -102
- data/vendor/gems/suitcase/test/test_dir/box.rb +0 -1
- data/vendor/gems/suitcase/test/test_dir/test.txt +0 -1
- data/vendor/gems/suitcase/test/test_helper.rb +0 -12
@@ -0,0 +1,106 @@
|
|
1
|
+
require "#{::File.dirname(__FILE__)}/../../test_helper"
|
2
|
+
|
3
|
+
class PuppetResolverSpec
|
4
|
+
plugin :apache do
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
class TestPuppetResolver < Test::Unit::TestCase
|
9
|
+
context "from a hash" do
|
10
|
+
setup do
|
11
|
+
reset!
|
12
|
+
@cloud_reference_hash = {
|
13
|
+
:options => {:name => "dog", :keypair => "bob", :users => ["ari", "michael"]},
|
14
|
+
:resources => [
|
15
|
+
{:name => "/etc/motd", :content => "Welcome to the cloud", :pp_type => "file"},
|
16
|
+
{:name => "/etc/profile", :content => "profile info", :pp_type => "file"},
|
17
|
+
{:name => "/var/www", :pp_type => "directory"}
|
18
|
+
],
|
19
|
+
:services => {
|
20
|
+
:apache => [{
|
21
|
+
:options => {:listen => "8080"},
|
22
|
+
:resources => [
|
23
|
+
{:name => "/etc/apache2/apache2.conf", :pp_type => "file", :template => "/absolute/path/to/template", :content => "rendered template string"}
|
24
|
+
],
|
25
|
+
:services => {}
|
26
|
+
}]
|
27
|
+
}
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
should "throw an exception if not given a hash" do
|
32
|
+
lambda { PoolParty::PuppetResolver.compile }.should raise_error
|
33
|
+
end
|
34
|
+
should "accept a hash" do
|
35
|
+
lambda { PoolParty::PuppetResolver.compile(@cloud_reference_hash)}.should_not raise_error
|
36
|
+
end
|
37
|
+
context "compiled" do
|
38
|
+
setup do
|
39
|
+
reset!
|
40
|
+
@dr = PuppetResolver.new(@cloud_reference_hash)
|
41
|
+
@compiled = @dr.compile
|
42
|
+
end
|
43
|
+
|
44
|
+
should "should print resources in the proper layout" do
|
45
|
+
@compiled.should =~ /file \{ "\/etc\/motd"/
|
46
|
+
end
|
47
|
+
|
48
|
+
should "should print apache into a class definition" do
|
49
|
+
# puts "<pre>#{@compiled.to_yaml}</pre>"
|
50
|
+
@compiled.should =~ /class apache \{/
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
context "with a cloud" do
|
56
|
+
setup do
|
57
|
+
reset!
|
58
|
+
@cloud = cloud :hope do
|
59
|
+
keypair "bob"
|
60
|
+
has_file :name => "/etc/motd", :content => "Welcome to the cloud"
|
61
|
+
has_file :name => "/etc/profile", :content => "profile info"
|
62
|
+
|
63
|
+
has_directory :name => "/var/www"
|
64
|
+
has_file :name => "/var/www/index.html", :content => "profile info", :requires => get_directory("/var/www")
|
65
|
+
|
66
|
+
dependency_resolver "puppet"
|
67
|
+
# has_package :name => "bash"
|
68
|
+
# parent == cloud
|
69
|
+
apache do
|
70
|
+
# parent == apache
|
71
|
+
listen "8080"
|
72
|
+
has_file :name => "/etc/apache2/apache2.conf", :template => "#{::File.dirname(__FILE__)}/../../fixtures/test_template.erb", :friends => "bob"
|
73
|
+
has_exec :command => "ls /etc/apache2"
|
74
|
+
end
|
75
|
+
|
76
|
+
case_of "hostname" do
|
77
|
+
when_is 'master' do
|
78
|
+
has_package :name=>'haproxy'
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
@properties = @cloud.to_properties_hash
|
83
|
+
|
84
|
+
# puts "<pre>#{@cloud_reference_hash.to_yaml}\n\n#{@properties}</pre>"
|
85
|
+
@dr = PuppetResolver.new(@properties)
|
86
|
+
@compiled = @dr.compile
|
87
|
+
end
|
88
|
+
should "should compile to a string" do
|
89
|
+
# puts "<pre>#{@compiled.to_yaml}</pre>"
|
90
|
+
@compiled.class.should == String
|
91
|
+
end
|
92
|
+
should "should include apache class" do
|
93
|
+
@compiled.should =~ /class apache \{/
|
94
|
+
end
|
95
|
+
should "should include the case statement" do
|
96
|
+
@compiled.should =~ /case \$hostname \{/
|
97
|
+
@compiled.should =~ /master : \{/
|
98
|
+
end
|
99
|
+
should "should require the file to have the directory (written as file)" do
|
100
|
+
@compiled.should =~ /require => File\[\"\/var\/www\"\]/
|
101
|
+
end
|
102
|
+
should "should ensure file" do
|
103
|
+
@compiled.should =~ /ensure => "present"/
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require "#{::File.dirname(__FILE__)}/../../test_helper"
|
2
|
+
|
3
|
+
class CallbacksTestClass
|
4
|
+
attr_reader :configured
|
5
|
+
include PoolParty::Callbacks
|
6
|
+
|
7
|
+
additional_callbacks ["after_boxes"]
|
8
|
+
|
9
|
+
def before_configure
|
10
|
+
@configured = true
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class TestCallbacks < Test::Unit::TestCase
|
15
|
+
context "methods" do
|
16
|
+
setup do
|
17
|
+
@tc = CallbacksTestClass.new
|
18
|
+
@tc.after_create
|
19
|
+
end
|
20
|
+
|
21
|
+
should "have the 4 basic callbacks" do
|
22
|
+
assert @tc.respond_to?(:call_before_bootstrap_callbacks)
|
23
|
+
assert @tc.respond_to?(:call_after_bootstrap_callbacks)
|
24
|
+
assert @tc.respond_to?(:call_before_configure_callbacks)
|
25
|
+
assert @tc.respond_to?(:call_after_configure_callbacks)
|
26
|
+
end
|
27
|
+
should "have an addiitonal callback caller method" do
|
28
|
+
assert @tc.respond_to?(:call_after_boxes_callbacks)
|
29
|
+
end
|
30
|
+
should "call the callback on the class when calling call_(\w+)_callbacks method" do
|
31
|
+
assert_nil @tc.configured
|
32
|
+
@tc.call_before_configure_callbacks
|
33
|
+
assert @tc.configured
|
34
|
+
end
|
35
|
+
should "not explode when the method does not exist on the call_(\w+)_callbacks method" do
|
36
|
+
lambda {@tc.call_after_boxes_callbacks}.should_not raise_error
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
@@ -29,5 +29,30 @@ class TestCloudDsl < Test::Unit::TestCase
|
|
29
29
|
@cloud.enabled?(:hyper_drive).should == false
|
30
30
|
end
|
31
31
|
end
|
32
|
+
context "calling add_optional_enabled_services" do
|
33
|
+
setup do
|
34
|
+
reset!
|
35
|
+
@cloud = cloud :test_cloud_dsl_2
|
36
|
+
@cloud.instance_eval "self.class.send :attr_reader, :brains"
|
37
|
+
@cloud.instance_eval "def box;@brains = 'pepper';end"
|
38
|
+
end
|
39
|
+
|
40
|
+
should "send @cloud the method box after it's been enabled" do
|
41
|
+
@cloud.enable :box
|
42
|
+
@cloud.add_optional_enabled_services
|
43
|
+
@cloud.brains.should == "pepper"
|
44
|
+
end
|
45
|
+
should "not call box if the method has not been enabled" do
|
46
|
+
@cloud.add_optional_enabled_services
|
47
|
+
@cloud.brains.should == nil
|
48
|
+
end
|
49
|
+
should "call haproxy when adding enabled serivces" do
|
50
|
+
@cloud.enable :haproxy
|
51
|
+
@cloud.add_optional_enabled_services
|
52
|
+
klasses = @cloud.plugin_store.map {|a| a.class.to_s.split("::")[-1] }
|
53
|
+
klasses.include?("HaproxyClass").should == true
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
32
57
|
|
33
58
|
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require "#{::File.dirname(__FILE__)}/../../../../test_helper"
|
2
|
+
|
3
|
+
class TestVmRun < Test::Unit::TestCase
|
4
|
+
context "registered as remote base" do
|
5
|
+
setup do
|
6
|
+
reset!
|
7
|
+
$vmx_keys = {
|
8
|
+
::File.expand_path("~/Documents/vm/Ubuntu32bitVM.vmwarevm/Ubuntu32bitVM.vmx") => "192.168.248.133"
|
9
|
+
}
|
10
|
+
$vmx_files = $vmx_keys.keys
|
11
|
+
$ipaddresses = $vmx_keys.values
|
12
|
+
|
13
|
+
@cloud = cloud :test_vm_runner do
|
14
|
+
|
15
|
+
using :vmrun do
|
16
|
+
vmx_hash $vmx_keys
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
should "be setting the type of remote_base as Vmrun" do
|
22
|
+
@cloud.remote_base.class.should == PoolParty::Remote::Vmrun
|
23
|
+
end
|
24
|
+
should "have the method vmrun as the remoter base" do
|
25
|
+
@cloud.vmrun.should == @cloud.remote_base
|
26
|
+
end
|
27
|
+
should "start vmware instance" do
|
28
|
+
@cloud.launch_instance!
|
29
|
+
assert @cloud.vmrun.describe_instances.first[:instance_id], $vmx_files.first
|
30
|
+
end
|
31
|
+
should "have the ip and mac address" do
|
32
|
+
@cloud.launch_instance!
|
33
|
+
|
34
|
+
vmx_file = @cloud.vmrun.describe_instances.first[:instance_id]
|
35
|
+
instance = @cloud.vmrun.describe_instance(:vmx_file => vmx_file)
|
36
|
+
|
37
|
+
assert !instance.mac_address.nil?
|
38
|
+
assert !instance.ip.nil?
|
39
|
+
end
|
40
|
+
should "be able to turn off the instance" do
|
41
|
+
@cloud.launch_instance!
|
42
|
+
@cloud.terminate_instance!
|
43
|
+
assert @cloud.describe_instances.empty?
|
44
|
+
end
|
45
|
+
after :all do
|
46
|
+
PoolParty::Remote::Vmrun.terminate!(@cloud)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require "#{::File.dirname(__FILE__)}/../../test_helper"
|
2
|
+
|
3
|
+
class TestNeighborhoods < Test::Unit::TestCase
|
4
|
+
context "Constant" do
|
5
|
+
should "have the constant Neighborhoods" do
|
6
|
+
PoolParty.const_get("Neighborhoods").should == PoolParty::Neighborhoods
|
7
|
+
end
|
8
|
+
end
|
9
|
+
context "setting up a neighborhood" do
|
10
|
+
should "set the schema when starting with a json string or a hash" do
|
11
|
+
n = Neighborhoods.new({:instances => "b"})
|
12
|
+
n.schema.nil?.should == false
|
13
|
+
n.schema.class.should == PoolParty::Schema
|
14
|
+
end
|
15
|
+
should "raise an error if there started with nil" do
|
16
|
+
lambda {Neighborhoods.new}.should raise_error
|
17
|
+
end
|
18
|
+
it "should not raise a fit if there ARE instances defined" do
|
19
|
+
lambda{Neighborhoods.new({:instances => ["10.0.0.1"]})}.should_not raise_error
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
require "#{::File.dirname(__FILE__)}/../../test_helper"
|
2
|
+
|
3
|
+
class TestBaseClass < PoolParty::PoolPartyBaseClass
|
4
|
+
end
|
5
|
+
|
6
|
+
class TestBaseClassTest < Test::Unit::TestCase
|
7
|
+
context "services" do
|
8
|
+
before(:each) do
|
9
|
+
reset!
|
10
|
+
@tbc = TestBaseClass.new do
|
11
|
+
has_git_repos :name => "test git", :at => "/var/www/google", :source => "git://pop.git"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
it "should add a service when a service is called" do
|
15
|
+
@tbc.services.size.should == 1
|
16
|
+
end
|
17
|
+
end
|
18
|
+
context "context_stack" do
|
19
|
+
before(:each) do
|
20
|
+
::PoolParty.reset!
|
21
|
+
@a = TestBaseClass.new
|
22
|
+
end
|
23
|
+
it "should have a context stack that is empty" do
|
24
|
+
@a.context_stack.empty?.should == true
|
25
|
+
end
|
26
|
+
it "should have a context_stack that is not empty when being evaluated" do
|
27
|
+
TestBaseClass.new do
|
28
|
+
context_stack.empty?.should == false
|
29
|
+
end
|
30
|
+
end
|
31
|
+
it "should have self in context_stack" do
|
32
|
+
TestBaseClass.new do
|
33
|
+
context_stack.last.should == self
|
34
|
+
end
|
35
|
+
end
|
36
|
+
it "should have the parent of self set in the context stack in the current_context" do
|
37
|
+
TestBaseClass.new do
|
38
|
+
current_context.last.should == parent
|
39
|
+
end
|
40
|
+
end
|
41
|
+
context "depth" do
|
42
|
+
before(:each) do
|
43
|
+
reset!
|
44
|
+
Proc.new do
|
45
|
+
@a = $a =TestBaseClass.new do
|
46
|
+
@@b = $b = TestBaseClass.new do
|
47
|
+
@@c = $c =TestBaseClass.new do
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end.call
|
52
|
+
end
|
53
|
+
it "should set the correct depth" do
|
54
|
+
@a.depth.should == 0
|
55
|
+
@@b.depth.should == 1
|
56
|
+
@@c.depth.should == 2
|
57
|
+
end
|
58
|
+
it "should have the parent set properly" do
|
59
|
+
# @a.parent.should == nil
|
60
|
+
@@c.parent.should == @@b
|
61
|
+
@@b.parent.should == @a
|
62
|
+
end
|
63
|
+
it "should have proper self" do
|
64
|
+
@a.this.should == $a.this
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
it "should have the parent set properly" do
|
69
|
+
@a = TestBaseClass.new do
|
70
|
+
@@b = TestBaseClass.new do
|
71
|
+
@@c = TestBaseClass.new do
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
@a.parent.should == nil
|
77
|
+
@@c.parent.should == @@b
|
78
|
+
@@b.parent.should == @a
|
79
|
+
|
80
|
+
@a.parent.should == nil
|
81
|
+
@@c.parent.should == @@b
|
82
|
+
@@b.parent.should == @a
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require "#{::File.dirname(__FILE__)}/../../test_helper"
|
2
|
+
|
3
|
+
module PoolParty
|
4
|
+
module Verifiers
|
5
|
+
class Ping < VerifierBase
|
6
|
+
attr_accessor :port, :checked
|
7
|
+
def initialize(port=80)
|
8
|
+
@port = port
|
9
|
+
end
|
10
|
+
def passing?
|
11
|
+
@checked
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
17
|
+
class TestVerificationClass
|
18
|
+
include PoolParty::Verification
|
19
|
+
|
20
|
+
attr_reader :port
|
21
|
+
def initialize(port=70, &block)
|
22
|
+
@port = port
|
23
|
+
instance_eval &block
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
class TestVerification < Test::Unit::TestCase
|
28
|
+
context "verification included" do
|
29
|
+
setup do
|
30
|
+
@vc = TestVerificationClass.new do
|
31
|
+
verify do
|
32
|
+
ping 80
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
should "have a the ping verifier as a verifiers in the class" do
|
37
|
+
@vc.verifiers.first.class.should == PoolParty::Verifiers::Ping
|
38
|
+
end
|
39
|
+
should "not explode when calling verify on the verifier" do
|
40
|
+
@vc.verifiers.first.checked = true
|
41
|
+
@vc.passing?.should == true
|
42
|
+
end
|
43
|
+
should "explode if the verification fails" do
|
44
|
+
@vc.verifiers.first.checked = false
|
45
|
+
lambda {@vc.passing?}.should raise_error
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
data/test/test_helper.rb
CHANGED
data/test/test_poolparty.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/test_helper.rb'
|
2
2
|
|
3
3
|
class TestPoolParty < Test::Unit::TestCase
|
4
|
-
|
5
|
-
|
4
|
+
context "helpers" do
|
5
|
+
|
6
|
+
should "include_user_directory" do
|
7
|
+
# FIXUP
|
8
|
+
assert false
|
9
|
+
end
|
6
10
|
end
|
7
11
|
|
8
|
-
def test_truth
|
9
|
-
assert true
|
10
|
-
end
|
11
12
|
end
|
@@ -47,7 +47,7 @@ end
|
|
47
47
|
###
|
48
48
|
|
49
49
|
# General settings
|
50
|
-
apache[:listen_ports] = [ "
|
50
|
+
apache[:listen_ports] = [ "8080" ] unless apache.has_key?(:listen_ports)
|
51
51
|
apache[:contact] = "ops@example.com" unless apache.has_key?(:contact)
|
52
52
|
apache[:timeout] = 300 unless apache.has_key?(:timeout)
|
53
53
|
apache[:keepalive] = "On" unless apache.has_key?(:keepalive)
|
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
@@ -0,0 +1,24 @@
|
|
1
|
+
== chef-deploy
|
2
|
+
|
3
|
+
A gem that provides resources and providers for deploying ruby web apps from chef recipes
|
4
|
+
|
5
|
+
|
6
|
+
Uses the same directory layout as capistrano and steals the git remote cached deploy strategy
|
7
|
+
from cap and adapts it to work without cap and under chef
|
8
|
+
|
9
|
+
deploy "/data/#{app}" do
|
10
|
+
repo "git://github.com/engineyard/rack-app.git"
|
11
|
+
branch "HEAD"
|
12
|
+
user "ez"
|
13
|
+
enable_submodules true
|
14
|
+
migrate true
|
15
|
+
migration_command "rake db:migrate"
|
16
|
+
environment "production"
|
17
|
+
shallow_clone true
|
18
|
+
revision '0xbeadbeef'
|
19
|
+
action :deploy # or :rollback
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
Currently only supports doing the cached git checkout, rsyncing it into place and doing the symlink dance.
|
24
|
+
Does not restart servers or have hooks(yet)
|