Chef 的各种组件

The various components of Chef

刚刚开始使用 Chef,看起来有几个组件,我发现它们相当混乱。它们都可以通过 https://downloads.chef.io/

下载

我偶然发现另一个网站建议我使用 bash 安装脚本通过命令行如下安装它。

curl -L https://www.opscode.com/chef/install.sh | bash

我 运行 它安装了几个实用程序(knifechef-apply 等)到我的 /opt/chef/bin 目录

> ls -hlt /opt/chef/bin/
total 32K
-rwxr-xr-x 1 root root 1.5K Apr 28 09:57 chef-apply
-rwxr-xr-x 1 root root 1.6K Apr 28 09:57 chef-client
-rwxr-xr-x 1 root root 1.6K Apr 28 09:57 chef-service-manager
-rwxr-xr-x 1 root root 1.5K Apr 28 09:57 chef-shell
-rwxr-xr-x 1 root root 1.5K Apr 28 09:57 chef-solo
-rwxr-xr-x 1 root root 1.6K Apr 28 09:57 chef-windows-service
-rwxr-xr-x 1 root root 1.5K Apr 28 09:57 knife
-rwxr-xr-x 1 root root  732 Apr 28 09:57 ohai
  1. 我刚刚安装了什么?那是厨师工作站吗(即普通的旧 chef?)。或者它是其他 3 个组件中的一些奇怪的 subset/combination?

  2. 如果我从 Chef 下载页面下载其他组件之一(例如 chefdk),它只是在同一目录中添加更多二进制可执行文件还是很好地创建了一个 /opt/chefdk/bin 目录或类似目录?我问是因为我对它安装的所有东西有点不知所措,而且很难跟踪它。如果它只是一个带有各种子命令的巨大工具,我会很高兴。

谢谢!

通过 curl bashing chef,您可以安装 运行 chef-client(因此对于您的节点)以及 knife,一个与 Chef 服务器交互的实用程序(到您工作站上的 运行)。

ChefDK 将安装在 /opt/chefdk 中(恕我直言,您可以尝试一下而不是发布这样的问题)。除了前面提到的所有内容(Chef Server 被排除在外)之外,这还为食谱开发带来了额外的实用程序,包括 test-kitchen, foodcritic (both for testing) and Berkshelf(食谱依赖管理器)。

因此,虽然 chef 包允许您在工作站上使用,但推荐使用 ChefDK。