chef 11.10.0.rc.0 → 11.10.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (401) hide show
  1. data/Rakefile +0 -75
  2. data/distro/common/html/_sources/ctl_chef_client.txt +36 -0
  3. data/distro/common/html/_sources/ctl_chef_server.txt +26 -0
  4. data/distro/common/html/_sources/ctl_chef_shell.txt +15 -0
  5. data/distro/common/html/_sources/ctl_chef_solo.txt +25 -0
  6. data/distro/common/html/_sources/index.txt +126 -0
  7. data/distro/common/html/_sources/knife.txt +74 -0
  8. data/distro/common/html/_sources/knife_bootstrap.txt +56 -0
  9. data/distro/common/html/_sources/knife_client.txt +151 -0
  10. data/distro/common/html/_sources/knife_common_options.txt +6 -0
  11. data/distro/common/html/_sources/knife_configure.txt +29 -0
  12. data/distro/common/html/_sources/knife_cookbook.txt +236 -0
  13. data/distro/common/html/_sources/knife_cookbook_site.txt +157 -0
  14. data/distro/common/html/_sources/knife_data_bag.txt +160 -0
  15. data/distro/common/html/_sources/knife_delete.txt +26 -0
  16. data/distro/common/html/_sources/knife_deps.txt +61 -0
  17. data/distro/common/html/_sources/knife_diff.txt +34 -0
  18. data/distro/common/html/_sources/knife_download.txt +44 -0
  19. data/distro/common/html/_sources/knife_edit.txt +26 -0
  20. data/distro/common/html/_sources/knife_environment.txt +158 -0
  21. data/distro/common/html/_sources/knife_exec.txt +47 -0
  22. data/distro/common/html/_sources/knife_index_rebuild.txt +21 -0
  23. data/distro/common/html/_sources/knife_list.txt +33 -0
  24. data/distro/common/html/_sources/knife_node.txt +250 -0
  25. data/distro/common/html/_sources/knife_raw.txt +35 -0
  26. data/distro/common/html/_sources/knife_recipe_list.txt +23 -0
  27. data/distro/common/html/_sources/knife_role.txt +157 -0
  28. data/distro/common/html/_sources/knife_search.txt +53 -0
  29. data/distro/common/html/_sources/knife_show.txt +27 -0
  30. data/distro/common/html/_sources/knife_ssh.txt +43 -0
  31. data/distro/common/html/_sources/knife_status.txt +37 -0
  32. data/distro/common/html/_sources/knife_tag.txt +69 -0
  33. data/distro/common/html/_sources/knife_upload.txt +49 -0
  34. data/distro/common/html/_sources/knife_user.txt +127 -0
  35. data/distro/common/html/_sources/knife_using.txt +43 -0
  36. data/distro/common/html/_sources/knife_xargs.txt +30 -0
  37. data/distro/common/html/_static/ajax-loader.gif +0 -0
  38. data/distro/common/html/_static/basic.css +540 -0
  39. data/distro/common/html/_static/chef.css +507 -0
  40. data/distro/common/html/_static/chef.ico +0 -0
  41. data/distro/common/html/_static/chef_html_logo.png +0 -0
  42. data/distro/common/html/_static/chef_logo.png +0 -0
  43. data/distro/common/html/_static/comment-bright.png +0 -0
  44. data/distro/common/html/_static/comment-close.png +0 -0
  45. data/distro/common/html/_static/comment.png +0 -0
  46. data/distro/common/html/_static/contents.png +0 -0
  47. data/distro/common/html/_static/doctools.js +247 -0
  48. data/distro/common/html/_static/down-pressed.png +0 -0
  49. data/distro/common/html/_static/down.png +0 -0
  50. data/distro/common/html/_static/file.png +0 -0
  51. data/distro/common/html/_static/guide.css +505 -0
  52. data/distro/common/html/_static/jquery.js +154 -0
  53. data/distro/common/html/_static/minus.png +0 -0
  54. data/distro/common/html/_static/navigation.png +0 -0
  55. data/distro/common/html/_static/plus.png +0 -0
  56. data/distro/common/html/_static/pygments.css +62 -0
  57. data/distro/common/html/_static/searchtools.js +560 -0
  58. data/distro/common/html/_static/underscore.js +23 -0
  59. data/distro/common/html/_static/up-pressed.png +0 -0
  60. data/distro/common/html/_static/up.png +0 -0
  61. data/distro/common/html/_static/websupport.js +808 -0
  62. data/distro/common/html/ctl_chef_client.html +219 -0
  63. data/distro/common/html/ctl_chef_server.html +111 -0
  64. data/distro/common/html/ctl_chef_shell.html +120 -0
  65. data/distro/common/html/ctl_chef_solo.html +144 -0
  66. data/distro/common/html/index.html +185 -0
  67. data/distro/common/html/knife.html +172 -0
  68. data/distro/common/html/knife_bootstrap.html +250 -0
  69. data/distro/common/html/knife_client.html +283 -0
  70. data/distro/common/html/knife_common_options.html +98 -0
  71. data/distro/common/html/knife_configure.html +107 -0
  72. data/distro/common/html/knife_cookbook.html +481 -0
  73. data/distro/common/html/knife_cookbook_site.html +372 -0
  74. data/distro/common/html/knife_data_bag.html +359 -0
  75. data/distro/common/html/knife_delete.html +95 -0
  76. data/distro/common/html/knife_deps.html +145 -0
  77. data/distro/common/html/knife_diff.html +125 -0
  78. data/distro/common/html/knife_download.html +147 -0
  79. data/distro/common/html/knife_edit.html +91 -0
  80. data/distro/common/html/knife_environment.html +328 -0
  81. data/distro/common/html/knife_exec.html +222 -0
  82. data/distro/common/html/knife_index_rebuild.html +85 -0
  83. data/distro/common/html/knife_list.html +116 -0
  84. data/distro/common/html/knife_node.html +450 -0
  85. data/distro/common/html/knife_raw.html +112 -0
  86. data/distro/common/html/knife_recipe_list.html +93 -0
  87. data/distro/common/html/knife_role.html +295 -0
  88. data/distro/common/html/knife_search.html +204 -0
  89. data/distro/common/html/knife_show.html +106 -0
  90. data/distro/common/html/knife_ssh.html +179 -0
  91. data/distro/common/html/knife_status.html +142 -0
  92. data/distro/common/html/knife_tag.html +140 -0
  93. data/distro/common/html/knife_upload.html +155 -0
  94. data/distro/common/html/knife_user.html +244 -0
  95. data/distro/common/html/knife_using.html +211 -0
  96. data/distro/common/html/knife_xargs.html +115 -0
  97. data/distro/common/html/objects.inv +0 -0
  98. data/distro/common/html/search.html +84 -0
  99. data/distro/common/html/searchindex.js +1 -0
  100. data/distro/common/man/man1/chef-shell.1 +5 -5
  101. data/distro/common/man/man1/knife-bootstrap.1 +6 -9
  102. data/distro/common/man/man1/knife-client.1 +1 -9
  103. data/distro/common/man/man1/knife-configure.1 +10 -6
  104. data/distro/common/man/man1/knife-cookbook-site.1 +1 -9
  105. data/distro/common/man/man1/knife-cookbook.1 +11 -21
  106. data/distro/common/man/man1/knife-data-bag.1 +8 -22
  107. data/distro/common/man/man1/knife-delete.1 +1 -1
  108. data/distro/common/man/man1/knife-deps.1 +4 -12
  109. data/distro/common/man/man1/knife-diff.1 +1 -1
  110. data/distro/common/man/man1/knife-download.1 +2 -2
  111. data/distro/common/man/man1/knife-edit.1 +1 -1
  112. data/distro/common/man/man1/knife-environment.1 +108 -9
  113. data/distro/common/man/man1/knife-exec.1 +1 -15
  114. data/distro/common/man/man1/knife-index-rebuild.1 +1 -1
  115. data/distro/common/man/man1/knife-list.1 +1 -1
  116. data/distro/common/man/man1/knife-node.1 +3 -13
  117. data/distro/common/man/man1/knife-raw.1 +1 -1
  118. data/distro/common/man/man1/knife-recipe-list.1 +1 -1
  119. data/distro/common/man/man1/knife-role.1 +2 -12
  120. data/distro/common/man/man1/knife-search.1 +5 -5
  121. data/distro/common/man/man1/knife-show.1 +1 -3
  122. data/distro/common/man/man1/knife-ssh.1 +1 -5
  123. data/distro/common/man/man1/knife-status.1 +1 -1
  124. data/distro/common/man/man1/knife-tag.1 +1 -9
  125. data/distro/common/man/man1/knife-upload.1 +7 -9
  126. data/distro/common/man/man1/knife-user.1 +3 -17
  127. data/distro/common/man/man1/knife-xargs.1 +1 -3
  128. data/distro/common/man/man8/chef-client.8 +18 -18
  129. data/distro/common/man/man8/chef-solo.8 +12 -6
  130. data/lib/chef/client.rb +9 -5
  131. data/lib/chef/cookbook_uploader.rb +1 -1
  132. data/lib/chef/dsl/recipe.rb +119 -38
  133. data/lib/chef/exceptions.rb +4 -0
  134. data/lib/chef/policy_builder/expand_node_object.rb +11 -4
  135. data/lib/chef/policy_builder/policyfile.rb +7 -1
  136. data/lib/chef/provider/file.rb +1 -0
  137. data/lib/chef/resource_platform_map.rb +1 -1
  138. data/lib/chef/resource_reporter.rb +2 -2
  139. data/lib/chef/version.rb +1 -1
  140. data/spec/functional/knife/cookbook_delete_spec.rb +9 -9
  141. data/spec/functional/knife/ssh_spec.rb +1 -1
  142. data/spec/functional/resource/link_spec.rb +6 -6
  143. data/spec/functional/resource/registry_spec.rb +7 -7
  144. data/spec/functional/run_lock_spec.rb +1 -1
  145. data/spec/integration/knife/download_spec.rb +1 -1
  146. data/spec/integration/solo/solo_spec.rb +1 -1
  147. data/spec/spec_helper.rb +0 -1
  148. data/spec/stress/win32/file_spec.rb +6 -0
  149. data/spec/support/lib/chef/resource/zen_master.rb +1 -1
  150. data/spec/support/mock/platform.rb +1 -1
  151. data/spec/support/shared/functional/file_resource.rb +0 -2
  152. data/spec/support/shared/functional/securable_resource.rb +2 -2
  153. data/spec/support/shared/unit/api_error_inspector.rb +7 -7
  154. data/spec/support/shared/unit/provider/file.rb +47 -8
  155. data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +23 -23
  156. data/spec/unit/api_client/registration_spec.rb +5 -5
  157. data/spec/unit/api_client_spec.rb +2 -2
  158. data/spec/unit/application/apply.rb +6 -6
  159. data/spec/unit/application/client_spec.rb +6 -6
  160. data/spec/unit/application/knife_spec.rb +5 -5
  161. data/spec/unit/application/solo_spec.rb +13 -13
  162. data/spec/unit/application_spec.rb +19 -19
  163. data/spec/unit/checksum/storage/filesystem_spec.rb +2 -2
  164. data/spec/unit/client_spec.rb +23 -23
  165. data/spec/unit/config_spec.rb +4 -4
  166. data/spec/unit/cookbook/metadata_spec.rb +22 -22
  167. data/spec/unit/cookbook/synchronizer_spec.rb +17 -17
  168. data/spec/unit/daemon_spec.rb +21 -22
  169. data/spec/unit/data_bag_item_spec.rb +8 -8
  170. data/spec/unit/data_bag_spec.rb +6 -6
  171. data/spec/unit/deprecation_spec.rb +1 -1
  172. data/spec/unit/dsl/data_query_spec.rb +1 -1
  173. data/spec/unit/environment_spec.rb +5 -5
  174. data/spec/unit/file_access_control_spec.rb +5 -5
  175. data/spec/unit/file_cache_spec.rb +1 -1
  176. data/spec/unit/file_content_management/deploy/mv_unix_spec.rb +1 -1
  177. data/spec/unit/file_content_management/deploy/mv_windows_spec.rb +12 -12
  178. data/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +4 -4
  179. data/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb +4 -4
  180. data/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb +1 -1
  181. data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +6 -6
  182. data/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb +4 -4
  183. data/spec/unit/handler/json_file_spec.rb +1 -1
  184. data/spec/unit/handler_spec.rb +3 -3
  185. data/spec/unit/knife/bootstrap_spec.rb +17 -17
  186. data/spec/unit/knife/client_bulk_delete_spec.rb +4 -4
  187. data/spec/unit/knife/client_create_spec.rb +7 -7
  188. data/spec/unit/knife/client_reregister_spec.rb +2 -2
  189. data/spec/unit/knife/client_show_spec.rb +1 -1
  190. data/spec/unit/knife/config_file_selection_spec.rb +4 -4
  191. data/spec/unit/knife/configure_client_spec.rb +4 -4
  192. data/spec/unit/knife/configure_spec.rb +16 -16
  193. data/spec/unit/knife/cookbook_bulk_delete_spec.rb +10 -10
  194. data/spec/unit/knife/cookbook_create_spec.rb +5 -5
  195. data/spec/unit/knife/cookbook_delete_spec.rb +6 -6
  196. data/spec/unit/knife/cookbook_download_spec.rb +10 -10
  197. data/spec/unit/knife/cookbook_list_spec.rb +3 -3
  198. data/spec/unit/knife/cookbook_metadata_from_file_spec.rb +2 -2
  199. data/spec/unit/knife/cookbook_metadata_spec.rb +8 -8
  200. data/spec/unit/knife/cookbook_show_spec.rb +4 -4
  201. data/spec/unit/knife/cookbook_site_download_spec.rb +3 -3
  202. data/spec/unit/knife/cookbook_site_install_spec.rb +8 -8
  203. data/spec/unit/knife/cookbook_site_share_spec.rb +22 -22
  204. data/spec/unit/knife/cookbook_site_unshare_spec.rb +8 -8
  205. data/spec/unit/knife/cookbook_test_spec.rb +7 -7
  206. data/spec/unit/knife/cookbook_upload_spec.rb +20 -20
  207. data/spec/unit/knife/core/cookbook_scm_repo_spec.rb +6 -6
  208. data/spec/unit/knife/core/object_loader_spec.rb +1 -1
  209. data/spec/unit/knife/core/ui_spec.rb +19 -21
  210. data/spec/unit/knife/data_bag_create_spec.rb +4 -4
  211. data/spec/unit/knife/data_bag_edit_spec.rb +7 -7
  212. data/spec/unit/knife/data_bag_from_file_spec.rb +15 -15
  213. data/spec/unit/knife/data_bag_show_spec.rb +5 -5
  214. data/spec/unit/knife/environment_create_spec.rb +6 -6
  215. data/spec/unit/knife/environment_delete_spec.rb +6 -6
  216. data/spec/unit/knife/environment_edit_spec.rb +5 -5
  217. data/spec/unit/knife/environment_from_file_spec.rb +7 -7
  218. data/spec/unit/knife/environment_list_spec.rb +4 -4
  219. data/spec/unit/knife/environment_show_spec.rb +4 -4
  220. data/spec/unit/knife/index_rebuild_spec.rb +2 -2
  221. data/spec/unit/knife/knife_help.rb +11 -11
  222. data/spec/unit/knife/node_bulk_delete_spec.rb +4 -4
  223. data/spec/unit/knife/node_delete_spec.rb +5 -5
  224. data/spec/unit/knife/node_edit_spec.rb +2 -2
  225. data/spec/unit/knife/node_from_file_spec.rb +5 -5
  226. data/spec/unit/knife/node_list_spec.rb +3 -3
  227. data/spec/unit/knife/node_run_list_add_spec.rb +3 -3
  228. data/spec/unit/knife/node_run_list_remove_spec.rb +4 -4
  229. data/spec/unit/knife/node_run_list_set_spec.rb +5 -5
  230. data/spec/unit/knife/node_show_spec.rb +2 -2
  231. data/spec/unit/knife/role_bulk_delete_spec.rb +4 -4
  232. data/spec/unit/knife/role_create_spec.rb +5 -5
  233. data/spec/unit/knife/role_delete_spec.rb +5 -5
  234. data/spec/unit/knife/role_edit_spec.rb +5 -5
  235. data/spec/unit/knife/role_from_file_spec.rb +5 -5
  236. data/spec/unit/knife/role_list_spec.rb +2 -2
  237. data/spec/unit/knife/ssh_spec.rb +6 -6
  238. data/spec/unit/knife/status_spec.rb +4 -4
  239. data/spec/unit/knife/tag_create_spec.rb +3 -3
  240. data/spec/unit/knife/tag_delete_spec.rb +3 -3
  241. data/spec/unit/knife/tag_list_spec.rb +2 -2
  242. data/spec/unit/knife/user_create_spec.rb +7 -7
  243. data/spec/unit/knife/user_reregister_spec.rb +3 -3
  244. data/spec/unit/knife/user_show_spec.rb +1 -1
  245. data/spec/unit/knife_spec.rb +29 -29
  246. data/spec/unit/lwrp_spec.rb +2 -2
  247. data/spec/unit/mixin/checksum_spec.rb +2 -2
  248. data/spec/unit/mixin/command_spec.rb +1 -1
  249. data/spec/unit/mixin/enforce_ownership_and_permissions_spec.rb +4 -4
  250. data/spec/unit/mixin/params_validate_spec.rb +17 -17
  251. data/spec/unit/mixin/path_sanity_spec.rb +8 -8
  252. data/spec/unit/mixin/securable_spec.rb +87 -87
  253. data/spec/unit/mixin/shell_out_spec.rb +1 -1
  254. data/spec/unit/mixin/template_spec.rb +2 -2
  255. data/spec/unit/node/attribute_spec.rb +3 -3
  256. data/spec/unit/node_spec.rb +12 -12
  257. data/spec/unit/platform_spec.rb +1 -1
  258. data/spec/unit/policy_builder/expand_node_object_spec.rb +16 -0
  259. data/spec/unit/policy_builder/policyfile_spec.rb +4 -0
  260. data/spec/unit/provider/breakpoint_spec.rb +8 -8
  261. data/spec/unit/provider/cookbook_file/content_spec.rb +4 -4
  262. data/spec/unit/provider/cookbook_file_spec.rb +1 -1
  263. data/spec/unit/provider/cron/unix_spec.rb +11 -11
  264. data/spec/unit/provider/cron_spec.rb +40 -40
  265. data/spec/unit/provider/deploy/revision_spec.rb +11 -12
  266. data/spec/unit/provider/deploy/timestamped_spec.rb +3 -3
  267. data/spec/unit/provider/deploy_spec.rb +50 -50
  268. data/spec/unit/provider/directory_spec.rb +18 -18
  269. data/spec/unit/provider/env_spec.rb +15 -15
  270. data/spec/unit/provider/erl_call_spec.rb +1 -1
  271. data/spec/unit/provider/execute_spec.rb +5 -5
  272. data/spec/unit/provider/file/content_spec.rb +5 -5
  273. data/spec/unit/provider/file_spec.rb +1 -1
  274. data/spec/unit/provider/git_spec.rb +47 -47
  275. data/spec/unit/provider/group/dscl_spec.rb +16 -15
  276. data/spec/unit/provider/group/gpasswd_spec.rb +6 -5
  277. data/spec/unit/provider/group/groupadd_spec.rb +10 -10
  278. data/spec/unit/provider/group/groupmod_spec.rb +3 -3
  279. data/spec/unit/provider/group/pw_spec.rb +9 -8
  280. data/spec/unit/provider/group/usermod_spec.rb +13 -12
  281. data/spec/unit/provider/group/windows_spec.rb +9 -9
  282. data/spec/unit/provider/group_spec.rb +31 -31
  283. data/spec/unit/provider/http_request_spec.rb +3 -3
  284. data/spec/unit/provider/ifconfig/aix_spec.rb +7 -7
  285. data/spec/unit/provider/ifconfig/debian_spec.rb +3 -3
  286. data/spec/unit/provider/ifconfig/redhat_spec.rb +5 -5
  287. data/spec/unit/provider/ifconfig_spec.rb +13 -13
  288. data/spec/unit/provider/link_spec.rb +33 -33
  289. data/spec/unit/provider/mdadm_spec.rb +4 -4
  290. data/spec/unit/provider/mount/aix_spec.rb +5 -5
  291. data/spec/unit/provider/mount/mount_spec.rb +49 -50
  292. data/spec/unit/provider/mount/windows_spec.rb +18 -18
  293. data/spec/unit/provider/mount_spec.rb +12 -12
  294. data/spec/unit/provider/ohai_spec.rb +6 -6
  295. data/spec/unit/provider/package/aix_spec.rb +14 -14
  296. data/spec/unit/provider/package/apt_spec.rb +10 -10
  297. data/spec/unit/provider/package/dpkg_spec.rb +13 -13
  298. data/spec/unit/provider/package/easy_install_spec.rb +6 -6
  299. data/spec/unit/provider/package/freebsd_spec.rb +29 -29
  300. data/spec/unit/provider/package/ips_spec.rb +4 -4
  301. data/spec/unit/provider/package/macports_spec.rb +6 -6
  302. data/spec/unit/provider/package/pacman_spec.rb +17 -17
  303. data/spec/unit/provider/package/portage_spec.rb +18 -18
  304. data/spec/unit/provider/package/rpm_spec.rb +7 -7
  305. data/spec/unit/provider/package/rubygems_spec.rb +31 -31
  306. data/spec/unit/provider/package/smartos_spec.rb +4 -4
  307. data/spec/unit/provider/package/solaris_spec.rb +15 -15
  308. data/spec/unit/provider/package/yum_spec.rb +100 -100
  309. data/spec/unit/provider/package/zypper_spec.rb +10 -10
  310. data/spec/unit/provider/package_spec.rb +21 -21
  311. data/spec/unit/provider/registry_key_spec.rb +2 -2
  312. data/spec/unit/provider/remote_file/content_spec.rb +31 -31
  313. data/spec/unit/provider/remote_file/fetcher_spec.rb +8 -8
  314. data/spec/unit/provider/remote_file/ftp_spec.rb +10 -10
  315. data/spec/unit/provider/remote_file/http_spec.rb +4 -4
  316. data/spec/unit/provider/remote_file/local_file_spec.rb +2 -2
  317. data/spec/unit/provider/remote_file_spec.rb +1 -1
  318. data/spec/unit/provider/route_spec.rb +23 -23
  319. data/spec/unit/provider/script_spec.rb +5 -5
  320. data/spec/unit/provider/service/arch_service_spec.rb +41 -41
  321. data/spec/unit/provider/service/debian_service_spec.rb +23 -23
  322. data/spec/unit/provider/service/freebsd_service_spec.rb +33 -33
  323. data/spec/unit/provider/service/gentoo_service_spec.rb +16 -16
  324. data/spec/unit/provider/service/init_service_spec.rb +13 -13
  325. data/spec/unit/provider/service/insserv_service_spec.rb +4 -4
  326. data/spec/unit/provider/service/invokercd_service_spec.rb +12 -12
  327. data/spec/unit/provider/service/macosx_spec.rb +20 -20
  328. data/spec/unit/provider/service/redhat_spec.rb +15 -15
  329. data/spec/unit/provider/service/simple_service_spec.rb +9 -9
  330. data/spec/unit/provider/service/solaris_smf_service_spec.rb +13 -13
  331. data/spec/unit/provider/service/systemd_service_spec.rb +28 -28
  332. data/spec/unit/provider/service/upstart_service_spec.rb +41 -41
  333. data/spec/unit/provider/service/windows_spec.rb +37 -37
  334. data/spec/unit/provider/service_spec.rb +9 -9
  335. data/spec/unit/provider/subversion_spec.rb +36 -36
  336. data/spec/unit/provider/template/content_spec.rb +8 -8
  337. data/spec/unit/provider/template_spec.rb +1 -1
  338. data/spec/unit/provider/user/dscl_spec.rb +9 -9
  339. data/spec/unit/provider/user/pw_spec.rb +20 -20
  340. data/spec/unit/provider/user/solaris_spec.rb +5 -5
  341. data/spec/unit/provider/user/windows_spec.rb +8 -8
  342. data/spec/unit/provider/user_spec.rb +34 -34
  343. data/spec/unit/provider_spec.rb +3 -3
  344. data/spec/unit/recipe_spec.rb +79 -4
  345. data/spec/unit/registry_helper_spec.rb +2 -2
  346. data/spec/unit/resource/cron_spec.rb +2 -2
  347. data/spec/unit/resource/directory_spec.rb +5 -5
  348. data/spec/unit/resource/env_spec.rb +2 -2
  349. data/spec/unit/resource/erl_call_spec.rb +1 -1
  350. data/spec/unit/resource/file_spec.rb +8 -8
  351. data/spec/unit/resource/group_spec.rb +3 -3
  352. data/spec/unit/resource/link_spec.rb +8 -8
  353. data/spec/unit/resource/mdadm_spec.rb +3 -3
  354. data/spec/unit/resource/mount_spec.rb +3 -3
  355. data/spec/unit/resource/route_spec.rb +2 -2
  356. data/spec/unit/resource/user_spec.rb +2 -2
  357. data/spec/unit/resource/yum_package_spec.rb +2 -2
  358. data/spec/unit/resource_collection_spec.rb +1 -1
  359. data/spec/unit/resource_definition_spec.rb +2 -2
  360. data/spec/unit/resource_reporter_spec.rb +71 -16
  361. data/spec/unit/resource_spec.rb +3 -3
  362. data/spec/unit/rest/auth_credentials_spec.rb +2 -2
  363. data/spec/unit/rest_spec.rb +3 -40
  364. data/spec/unit/run_list/run_list_expansion_spec.rb +3 -3
  365. data/spec/unit/run_list_spec.rb +9 -9
  366. data/spec/unit/run_status_spec.rb +1 -1
  367. data/spec/unit/runner_spec.rb +8 -8
  368. data/spec/unit/scan_access_control_spec.rb +3 -3
  369. data/spec/unit/search/query_spec.rb +7 -7
  370. data/spec/unit/shell/model_wrapper_spec.rb +2 -2
  371. data/spec/unit/shell/shell_ext_spec.rb +15 -15
  372. data/spec/unit/shell/shell_session_spec.rb +9 -9
  373. data/spec/unit/shell_spec.rb +1 -2
  374. data/spec/unit/user_spec.rb +4 -4
  375. data/spec/unit/util/backup_spec.rb +1 -1
  376. data/spec/unit/util/selinux_spec.rb +7 -7
  377. metadata +106 -51
  378. data/distro/common/html/chef-client.8.html +0 -145
  379. data/distro/common/html/chef-expander.8.html +0 -164
  380. data/distro/common/html/chef-expanderctl.8.html +0 -146
  381. data/distro/common/html/chef-server-webui.8.html +0 -185
  382. data/distro/common/html/chef-server.8.html +0 -182
  383. data/distro/common/html/chef-shell.1.html +0 -286
  384. data/distro/common/html/chef-solo.8.html +0 -185
  385. data/distro/common/html/chef-solr.8.html +0 -165
  386. data/distro/common/html/knife-bootstrap.1.html +0 -241
  387. data/distro/common/html/knife-client.1.html +0 -219
  388. data/distro/common/html/knife-configure.1.html +0 -170
  389. data/distro/common/html/knife-cookbook-site.1.html +0 -241
  390. data/distro/common/html/knife-cookbook.1.html +0 -381
  391. data/distro/common/html/knife-data-bag.1.html +0 -235
  392. data/distro/common/html/knife-environment.1.html +0 -265
  393. data/distro/common/html/knife-exec.1.html +0 -134
  394. data/distro/common/html/knife-index.1.html +0 -125
  395. data/distro/common/html/knife-node.1.html +0 -250
  396. data/distro/common/html/knife-role.1.html +0 -200
  397. data/distro/common/html/knife-search.1.html +0 -288
  398. data/distro/common/html/knife-ssh.1.html +0 -156
  399. data/distro/common/html/knife-status.1.html +0 -128
  400. data/distro/common/html/knife-tag.1.html +0 -137
  401. data/distro/common/html/knife.1.html +0 -315
@@ -0,0 +1,250 @@
1
+
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
+
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml">
7
+ <head>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
+
10
+ <title>knife bootstrap &mdash; chef-client Man Pages</title>
11
+
12
+ <link rel="stylesheet" href="_static/guide.css" type="text/css" />
13
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
14
+
15
+ <script type="text/javascript">
16
+ var DOCUMENTATION_OPTIONS = {
17
+ URL_ROOT: '',
18
+ VERSION: '',
19
+ COLLAPSE_INDEX: false,
20
+ FILE_SUFFIX: '.html',
21
+ HAS_SOURCE: true
22
+ };
23
+ </script>
24
+ <script type="text/javascript" src="_static/jquery.js"></script>
25
+ <script type="text/javascript" src="_static/underscore.js"></script>
26
+ <script type="text/javascript" src="_static/doctools.js"></script>
27
+ <link rel="shortcut icon" href="_static/chef.ico"/>
28
+
29
+
30
+ </head>
31
+ <body>
32
+ <div style="background-color: #212c35; text-align: left; padding: 0px 0px 0px 0px">
33
+ <a href="http://docs.opscode.com/"><img src="_static/chef_html_logo.png" border="0" alt="Chef"/></a>
34
+ </div>
35
+
36
+
37
+
38
+
39
+ <div class="document">
40
+ <div class="documentwrapper">
41
+
42
+ <div class="body">
43
+
44
+ <div class="section" id="knife-bootstrap">
45
+ <h1>knife bootstrap<a class="headerlink" href="#knife-bootstrap" title="Permalink to this headline">¶</a></h1>
46
+ <p>A bootstrap is a process that installs the chef-client on a target system so that it can run as a chef-client and communicate with a server.</p>
47
+ <p>The <strong>knife bootstrap</strong> subcommand is used to run a bootstrap operation that installs the chef-client on the target system. The bootstrap operation must specify the IP address or FQDN of the target system.</p>
48
+ <div class="admonition note">
49
+ <p class="first admonition-title">Note</p>
50
+ <p class="last">To bootstrap the chef-client on Microsoft Windows machines, the <a class="reference external" href="http://docs.opscode.com/plugin_knife_windows.html">knife-windows</a> plugins is required, which includes the necessary bootstrap scripts that are used to do the actual installation.</p>
51
+ </div>
52
+ <div class="section" id="syntax">
53
+ <h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
54
+ <p>This argument has the following syntax:</p>
55
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife bootstrap FQDN_or_IP_ADDRESS <span class="o">(</span>options<span class="o">)</span>
56
+ </pre></div>
57
+ </div>
58
+ </div>
59
+ <div class="section" id="options">
60
+ <h2>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h2>
61
+ <div class="admonition note">
62
+ <p class="first admonition-title">Note</p>
63
+ <p class="last">Review the list of <a class="reference internal" href="knife_common_options.html"><em>common options</em></a> available to this (and all) Knife subcommands and plugins.</p>
64
+ </div>
65
+ <p>This subcommand has the following options:</p>
66
+ <dl class="docutils">
67
+ <dt><tt class="docutils literal"><span class="pre">-A</span></tt>, <tt class="docutils literal"><span class="pre">--forward-agent</span></tt></dt>
68
+ <dd>Indicates that SSH agent forwarding is enabled.</dd>
69
+ <dt><tt class="docutils literal"><span class="pre">--bootstrap-no-proxy</span> <span class="pre">NO_PROXY_URL_or_IP</span></tt></dt>
70
+ <dd>A URL or IP address that specifies a location that should not be proxied. Note: This option is used internally by Chef to help verify bootstrap operations during testing and should never be used during an actual bootstrap operation.</dd>
71
+ <dt><tt class="docutils literal"><span class="pre">--bootstrap-proxy</span> <span class="pre">PROXY_URL</span></tt></dt>
72
+ <dd>The proxy server for the node that is the target of a bootstrap operation.</dd>
73
+ <dt><tt class="docutils literal"><span class="pre">--bootstrap-version</span> <span class="pre">VERSION</span></tt></dt>
74
+ <dd>The version of the chef-client to install.</dd>
75
+ <dt><tt class="docutils literal"><span class="pre">-d</span> <span class="pre">DISTRO</span></tt>, <tt class="docutils literal"><span class="pre">--distro</span> <span class="pre">DISTRO</span></tt></dt>
76
+ <dd><div class="first admonition warning">
77
+ <p class="first admonition-title">Warning</p>
78
+ <p class="last">The default bootstrap operation uses the omnibus installer, which means the default template file (<tt class="docutils literal"><span class="pre">chef-full</span></tt>) should work on all supported platforms. It is recommended to use custom bootstrap templates only when the omnibus installer cannot be used.</p>
79
+ </div>
80
+ <p class="last">The template file to be used during a bootstrap operation. The following distributions are supported: <tt class="docutils literal"><span class="pre">chef-full</span></tt> (the default bootstrap), <tt class="docutils literal"><span class="pre">centos5-gems</span></tt>, <tt class="docutils literal"><span class="pre">fedora13-gems</span></tt>, <tt class="docutils literal"><span class="pre">ubuntu10.04-gems</span></tt>, <tt class="docutils literal"><span class="pre">ubuntu10.04-apt</span></tt>, <tt class="docutils literal"><span class="pre">ubuntu12.04-gems</span></tt>, and the name of a custom bootstrap template file. When this option is used, Knife will search for the template file in the following order: the <tt class="docutils literal"><span class="pre">bootstrap/</span></tt> folder in the current working directory, the <tt class="docutils literal"><span class="pre">bootstrap/</span></tt> folder in the chef-repo, the <tt class="docutils literal"><span class="pre">bootstrap/</span></tt> folder in the <tt class="docutils literal"><span class="pre">~/.chef/</span></tt> directory, or a default bootstrap file. Do not use the <tt class="docutils literal"><span class="pre">--template-file</span></tt> option when <tt class="docutils literal"><span class="pre">--distro</span></tt> is specified.</p>
81
+ </dd>
82
+ <dt><tt class="docutils literal"><span class="pre">-G</span> <span class="pre">GATEWAY</span></tt>, <tt class="docutils literal"><span class="pre">--ssh-gateway</span> <span class="pre">GATEWAY</span></tt></dt>
83
+ <dd>The SSH tunnel or gateway that is used to run a bootstrap action on a machine that is not accessible from the workstation.</dd>
84
+ <dt><tt class="docutils literal"><span class="pre">--hint</span> <span class="pre">HINT_NAME[=HINT_FILE]</span></tt></dt>
85
+ <dd>An Ohai hint to be set on the target of the bootstrap. The hint is contained in a file and is formatted as JSON: <tt class="docutils literal"><span class="pre">{&quot;attribute&quot;:&quot;value&quot;,&quot;attribute&quot;:&quot;value&quot;...}</span></tt>. <tt class="docutils literal"><span class="pre">HINT_NAME</span></tt> is the name of the hint and <tt class="docutils literal"><span class="pre">HINT_FILE</span></tt> is the name of the hint file located at <tt class="docutils literal"><span class="pre">/etc/chef/ohai/hints/HINT_FILE.json</span></tt>. Use multiple <tt class="docutils literal"><span class="pre">--hint</span></tt> options in the command to specify multiple hints.</dd>
86
+ <dt><tt class="docutils literal"><span class="pre">-i</span> <span class="pre">IDENTITY_FILE</span></tt>, <tt class="docutils literal"><span class="pre">--identity-file</span> <span class="pre">IDENTITY_FILE</span></tt></dt>
87
+ <dd>The SSH identity file used for authentication. Key-based authentication is recommended.</dd>
88
+ <dt><tt class="docutils literal"><span class="pre">-j</span> <span class="pre">JSON_ATTRIBS</span></tt>, <tt class="docutils literal"><span class="pre">--json-attributes</span> <span class="pre">JSON_ATTRIBS</span></tt></dt>
89
+ <dd>A JSON string that is added to the first run of a chef-client.</dd>
90
+ <dt><tt class="docutils literal"><span class="pre">-N</span> <span class="pre">NAME</span></tt>, <tt class="docutils literal"><span class="pre">--node-name</span> <span class="pre">NAME</span></tt></dt>
91
+ <dd>The name of the node.</dd>
92
+ <dt><tt class="docutils literal"><span class="pre">--[no-]host-key-verify</span></tt></dt>
93
+ <dd>Use <tt class="docutils literal"><span class="pre">--no-host-key-verify</span></tt> to disable host key verification. Default setting: <tt class="docutils literal"><span class="pre">--host-key-verify</span></tt>.</dd>
94
+ <dt><tt class="docutils literal"><span class="pre">-p</span> <span class="pre">PORT</span></tt>, <tt class="docutils literal"><span class="pre">--ssh-port</span> <span class="pre">PORT</span></tt></dt>
95
+ <dd>The SSH port.</dd>
96
+ <dt><tt class="docutils literal"><span class="pre">-P</span> <span class="pre">PASSWORD</span></tt>, <tt class="docutils literal"><span class="pre">--ssh-password</span> <span class="pre">PASSWORD</span></tt></dt>
97
+ <dd>The SSH password. This can be used to pass the password directly on the command line. If this option is not specified (and a password is required) Knife will prompt for the password.</dd>
98
+ <dt><tt class="docutils literal"><span class="pre">--prerelease</span></tt></dt>
99
+ <dd>Indicates that pre-release gems should be installed.</dd>
100
+ <dt><tt class="docutils literal"><span class="pre">-r</span> <span class="pre">RUN_LIST</span></tt>, <tt class="docutils literal"><span class="pre">--run-list</span> <span class="pre">RUN_LIST</span></tt></dt>
101
+ <dd>A comma-separated list of roles and/or recipes to be applied.</dd>
102
+ <dt><tt class="docutils literal"><span class="pre">--secret</span> <span class="pre">SECRET</span></tt></dt>
103
+ <dd>The encryption key that is used for values contained within a data bag item.</dd>
104
+ <dt><tt class="docutils literal"><span class="pre">--secret-file</span> <span class="pre">FILE</span></tt></dt>
105
+ <dd>The path to the file that contains the encryption key.</dd>
106
+ <dt><tt class="docutils literal"><span class="pre">--sudo</span></tt></dt>
107
+ <dd>Indicates that a bootstrap operation should be executed using sudo.</dd>
108
+ <dt><tt class="docutils literal"><span class="pre">--template-file</span> <span class="pre">TEMPLATE</span></tt></dt>
109
+ <dd>The path to a template file that will be used during a bootstrap operation. Do not use the <tt class="docutils literal"><span class="pre">--distro</span></tt> option when <tt class="docutils literal"><span class="pre">--template-file</span></tt> is specified.</dd>
110
+ <dt><tt class="docutils literal"><span class="pre">--use-sudo-password</span></tt></dt>
111
+ <dd>Indicates that a bootstrap operation is done using sudo, with the password specified by the <tt class="docutils literal"><span class="pre">-P</span></tt> (or <tt class="docutils literal"><span class="pre">--ssh-password</span></tt>) option.</dd>
112
+ <dt><tt class="docutils literal"><span class="pre">-x</span> <span class="pre">USERNAME</span></tt>, <tt class="docutils literal"><span class="pre">--ssh-user</span> <span class="pre">USERNAME</span></tt></dt>
113
+ <dd>The SSH user name.</dd>
114
+ </dl>
115
+ </div>
116
+ <div class="section" id="custom-templates">
117
+ <h2>Custom Templates<a class="headerlink" href="#custom-templates" title="Permalink to this headline">¶</a></h2>
118
+ <p>The <tt class="docutils literal"><span class="pre">chef-full</span></tt> distribution uses the omnibus installer. For most bootstrap operations, regardless of the platform on which the target node is running, using the <tt class="docutils literal"><span class="pre">chef-full</span></tt> distribution is the best approach for installing the chef-client on a target node. In some situations, using another supported distribution is necessary. And in some situations, a custom template may be required. For example, the default bootstrap operation relies on an Internet connection to get the distribution to the target node. If a target node cannot access the Internet, then a custom template can be used to define a specific location for the distribution so that the target node may access it during the bootstrap operation.</p>
119
+ <p>A custom bootstrap template file (<tt class="docutils literal"><span class="pre">template_filename.erb</span></tt>) must be located in a <tt class="docutils literal"><span class="pre">bootstrap/</span></tt> directory. Use the <tt class="docutils literal"><span class="pre">--distro</span></tt> option with the <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">bootstrap</span></tt> subcommand to specify the bootstrap template file. For example, a bootstrap template file named &#8220;british_sea_power.erb&#8221;:</p>
120
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife bootstrap 123.456.7.8 -x username -P password --sudo --distro <span class="s2">&quot;british_sea_power.erb&quot;</span>
121
+ </pre></div>
122
+ </div>
123
+ <p>The following examples show how a bootstrap template file can be customized for various platforms.</p>
124
+ <div class="section" id="ubuntu-12-04">
125
+ <h3>Ubuntu 12.04<a class="headerlink" href="#ubuntu-12-04" title="Permalink to this headline">¶</a></h3>
126
+ <p>The following example shows how to modify the default script for Ubuntu 12.04. First, copy the bootstrap template from the default location. If the chef-client is installed from a RubyGems, the full path can be found in the gem contents:</p>
127
+ <div class="highlight-bash"><div class="highlight"><pre>% gem contents chef | grep ubuntu12.04-gems
128
+ /Users/jtimberman/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.2/lib/chef/knife/bootstrap/ubuntu12.04-gems.erb
129
+ </pre></div>
130
+ </div>
131
+ <p>Copy the template to the chef-repo in the <tt class="docutils literal"><span class="pre">.chef/bootstrap</span></tt> directory:</p>
132
+ <div class="highlight-bash"><div class="highlight"><pre>% cp /Users/jtimberman/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.2/
133
+ lib/chef/knife/bootstrap/ubuntu12.04-gems.erb ~/chef-repo/.chef/
134
+ bootstrap/ubuntu12.04-gems-mine.erb
135
+ </pre></div>
136
+ </div>
137
+ <p>Modify the template with any editor, then use it with the <tt class="docutils literal"><span class="pre">-d</span></tt> or <tt class="docutils literal"><span class="pre">--distro</span></tt> option in the <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">bootstrap</span></tt> operation, or use any of the Knife plug-ins that support cloud computing.</p>
138
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife bootstrap 192.168.1.100 -r <span class="s1">&#39;role[webserver]&#39;</span> -d ubuntu12.04-gems-mine
139
+ </pre></div>
140
+ </div>
141
+ <p>Alternatively, an example bootstrap template can be found in the git source for the chef-repo: <a class="reference external" href="https://github.com/opscode/chef/blob/master/lib/chef/knife/bootstrap/ubuntu12.04-gems.erb">https://github.com/opscode/chef/blob/master/lib/chef/knife/bootstrap/ubuntu12.04-gems.erb</a>. Copy the template to <tt class="docutils literal"><span class="pre">~/.chef-repo/.chef/bootstrap/ubuntu12.04-apt.erb</span></tt> and modify the template appropriately.</p>
142
+ </div>
143
+ <div class="section" id="debian-and-apt">
144
+ <h3>Debian and Apt<a class="headerlink" href="#debian-and-apt" title="Permalink to this headline">¶</a></h3>
145
+ <p>The following example shows how to use the <strong>knife bootstrap</strong> sub-command to create a client configuration file (/etc/chef/client.rb) that uses Hosted Chef as the server. The configuration file will look something like:</p>
146
+ <div class="highlight-ruby"><div class="highlight"><pre><span class="n">log_level</span> <span class="ss">:info</span>
147
+ <span class="n">log_location</span> <span class="no">STDOUT</span>
148
+ <span class="n">chef_server_url</span> <span class="s1">&#39;https://api.opscode.com/organizations/ORGNAME&#39;</span>
149
+ <span class="n">validation_client_name</span> <span class="s1">&#39;ORGNAME-validator&#39;</span>
150
+ </pre></div>
151
+ </div>
152
+ <p>The <strong>knife bootstrap</strong> sub-command will look in three locations for the template that is used during the bootstrap operation. The locations are:</p>
153
+ <ol class="arabic simple">
154
+ <li>A bootstrap directory in the installed Knife library; the actual location may vary, depending how the chef-client is installed</li>
155
+ <li>A bootstrap directory in the <tt class="docutils literal"><span class="pre">$PWD/.chef</span></tt>, e.g. in <tt class="docutils literal"><span class="pre">~/chef-repo/.chef</span></tt></li>
156
+ <li>A bootstrap directory in the users <tt class="docutils literal"><span class="pre">$HOME/.chef</span></tt></li>
157
+ </ol>
158
+ <p>If, in the example above, the second location was used, then create the <tt class="docutils literal"><span class="pre">.chef/bootstrap/</span></tt> directory in the chef-repo, and then create the Embedded Ruby (ERB) template file by running commands similar to the following:</p>
159
+ <div class="highlight-bash"><div class="highlight"><pre>mkdir ~/.chef/bootstrap
160
+ vi ~/.chef/bootstrap/debian5.0-apt.erb
161
+ </pre></div>
162
+ </div>
163
+ <p>When finished creating the directory and the Embedded Ruby (ERB) template file, edit the template to run the SSH commands. Then set up the validation certificate and the client configuration file.</p>
164
+ <p>Finally, run the chef-client on the node using a <strong>knife bootstrap</strong> command that specifies a run-list (the <tt class="docutils literal"><span class="pre">-r</span></tt> option). The bootstrap template can be called using a command similar to the following:</p>
165
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife bootstrap mynode.example.com -r <span class="s1">&#39;role[webserver]&#39;</span>,<span class="s1">&#39;role[production]&#39;</span> --distro debian5.0-apt
166
+ </pre></div>
167
+ </div>
168
+ </div>
169
+ <div class="section" id="microsoft-windows">
170
+ <h3>Microsoft Windows<a class="headerlink" href="#microsoft-windows" title="Permalink to this headline">¶</a></h3>
171
+ <p>The following example shows how to modify the default script for Microsoft Windows and Windows PowerShell:</p>
172
+ <div class="highlight-bash"><div class="highlight"><pre>@setlocal
173
+
174
+ &lt;%<span class="o">=</span> <span class="s2">&quot;SETX HTTP_PROXY \&quot;#{knife_config[:bootstrap_proxy]}\&quot;&quot;</span> <span class="k">if </span>knife_config<span class="o">[</span>:bootstrap_proxy<span class="o">]</span> %&gt;
175
+ @mkdir &lt;%<span class="o">=</span> bootstrap_directory %&gt;
176
+
177
+ &gt; &lt;%<span class="o">=</span> bootstrap_directory %&gt;<span class="se">\w</span>get.ps1 <span class="o">(</span>
178
+ &lt;%<span class="o">=</span> win_wget_ps %&gt;
179
+ <span class="o">)</span>
180
+
181
+ :install
182
+ @rem Install Chef using chef-client MSI installer
183
+
184
+ &lt;% <span class="nv">url</span><span class="o">=</span><span class="s2">&quot;http://reposerver.example.com/chef-client-11.6.0.rc.1-1.windows.msi&quot;</span> -%&gt;
185
+ @set <span class="s2">&quot;REMOTE_SOURCE_MSI_URL=&lt;%= url %&gt;&quot;</span>
186
+ @set <span class="s2">&quot;LOCAL_DESTINATION_MSI_PATH=&lt;%= local_download_path %&gt;&quot;</span>
187
+
188
+ @powershell -ExecutionPolicy Unrestricted -NoProfile -NonInteractive <span class="s2">&quot;&amp; &#39;&lt;%= bootstrap_directory %&gt;\wget.ps1&#39; &#39;%REMOTE_SOURCE_MSI_URL%&#39; &#39;%LOCAL_DESTINATION_MSI_PATH%&#39;&quot;</span>
189
+
190
+ @REM Replace install_chef from knife-windows Gem with one that has extra flags to turn on Chef service feature -- only available in Chef &gt;<span class="o">=</span> 11.6.x
191
+ @REM &lt;%<span class="o">=</span> install_chef %&gt;
192
+ @echo Installing Chef Client 11.6.0.rc1 with msiexec
193
+ @msiexec /q /i <span class="s2">&quot;%LOCAL_DESTINATION_MSI_PATH%&quot;</span> <span class="nv">ADDLOCAL</span><span class="o">=</span><span class="s2">&quot;ChefClientFeature,ChefServiceFeature&quot;</span>
194
+ @endlocal
195
+
196
+ @echo Writing validation key...
197
+
198
+ &gt; &lt;%<span class="o">=</span> bootstrap_directory %&gt;<span class="se">\v</span>alidation.pem <span class="o">(</span>
199
+ &lt;%<span class="o">=</span> validation_key %&gt;
200
+ <span class="o">)</span>
201
+
202
+ @echo Validation key written.
203
+
204
+ &lt;% <span class="k">if</span> @config<span class="o">[</span>:encrypted_data_bag_secret<span class="o">]</span> -%&gt;
205
+ &gt; &lt;%<span class="o">=</span> bootstrap_directory %&gt;<span class="se">\e</span>ncrypted_data_bag_secret <span class="o">(</span>
206
+ &lt;%<span class="o">=</span> encrypted_data_bag_secret %&gt;
207
+ <span class="o">)</span>
208
+ &lt;% end -%&gt;
209
+
210
+ &gt; &lt;%<span class="o">=</span> bootstrap_directory %&gt;<span class="se">\c</span>lient.rb <span class="o">(</span>
211
+ &lt;%<span class="o">=</span> config_content %&gt;
212
+ <span class="o">)</span>
213
+
214
+ &gt; &lt;%<span class="o">=</span> bootstrap_directory %&gt;<span class="se">\f</span>irst-boot.json <span class="o">(</span>
215
+ &lt;%<span class="o">=</span> run_list %&gt;
216
+ <span class="o">)</span>
217
+
218
+ &lt;%<span class="o">=</span> start_chef %&gt;
219
+ </pre></div>
220
+ </div>
221
+ </div>
222
+ </div>
223
+ <div class="section" id="examples">
224
+ <h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
225
+ <p>The following examples show how to use this Knife subcommand:</p>
226
+ <p><strong>Use an SSH password</strong></p>
227
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife bootstrap 192.168.1.1 -x username -P PASSWORD --sudo
228
+ </pre></div>
229
+ </div>
230
+ <p><strong>Use a file that contains a private key</strong></p>
231
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife bootstrap 192.168.1.1 -x username -i ~/.ssh/id_rsa --sudo
232
+ </pre></div>
233
+ </div>
234
+ </div>
235
+ </div>
236
+
237
+
238
+ </div>
239
+
240
+ </div>
241
+
242
+
243
+ <div class="clearer"></div>
244
+ </div>
245
+
246
+
247
+
248
+
249
+ </body>
250
+ </html>
@@ -0,0 +1,283 @@
1
+
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
+
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml">
7
+ <head>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
+
10
+ <title>knife client &mdash; chef-client Man Pages</title>
11
+
12
+ <link rel="stylesheet" href="_static/guide.css" type="text/css" />
13
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
14
+
15
+ <script type="text/javascript">
16
+ var DOCUMENTATION_OPTIONS = {
17
+ URL_ROOT: '',
18
+ VERSION: '',
19
+ COLLAPSE_INDEX: false,
20
+ FILE_SUFFIX: '.html',
21
+ HAS_SOURCE: true
22
+ };
23
+ </script>
24
+ <script type="text/javascript" src="_static/jquery.js"></script>
25
+ <script type="text/javascript" src="_static/underscore.js"></script>
26
+ <script type="text/javascript" src="_static/doctools.js"></script>
27
+ <link rel="shortcut icon" href="_static/chef.ico"/>
28
+
29
+
30
+ </head>
31
+ <body>
32
+ <div style="background-color: #212c35; text-align: left; padding: 0px 0px 0px 0px">
33
+ <a href="http://docs.opscode.com/"><img src="_static/chef_html_logo.png" border="0" alt="Chef"/></a>
34
+ </div>
35
+
36
+
37
+
38
+
39
+ <div class="document">
40
+ <div class="documentwrapper">
41
+
42
+ <div class="body">
43
+
44
+ <div class="section" id="knife-client">
45
+ <h1>knife client<a class="headerlink" href="#knife-client" title="Permalink to this headline">¶</a></h1>
46
+ <p>The <strong>knife client</strong> subcommand is used to manage an API client list and their associated RSA public key-pairs. This allows authentication requests to be made to the server by any entity that uses the Chef Server API, such as the chef-client and Knife.</p>
47
+ <div class="admonition note">
48
+ <p class="first admonition-title">Note</p>
49
+ <p class="last">Review the list of <a class="reference internal" href="knife_common_options.html"><em>common options</em></a> available to this (and all) Knife subcommands and plugins.</p>
50
+ </div>
51
+ <div class="section" id="bulk-delete">
52
+ <h2>bulk delete<a class="headerlink" href="#bulk-delete" title="Permalink to this headline">¶</a></h2>
53
+ <p>The <tt class="docutils literal"><span class="pre">bulk</span> <span class="pre">delete</span></tt> argument is used to delete any API client that matches a pattern defined by a regular expression. The regular expression must be within quotes and not be surrounded by forward slashes (/).</p>
54
+ <div class="section" id="syntax">
55
+ <h3>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h3>
56
+ <p>This argument has the following syntax:</p>
57
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife client bulk delete REGEX
58
+ </pre></div>
59
+ </div>
60
+ </div>
61
+ <div class="section" id="options">
62
+ <h3>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h3>
63
+ <p>This command does not have any specific options.</p>
64
+ </div>
65
+ <div class="section" id="examples">
66
+ <h3>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h3>
67
+ <p>None.</p>
68
+ </div>
69
+ </div>
70
+ <div class="section" id="create">
71
+ <h2>create<a class="headerlink" href="#create" title="Permalink to this headline">¶</a></h2>
72
+ <p>The <tt class="docutils literal"><span class="pre">create</span></tt> argument is used to create a new API client. This process will generate an RSA key pair for the named API client. The public key will be stored on the server and the private key will be displayed on <tt class="docutils literal"><span class="pre">STDOUT</span></tt> or written to a named file.</p>
73
+ <ul class="simple">
74
+ <li>For the chef-client, the private key should be copied to the system as <tt class="docutils literal"><span class="pre">/etc/chef/client.pem</span></tt>.</li>
75
+ <li>For Knife, the private key is typically copied to <tt class="docutils literal"><span class="pre">~/.chef/client_name.pem</span></tt> and referenced in the knife.rb configuration file.</li>
76
+ </ul>
77
+ <div class="section" id="id1">
78
+ <h3>Syntax<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
79
+ <p>This argument has the following syntax:</p>
80
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife client create CLIENT_NAME <span class="o">(</span>options<span class="o">)</span>
81
+ </pre></div>
82
+ </div>
83
+ </div>
84
+ <div class="section" id="id2">
85
+ <h3>Options<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
86
+ <p>This argument has the following options:</p>
87
+ <dl class="docutils">
88
+ <dt><tt class="docutils literal"><span class="pre">-a</span></tt>, <tt class="docutils literal"><span class="pre">--admin</span></tt></dt>
89
+ <dd>Indicates that a client will be created as an admin client. This is required when users of the open source server need to access the Chef Server API as an administrator. This option only works when used with the open source server and will have no effect when used with Enterprise Chef.</dd>
90
+ </dl>
91
+ </div>
92
+ <div class="section" id="id3">
93
+ <h3>Examples<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
94
+ <p>The following examples show how to use this Knife subcommand:</p>
95
+ <p><strong>Create an admin client</strong></p>
96
+ <p>To create a Chef Admin client with the name &#8220;exampleorg&#8221; and save its private key to a file, enter:</p>
97
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife client create exampleorg -a -f <span class="s2">&quot;/etc/chef/client.pem&quot;</span>
98
+ </pre></div>
99
+ </div>
100
+ <p><strong>Create an admin client for Enterprise Chef</strong></p>
101
+ <p>When running the <tt class="docutils literal"><span class="pre">create</span></tt> argument on Enterprise Chef, be sure to omit the <tt class="docutils literal"><span class="pre">-a</span></tt> option:</p>
102
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife client create exampleorg -f <span class="s2">&quot;/etc/chef/client.pem&quot;</span>
103
+ </pre></div>
104
+ </div>
105
+ </div>
106
+ </div>
107
+ <div class="section" id="delete">
108
+ <h2>delete<a class="headerlink" href="#delete" title="Permalink to this headline">¶</a></h2>
109
+ <p>The <tt class="docutils literal"><span class="pre">delete</span></tt> argument is used to delete a registered API client.</p>
110
+ <div class="section" id="id4">
111
+ <h3>Syntax<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
112
+ <p>This argument has the following syntax:</p>
113
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife client delete CLIENT_NAME
114
+ </pre></div>
115
+ </div>
116
+ </div>
117
+ <div class="section" id="id5">
118
+ <h3>Options<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
119
+ <p>This command does not have any specific options.</p>
120
+ </div>
121
+ <div class="section" id="id6">
122
+ <h3>Examples<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3>
123
+ <p>The following examples show how to use this Knife subcommand:</p>
124
+ <p><strong>Delete a client</strong></p>
125
+ <p>To delete a client with the name &#8220;client_foo&#8221;, enter:</p>
126
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife client delete client_foo
127
+ </pre></div>
128
+ </div>
129
+ <p>Type <tt class="docutils literal"><span class="pre">Y</span></tt> to confirm a deletion.</p>
130
+ </div>
131
+ </div>
132
+ <div class="section" id="edit">
133
+ <h2>edit<a class="headerlink" href="#edit" title="Permalink to this headline">¶</a></h2>
134
+ <p>The <tt class="docutils literal"><span class="pre">edit</span></tt> argument is used to edit the details of a registered API client. When this argument is run, Knife will open $EDITOR to enable editing of the <tt class="docutils literal"><span class="pre">admin</span></tt> attribute. (None of the other attributes should be changed using this argument.) When finished, Knife will update the server with those changes.</p>
135
+ <div class="section" id="id7">
136
+ <h3>Syntax<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3>
137
+ <p>This argument has the following syntax:</p>
138
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife client edit CLIENT_NAME
139
+ </pre></div>
140
+ </div>
141
+ </div>
142
+ <div class="section" id="id8">
143
+ <h3>Options<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h3>
144
+ <p>This command does not have any specific options.</p>
145
+ </div>
146
+ <div class="section" id="id9">
147
+ <h3>Examples<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h3>
148
+ <p>The following examples show how to use this Knife subcommand:</p>
149
+ <p><strong>Edit a client</strong></p>
150
+ <p>To edit a client with the name &#8220;exampleorg&#8221;, enter:</p>
151
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife client edit exampleorg
152
+ </pre></div>
153
+ </div>
154
+ </div>
155
+ </div>
156
+ <div class="section" id="list">
157
+ <h2>list<a class="headerlink" href="#list" title="Permalink to this headline">¶</a></h2>
158
+ <p>The <tt class="docutils literal"><span class="pre">list</span></tt> argument is used to view a list of registered API client.</p>
159
+ <div class="section" id="id10">
160
+ <h3>Syntax<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h3>
161
+ <p>This argument has the following syntax:</p>
162
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife client list <span class="o">(</span>options<span class="o">)</span>
163
+ </pre></div>
164
+ </div>
165
+ </div>
166
+ <div class="section" id="id11">
167
+ <h3>Options<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h3>
168
+ <p>This argument has the following options:</p>
169
+ <dl class="docutils">
170
+ <dt><tt class="docutils literal"><span class="pre">-w</span></tt>, <tt class="docutils literal"><span class="pre">--with-uri</span></tt></dt>
171
+ <dd>Indicates that the corresponding URIs will be shown.</dd>
172
+ </dl>
173
+ </div>
174
+ <div class="section" id="id12">
175
+ <h3>Examples<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h3>
176
+ <p>The following examples show how to use this Knife subcommand:</p>
177
+ <p><strong>View a list of clients</strong></p>
178
+ <p>To verify the API client list for the server, enter:</p>
179
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife client list
180
+ </pre></div>
181
+ </div>
182
+ <p>to return something similar to:</p>
183
+ <div class="highlight-bash"><div class="highlight"><pre>exampleorg
184
+ i-12345678
185
+ rs-123456
186
+ </pre></div>
187
+ </div>
188
+ <p>To verify that an API client can authenticate to the
189
+ server correctly, try getting a list of clients using <tt class="docutils literal"><span class="pre">-u</span></tt> and <tt class="docutils literal"><span class="pre">-k</span></tt> options to specify its name and private key:</p>
190
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife client list -u ORGNAME -k .chef/ORGNAME.pem
191
+ </pre></div>
192
+ </div>
193
+ </div>
194
+ </div>
195
+ <div class="section" id="reregister">
196
+ <h2>reregister<a class="headerlink" href="#reregister" title="Permalink to this headline">¶</a></h2>
197
+ <p>The <tt class="docutils literal"><span class="pre">reregister</span></tt> argument is used to regenerate an RSA key pair for an API client. The public key will be stored on the server and the private key will be displayed on <tt class="docutils literal"><span class="pre">STDOUT</span></tt> or written to a named file.</p>
198
+ <div class="admonition note">
199
+ <p class="first admonition-title">Note</p>
200
+ <p class="last">Running this argument will invalidate the previous RSA key pair, making it unusable during authentication to the server.</p>
201
+ </div>
202
+ <div class="section" id="id13">
203
+ <h3>Syntax<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h3>
204
+ <p>This argument has the following syntax:</p>
205
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife client reregister CLIENT_NAME <span class="o">(</span>options<span class="o">)</span>
206
+ </pre></div>
207
+ </div>
208
+ </div>
209
+ <div class="section" id="id14">
210
+ <h3>Options<a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h3>
211
+ <p>This argument has the following options:</p>
212
+ <dl class="docutils">
213
+ <dt><tt class="docutils literal"><span class="pre">-f</span> <span class="pre">FILE_NAME</span></tt>, <tt class="docutils literal"><span class="pre">--file</span> <span class="pre">FILE_NAME</span></tt></dt>
214
+ <dd>Indicates that the private key will be saved to a specified file name.</dd>
215
+ </dl>
216
+ </div>
217
+ <div class="section" id="id15">
218
+ <h3>Examples<a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h3>
219
+ <p>The following examples show how to use this Knife subcommand:</p>
220
+ <p><strong>Reregister clients</strong></p>
221
+ <p>To regenerate the RSA key pair for a client named &#8220;testclient&#8221; and save it to a file named &#8220;rsa_key&#8221;, enter:</p>
222
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife client regenerate testclient -f rsa_key
223
+ </pre></div>
224
+ </div>
225
+ </div>
226
+ </div>
227
+ <div class="section" id="show">
228
+ <h2>show<a class="headerlink" href="#show" title="Permalink to this headline">¶</a></h2>
229
+ <p>The <tt class="docutils literal"><span class="pre">show</span></tt> argument is used to show the details of an API client.</p>
230
+ <div class="section" id="id16">
231
+ <h3>Syntax<a class="headerlink" href="#id16" title="Permalink to this headline">¶</a></h3>
232
+ <p>This argument has the following syntax:</p>
233
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife client show CLIENT_NAME <span class="o">(</span>options<span class="o">)</span>
234
+ </pre></div>
235
+ </div>
236
+ </div>
237
+ <div class="section" id="id17">
238
+ <h3>Options<a class="headerlink" href="#id17" title="Permalink to this headline">¶</a></h3>
239
+ <p>This argument has the following options:</p>
240
+ <dl class="docutils">
241
+ <dt><tt class="docutils literal"><span class="pre">-a</span> <span class="pre">ATTR</span></tt>, <tt class="docutils literal"><span class="pre">--attribute</span> <span class="pre">ATTR</span></tt></dt>
242
+ <dd>The attribute (or attributes) to show.</dd>
243
+ </dl>
244
+ </div>
245
+ <div class="section" id="id18">
246
+ <h3>Examples<a class="headerlink" href="#id18" title="Permalink to this headline">¶</a></h3>
247
+ <p>The following examples show how to use this Knife subcommand:</p>
248
+ <p><strong>Show clients</strong></p>
249
+ <p>To view a client named &#8220;testclient&#8221;, enter:</p>
250
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife client show testclient
251
+ </pre></div>
252
+ </div>
253
+ <p>to return something like:</p>
254
+ <div class="highlight-bash"><div class="highlight"><pre>admin: <span class="nb">false</span>
255
+ chef_type: client
256
+ json_class: Chef::ApiClient
257
+ name: testclient
258
+ public_key:
259
+ </pre></div>
260
+ </div>
261
+ <p>To view information in JSON format, use the <tt class="docutils literal"><span class="pre">-F</span></tt> common option as part of the command like this:</p>
262
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife role show devops -F json
263
+ </pre></div>
264
+ </div>
265
+ <p>Other formats available include <tt class="docutils literal"><span class="pre">text</span></tt>, <tt class="docutils literal"><span class="pre">yaml</span></tt>, and <tt class="docutils literal"><span class="pre">pp</span></tt>.</p>
266
+ </div>
267
+ </div>
268
+ </div>
269
+
270
+
271
+ </div>
272
+
273
+ </div>
274
+
275
+
276
+ <div class="clearer"></div>
277
+ </div>
278
+
279
+
280
+
281
+
282
+ </body>
283
+ </html>