简体   繁体   中英

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.

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? 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.

chef-solo is a part of Chef Client

See the package contents from 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

Install Chef Client

Option 1

Shell script => install.sh which detects OS and use OS specific packages to install chef

Option 2

Use vagrant-omnibus to take care of Chef Client installation within the guest.

Install the plugin

vagrant plugin install vagrant-omnibus

Add the block in Vagrantfile , for example

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM