chef 12.0.0.alpha.1 → 12.0.0.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef/application.rb +8 -1
- data/lib/chef/application/apply.rb +4 -0
- data/lib/chef/application/client.rb +7 -7
- data/lib/chef/application/solo.rb +21 -13
- data/lib/chef/chef_fs/chef_fs_data_store.rb +60 -6
- data/lib/chef/chef_fs/config.rb +78 -4
- data/lib/chef/chef_fs/data_handler/acl_data_handler.rb +2 -2
- data/lib/chef/chef_fs/data_handler/client_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/container_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/cookbook_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/data_handler_base.rb +76 -2
- data/lib/chef/chef_fs/data_handler/environment_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/group_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/node_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/organization_data_handler.rb +30 -0
- data/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb +17 -0
- data/lib/chef/chef_fs/data_handler/organization_members_data_handler.rb +17 -0
- data/lib/chef/chef_fs/data_handler/role_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/user_data_handler.rb +2 -1
- data/lib/chef/chef_fs/file_system.rb +0 -1
- data/lib/chef/chef_fs/file_system/acl_entry.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_entry.rb +5 -1
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_root_dir.rb +73 -13
- data/lib/chef/chef_fs/file_system/chef_server_root_dir.rb +44 -5
- data/lib/chef/chef_fs/file_system/cookbook_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/cookbooks_dir.rb +3 -3
- data/lib/chef/chef_fs/file_system/org_entry.rb +34 -0
- data/lib/chef/chef_fs/file_system/organization_invites_entry.rb +58 -0
- data/lib/chef/chef_fs/file_system/organization_members_entry.rb +57 -0
- data/lib/chef/chef_fs/file_system/rest_list_entry.rb +13 -4
- data/lib/chef/chef_fs/knife.rb +1 -1
- data/lib/chef/client.rb +8 -2
- data/lib/chef/config.rb +75 -57
- data/lib/chef/config_fetcher.rb +6 -21
- data/lib/chef/dsl/data_query.rb +48 -3
- data/lib/chef/dsl/platform_introspection.rb +42 -0
- data/lib/chef/dsl/reboot_pending.rb +6 -3
- data/lib/chef/encrypted_data_bag_item.rb +1 -1
- data/lib/chef/encrypted_data_bag_item/encryptor.rb +12 -0
- data/lib/chef/exceptions.rb +2 -0
- data/lib/chef/http/basic_client.rb +14 -0
- data/lib/chef/http/json_output.rb +7 -2
- data/lib/chef/knife.rb +36 -121
- data/lib/chef/knife/bootstrap.rb +68 -54
- data/lib/chef/knife/bootstrap/archlinux-gems.erb +6 -1
- data/lib/chef/knife/bootstrap/chef-aix.erb +5 -0
- data/lib/chef/knife/bootstrap/chef-full.erb +5 -1
- data/lib/chef/knife/core/bootstrap_context.rb +70 -29
- data/lib/chef/knife/search.rb +56 -12
- data/lib/chef/knife/serve.rb +1 -1
- data/lib/chef/local_mode.rb +10 -4
- data/lib/chef/mixin/deep_merge.rb +6 -3
- data/lib/chef/mixin/shell_out.rb +33 -17
- data/lib/chef/null_logger.rb +72 -0
- data/lib/chef/platform.rb +2 -1
- data/lib/chef/platform/provider_mapping.rb +1 -1
- data/lib/chef/platform/rebooter.rb +54 -0
- data/lib/chef/provider/ifconfig.rb +15 -16
- data/lib/chef/provider/link.rb +1 -1
- data/lib/chef/provider/mount/mount.rb +1 -1
- data/lib/chef/provider/mount/solaris.rb +102 -64
- data/lib/chef/provider/package/aix.rb +4 -12
- data/lib/chef/provider/package/ips.rb +8 -12
- data/lib/chef/provider/package/macports.rb +4 -12
- data/lib/chef/provider/package/pacman.rb +2 -6
- data/lib/chef/provider/package/portage.rb +2 -6
- data/lib/chef/provider/package/rpm.rb +4 -12
- data/lib/chef/provider/package/solaris.rb +4 -12
- data/lib/chef/provider/reboot.rb +69 -0
- data/lib/chef/provider/service/debian.rb +10 -10
- data/lib/chef/provider/service/freebsd.rb +89 -73
- data/lib/chef/provider/service/gentoo.rb +2 -2
- data/lib/chef/provider/service/init.rb +6 -4
- data/lib/chef/provider/service/insserv.rb +3 -3
- data/lib/chef/provider/service/macosx.rb +2 -2
- data/lib/chef/provider/service/simple.rb +6 -4
- data/lib/chef/provider/service/solaris.rb +1 -1
- data/lib/chef/provider/service/systemd.rb +9 -9
- data/lib/chef/provider/service/upstart.rb +6 -6
- data/lib/chef/provider/subversion.rb +6 -6
- data/lib/chef/provider/user/dscl.rb +32 -28
- data/lib/chef/provider/user/windows.rb +6 -6
- data/lib/chef/provider/whyrun_safe_ruby_block.rb +1 -1
- data/lib/chef/providers.rb +1 -0
- data/lib/chef/recipe.rb +0 -1
- data/lib/chef/resource.rb +3 -5
- data/lib/chef/resource/mount.rb +9 -0
- data/lib/chef/resource/reboot.rb +48 -0
- data/lib/chef/resources.rb +1 -0
- data/lib/chef/run_context.rb +25 -0
- data/lib/chef/search/query.rb +122 -14
- data/lib/chef/util/path_helper.rb +54 -6
- data/lib/chef/util/windows/net_user.rb +4 -1
- data/lib/chef/version.rb +1 -1
- data/lib/chef/win32/api/file.rb +1 -5
- data/lib/chef/win32/api/net.rb +1 -0
- data/lib/chef/workstation_config_loader.rb +177 -0
- data/spec/functional/http/simple_spec.rb +57 -1
- data/spec/functional/mixin/shell_out_spec.rb +2 -2
- data/spec/functional/provider/whyrun_safe_ruby_block_spec.rb +51 -0
- data/spec/functional/rebooter_spec.rb +105 -0
- data/spec/functional/resource/deploy_revision_spec.rb +0 -4
- data/spec/functional/resource/file_spec.rb +26 -3
- data/spec/functional/resource/group_spec.rb +5 -3
- data/spec/functional/resource/link_spec.rb +16 -16
- data/spec/functional/resource/reboot_spec.rb +103 -0
- data/spec/integration/client/client_spec.rb +4 -8
- data/spec/integration/client/ipv6_spec.rb +1 -1
- data/spec/integration/knife/cookbook_api_ipv6_spec.rb +3 -2
- data/spec/integration/knife/delete_spec.rb +39 -0
- data/spec/integration/knife/deps_spec.rb +30 -20
- data/spec/integration/knife/download_spec.rb +77 -1
- data/spec/integration/knife/list_spec.rb +221 -0
- data/spec/integration/knife/raw_spec.rb +1 -1
- data/spec/integration/knife/show_spec.rb +2 -2
- data/spec/integration/knife/upload_spec.rb +154 -1
- data/spec/support/pedant/run_pedant.rb +0 -1
- data/spec/support/shared/functional/http.rb +8 -1
- data/spec/support/shared/integration/integration_helper.rb +11 -19
- data/spec/support/shared/unit/platform_introspector.rb +22 -0
- data/spec/unit/application/apply.rb +11 -1
- data/spec/unit/application/solo_spec.rb +19 -3
- data/spec/unit/chef_fs/config_spec.rb +58 -0
- data/spec/unit/config_fetcher_spec.rb +1 -3
- data/spec/unit/config_spec.rb +247 -220
- data/spec/unit/dsl/data_query_spec.rb +165 -23
- data/spec/unit/dsl/reboot_pending_spec.rb +1 -7
- data/spec/unit/encrypted_data_bag_item_spec.rb +1 -1
- data/spec/unit/knife/bootstrap_spec.rb +354 -182
- data/spec/unit/knife/core/bootstrap_context_spec.rb +67 -30
- data/spec/unit/knife_spec.rb +3 -30
- data/spec/unit/mixin/deep_merge_spec.rb +14 -0
- data/spec/unit/mixin/shell_out_spec.rb +134 -64
- data/spec/unit/provider/ifconfig/debian_spec.rb +19 -9
- data/spec/unit/provider/ifconfig/redhat_spec.rb +16 -14
- data/spec/unit/provider/ifconfig_spec.rb +3 -3
- data/spec/unit/provider/link_spec.rb +5 -5
- data/spec/unit/provider/mount/mount_spec.rb +10 -1
- data/spec/unit/provider/mount/solaris_spec.rb +185 -11
- data/spec/unit/provider/package/aix_spec.rb +5 -17
- data/spec/unit/provider/package/ips_spec.rb +8 -21
- data/spec/unit/provider/package/macports_spec.rb +12 -12
- data/spec/unit/provider/package/pacman_spec.rb +4 -12
- data/spec/unit/provider/package/portage_spec.rb +5 -15
- data/spec/unit/provider/package/rpm_spec.rb +7 -22
- data/spec/unit/provider/package/solaris_spec.rb +5 -16
- data/spec/unit/provider/service/arch_service_spec.rb +8 -14
- data/spec/unit/provider/service/debian_service_spec.rb +1 -1
- data/spec/unit/provider/service/freebsd_service_spec.rb +457 -225
- data/spec/unit/provider/service/gentoo_service_spec.rb +2 -2
- data/spec/unit/provider/service/init_service_spec.rb +10 -10
- data/spec/unit/provider/service/insserv_service_spec.rb +3 -4
- data/spec/unit/provider/service/invokercd_service_spec.rb +8 -9
- data/spec/unit/provider/service/macosx_spec.rb +5 -5
- data/spec/unit/provider/service/simple_service_spec.rb +4 -6
- data/spec/unit/provider/service/solaris_smf_service_spec.rb +1 -3
- data/spec/unit/provider/service/systemd_service_spec.rb +20 -20
- data/spec/unit/provider/service/upstart_service_spec.rb +15 -17
- data/spec/unit/provider/subversion_spec.rb +5 -6
- data/spec/unit/provider/user/dscl_spec.rb +2 -1
- data/spec/unit/provider/user/windows_spec.rb +7 -0
- data/spec/unit/provider/whyrun_safe_ruby_block_spec.rb +2 -2
- data/spec/unit/resource/mount_spec.rb +9 -0
- data/spec/unit/resource_spec.rb +0 -4
- data/spec/unit/rest_spec.rb +1 -1
- data/spec/unit/run_context_spec.rb +15 -0
- data/spec/unit/search/query_spec.rb +196 -40
- data/spec/unit/util/path_helper_spec.rb +111 -28
- data/spec/unit/workstation_config_loader_spec.rb +283 -0
- metadata +36 -20
- data/lib/chef/knife/bootstrap/centos5-gems.erb +0 -62
- data/lib/chef/knife/bootstrap/fedora13-gems.erb +0 -44
- data/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb +0 -53
- data/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb +0 -48
- data/lib/chef/knife/bootstrap/ubuntu12.04-gems.erb +0 -46
- data/spec/support/shared/integration/chef_zero_support.rb +0 -130
- data/spec/unit/knife/config_file_selection_spec.rb +0 -135
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.0.0.alpha.
|
4
|
+
version: 12.0.0.alpha.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-config
|
@@ -70,30 +70,36 @@ dependencies:
|
|
70
70
|
name: mixlib-shellout
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 2.0.0.rc.0
|
76
|
+
- - "<"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '3.0'
|
76
79
|
type: :runtime
|
77
80
|
prerelease: false
|
78
81
|
version_requirements: !ruby/object:Gem::Requirement
|
79
82
|
requirements:
|
80
|
-
- - "
|
83
|
+
- - ">="
|
81
84
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
85
|
+
version: 2.0.0.rc.0
|
86
|
+
- - "<"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '3.0'
|
83
89
|
- !ruby/object:Gem::Dependency
|
84
90
|
name: ohai
|
85
91
|
requirement: !ruby/object:Gem::Requirement
|
86
92
|
requirements:
|
87
|
-
- - "
|
93
|
+
- - ">="
|
88
94
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
95
|
+
version: 7.6.0.rc.0
|
90
96
|
type: :runtime
|
91
97
|
prerelease: false
|
92
98
|
version_requirements: !ruby/object:Gem::Requirement
|
93
99
|
requirements:
|
94
|
-
- - "
|
100
|
+
- - ">="
|
95
101
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
102
|
+
version: 7.6.0.rc.0
|
97
103
|
- !ruby/object:Gem::Dependency
|
98
104
|
name: ffi-yajl
|
99
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -202,14 +208,14 @@ dependencies:
|
|
202
208
|
requirements:
|
203
209
|
- - "~>"
|
204
210
|
- !ruby/object:Gem::Version
|
205
|
-
version: '
|
211
|
+
version: '3.1'
|
206
212
|
type: :runtime
|
207
213
|
prerelease: false
|
208
214
|
version_requirements: !ruby/object:Gem::Requirement
|
209
215
|
requirements:
|
210
216
|
- - "~>"
|
211
217
|
- !ruby/object:Gem::Version
|
212
|
-
version: '
|
218
|
+
version: '3.1'
|
213
219
|
- !ruby/object:Gem::Dependency
|
214
220
|
name: pry
|
215
221
|
requirement: !ruby/object:Gem::Requirement
|
@@ -579,6 +585,9 @@ files:
|
|
579
585
|
- lib/chef/chef_fs/data_handler/environment_data_handler.rb
|
580
586
|
- lib/chef/chef_fs/data_handler/group_data_handler.rb
|
581
587
|
- lib/chef/chef_fs/data_handler/node_data_handler.rb
|
588
|
+
- lib/chef/chef_fs/data_handler/organization_data_handler.rb
|
589
|
+
- lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb
|
590
|
+
- lib/chef/chef_fs/data_handler/organization_members_data_handler.rb
|
582
591
|
- lib/chef/chef_fs/data_handler/role_data_handler.rb
|
583
592
|
- lib/chef/chef_fs/data_handler/user_data_handler.rb
|
584
593
|
- lib/chef/chef_fs/file_pattern.rb
|
@@ -620,6 +629,9 @@ files:
|
|
620
629
|
- lib/chef/chef_fs/file_system/not_found_error.rb
|
621
630
|
- lib/chef/chef_fs/file_system/operation_failed_error.rb
|
622
631
|
- lib/chef/chef_fs/file_system/operation_not_allowed_error.rb
|
632
|
+
- lib/chef/chef_fs/file_system/org_entry.rb
|
633
|
+
- lib/chef/chef_fs/file_system/organization_invites_entry.rb
|
634
|
+
- lib/chef/chef_fs/file_system/organization_members_entry.rb
|
623
635
|
- lib/chef/chef_fs/file_system/rest_list_dir.rb
|
624
636
|
- lib/chef/chef_fs/file_system/rest_list_entry.rb
|
625
637
|
- lib/chef/chef_fs/knife.rb
|
@@ -726,13 +738,8 @@ files:
|
|
726
738
|
- lib/chef/knife/bootstrap.rb
|
727
739
|
- lib/chef/knife/bootstrap/README.md
|
728
740
|
- lib/chef/knife/bootstrap/archlinux-gems.erb
|
729
|
-
- lib/chef/knife/bootstrap/centos5-gems.erb
|
730
741
|
- lib/chef/knife/bootstrap/chef-aix.erb
|
731
742
|
- lib/chef/knife/bootstrap/chef-full.erb
|
732
|
-
- lib/chef/knife/bootstrap/fedora13-gems.erb
|
733
|
-
- lib/chef/knife/bootstrap/ubuntu10.04-apt.erb
|
734
|
-
- lib/chef/knife/bootstrap/ubuntu10.04-gems.erb
|
735
|
-
- lib/chef/knife/bootstrap/ubuntu12.04-gems.erb
|
736
743
|
- lib/chef/knife/client_bulk_delete.rb
|
737
744
|
- lib/chef/knife/client_create.rb
|
738
745
|
- lib/chef/knife/client_delete.rb
|
@@ -876,9 +883,11 @@ files:
|
|
876
883
|
- lib/chef/node/attribute.rb
|
877
884
|
- lib/chef/node/attribute_collections.rb
|
878
885
|
- lib/chef/node/immutable_collections.rb
|
886
|
+
- lib/chef/null_logger.rb
|
879
887
|
- lib/chef/platform.rb
|
880
888
|
- lib/chef/platform/provider_mapping.rb
|
881
889
|
- lib/chef/platform/query_helpers.rb
|
890
|
+
- lib/chef/platform/rebooter.rb
|
882
891
|
- lib/chef/policy_builder.rb
|
883
892
|
- lib/chef/policy_builder/expand_node_object.rb
|
884
893
|
- lib/chef/policy_builder/policyfile.rb
|
@@ -951,6 +960,7 @@ files:
|
|
951
960
|
- lib/chef/provider/package/yum.rb
|
952
961
|
- lib/chef/provider/package/zypper.rb
|
953
962
|
- lib/chef/provider/powershell_script.rb
|
963
|
+
- lib/chef/provider/reboot.rb
|
954
964
|
- lib/chef/provider/registry_key.rb
|
955
965
|
- lib/chef/provider/remote_directory.rb
|
956
966
|
- lib/chef/provider/remote_file.rb
|
@@ -1038,6 +1048,7 @@ files:
|
|
1038
1048
|
- lib/chef/resource/portage_package.rb
|
1039
1049
|
- lib/chef/resource/powershell_script.rb
|
1040
1050
|
- lib/chef/resource/python.rb
|
1051
|
+
- lib/chef/resource/reboot.rb
|
1041
1052
|
- lib/chef/resource/registry_key.rb
|
1042
1053
|
- lib/chef/resource/remote_directory.rb
|
1043
1054
|
- lib/chef/resource/remote_file.rb
|
@@ -1137,6 +1148,7 @@ files:
|
|
1137
1148
|
- lib/chef/win32/security/token.rb
|
1138
1149
|
- lib/chef/win32/unicode.rb
|
1139
1150
|
- lib/chef/win32/version.rb
|
1151
|
+
- lib/chef/workstation_config_loader.rb
|
1140
1152
|
- spec/data/apt/chef-integration-test-1.0/debian/changelog
|
1141
1153
|
- spec/data/apt/chef-integration-test-1.0/debian/compat
|
1142
1154
|
- spec/data/apt/chef-integration-test-1.0/debian/control
|
@@ -1424,6 +1436,8 @@ files:
|
|
1424
1436
|
- spec/functional/knife/ssh_spec.rb
|
1425
1437
|
- spec/functional/mixin/shell_out_spec.rb
|
1426
1438
|
- spec/functional/provider/remote_file/cache_control_data_spec.rb
|
1439
|
+
- spec/functional/provider/whyrun_safe_ruby_block_spec.rb
|
1440
|
+
- spec/functional/rebooter_spec.rb
|
1427
1441
|
- spec/functional/resource/base.rb
|
1428
1442
|
- spec/functional/resource/batch_spec.rb
|
1429
1443
|
- spec/functional/resource/bff_spec.rb
|
@@ -1441,6 +1455,7 @@ files:
|
|
1441
1455
|
- spec/functional/resource/ohai_spec.rb
|
1442
1456
|
- spec/functional/resource/package_spec.rb
|
1443
1457
|
- spec/functional/resource/powershell_spec.rb
|
1458
|
+
- spec/functional/resource/reboot_spec.rb
|
1444
1459
|
- spec/functional/resource/registry_spec.rb
|
1445
1460
|
- spec/functional/resource/remote_directory_spec.rb
|
1446
1461
|
- spec/functional/resource/remote_file_spec.rb
|
@@ -1512,7 +1527,6 @@ files:
|
|
1512
1527
|
- spec/support/shared/functional/securable_resource_with_reporting.rb
|
1513
1528
|
- spec/support/shared/functional/windows_script.rb
|
1514
1529
|
- spec/support/shared/integration/app_server_support.rb
|
1515
|
-
- spec/support/shared/integration/chef_zero_support.rb
|
1516
1530
|
- spec/support/shared/integration/integration_helper.rb
|
1517
1531
|
- spec/support/shared/integration/knife_support.rb
|
1518
1532
|
- spec/support/shared/matchers.rb
|
@@ -1534,6 +1548,7 @@ files:
|
|
1534
1548
|
- spec/unit/application/server_spec.rb
|
1535
1549
|
- spec/unit/application/solo_spec.rb
|
1536
1550
|
- spec/unit/application_spec.rb
|
1551
|
+
- spec/unit/chef_fs/config_spec.rb
|
1537
1552
|
- spec/unit/chef_fs/diff_spec.rb
|
1538
1553
|
- spec/unit/chef_fs/file_pattern_spec.rb
|
1539
1554
|
- spec/unit/chef_fs/file_system/operation_failed_error_spec.rb
|
@@ -1600,7 +1615,6 @@ files:
|
|
1600
1615
|
- spec/unit/knife/client_list_spec.rb
|
1601
1616
|
- spec/unit/knife/client_reregister_spec.rb
|
1602
1617
|
- spec/unit/knife/client_show_spec.rb
|
1603
|
-
- spec/unit/knife/config_file_selection_spec.rb
|
1604
1618
|
- spec/unit/knife/configure_client_spec.rb
|
1605
1619
|
- spec/unit/knife/configure_spec.rb
|
1606
1620
|
- spec/unit/knife/cookbook_bulk_delete_spec.rb
|
@@ -1889,9 +1903,11 @@ files:
|
|
1889
1903
|
- spec/unit/version_constraint/platform_spec.rb
|
1890
1904
|
- spec/unit/version_constraint_spec.rb
|
1891
1905
|
- spec/unit/windows_service_spec.rb
|
1906
|
+
- spec/unit/workstation_config_loader_spec.rb
|
1892
1907
|
- tasks/rspec.rb
|
1893
1908
|
homepage: http://www.getchef.com
|
1894
|
-
licenses:
|
1909
|
+
licenses:
|
1910
|
+
- Apache-2.0
|
1895
1911
|
metadata: {}
|
1896
1912
|
post_install_message:
|
1897
1913
|
rdoc_options: []
|
@@ -1,62 +0,0 @@
|
|
1
|
-
bash -c '
|
2
|
-
<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%>
|
3
|
-
|
4
|
-
if [ ! -f /usr/bin/chef-client ]; then
|
5
|
-
tmp_dir=$(mktemp -d) || exit 1
|
6
|
-
pushd "$tmp_dir"
|
7
|
-
|
8
|
-
yum install -y wget
|
9
|
-
|
10
|
-
wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
|
11
|
-
rpm -Uvh epel-release-5-4.noarch.rpm
|
12
|
-
wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://rpm.aegisco.com/aegisco/rhel/aegisco-rhel.rpm
|
13
|
-
rpm -Uvh aegisco-rhel.rpm
|
14
|
-
|
15
|
-
yum install -y ruby ruby-devel gcc gcc-c++ automake autoconf make
|
16
|
-
|
17
|
-
wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz -O - | tar zxf -
|
18
|
-
(cd rubygems-1.6.2 && ruby setup.rb --no-format-executable)
|
19
|
-
|
20
|
-
popd
|
21
|
-
rm -r "$tmp_dir"
|
22
|
-
fi
|
23
|
-
|
24
|
-
gem update --system
|
25
|
-
gem update
|
26
|
-
gem install ohai --no-rdoc --no-ri --verbose
|
27
|
-
gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %>
|
28
|
-
|
29
|
-
mkdir -p /etc/chef
|
30
|
-
|
31
|
-
cat > /etc/chef/validation.pem <<'EOP'
|
32
|
-
<%= validation_key %>
|
33
|
-
EOP
|
34
|
-
chmod 0600 /etc/chef/validation.pem
|
35
|
-
|
36
|
-
<% if encrypted_data_bag_secret -%>
|
37
|
-
cat > /etc/chef/encrypted_data_bag_secret <<'EOP'
|
38
|
-
<%= encrypted_data_bag_secret %>
|
39
|
-
EOP
|
40
|
-
chmod 0600 /etc/chef/encrypted_data_bag_secret
|
41
|
-
<% end -%>
|
42
|
-
|
43
|
-
<%# Generate Ohai Hints -%>
|
44
|
-
<% unless @chef_config[:knife][:hints].nil? || @chef_config[:knife][:hints].empty? -%>
|
45
|
-
mkdir -p /etc/chef/ohai/hints
|
46
|
-
|
47
|
-
<% @chef_config[:knife][:hints].each do |name, hash| -%>
|
48
|
-
cat > /etc/chef/ohai/hints/<%= name %>.json <<'EOP'
|
49
|
-
<%= hash.to_json %>
|
50
|
-
EOP
|
51
|
-
<% end -%>
|
52
|
-
<% end -%>
|
53
|
-
|
54
|
-
cat > /etc/chef/client.rb <<'EOP'
|
55
|
-
<%= config_content %>
|
56
|
-
EOP
|
57
|
-
|
58
|
-
cat > /etc/chef/first-boot.json <<'EOP'
|
59
|
-
<%= first_boot.to_json %>
|
60
|
-
EOP
|
61
|
-
|
62
|
-
<%= start_chef %>'
|
@@ -1,44 +0,0 @@
|
|
1
|
-
bash -c '
|
2
|
-
<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%>
|
3
|
-
|
4
|
-
yum install -y ruby ruby-devel gcc gcc-c++ automake autoconf rubygems make
|
5
|
-
|
6
|
-
gem update --system
|
7
|
-
gem update
|
8
|
-
gem install ohai --no-rdoc --no-ri --verbose
|
9
|
-
gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %>
|
10
|
-
|
11
|
-
mkdir -p /etc/chef
|
12
|
-
|
13
|
-
cat > /etc/chef/validation.pem <<'EOP'
|
14
|
-
<%= validation_key %>
|
15
|
-
EOP
|
16
|
-
chmod 0600 /etc/chef/validation.pem
|
17
|
-
|
18
|
-
<% if encrypted_data_bag_secret -%>
|
19
|
-
cat > /etc/chef/encrypted_data_bag_secret <<'EOP'
|
20
|
-
<%= encrypted_data_bag_secret %>
|
21
|
-
EOP
|
22
|
-
chmod 0600 /etc/chef/encrypted_data_bag_secret
|
23
|
-
<% end -%>
|
24
|
-
|
25
|
-
<%# Generate Ohai Hints -%>
|
26
|
-
<% unless @chef_config[:knife][:hints].nil? || @chef_config[:knife][:hints].empty? -%>
|
27
|
-
mkdir -p /etc/chef/ohai/hints
|
28
|
-
|
29
|
-
<% @chef_config[:knife][:hints].each do |name, hash| -%>
|
30
|
-
cat > /etc/chef/ohai/hints/<%= name %>.json <<'EOP'
|
31
|
-
<%= hash.to_json %>
|
32
|
-
EOP
|
33
|
-
<% end -%>
|
34
|
-
<% end -%>
|
35
|
-
|
36
|
-
cat > /etc/chef/client.rb <<'EOP'
|
37
|
-
<%= config_content %>
|
38
|
-
EOP
|
39
|
-
|
40
|
-
cat > /etc/chef/first-boot.json <<'EOP'
|
41
|
-
<%= first_boot.to_json %>
|
42
|
-
EOP
|
43
|
-
|
44
|
-
<%= start_chef %>'
|
@@ -1,53 +0,0 @@
|
|
1
|
-
bash -c '
|
2
|
-
<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%>
|
3
|
-
|
4
|
-
if [ ! -f /usr/bin/chef-client ]; then
|
5
|
-
apt-get install -y wget
|
6
|
-
echo "chef chef/chef_server_url string <%= @chef_config[:chef_server_url] %>" | debconf-set-selections
|
7
|
-
[ -f /etc/apt/sources.list.d/opscode.list ] || echo "deb http://apt.opscode.com <%= chef_version.to_f == 0.10 ? "lucid-0.10" : "lucid" %> main" > /etc/apt/sources.list.d/opscode.list
|
8
|
-
wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>-O- http://apt.opscode.com/packages@opscode.com.gpg.key | apt-key add -
|
9
|
-
fi
|
10
|
-
apt-get update
|
11
|
-
apt-get install -y chef
|
12
|
-
|
13
|
-
cat > /etc/chef/validation.pem <<'EOP'
|
14
|
-
<%= validation_key %>
|
15
|
-
EOP
|
16
|
-
chmod 0600 /etc/chef/validation.pem
|
17
|
-
|
18
|
-
<% if encrypted_data_bag_secret -%>
|
19
|
-
cat > /etc/chef/encrypted_data_bag_secret <<'EOP'
|
20
|
-
<%= encrypted_data_bag_secret %>
|
21
|
-
EOP
|
22
|
-
chmod 0600 /etc/chef/encrypted_data_bag_secret
|
23
|
-
<% end -%>
|
24
|
-
|
25
|
-
<%# Generate Ohai Hints -%>
|
26
|
-
<% unless @chef_config[:knife][:hints].nil? || @chef_config[:knife][:hints].empty? -%>
|
27
|
-
mkdir -p /etc/chef/ohai/hints
|
28
|
-
|
29
|
-
<% @chef_config[:knife][:hints].each do |name, hash| -%>
|
30
|
-
cat > /etc/chef/ohai/hints/<%= name %>.json <<'EOP'
|
31
|
-
<%= hash.to_json %>
|
32
|
-
EOP
|
33
|
-
<% end -%>
|
34
|
-
<% end -%>
|
35
|
-
|
36
|
-
<% unless @chef_config[:validation_client_name] == "chef-validator" -%>
|
37
|
-
[ `grep -qx "validation_client_name \"<%= @chef_config[:validation_client_name] %>\"" /etc/chef/client.rb` ] || echo "validation_client_name \"<%= @chef_config[:validation_client_name] %>\"" >> /etc/chef/client.rb
|
38
|
-
<% end -%>
|
39
|
-
|
40
|
-
<% if @config[:chef_node_name] %>
|
41
|
-
[ `grep -qx "node_name \"<%= @config[:chef_node_name] %>\"" /etc/chef/client.rb` ] || echo "node_name \"<%= @config[:chef_node_name] %>\"" >> /etc/chef/client.rb
|
42
|
-
<% end -%>
|
43
|
-
|
44
|
-
<% if knife_config[:bootstrap_proxy] %>
|
45
|
-
echo 'http_proxy "knife_config[:bootstrap_proxy]"' >> /etc/chef/client.rb
|
46
|
-
echo 'https_proxy "knife_config[:bootstrap_proxy]"' >> /etc/chef/client.rb
|
47
|
-
<% end -%>
|
48
|
-
|
49
|
-
cat > /etc/chef/first-boot.json <<'EOP'
|
50
|
-
<%= first_boot.to_json %>
|
51
|
-
EOP
|
52
|
-
|
53
|
-
<%= start_chef %>'
|
@@ -1,48 +0,0 @@
|
|
1
|
-
bash -c '
|
2
|
-
<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%>
|
3
|
-
|
4
|
-
if [ ! -f /usr/bin/chef-client ]; then
|
5
|
-
apt-get update
|
6
|
-
apt-get install -y ruby ruby1.8-dev build-essential wget libruby-extras libruby1.8-extras
|
7
|
-
wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz -O - | tar zxf -
|
8
|
-
(cd rubygems-1.6.2 && ruby setup.rb --no-format-executable)
|
9
|
-
fi
|
10
|
-
|
11
|
-
gem update --no-rdoc --no-ri
|
12
|
-
gem install ohai --no-rdoc --no-ri --verbose
|
13
|
-
gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %>
|
14
|
-
|
15
|
-
mkdir -p /etc/chef
|
16
|
-
|
17
|
-
cat > /etc/chef/validation.pem <<'EOP'
|
18
|
-
<%= validation_key %>
|
19
|
-
EOP
|
20
|
-
chmod 0600 /etc/chef/validation.pem
|
21
|
-
|
22
|
-
<% if encrypted_data_bag_secret -%>
|
23
|
-
cat > /etc/chef/encrypted_data_bag_secret <<'EOP'
|
24
|
-
<%= encrypted_data_bag_secret %>
|
25
|
-
EOP
|
26
|
-
chmod 0600 /etc/chef/encrypted_data_bag_secret
|
27
|
-
<% end -%>
|
28
|
-
|
29
|
-
<%# Generate Ohai Hints -%>
|
30
|
-
<% unless @chef_config[:knife][:hints].nil? || @chef_config[:knife][:hints].empty? -%>
|
31
|
-
mkdir -p /etc/chef/ohai/hints
|
32
|
-
|
33
|
-
<% @chef_config[:knife][:hints].each do |name, hash| -%>
|
34
|
-
cat > /etc/chef/ohai/hints/<%= name %>.json <<'EOP'
|
35
|
-
<%= hash.to_json %>
|
36
|
-
EOP
|
37
|
-
<% end -%>
|
38
|
-
<% end -%>
|
39
|
-
|
40
|
-
cat > /etc/chef/client.rb <<'EOP'
|
41
|
-
<%= config_content %>
|
42
|
-
EOP
|
43
|
-
|
44
|
-
cat > /etc/chef/first-boot.json <<'EOP'
|
45
|
-
<%= first_boot.to_json %>
|
46
|
-
EOP
|
47
|
-
|
48
|
-
<%= start_chef %>'
|
@@ -1,46 +0,0 @@
|
|
1
|
-
bash -c '
|
2
|
-
<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%>
|
3
|
-
|
4
|
-
if [ ! -f /usr/bin/chef-client ]; then
|
5
|
-
aptitude update
|
6
|
-
aptitude install -y ruby ruby1.8-dev build-essential wget libruby1.8 rubygems
|
7
|
-
fi
|
8
|
-
|
9
|
-
gem update --no-rdoc --no-ri
|
10
|
-
gem install ohai --no-rdoc --no-ri --verbose
|
11
|
-
gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %>
|
12
|
-
|
13
|
-
mkdir -p /etc/chef
|
14
|
-
|
15
|
-
cat > /etc/chef/validation.pem <<'EOP'
|
16
|
-
<%= validation_key %>
|
17
|
-
EOP
|
18
|
-
chmod 0600 /etc/chef/validation.pem
|
19
|
-
|
20
|
-
<% if encrypted_data_bag_secret -%>
|
21
|
-
cat > /etc/chef/encrypted_data_bag_secret <<'EOP'
|
22
|
-
<%= encrypted_data_bag_secret %>
|
23
|
-
EOP
|
24
|
-
chmod 0600 /etc/chef/encrypted_data_bag_secret
|
25
|
-
<% end -%>
|
26
|
-
|
27
|
-
<%# Generate Ohai Hints -%>
|
28
|
-
<% unless @chef_config[:knife][:hints].nil? || @chef_config[:knife][:hints].empty? -%>
|
29
|
-
mkdir -p /etc/chef/ohai/hints
|
30
|
-
|
31
|
-
<% @chef_config[:knife][:hints].each do |name, hash| -%>
|
32
|
-
cat > /etc/chef/ohai/hints/<%= name %>.json <<'EOP'
|
33
|
-
<%= hash.to_json %>
|
34
|
-
EOP
|
35
|
-
<% end -%>
|
36
|
-
<% end -%>
|
37
|
-
|
38
|
-
cat > /etc/chef/client.rb <<'EOP'
|
39
|
-
<%= config_content %>
|
40
|
-
EOP
|
41
|
-
|
42
|
-
cat > /etc/chef/first-boot.json <<'EOP'
|
43
|
-
<%= first_boot.to_json %>
|
44
|
-
EOP
|
45
|
-
|
46
|
-
<%= start_chef %>'
|