Questions tagged [chef-solo]

Chef is an open-source systems integration framework built specifically for automating the cloud

chef-solo is an open source version of the chef-client that allows using cookbooks with nodes without requiring access to a Chef server.

In comparison to chef, chef-solo doesn't have the following features

  • Centralized distribution of cookbooks
  • Authentication or authorization

More details about chef-solo and documentation is available on the official site

523 questions
33
votes
1 answer

Default search path for cookbook

I am a chef Newbie and facing an issue. Every time I run any of the knife cookbook command, I have to explicitly provide the path to cookbook using -o /path/to/cookbook else it will error out saying no cookbooks found. Please find below commands: $…
slayedbylucifer
  • 22,878
  • 16
  • 94
  • 123
31
votes
3 answers

chef-solo ssl warning when provisioning

When using vagrant and chef as provisioner, I've got this warning: [web] Chef 11.12.2 Omnibus package is already installed. [web] Running provisioner: chef_solo... Generating chef JSON and uploading... Running chef-solo... stdin: is not a…
holms
  • 9,112
  • 14
  • 65
  • 95
13
votes
3 answers

ChefZero returning 404

I am setting up a simple vagrant box with chef solo as the provisioner. Everything was going fine until i tried running it on my laptop. The machine comes up fine but when it provisions it spits out some errors. I'm relatively fresh to chef and i'm…
Jay Kravetz
  • 233
  • 2
  • 10
11
votes
2 answers

How can I run a cookbook with a specific version using chef-client?

I am having 2 cookbooks name as mycookbook and version 0.1.0 and 0.1.1 on chef server. Now I want to run only cookbook mycookbook version 0.1.1 using chef-client. How do I do this ?
Salim
  • 714
  • 1
  • 5
  • 19
11
votes
2 answers

Chef correct way to load new rpm and install package

I am trying to install the latest version of php on a centos box and am struggling. The cookbook i have been looking at is the opscode one: https://github.com/opscode-cookbooks/php It doesnt look like i can install php 5.5 using that. To install…
Marty Wallace
  • 34,046
  • 53
  • 137
  • 200
11
votes
4 answers

Is it possible to debug chef recipes from the vagrant box?

i'm struggling with the chef recipes for a vagrant box. I'm using chef-solo. I'm not so comfortable with Ruby (i've never used it before), so the process to write my recipes is very long if i have to do vagrant provision each time. Is there a way to…
apelliciari
  • 8,241
  • 9
  • 57
  • 92
9
votes
2 answers

Detect host operating system distro in chef-solo deploy bash script

When deploying a chef-solo setup you need to switch between using sudo or not eg: bash install.sh and sudo bash install.sh Depending on the distro on the host server. How can this be automated?
offwhite
  • 552
  • 1
  • 4
  • 9
8
votes
1 answer

How can I programmatically query Vagrant for its provisioning status?

The Goal I am attempting to conditionally run the vagrant-berkshelf plugin. By default, enabling the plugin causes Berkshelf to resolve and vendor cookbooks on every single vagrant up (which is a relatively expensive operation) even if the current…
Todd A. Jacobs
  • 81,402
  • 15
  • 141
  • 199
8
votes
2 answers

How to specify the version of Chef Solo in Test Kitchen .kitchen.yml file?

I am using Test Kitchen to test a cookbook. I would like to specify the version number of chef solo that will be installed. How can I specify a version number?
Andrew
  • 227,796
  • 193
  • 515
  • 708
8
votes
1 answer

Best common workflow for Vagrant and Knife Solo (or any other non Vagrant Chef Env)?

After a while away from Chef I am currently getting back to it for all my server needs. I already used it a few years back for a while and got to like it, but had other people do the ops part lately. But I am still struggling to find a really good…
maxigs
  • 866
  • 6
  • 16
7
votes
4 answers

How to disable cookbook synchronization with chef-client?

I would like to test/debug cookbooks. However, using chef-client to restart a chef run, this requires me to modify cookbooks, upload them to the chef server & synchronize cookbooks. I would like to be able to modify the cookbooks that were…
eloaf
  • 101
  • 1
  • 2
  • 6
7
votes
2 answers

Conditionally provision ("vagrant provision") on "vagrant up"

Since I work in a team, I want to make the process of working with vagrant (and chef-solo) as smooth as possible. When someone in the team changes the chef cookbooks, roles or whatever, I want all the other team members to automatically "receive"…
Doron
  • 3,176
  • 7
  • 35
  • 60
7
votes
3 answers

Passing variables between chef resources

i would like to show you my use case and then discuss possible solutions: Problem A: i have 2 recipes, "a" and "b".. "a" installs some program on my file system (say at "/usr/local/bin/stuff.sh" and recipe "b" needs to run this and do something with…
ShinySpiderdude
  • 1,170
  • 4
  • 14
  • 18
7
votes
2 answers

chef template variable @node seems to throw error

I'm going through peepcode's Chef tutorial, so far so good. For some reason there is a failure when using template variables. The example is for nginx. In the nginx/attributes/nginx.rb I have: default[:nginx][:worker_processes] = 4 In the…
Michael K Madison
  • 2,242
  • 3
  • 21
  • 35
7
votes
4 answers

Chef Solo error: Cookbook apt not found

Hy I'm trying to run a MongoDB recipe with Chef Solo on an Amazon EC2 Linux AMI. I've installed Omnibus, set the cookbook path in the .rb file, and the runlist in the .json file. I've copied the content of the mongodb recipe zip from github to to…
Csapi007
  • 133
  • 1
  • 2
  • 6
1
2 3
34 35