0

I am trying to learn how to do local development of chef recipes. I am following this guide https://gist.github.com/smford22/f00f46471047422bd8a7

I am prefixing all the kitchen commands with chef exec because if I try to run kitchen directly, I get all sorts of ruby/gem errors.

When I run chef exec kitchen converge it gets stuck on installing the Chef Omnibus, hanging on "Trying wget..."

If I login to the VM and try to run curl and wget commands like curl https://google.com it indeed cannot access the internet.

chef exec kitchen -v
Test Kitchen version 1.23.2

chef -v
Chef Development Kit Version: 3.5.13
chef-client version: 14.7.17
delivery version: master (6862f27aba89109a9630f0b6c6798efec56b4efe)
berks version: 7.0.6
kitchen version: 1.23.2
inspec version: 3.0.52

.kitchen.yml:

---
driver:
  name: vagrant

 ## The private_network feature lets you setup a private network on the VM guest
 ## via localhost on the host.
 ## see also: https://www.vagrantup.com/docs/networking/private_network.html

  # network:
  #  - ["private_network", {ip: "33.33.33.33"}]

provisioner:
  name: chef_zero

## The verifier section determines which test platform you want to use.
verifier:
  name: inspec
  format: doc

platforms:
  - name: centos-6.7

suites:
  - name: default
    run_list:
      - recipe[chef_httpd::default]
    attributes:
swagrov
  • 1,510
  • 3
  • 22
  • 38

1 Answers1

0

Are you accessing the internet through proxy? If yes, you need to configure the same for your Vagrant VMs using vagrant-proxyconf plugin. Documentation: http://tmatilai.github.io/vagrant-proxyconf/

schilz
  • 11
  • 2