[英]How to install chef-solo for vagrant with knife
I am on a MAC OSX 10.8, I know this quest should be googled but I am still a bit confused. 我在MAC OSX 10.8上,我知道这个任务应该用Google搜索,但我仍然有点困惑。
I am working on a vagrant deployment that should use chef-solo, but when I went to the opscode site, chef installers are separated into chef-client and chef-server, if I install chef client would that install the chef-solo? 我正在进行一个应该使用厨师独奏的流浪汉部署,但当我去opscode网站时,厨师安装人员被分成厨师 - 客户端和厨师 - 服务器,如果我安装厨师客户端会安装厨师独奏? I can not find any installer for chef-solo on the net too. 我在网上找不到任何关于厨师独奏的安装程序。 Also when installing chef would that also install the knife? 安装厨师时还会安装刀吗?
Thanks in advance. 提前致谢。
See the package contents from Ubuntu 13.04 请参阅Ubuntu 13.04中的包内容
vagrant@devops:~$ dpkg -L chef | grep chef-solo
/opt/chef/bin/chef-solo
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/bin/chef-solo
Option 1 选项1
Shell script => install.sh
which detects OS and use OS specific packages to install chef Shell script => install.sh
,它检测操作系统并使用特定于操作系统的软件包来安装chef
Option 2 选项2
Use vagrant-omnibus
to take care of Chef Client installation within the guest. 使用vagrant-omnibus
来处理guest虚拟机中的Chef Client安装。
Install the plugin 安装插件
vagrant plugin install vagrant-omnibus
Add the block in Vagrantfile
, for example 例如,在Vagrantfile
添加块
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "raring64"
config.vm.hostname = "devops#{rand(01..99)}.vagrant.vm"
# Use vagrant-omnibus to install chef client
config.omnibus.chef_version = :latest
# Enable Berkshelf via vagrant-berkshelf
# config.berkshelf.enabled = true
Spin up the VM and it'll take care of the chef client installation. 启动VM,它将负责厨师客户端的安装。
NOTE: Chef Client is still available as a gem but OS specific (self-contained) packages are recommended, just make it easier to install and maintain. 注意:Chef Client仍然可用作gem,但建议使用特定于操作系统(自包含)的软件包,只是使其更易于安装和维护。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.