流浪汉等待主厨零开始

时间:2014-10-15 18:11:55

标签: ruby gem vagrant chef vagrantfile

我正在努力让Vagrant使用Chef Zero而不是Chef Solo。但是,每当我尝试这样做时,Vagrant会挂起并输出Waiting for Chef Zero to start,即使我看到Chef Zero正在使用ps aux | grep chef运行。

为什么会这样?我在Mac上。

Vagrant输出:

MAC-Laptop:third_party_cookbooks user$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'CentOS-7.0.box'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: third_party_cookbooks_default_1413395173666_70562
Starting Chef Zero at http://10.130.96.27:4000
Waiting for Chef Zero to start
Waiting for Chef Zero to start
...

PS:

MAC-Laptop:~ user$ ps aux | grep chef
user   4573   0.0  0.0  2432784    628 s001  S+    1:48PM   0:00.00 grep chef
user   4571   0.0  0.1  2473520  24244 s000  S+    1:48PM   0:00.45 ruby /Users/user/.vagrant.d/gems/gems/chef-zero-2.2/bin/chef-zero --host 10.130.96.27 --port 4000
user   4570   0.0  0.0  2433364    936 s000  S+    1:48PM   0:00.00 sh -c /Users/user/.vagrant.d/gems/gems/chef-zero-2.2/bin/chef-zero --host 10.130.96.27 --port 4000 2>&1 > /dev/null

Vagrantfile:

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.synced_folder '.', '/vagrant', :disabled => true
  config.vm.synced_folder '/Users/user/Documents/RPMS', '/var/rpms'
  config.vm.box = "CentOS-7.0.box"
  config.vm.box_url = "http://url.com/vImages/CentOS-7.0.box"
  config.vm.network "private_network", ip: "192.168.33.11"
  config.vm.network "forwarded_port", guest: 8085, host: 8080
    config.vm.provider "virtualbox" do |vb|
      vb.customize ["modifyvm", :id, "--natsettings1", "16000,256,256,0,0"]
    end

  config.omnibus.chef_version = :latest
  config.chef_zero.enabled = true
  config.chef_zero.cookbooks = "../third_party_cookbooks"

  config.vm.provision :chef_client do |chef|
    chef.add_recipe "build-essential::default"
    chef.add_recipe "redisio::default"
    chef.add_recipe "redisio::enable"
    chef.add_recipe "nodejs::default"
    chef.add_recipe "nginx::default"
  end
end

一般系统配置:

MAC-Laptop:~ user$ ruby -v
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin13]
MAC-Laptop:~ user$ vagrant -v
Vagrant 1.6.5
MAC-Laptop:~ user$ vagrant plugin list
vagrant-berkshelf (3.0.1)
vagrant-centos7_fix (0.0.1)
vagrant-chef-zero (0.7.1)
vagrant-login (1.0.1, system)
vagrant-omnibus (1.4.1)
vagrant-share (1.1.2, system)

宝石:

MAC-Laptop:~ user$ ls .vagrant.d/gems/gems/
addressable-2.3.6/           diff-lcs-1.2.5/              mixlib-config-2.1.0/         ridley-4.0.0/
buff-config-1.0.1/           faraday-0.9.0/               mixlib-log-1.6.0/            semverse-1.2.1/
buff-extensions-1.0.0/       ffi-1.9.5/                   mixlib-shellout-1.4.0/       slop-3.6.0/
buff-ignore-1.1.1/           ffi-1.9.6/                   mixlib-shellout-1.6.0/       systemu-2.5.2/
buff-ruby_engine-0.1.0/      gyoku-1.2.2/                 multipart-post-2.0.0/        timers-4.0.1/
buff-shell_out-0.2.0/        hashie-2.1.2/                net-http-persistent-2.9.4/   vagrant-berkshelf-3.0.1/
celluloid-0.16.0/            highline-1.6.21/             net-ssh-gateway-1.2.0/       vagrant-centos7_fix-0.0.1/
celluloid-io-0.16.0/         hitimes-1.2.2/               net-ssh-multi-1.2.0/         vagrant-chef-zero-0.7.1/
celluloid-io-0.16.1/         ipaddress-0.8.0/             nio4r-1.0.1/                 vagrant-omnibus-1.4.1/
chef-11.12.4/                json-1.8.1/                  ohai-7.0.4/                  vagrant-share-1.1.2/
chef-zero-2.2/               method_source-0.8.2/         pry-0.10.1/                  varia_model-0.4.0/
childprocess-0.5.5/          mixlib-authentication-1.3.0/ rdoc-4.1.2/                  yajl-ruby-1.2.1/
MAC-Laptop:~ user$ ls /Library/Ruby/Gems/2.0.0/gems/
Display all 118 possibilities? (y or n)
addressable-2.3.6/            formatador-0.2.5/             mixlib-log-1.6.0/             rspec-its-1.0.1/
akami-1.2.2/                  gherkin-2.12.2/               mixlib-shellout-1.4.0/        rspec-mocks-3.1.2/
berkshelf-3.1.5/              gssapi-1.0.3/                 multi_json-1.10.1/            rspec-support-3.1.1/
berkshelf-api-client-1.2.0/   guard-2.6.1/                  multipart-post-2.0.0/         rubyntlm-0.1.1/
buff-config-1.0.1/            guard-foodcritic-1.0.3/       net-http-persistent-2.9.4/    rufus-lru-1.0.5/
buff-extensions-1.0.0/        guard-kitchen-0.0.2/          net-scp-1.2.1/                safe_yaml-1.0.3/
buff-ignore-1.1.1/            guard-rspec-4.3.1/            net-ssh-2.9.1/                safe_yaml-1.0.4/
buff-ruby_engine-0.1.0/       gyoku-1.2.2/                  net-ssh-gateway-1.2.0/        savon-0.9.5/
buff-shell_out-0.2.0/         hashie-2.1.2/                 net-ssh-multi-1.2.0/          sawyer-0.5.5/
builder-3.2.2/                highline-1.6.21/              nio4r-1.0.1/                  semverse-1.2.1/
bundler-1.7.3/                hitimes-1.2.2/                nokogiri-1.6.3.1/             serverspec-2.1.0/
celluloid-0.16.0/             httpclient-2.4.0/             nori-1.1.5/                   slop-3.6.0/
celluloid-io-0.16.0/          httpi-0.9.7/                  octokit-3.3.1/                solve-1.2.1/
chef-11.16.2/                 inifile-2.0.2/                octokit-3.4.0/                specinfra-2.1.1/
chef-metal-0.14.2/            ipaddress-0.8.0/              ohai-7.4.0/                   specinfra-2.2.0/
chef-metal-vagrant-0.6/       json-1.8.1/                   plist-3.1.0/                  systemu-2.6.4/
chef-zero-2.2/                kitchen-docker-1.5.0/         polyglot-0.3.5/               test-kitchen-1.2.1/
cheffish-0.8.3/               kitchen-vagrant-0.15.0/       pry-0.10.1/                   test-unit-2.0.0.0/
chefspec-4.0.2/               libyajl2-1.0.1/               rack-1.5.2/                   thor-0.19.1/
coderay-1.1.0/                listen-2.7.11/                rake-0.9.6/                   timers-4.0.1/
dep-selector-libgecode-1.0.2/ little-plugger-1.1.3/         rake-10.3.2/                  treetop-1.5.3/
dep_selector-1.0.3/           logging-1.8.2/                rb-fsevent-0.9.4/             uuidtools-2.1.5/
diff-lcs-1.2.5/               lumberjack-1.0.9/             rb-inotify-0.9.5/             vagrant-chef-zero-0.7.1/
erubis-2.7.0/                 method_source-0.8.2/          rdoc-4.0.0/                   varia_model-0.4.0/
faraday-0.9.0/                mime-types-1.25.1/            rest-client-1.6.7/            wasabi-1.0.0/
fauxhai-2.2.0/                mini_portile-0.6.0/           retryable-1.3.6/              winrm-1.1.3/
ffi-1.9.3/                    minitar-0.5.4/                ridley-4.0.0/                 wmi-lite-1.0.0/
ffi-1.9.5/                    mixlib-authentication-1.3.0/  rspec-3.1.0/                  yajl-ruby-1.2.1/
ffi-yajl-1.1.0/               mixlib-cli-1.5.0/             rspec-core-3.1.5/
foodcritic-4.0.0/             mixlib-config-2.1.0/          rspec-expectations-3.1.2/

0 个答案:

没有答案