Questions tagged [chef-zero]

Questions regarding Chef zero server

Chef zero project made for testing and solo purposes of Chef server

Simple, easy-run, fast-start in-memory Chef server for testing and solo purposes

Github: https://github.com/chef/chef-zero

39 questions
6
votes
2 answers

How do I access Chef data_bags in InSpec

I am writing InSpec tests for some new Chef recipes I am working on. I would like to utilise the data_bags used by the cookbooks to iterate through the data bag items. I can't figure out how to access them in my InSpec tests! The recipes are using…
3
votes
1 answer

knife zero converge - SocketError: getaddrinfo: Name or service not known

After successful bootstrap with bundle exec knife zero bootstrap root@139.59.210.225 I'm trying to apply my cookbooks to remote using bundle exec knife zero converge "name:ily" but getting WARNING: Failed to connect to ily.localdomain --…
divideByZero
  • 1,120
  • 16
  • 27
3
votes
1 answer

How to specify chef_environment for chef local mode (chef-client -z)

I have copied chef files from my chef server to a local client node, under ~/.chef, i have all environments under ~/.chef/environments, e.g. development.rb, production.rb, etc. When i run chef-client -z -E development -r…
Kipras
  • 2,664
  • 1
  • 16
  • 10
2
votes
2 answers

Chef Vault with Test-Kitchen, Vagrant and Chef-Zero provisioner

I have an environment setup with Test-Kitchen v1.5.0, Vagrant v1.8.1. I have a recipe that uses chef vault to decrypt our encrypted passwords that our in our data_bags_path/passwords/pilot.json file. I am using the solution here…
tjmair
  • 77
  • 7
2
votes
1 answer

How do I use roles in test kitchen?

I can't figure out how to run roles in a run list in test kitchen. I did a knife download roles to my chef repo (C:\.chef\roles). I also did a knife download cookbooks to c:\.chef\cookbooks Here is the .kitchen.yml for a cookbook I want to test…
red888
  • 27,709
  • 55
  • 204
  • 392
2
votes
1 answer

chef Improve powershell_script performance

Is there a way to get chef to reuse a powershell session or at least decrease the launch time of a new process? A run is spending 2 seconds performing not_if and only_if checks that use powershell (even if the PS code itself is instantaneous). It…
Jeff
  • 35,755
  • 15
  • 108
  • 220
2
votes
2 answers

How to specify cookbook_path in .kitchen.yml with chef_zero provisioner without Berkshelf

My project is structured with our company cookbooks in a directory separate from 3rd-party cookbooks. cookbooks | |- CompanyCookbooks | | | |-MyCookbook | |- 3rdPartyCookbooks | | | |-ark While working from the "MyCookbook" directory, I'm…
TreverW
  • 440
  • 7
  • 16
2
votes
2 answers

Vagrant with Chef Zero fails on initial up but succeeds with subsequent provision

I am trying to provision a vagrant box with Chef Zero. When I run vagrant up myboxname it fails with a 404 error on the Chef URL and exits with an error. If I then run vagrant provision myboxname it succeeds. Is there some sort of delay for the…
Brett
  • 5,690
  • 6
  • 36
  • 63
2
votes
0 answers

Chef not found on Vagrant box during provisioning, but exists on machine

I am attempting to use chef zero through vagrant as a stepping stone to understanding it. However, I seem to be stumbling out of the gate. When provisioning, I get a message that clearly says chef has been installed before receiving an error saying…
whtevn
  • 509
  • 1
  • 3
  • 9
2
votes
2 answers

Vagrant + Chef box throwing "uninitialized constant Opscode::Mysql"

Here's the output of vagrant up (after a vagrant destroy) of the box in question (vagrant provision results in the same error): ==> mongos-zend: ================================================================================ ==> mongos-zend: Recipe…
lostphilosopher
  • 4,361
  • 4
  • 28
  • 39
1
vote
0 answers

installing vagrant-librarian-chef plugin

I'm trying to install the vagrant librarian plugin with this command: vagrant plugin install vagrant-librarian-chef But I keep getting this error message: chef-zero requires Ruby version >= 2.3.1. So I've uninstalled chef-zero and downloaded…
MaxRah
  • 243
  • 1
  • 6
  • 21
1
vote
2 answers

Chef - using overriden attributes inside recipes applied inside a machine resource

I have a recipe for provisioning an ec2 instance that I'm trying to apply an environment to, which I run as: chef-client -z -o 'myapp::dev_create' The default.rb attributes file is defined as: default['myapp_provisioner'].tap do…
1
vote
1 answer

Why does Chef throw fatal error on restart request

I'm trying to use a log filter on client.log to evaluate if Chef runs succeeded. In the normal course of a Chef run, my recipe requests a reboot. Chef logs: FATAL: Chef::Exceptions::Reboot: Rebooting server at a recipe's request. Why does Chef…
Jeff
  • 35,755
  • 15
  • 108
  • 220
1
vote
1 answer

kitchen.yml attributes not override default values - Chef 12.12 - Kitchen 1.10

I have a simple attributes file: attributes/default.rb. default['simpleattr'] = 'file value' And inside kitchen.yml, I do suites: - name: default run_list: - recipe[simple::default] attributes: simpleattr: 'value from…
OBender
  • 2,492
  • 2
  • 20
  • 33
1
vote
1 answer

Vagrant and Chef Zero - Missing Role

I was happily using Vagrant and Chef Solo, but I read that using Chef Zero will lead to an easier transition to the full Chef Server (something which might happen in the near future of the project). When I started using vagrant plus chef-zero, I get…
Georgi Tenev
  • 338
  • 4
  • 18
1
2 3