cuken 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +5 -3
- data/Gemfile.lock +61 -18
- data/LICENSE +13 -0
- data/NOTICE +3 -0
- data/Rakefile +3 -3
- data/VERSION +1 -1
- data/cucumber.yml +8 -0
- data/cuken.gemspec +397 -13
- data/examples/chef/features/support/env.rb +16 -0
- data/features/chef/cookbooks/cookbook.feature +14 -0
- data/features/chef/cookbooks/metadata.feature +40 -0
- data/features/chef/cookbooks/repo.feature +13 -0
- data/features/chef/knife.feature +140 -0
- data/features/chef/knife_steps.feature +19 -0
- data/features/command_steps.feature +68 -0
- data/features/commands.feature +5 -5
- data/features/common_steps.feature +13 -0
- data/features/data/Rakefile +38 -0
- data/features/data/apt/chef-integration-test-1.0/debian/changelog +5 -0
- data/features/data/apt/chef-integration-test-1.0/debian/compat +1 -0
- data/features/data/apt/chef-integration-test-1.0/debian/control +13 -0
- data/features/data/apt/chef-integration-test-1.0/debian/copyright +34 -0
- data/features/data/apt/chef-integration-test-1.0/debian/files +1 -0
- data/features/data/apt/chef-integration-test-1.0/debian/rules +13 -0
- data/features/data/apt/chef-integration-test-1.0/debian/source/format +1 -0
- data/features/data/apt/chef-integration-test-1.1/debian/changelog +11 -0
- data/features/data/apt/chef-integration-test-1.1/debian/compat +1 -0
- data/features/data/apt/chef-integration-test-1.1/debian/control +13 -0
- data/features/data/apt/chef-integration-test-1.1/debian/copyright +34 -0
- data/features/data/apt/chef-integration-test-1.1/debian/files +1 -0
- data/features/data/apt/chef-integration-test-1.1/debian/rules +13 -0
- data/features/data/apt/chef-integration-test-1.1/debian/source/format +1 -0
- data/features/data/apt/chef-integration-test_1.0-1_amd64.changes +22 -0
- data/features/data/apt/chef-integration-test_1.0-1_amd64.deb +0 -0
- data/features/data/apt/chef-integration-test_1.0.orig.tar.gz +0 -0
- data/features/data/apt/chef-integration-test_1.1-1_amd64.changes +22 -0
- data/features/data/apt/chef-integration-test_1.1-1_amd64.deb +0 -0
- data/features/data/apt/chef-integration-test_1.1.orig.tar.gz +0 -0
- data/features/data/apt/var/www/apt/conf/distributions +7 -0
- data/features/data/apt/var/www/apt/conf/incoming +4 -0
- data/features/data/apt/var/www/apt/conf/pulls +3 -0
- data/features/data/apt/var/www/apt/db/checksums.db +0 -0
- data/features/data/apt/var/www/apt/db/contents.cache.db +0 -0
- data/features/data/apt/var/www/apt/db/packages.db +0 -0
- data/features/data/apt/var/www/apt/db/references.db +0 -0
- data/features/data/apt/var/www/apt/db/release.caches.db +0 -0
- data/features/data/apt/var/www/apt/db/version +4 -0
- data/features/data/apt/var/www/apt/dists/sid/Release +19 -0
- data/features/data/apt/var/www/apt/dists/sid/main/binary-amd64/Packages +16 -0
- data/features/data/apt/var/www/apt/dists/sid/main/binary-amd64/Packages.gz +0 -0
- data/features/data/apt/var/www/apt/dists/sid/main/binary-amd64/Release +5 -0
- data/features/data/apt/var/www/apt/pool/main/c/chef-integration-test/chef-integration-test_1.0-1_amd64.deb +0 -0
- data/features/data/apt/var/www/apt/pool/main/c/chef-integration-test/chef-integration-test_1.1-1_amd64.deb +0 -0
- data/features/data/config/client.rb +23 -0
- data/features/data/config/client_with_checksum_caching.rb +23 -0
- data/features/data/config/knife-stephen.rb +12 -0
- data/features/data/config/knife.rb +11 -0
- data/features/data/config/rake.rb +57 -0
- data/features/data/config/server.rb +52 -0
- data/features/data/cookbook_tarballs/empty_tarball.tar.gz +0 -0
- data/features/data/cookbook_tarballs/new.tar.gz +0 -0
- data/features/data/cookbook_tarballs/not_a_tarball.txt +1 -0
- data/features/data/cookbook_tarballs/original.tar.gz +0 -0
- data/features/data/cookbooks/attribute_include/README.rdoc +8 -0
- data/features/data/cookbooks/attribute_include/attributes/a.rb +4 -0
- data/features/data/cookbooks/attribute_include/attributes/b.rb +2 -0
- data/features/data/cookbooks/attribute_include/metadata.rb +6 -0
- data/features/data/cookbooks/attribute_include/recipes/default.rb +23 -0
- data/features/data/cookbooks/attribute_include_default/README.rdoc +8 -0
- data/features/data/cookbooks/attribute_include_default/attributes/a.rb +5 -0
- data/features/data/cookbooks/attribute_include_default/attributes/default.rb +2 -0
- data/features/data/cookbooks/attribute_include_default/metadata.rb +6 -0
- data/features/data/cookbooks/attribute_include_default/recipes/default.rb +23 -0
- data/features/data/cookbooks/attribute_settings/README.rdoc +8 -0
- data/features/data/cookbooks/attribute_settings/attributes/default.rb +3 -0
- data/features/data/cookbooks/attribute_settings/default.rb +1 -0
- data/features/data/cookbooks/attribute_settings/metadata.rb +6 -0
- data/features/data/cookbooks/attribute_settings/recipes/default.rb +21 -0
- data/features/data/cookbooks/attribute_settings/recipes/default_in_recipe.rb +25 -0
- data/features/data/cookbooks/attribute_settings_normal/README.rdoc +8 -0
- data/features/data/cookbooks/attribute_settings_normal/attributes/.default.rb.swo +0 -0
- data/features/data/cookbooks/attribute_settings_normal/attributes/default.rb +2 -0
- data/features/data/cookbooks/attribute_settings_normal/default.rb +1 -0
- data/features/data/cookbooks/attribute_settings_normal/metadata.rb +6 -0
- data/features/data/cookbooks/attribute_settings_normal/recipes/.default.rb.swo +0 -0
- data/features/data/cookbooks/attribute_settings_normal/recipes/.default_in_recipe.rb.swo +0 -0
- data/features/data/cookbooks/attribute_settings_normal/recipes/default.rb +21 -0
- data/features/data/cookbooks/attribute_settings_normal/recipes/normal_in_recipe.rb +25 -0
- data/features/data/cookbooks/attribute_settings_override/README.rdoc +8 -0
- data/features/data/cookbooks/attribute_settings_override/attributes/default.rb +2 -0
- data/features/data/cookbooks/attribute_settings_override/default.rb +1 -0
- data/features/data/cookbooks/attribute_settings_override/metadata.rb +6 -0
- data/features/data/cookbooks/attribute_settings_override/recipes/default.rb +21 -0
- data/features/data/cookbooks/attribute_settings_override/recipes/normal_in_recipe.rb +25 -0
- data/features/data/cookbooks/attribute_settings_override/recipes/override_in_recipe.rb +21 -0
- data/features/data/cookbooks/delayed_notifications/recipes/bad_syntax_notifies.rb +14 -0
- data/features/data/cookbooks/delayed_notifications/recipes/default.rb +18 -0
- data/features/data/cookbooks/delayed_notifications/recipes/forward_references.rb +10 -0
- data/features/data/cookbooks/delayed_notifications/recipes/invalid_forward_reference.rb +16 -0
- data/features/data/cookbooks/delayed_notifications/recipes/notify_a_resource_from_a_single_source.rb +26 -0
- data/features/data/cookbooks/delayed_notifications/recipes/notify_a_resource_from_multiple_sources.rb +31 -0
- data/features/data/cookbooks/delayed_notifications/recipes/notify_different_resources_for_different_actions.rb +31 -0
- data/features/data/cookbooks/deploy/recipes/callbacks.rb +78 -0
- data/features/data/cookbooks/deploy/recipes/default.rb +51 -0
- data/features/data/cookbooks/deploy/recipes/deploy_commit1.rb +25 -0
- data/features/data/cookbooks/deploy/recipes/deploy_commit2.rb +25 -0
- data/features/data/cookbooks/deploy/recipes/embedded_recipe_callbacks.rb +70 -0
- data/features/data/cookbooks/deploy/recipes/revision_deploy.rb +51 -0
- data/features/data/cookbooks/deploy/recipes/rollback_commit2.rb +24 -0
- data/features/data/cookbooks/deploy/templates/default/app_config.yml.erb +23 -0
- data/features/data/cookbooks/deploy/templates/default/database.yml.erb +18 -0
- data/features/data/cookbooks/deploy/templates/default/embedded_recipe_before_symlink.rb.erb +4 -0
- data/features/data/cookbooks/deploy/templates/default/sneaky_after_restart_hook.rb.erb +4 -0
- data/features/data/cookbooks/deploy/templates/default/sneaky_before_migrate_hook.rb.erb +2 -0
- data/features/data/cookbooks/deploy/templates/default/sneaky_before_restart_hook.rb.erb +4 -0
- data/features/data/cookbooks/deploy/templates/default/sneaky_before_symlink_hook.rb.erb +2 -0
- data/features/data/cookbooks/directory_provider/recipes/create.rb +25 -0
- data/features/data/cookbooks/directory_provider/recipes/default.rb +18 -0
- data/features/data/cookbooks/directory_provider/recipes/delete.rb +29 -0
- data/features/data/cookbooks/directory_provider/recipes/delete_nonexistent.rb +23 -0
- data/features/data/cookbooks/directory_provider/recipes/owner_update.rb +31 -0
- data/features/data/cookbooks/directory_provider/recipes/set_the_accessibility_of_a_created_directory.rb +55 -0
- data/features/data/cookbooks/execute_commands/metadata.rb +5 -0
- data/features/data/cookbooks/execute_commands/recipes/4k.rb +25 -0
- data/features/data/cookbooks/execute_commands/recipes/debug.rb +22 -0
- data/features/data/cookbooks/execute_commands/recipes/default.rb +22 -0
- data/features/data/cookbooks/execute_commands/recipes/umask.rb +23 -0
- data/features/data/cookbooks/integration_setup/attributes/integration.rb +25 -0
- data/features/data/cookbooks/integration_setup/recipes/default.rb +24 -0
- data/features/data/cookbooks/lwrp/providers/default.rb +9 -0
- data/features/data/cookbooks/lwrp/providers/lwp_non_default.rb +3 -0
- data/features/data/cookbooks/lwrp/providers/lwp_overridden_load_current_resource.rb +8 -0
- data/features/data/cookbooks/lwrp/providers/provider_is_omitted.rb +3 -0
- data/features/data/cookbooks/lwrp/recipes/default_everything.rb +4 -0
- data/features/data/cookbooks/lwrp/recipes/non_default_provider.rb +6 -0
- data/features/data/cookbooks/lwrp/recipes/non_default_resource.rb +6 -0
- data/features/data/cookbooks/lwrp/recipes/overridden_provider_load_current_resource.rb +6 -0
- data/features/data/cookbooks/lwrp/recipes/overridden_resource_initialize.rb +6 -0
- data/features/data/cookbooks/lwrp/recipes/provider_invokes_resource.rb +6 -0
- data/features/data/cookbooks/lwrp/recipes/provider_is_a_class.rb +6 -0
- data/features/data/cookbooks/lwrp/recipes/provider_is_a_string.rb +6 -0
- data/features/data/cookbooks/lwrp/recipes/provider_is_a_symbol.rb +6 -0
- data/features/data/cookbooks/lwrp/recipes/provider_is_omitted.rb +3 -0
- data/features/data/cookbooks/lwrp/resources/default.rb +4 -0
- data/features/data/cookbooks/lwrp/resources/lwr_non_default.rb +3 -0
- data/features/data/cookbooks/lwrp/resources/lwr_overridden_initialize.rb +8 -0
- data/features/data/cookbooks/lwrp/resources/provider_is_omitted.rb +1 -0
- data/features/data/cookbooks/manage_files/recipes/create_a_file.rb +22 -0
- data/features/data/cookbooks/manage_files/recipes/default.rb +19 -0
- data/features/data/cookbooks/manage_files/recipes/delete_a_file.rb +24 -0
- data/features/data/cookbooks/manage_files/recipes/delete_a_file_that_does_not_already_exist.rb +22 -0
- data/features/data/cookbooks/manage_files/recipes/manage_file_contents.rb +23 -0
- data/features/data/cookbooks/manage_files/recipes/set_the_accessibility_of_a_created_file.rb +79 -0
- data/features/data/cookbooks/manage_files/recipes/set_the_owner_of_a_created_file.rb +23 -0
- data/features/data/cookbooks/manage_files/recipes/touch_a_file.rb +22 -0
- data/features/data/cookbooks/metadata/metadata.rb +17 -0
- data/features/data/cookbooks/metadata/recipes/default.rb +18 -0
- data/features/data/cookbooks/no_attributes/README.rdoc +8 -0
- data/features/data/cookbooks/no_attributes/metadata.rb +6 -0
- data/features/data/cookbooks/no_attributes/recipes/default.rb +21 -0
- data/features/data/cookbooks/node_cookbook_sync/README.rdoc +8 -0
- data/features/data/cookbooks/node_cookbook_sync/attributes/attr_file.rb +0 -0
- data/features/data/cookbooks/node_cookbook_sync/definitions/def_file.rb +0 -0
- data/features/data/cookbooks/node_cookbook_sync/libraries/lib_file.rb +0 -0
- data/features/data/cookbooks/node_cookbook_sync/metadata.rb +6 -0
- data/features/data/cookbooks/node_cookbook_sync/recipes/default.rb +18 -0
- data/features/data/cookbooks/packages/recipes/default.rb +0 -0
- data/features/data/cookbooks/packages/recipes/gem_package.rb +26 -0
- data/features/data/cookbooks/packages/recipes/install_apt_package.rb +3 -0
- data/features/data/cookbooks/packages/recipes/install_dpkg_package.rb +4 -0
- data/features/data/cookbooks/packages/recipes/install_gem_noshell.rb +26 -0
- data/features/data/cookbooks/packages/recipes/install_gem_package_twice.rb +26 -0
- data/features/data/cookbooks/packages/recipes/macports_install_bad_package.rb +3 -0
- data/features/data/cookbooks/packages/recipes/macports_install_yydecode.rb +3 -0
- data/features/data/cookbooks/packages/recipes/macports_purge_yydecode.rb +3 -0
- data/features/data/cookbooks/packages/recipes/macports_remove_yydecode.rb +3 -0
- data/features/data/cookbooks/packages/recipes/macports_upgrade_yydecode.rb +7 -0
- data/features/data/cookbooks/packages/recipes/manually_upgrade_gem_package.rb +32 -0
- data/features/data/cookbooks/packages/recipes/upgrade_gem_noshell.rb +33 -0
- data/features/data/cookbooks/packages/recipes/upgrade_gem_package.rb +33 -0
- data/features/data/cookbooks/recipe_include/README.rdoc +8 -0
- data/features/data/cookbooks/recipe_include/metadata.rb +6 -0
- data/features/data/cookbooks/recipe_include/recipes/default.rb +21 -0
- data/features/data/cookbooks/recipe_include/recipes/second.rb +23 -0
- data/features/data/cookbooks/roles/recipes/default.rb +26 -0
- data/features/data/cookbooks/roles/recipes/env_test.rb +25 -0
- data/features/data/cookbooks/run_interval/recipes/default.rb +27 -0
- data/features/data/cookbooks/scm/metadata.rb +8 -0
- data/features/data/cookbooks/scm/recipes/git.rb +25 -0
- data/features/data/cookbooks/search/attributes/search_attrs.rb +1 -0
- data/features/data/cookbooks/search/recipes/default.rb +18 -0
- data/features/data/cookbooks/search/recipes/search_data.rb +28 -0
- data/features/data/cookbooks/search/recipes/search_data_manual.rb +33 -0
- data/features/data/cookbooks/search/recipes/search_data_noblock.rb +32 -0
- data/features/data/cookbooks/show_cookbook/README.rdoc +8 -0
- data/features/data/cookbooks/show_cookbook/attributes/attr_file.rb +0 -0
- data/features/data/cookbooks/show_cookbook/definitions/def_file.rb +0 -0
- data/features/data/cookbooks/show_cookbook/files/default/prime_time.txt +0 -0
- data/features/data/cookbooks/show_cookbook/files/host-latte/prime_time.txt +0 -0
- data/features/data/cookbooks/show_cookbook/files/mac_os_x-10.5/prime_time.txt +0 -0
- data/features/data/cookbooks/show_cookbook/files/mac_os_x/prime_time.txt +0 -0
- data/features/data/cookbooks/show_cookbook/libraries/lib_file.rb +0 -0
- data/features/data/cookbooks/show_cookbook/metadata.rb +6 -0
- data/features/data/cookbooks/show_cookbook/recipes/default.rb +18 -0
- data/features/data/cookbooks/show_cookbook/templates/default/prime_time.txt.erb +0 -0
- data/features/data/cookbooks/show_cookbook/templates/host-latte/prime_time.txt.erb +0 -0
- data/features/data/cookbooks/show_cookbook/templates/mac_os_x-10.5/prime_time.txt.erb +0 -0
- data/features/data/cookbooks/show_cookbook/templates/mac_os_x/prime_time.txt.erb +0 -0
- data/features/data/cookbooks/synchronize/recipes/default.rb +18 -0
- data/features/data/cookbooks/synchronize_deps/metadata.json +30 -0
- data/features/data/cookbooks/synchronize_deps/metadata.rb +1 -0
- data/features/data/cookbooks/synchronize_deps/recipes/default.rb +18 -0
- data/features/data/cookbooks/template/README.rdoc +8 -0
- data/features/data/cookbooks/template/metadata.rb +6 -0
- data/features/data/cookbooks/template/recipes/default.rb +26 -0
- data/features/data/cookbooks/template/recipes/interval.rb +37 -0
- data/features/data/cookbooks/template/recipes/render_node_attrs.rb +26 -0
- data/features/data/cookbooks/template/templates/default/node.txt.erb +3 -0
- data/features/data/cookbooks/template/templates/default/template.txt.erb +1 -0
- data/features/data/cookbooks/transfer_remote_directories/files/default/transfer_directory_feature/bar.txt +1 -0
- data/features/data/cookbooks/transfer_remote_directories/files/default/transfer_directory_feature/baz.txt +1 -0
- data/features/data/cookbooks/transfer_remote_directories/files/default/transfer_directory_feature/foo.txt +1 -0
- data/features/data/cookbooks/transfer_remote_directories/recipes/transfer_directory.rb +29 -0
- data/features/data/cookbooks/transfer_remote_files/files/default/transfer_a_file_from_a_cookbook.txt +1 -0
- data/features/data/cookbooks/transfer_remote_files/metadata.json +30 -0
- data/features/data/cookbooks/transfer_remote_files/metadata.rb +1 -0
- data/features/data/cookbooks/transfer_remote_files/recipes/change_remote_file_perms_trickery.rb +33 -0
- data/features/data/cookbooks/transfer_remote_files/recipes/default.rb +18 -0
- data/features/data/cookbooks/transfer_remote_files/recipes/should_prefer_the_file_for_this_specific_host.rb +22 -0
- data/features/data/cookbooks/transfer_remote_files/recipes/transfer_a_file_from_a_cookbook.rb +22 -0
- data/features/data/cookbooks/transfer_remote_files/recipes/transfer_a_file_from_a_specific_cookbook.rb +20 -0
- data/features/data/cookbooks/transfer_remote_files/recipes/transfer_a_non-existent_file_from_a_cookbook.rb +22 -0
- data/features/data/cookbooks/transfer_remote_files_definition/definitions/transfer.rb +6 -0
- data/features/data/cookbooks/transfer_remote_files_definition/files/default/easy.txt +1 -0
- data/features/data/cookbooks/transfer_some_cookbook_files/files/default/should_be_transferred.txt +3 -0
- data/features/data/cookbooks/transfer_some_cookbook_files/files/default/should_not_be_transferred.txt +2 -0
- data/features/data/cookbooks/transfer_some_cookbook_files/recipes/default.rb +26 -0
- data/features/data/cookbooks/transfer_some_cookbook_files/templates/default/should_be_transferred.erb +2 -0
- data/features/data/cookbooks/transfer_some_cookbook_files/templates/default/should_not_be_transferred.erb +3 -0
- data/features/data/cookbooks/version_deps/metadata.rb +1 -0
- data/features/data/cookbooks/version_deps/recipes/default.rb +1 -0
- data/features/data/cookbooks/versions/metadata.rb +5 -0
- data/features/data/cookbooks/versions/recipes/default.rb +5 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_a_1.0.0/metadata.json +31 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_a_1.0.0/metadata.rb +8 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_a_1.0.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_a_2.0.0/metadata.json +29 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_a_2.0.0/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_a_2.0.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_a_3.0.0/metadata.json +30 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_a_3.0.0/metadata.rb +7 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_a_3.0.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_b_1.0.0/metadata.json +31 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_b_1.0.0/metadata.rb +8 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_b_1.0.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_b_2.0.0/metadata.json +31 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_b_2.0.0/metadata.rb +8 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_b_2.0.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_b_3.0.0/metadata.json +30 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_b_3.0.0/metadata.rb +7 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_b_3.0.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_c_1.0.0/metadata.json +31 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_c_1.0.0/metadata.rb +8 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_c_1.0.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_c_2.0.0/metadata.json +29 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_c_2.0.0/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_c_2.0.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_c_3.0.0/metadata.json +29 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_c_3.0.0/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_c_3.0.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/test_cookbook/attributes/attr1.rb +1 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/test_cookbook/attributes/attr2.rb +1 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/test_cookbook/recipes/default.rb +2 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_invalid_empty_except_metadata/metadata.json +38 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_invalid_empty_except_metadata/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_invalid_nometadata/attributes/attributes.rb +1 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_invalid_nometadata/recipes/default.rb +2 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid/attributes/attributes.rb +1 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid/metadata.json +38 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid/recipes/default.rb +2 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid_v0.1.0_with_different_dependencies/attributes/attributes.rb +1 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid_v0.1.0_with_different_dependencies/metadata.json +40 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid_v0.1.0_with_different_dependencies/metadata.rb +7 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid_v0.1.0_with_different_dependencies/recipes/default.rb +2 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid_v0.2.0/attributes/attributes.rb +1 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid_v0.2.0/metadata.json +38 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid_v0.2.0/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid_v0.2.0/recipes/default.rb +2 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_wrong_metadata/metadata.json +40 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_wrong_metadata/recipes/default.rb +1 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.0/metadata.json +39 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.0/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.1/metadata.json +39 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.1/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.1/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.10.0/metadata.json +39 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.10.0/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.10.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.2.0/metadata.json +39 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.2.0/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.2.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.9.0/metadata.json +39 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.9.0/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.9.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.9.7/metadata.json +39 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.9.7/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.9.7/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_updated/attributes/attributes.rb +1 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_updated/metadata.json +29 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_updated/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_updated/recipes/default.rb +2 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/versions/metadata.json +38 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/versions/metadata.rb +5 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/versions/recipes/default.rb +5 -0
- data/features/data/gems/Marshal.4.8 +0 -0
- data/features/data/gems/Marshal.4.8.Z +0 -0
- data/features/data/gems/latest_specs.4.8 +0 -0
- data/features/data/gems/latest_specs.4.8.gz +0 -0
- data/features/data/gems/prerelease_specs.4.8 +0 -0
- data/features/data/gems/prerelease_specs.4.8.gz +0 -0
- data/features/data/gems/quick/Marshal.4.8/chef-integration-test-0.1.0.gemspec.rz +0 -0
- data/features/data/gems/quick/Marshal.4.8/chef-integration-test-0.1.1.gemspec.rz +0 -0
- data/features/data/gems/quick/chef-integration-test-0.1.0.gemspec.rz +0 -0
- data/features/data/gems/quick/chef-integration-test-0.1.1.gemspec.rz +0 -0
- data/features/data/gems/quick/index +2 -0
- data/features/data/gems/quick/index.rz +0 -0
- data/features/data/gems/quick/latest_index +1 -0
- data/features/data/gems/quick/latest_index.rz +0 -0
- data/features/data/gems/specs.4.8 +0 -0
- data/features/data/gems/specs.4.8.gz +0 -0
- data/features/data/gems/yaml +122 -0
- data/features/data/gems/yaml.Z +0 -0
- data/features/data/json_attribs/attribute_settings.json +3 -0
- data/features/data/json_attribs/json_runlist_and_attrs.json +4 -0
- data/features/data/myapp.bundle +0 -0
- data/features/data/node-load-test.rb +84 -0
- data/features/data/node-simple.rb +18 -0
- data/features/data/repositories/chef-repo/.gitignore +2 -0
- data/features/data/repositories/chef-repo/README.md +66 -0
- data/features/data/repositories/chef-repo/Rakefile +65 -0
- data/features/data/repositories/chef-repo/certificates/README.md +19 -0
- data/features/data/repositories/chef-repo/config/rake.rb +38 -0
- data/features/data/repositories/chef-repo/cookbooks/README.md +53 -0
- data/features/data/repositories/chef-repo/data_bags/README.md +23 -0
- data/features/data/repositories/chef-repo/roles/README.md +16 -0
- data/features/data/repositories/cookbooks/hosts/attributes/hosts.rb +1 -0
- data/features/data/repositories/cookbooks/hosts/cc.gemspec +36 -0
- data/features/data/repositories/cookbooks/hosts/metadata.json +41 -0
- data/features/data/repositories/cookbooks/hosts/metadata.rb +4 -0
- data/features/data/repositories/cookbooks/hosts/recipes/default.rb +6 -0
- data/features/data/repositories/cookbooks/hosts/templates/default/hosts.erb +27 -0
- data/features/data/search-tests/do_knife_search_test.rb +175 -0
- data/features/data/search-tests/search-test-nodes.rb +174 -0
- data/features/data/test_git_repo.tar.gz +0 -0
- data/features/file_steps.feature +70 -0
- data/features/files.feature +30 -16
- data/features/ssh.feature +2 -1
- data/features/ssh_steps.feature +20 -0
- data/features/step_definitions/cuken_steps.rb +10 -0
- data/features/support/env.rb +1 -0
- data/lib/cuken/api/chef.rb +115 -0
- data/lib/cuken/api/chef/common.rb +80 -0
- data/lib/cuken/api/file.rb +23 -3
- data/lib/cuken/chef.rb +3 -0
- data/lib/cuken/common.rb +0 -1
- data/lib/cuken/cucumber/chef.rb +16 -0
- data/lib/cuken/cucumber/chef/common.rb +68 -0
- data/lib/cuken/cucumber/chef/cookbook.rb +75 -0
- data/lib/cuken/cucumber/chef/cookbook_steps.rb +406 -0
- data/lib/cuken/cucumber/chef/deploy_steps.rb +84 -0
- data/lib/cuken/cucumber/chef/done_directory_steps.rb +41 -0
- data/lib/cuken/cucumber/chef/done_file_steps.rb +107 -0
- data/lib/cuken/cucumber/chef/done_knife_steps.rb +34 -0
- data/lib/cuken/cucumber/chef/fixture_steps.rb +413 -0
- data/lib/cuken/cucumber/chef/knife.rb +34 -0
- data/lib/cuken/cucumber/chef/node.rb +27 -0
- data/lib/cuken/cucumber/chef/node_steps.rb +88 -0
- data/lib/cuken/cucumber/chef/packages.rb +144 -0
- data/lib/cuken/cucumber/chef/pending_steps.rb +21 -0
- data/lib/cuken/cucumber/chef/recipe_steps.rb +23 -0
- data/lib/cuken/cucumber/chef/request_steps.rb +98 -0
- data/lib/cuken/cucumber/chef/response_steps.rb +233 -0
- data/lib/cuken/cucumber/chef/result_steps.rb +15 -0
- data/lib/cuken/cucumber/chef/run_client_steps.rb +260 -0
- data/lib/cuken/cucumber/chef/run_solo.rb +78 -0
- data/lib/cuken/cucumber/chef/sandbox_steps.rb +137 -0
- data/lib/cuken/cucumber/chef/search_steps.rb +70 -0
- data/lib/cuken/cucumber/chef/webrat_steps.rb +39 -0
- data/lib/cuken/cucumber/cmd.rb +18 -1
- data/lib/cuken/cucumber/common.rb +4 -0
- data/lib/cuken/cucumber/file.rb +25 -27
- data/lib/cuken/cucumber/ssh.rb +6 -6
- metadata +427 -27
- data/LICENSE.txt +0 -20
@@ -0,0 +1,38 @@
|
|
1
|
+
{
|
2
|
+
"license": "Apache 2.0",
|
3
|
+
"replacing": {
|
4
|
+
|
5
|
+
},
|
6
|
+
"dependencies": {
|
7
|
+
|
8
|
+
},
|
9
|
+
"long_description": "= DESCRIPTION:\n\n= REQUIREMENTS:\n\n= ATTRIBUTES:\n\n= USAGE:\n\n",
|
10
|
+
"recipes": {
|
11
|
+
"default": ""
|
12
|
+
},
|
13
|
+
"groupings": {
|
14
|
+
|
15
|
+
},
|
16
|
+
"recommendations": {
|
17
|
+
|
18
|
+
},
|
19
|
+
"description": "Description",
|
20
|
+
"platforms": {
|
21
|
+
|
22
|
+
},
|
23
|
+
"maintainer": "Opscode",
|
24
|
+
"version": "0.2.0",
|
25
|
+
"suggestions": {
|
26
|
+
|
27
|
+
},
|
28
|
+
"maintainer_email": "do_not_reply@opscode.com",
|
29
|
+
"conflicting": {
|
30
|
+
|
31
|
+
},
|
32
|
+
"name": "versions",
|
33
|
+
"attributes": {
|
34
|
+
|
35
|
+
},
|
36
|
+
"providing": {
|
37
|
+
}
|
38
|
+
}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
chef-integration-test-0.1.1
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,122 @@
|
|
1
|
+
--- !ruby/object:Gem::SourceIndex
|
2
|
+
gems:
|
3
|
+
chef-integration-test-0.1.0: !ruby/object:Gem::Specification
|
4
|
+
name: chef-integration-test
|
5
|
+
version: !ruby/object:Gem::Version
|
6
|
+
prerelease: false
|
7
|
+
segments:
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
- 0
|
11
|
+
version: 0.1.0
|
12
|
+
platform: ruby
|
13
|
+
authors:
|
14
|
+
- Daniel DeLeo
|
15
|
+
autorequire:
|
16
|
+
bindir: bin
|
17
|
+
cert_chain: []
|
18
|
+
|
19
|
+
date: 2009-10-16 23:00:00 -07:00
|
20
|
+
default_executable:
|
21
|
+
dependencies: []
|
22
|
+
|
23
|
+
description: A gem that's sole use is it existence; for integration testing chef's gem package support
|
24
|
+
email: dan@kallistec.com
|
25
|
+
executables: []
|
26
|
+
|
27
|
+
extensions: []
|
28
|
+
|
29
|
+
extra_rdoc_files: []
|
30
|
+
|
31
|
+
files: []
|
32
|
+
|
33
|
+
has_rdoc: true
|
34
|
+
homepage: http://wiki.opscode.com/display/opscode/Contributing
|
35
|
+
licenses: []
|
36
|
+
|
37
|
+
post_install_message:
|
38
|
+
rdoc_options: []
|
39
|
+
|
40
|
+
require_paths:
|
41
|
+
- lib
|
42
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: "0"
|
47
|
+
version:
|
48
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: "0"
|
53
|
+
version:
|
54
|
+
requirements: []
|
55
|
+
|
56
|
+
rubyforge_project:
|
57
|
+
rubygems_version: 1.3.7
|
58
|
+
signing_key:
|
59
|
+
specification_version: 3
|
60
|
+
summary: A gem that's sole use is it existence; for integration testing chef's gem package support
|
61
|
+
test_files: []
|
62
|
+
|
63
|
+
chef-integration-test-0.1.1: !ruby/object:Gem::Specification
|
64
|
+
name: chef-integration-test
|
65
|
+
version: !ruby/object:Gem::Version
|
66
|
+
prerelease: false
|
67
|
+
segments:
|
68
|
+
- 0
|
69
|
+
- 1
|
70
|
+
- 1
|
71
|
+
version: 0.1.1
|
72
|
+
platform: ruby
|
73
|
+
authors:
|
74
|
+
- Daniel DeLeo
|
75
|
+
autorequire:
|
76
|
+
bindir: bin
|
77
|
+
cert_chain: []
|
78
|
+
|
79
|
+
date: 2009-10-16 23:00:00 -07:00
|
80
|
+
default_executable:
|
81
|
+
dependencies: []
|
82
|
+
|
83
|
+
description: A gem that's sole use is it existence; for integration testing chef's gem package support
|
84
|
+
email: dan@kallistec.com
|
85
|
+
executables: []
|
86
|
+
|
87
|
+
extensions: []
|
88
|
+
|
89
|
+
extra_rdoc_files: []
|
90
|
+
|
91
|
+
files: []
|
92
|
+
|
93
|
+
has_rdoc: true
|
94
|
+
homepage: http://wiki.opscode.com/display/opscode/Contributing
|
95
|
+
licenses: []
|
96
|
+
|
97
|
+
post_install_message:
|
98
|
+
rdoc_options: []
|
99
|
+
|
100
|
+
require_paths:
|
101
|
+
- lib
|
102
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: "0"
|
107
|
+
version:
|
108
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: "0"
|
113
|
+
version:
|
114
|
+
requirements: []
|
115
|
+
|
116
|
+
rubyforge_project:
|
117
|
+
rubygems_version: 1.3.7
|
118
|
+
signing_key:
|
119
|
+
specification_version: 3
|
120
|
+
summary: A gem that's sole use is it existence; for integration testing chef's gem package support
|
121
|
+
test_files: []
|
122
|
+
|
Binary file
|
Binary file
|
@@ -0,0 +1,84 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
#
|
3
|
+
# A simple load test
|
4
|
+
|
5
|
+
$: << File.join(File.dirname(__FILE__), "..", "..", "chef", "lib")
|
6
|
+
$: << File.join(File.dirname(__FILE__), "..", "..", "chef-solr", "lib")
|
7
|
+
|
8
|
+
require 'chef'
|
9
|
+
require 'chef/client'
|
10
|
+
require 'tmpdir'
|
11
|
+
|
12
|
+
unless ARGV[0] && ARGV[1] && ARGV[2]
|
13
|
+
puts "USAGE: ./node-load-test.rb [nodes] [interval] [splay] (json_attribs)"
|
14
|
+
exit 10
|
15
|
+
end
|
16
|
+
|
17
|
+
Chef::Config.from_file("/etc/chef/client.rb")
|
18
|
+
json_attrs = Hash.new
|
19
|
+
if ARGV[3]
|
20
|
+
json_attrs = Chef::JSONCompat.from_json(IO.read(ARGV[3]))
|
21
|
+
end
|
22
|
+
Chef::Log.level = :info
|
23
|
+
processes = Array.new
|
24
|
+
STDOUT.sync = true
|
25
|
+
STDERR.sync = true
|
26
|
+
|
27
|
+
Kernel.srand
|
28
|
+
|
29
|
+
0.upto(ARGV[0].to_i) do |i|
|
30
|
+
cid = Process.fork
|
31
|
+
if cid
|
32
|
+
puts "Spawned #{cid}"
|
33
|
+
processes << cid
|
34
|
+
else
|
35
|
+
dir = File.join(Dir.tmpdir, "chef-#{i.to_s}")
|
36
|
+
Dir.mkdir(dir) unless File.exists?(dir)
|
37
|
+
Chef::Config[:file_store_path] = File.join(dir, "file_store")
|
38
|
+
Chef::Config[:file_cache_path] = File.join(dir, "cache")
|
39
|
+
Chef::Config[:client_key] = File.join(dir, "client.pem")
|
40
|
+
Chef::Config[:splay] = ARGV[2]
|
41
|
+
Chef::Config[:interval] = ARGV[1]
|
42
|
+
Chef::Config[:log_location] = File.join(dir, "client.log")
|
43
|
+
Chef::Config[:node_name] = "test#{i}"
|
44
|
+
Chef::Log.info("Starting test#{i}")
|
45
|
+
loop do
|
46
|
+
begin
|
47
|
+
c = Chef::Client.new
|
48
|
+
c.node_name = "test#{i}"
|
49
|
+
c.safe_name = "test#{i}"
|
50
|
+
c.json_attribs = json_attrs
|
51
|
+
c.run
|
52
|
+
|
53
|
+
Chef::Log.info("Child #{i} is finished")
|
54
|
+
Chef::Log.info("Sleeping for #{Chef::Config[:interval]} interval seconds")
|
55
|
+
sleep Chef::Config[:interval].to_i
|
56
|
+
|
57
|
+
splay = rand Chef::Config[:splay].to_i
|
58
|
+
Chef::Log.info("Splay sleep #{splay} seconds")
|
59
|
+
sleep splay
|
60
|
+
rescue
|
61
|
+
Chef::Log.info("Child #{i} died!")
|
62
|
+
Chef::Log.info("Sleeping for #{Chef::Config[:interval]} interval seconds")
|
63
|
+
sleep Chef::Config[:interval].to_i
|
64
|
+
retry
|
65
|
+
end
|
66
|
+
end
|
67
|
+
puts "Child #{i} is exiting!"
|
68
|
+
exit 0
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
Signal.trap("INT") do
|
73
|
+
processes.each do |pid|
|
74
|
+
Process.kill("INT", pid)
|
75
|
+
end
|
76
|
+
Process.waitall
|
77
|
+
puts "Killed all children - Exiting!"
|
78
|
+
exit 0
|
79
|
+
end
|
80
|
+
|
81
|
+
while(true) do
|
82
|
+
sleep 1
|
83
|
+
end
|
84
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
#
|
3
|
+
# A simple load test
|
4
|
+
|
5
|
+
$: << File.join(File.dirname(__FILE__), "..", "..", "chef", "lib")
|
6
|
+
$: << File.join(File.dirname(__FILE__), "..", "..", "chef-solr", "lib")
|
7
|
+
|
8
|
+
require 'chef'
|
9
|
+
require 'chef/client'
|
10
|
+
|
11
|
+
client = Chef::Client.new
|
12
|
+
client.run_ohai
|
13
|
+
301.upto(1000) do |i|
|
14
|
+
client.node = nil
|
15
|
+
client.build_node("node#{i}", true)
|
16
|
+
puts "node#{i}"
|
17
|
+
client.node.cdb_save
|
18
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
Overview
|
2
|
+
========
|
3
|
+
|
4
|
+
Every Chef installation needs a Chef Repository. This is the place where cookbooks, roles, config files and other artifacts for managing systems with Chef will live. We strongly recommend storing this repository in a version control system such as Git and treat it like source code.
|
5
|
+
|
6
|
+
While we prefer Git, and make this repository available via GitHub, you are welcome to download a tar or zip archive and use your favorite version control system to manage the code.
|
7
|
+
|
8
|
+
Repository Directories
|
9
|
+
======================
|
10
|
+
|
11
|
+
This repository contains several directories, and each directory contains a README file that describes what it is for in greater detail, and how to use it for managing your systems with Chef.
|
12
|
+
|
13
|
+
* `certificates/` - SSL certificates generated by `rake ssl_cert` live here.
|
14
|
+
* `config/` - Contains the Rake configuration file, `rake.rb`.
|
15
|
+
* `cookbooks/` - Cookbooks you download or create.
|
16
|
+
* `data_bags/` - Store data bags and items in .json in the repository.
|
17
|
+
* `roles/` - Store roles in .rb or .json in the repository.
|
18
|
+
|
19
|
+
Rake Tasks
|
20
|
+
==========
|
21
|
+
|
22
|
+
The repository contains a `Rakefile` that includes tasks that are installed with the Chef libraries. To view the tasks available with in the repository with a brief description, run `rake -T`.
|
23
|
+
|
24
|
+
The default task (`default`) is run when executing `rake` with no arguments. It will call the task `test_cookbooks`.
|
25
|
+
|
26
|
+
The following tasks are not directly replaced by knife sub-commands.
|
27
|
+
|
28
|
+
* `bundle_cookbook[cookbook]` - Creates cookbook tarballs in the `pkgs/` dir.
|
29
|
+
* `install` - Calls `update`, `roles` and `upload_cookbooks` Rake tasks.
|
30
|
+
* `ssl_cert` - Create self-signed SSL certificates in `certificates/` dir.
|
31
|
+
* `update` - Update the repository from source control server, understands git and svn.
|
32
|
+
|
33
|
+
The following tasks duplicate functionality from knife and may be removed in a future version of Chef.
|
34
|
+
|
35
|
+
* `metadata` - replaced by `knife cookbook metadata -a`.
|
36
|
+
* `new_cookbook` - replaced by `knife cookbook create`.
|
37
|
+
* `role[role_name]` - replaced by `knife role from file`.
|
38
|
+
* `roles` - iterates over the roles and uploads with `knife role from file`.
|
39
|
+
* `test_cookbooks` - replaced by `knife cookbook test -a`.
|
40
|
+
* `test_cookbook[cookbook]` - replaced by `knife cookbook test COOKBOOK`.
|
41
|
+
* `upload_cookbooks` - replaced by `knife cookbook upload -a`.
|
42
|
+
* `upload_cookbook[cookbook]` - replaced by `knife cookbook upload COOKBOOK`.
|
43
|
+
|
44
|
+
Configuration
|
45
|
+
=============
|
46
|
+
|
47
|
+
The repository uses two configuration files.
|
48
|
+
|
49
|
+
* config/rake.rb
|
50
|
+
* .chef/knife.rb
|
51
|
+
|
52
|
+
The first, `config/rake.rb` configures the Rakefile in two sections.
|
53
|
+
|
54
|
+
* Constants used in the `ssl_cert` task for creating the certificates.
|
55
|
+
* Constants that set the directory locations used in various tasks.
|
56
|
+
|
57
|
+
If you use the `ssl_cert` task, change the values in the `config/rake.rb` file appropriately. These values were also used in the `new_cookbook` task, but that task is replaced by the `knife cookbook create` command which can be configured below.
|
58
|
+
|
59
|
+
The second config file, `.chef/knife.rb` is a repository specific configuration file for knife. If you're using the Opscode Platform, you can download one for your organization from the management console. If you're using the Open Source Chef Server, you can generate a new one with `knife configure`. For more information about configuring Knife, see the Knife documentation.
|
60
|
+
|
61
|
+
http://help.opscode.com/faqs/chefbasics/knife
|
62
|
+
|
63
|
+
Next Steps
|
64
|
+
==========
|
65
|
+
|
66
|
+
Read the README file in each of the subdirectories for more information about what goes in those directories.
|
@@ -0,0 +1,65 @@
|
|
1
|
+
#
|
2
|
+
# Rakefile for Chef Server Repository
|
3
|
+
#
|
4
|
+
# Author:: Adam Jacob (<adam@opscode.com>)
|
5
|
+
# Copyright:: Copyright (c) 2008 Opscode, Inc.
|
6
|
+
# License:: Apache License, Version 2.0
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
|
21
|
+
require 'rubygems'
|
22
|
+
require 'chef'
|
23
|
+
require 'json'
|
24
|
+
|
25
|
+
# Load constants from rake config file.
|
26
|
+
require File.join(File.dirname(__FILE__), 'config', 'rake')
|
27
|
+
|
28
|
+
# Detect the version control system and assign to $vcs. Used by the update
|
29
|
+
# task in chef_repo.rake (below). The install task calls update, so this
|
30
|
+
# is run whenever the repo is installed.
|
31
|
+
#
|
32
|
+
# Comment out these lines to skip the update.
|
33
|
+
|
34
|
+
if File.directory?(File.join(TOPDIR, ".svn"))
|
35
|
+
$vcs = :svn
|
36
|
+
elsif File.directory?(File.join(TOPDIR, ".git"))
|
37
|
+
$vcs = :git
|
38
|
+
end
|
39
|
+
|
40
|
+
# Load common, useful tasks from Chef.
|
41
|
+
# rake -T to see the tasks this loads.
|
42
|
+
|
43
|
+
load 'chef/tasks/chef_repo.rake'
|
44
|
+
|
45
|
+
desc "Bundle a single cookbook for distribution"
|
46
|
+
task :bundle_cookbook => [ :metadata ]
|
47
|
+
task :bundle_cookbook, :cookbook do |t, args|
|
48
|
+
tarball_name = "#{args.cookbook}.tar.gz"
|
49
|
+
temp_dir = File.join(Dir.tmpdir, "chef-upload-cookbooks")
|
50
|
+
temp_cookbook_dir = File.join(temp_dir, args.cookbook)
|
51
|
+
tarball_dir = File.join(TOPDIR, "pkgs")
|
52
|
+
FileUtils.mkdir_p(tarball_dir)
|
53
|
+
FileUtils.mkdir(temp_dir)
|
54
|
+
FileUtils.mkdir(temp_cookbook_dir)
|
55
|
+
|
56
|
+
child_folders = [ "cookbooks/#{args.cookbook}", "site-cookbooks/#{args.cookbook}" ]
|
57
|
+
child_folders.each do |folder|
|
58
|
+
file_path = File.join(TOPDIR, folder, ".")
|
59
|
+
FileUtils.cp_r(file_path, temp_cookbook_dir) if File.directory?(file_path)
|
60
|
+
end
|
61
|
+
|
62
|
+
system("tar", "-C", temp_dir, "-cvzf", File.join(tarball_dir, tarball_name), "./#{args.cookbook}")
|
63
|
+
|
64
|
+
FileUtils.rm_rf temp_dir
|
65
|
+
end
|