Questions tagged [chef]

Chef is an open source configuration management framework for infrastructure automation.

Chef is an open source systems integration framework built to bring the benefits of configuration management to your entire infrastructure. You write source code to describe how you want each part of your infrastructure to be built, then apply those descriptions to your servers. The result is a fully automated infrastructure: when a new server comes on line, the only thing you have to do is tell Chef what role it should play in your architecture.

More information can be found in the Documentation.

635 questions
17
votes
5 answers

When is it appropriate to use a configuration manager (eg Puppet / Chef / Ansible)?

At my current workplace, I look after two VMware host machines, an OpenBSD physical machine, three Debian VM's, and six Windows Server VM's (2008/2012). I'm considering implementing a configuration management tool such as Puppet or Chef. Is this…
Rhyven
  • 183
  • 8
17
votes
2 answers

Chef: create a directory for a template if it doesn't already exist

If I have a template being created, how can I ensure that the directory exists? For instance: template "#{node[:app][:deploy_to]}/#{node[:app][:name]}/shared/config/database.yml" do source 'database.yml.erb' owner node[:user][:username] group…
Matthew
  • 1,859
  • 4
  • 22
  • 32
17
votes
5 answers

What's the strengths and weaknesses of existing configuration management systems?

I was looking up here for some comparisons between CFEngine, Puppet, Chef, bcfg2, AutomateIt and whatever other configuration management systems might be out there, and was very surprised I could find very little here on Server Fault. For instance,…
Daniel C. Sobral
  • 5,713
  • 6
  • 34
  • 48
16
votes
7 answers

What are the right questions to ask when deciding whether to use Chef or Puppet?

I am about to start a new project which will, in part, require deploying many identical nodes of approximately three different classes: Data nodes, which will run sharded instances of MongoDB. Application nodes, which will run instances of a Ruby…
John Feminella
  • 1,318
  • 1
  • 8
  • 11
15
votes
2 answers

How do I get started with Chef?

The chef documentation is pretty bad. And Google isn't helping me. Can anyone point me at a decent article or something that would help me get started? My specific issues are: How do I get a client to read my configuration? chef-solo seems like the…
Brad Wright
  • 261
  • 2
  • 7
13
votes
2 answers

chef-solo vs chef-client --local-mode

According to the document I should replace chef-solo by chef-client --local-mode. Local mode was added to the chef-client in the 11.8 release. If you are running that version of the chef-client (or later), you should consider using local mode…
ironsand
  • 707
  • 1
  • 7
  • 12
13
votes
5 answers

Knife SSH doesn't find my nodes

knife ssh isn't finding my nodes. I know it should be able to because when I can search for them I find them # knife search node name:* 2 items found Node Name: web_01 ... Node Name: admin ... However, when I run knife ssh (I'll show it with…
Max
  • 439
  • 1
  • 4
  • 12
13
votes
4 answers

Manage chef cookbooks in a team environment

I'm learning chef and having problems structuring everything to work with my team. For starters, it seems that you should create a chef-repo folder, where you will store and modify the cookbooks used to manage your nodes. I work on various…
Alex Recarey
  • 441
  • 1
  • 6
  • 14
13
votes
2 answers

In chef, how do I access attributes within role files?

I'm able to set attributes in role files as documented but I'm not able to access attributes already set by cookbooks that I'm using. For example within /roles/appserver.rb: name "appserver" run_list(%w{ …
Ophir Radnitz
  • 343
  • 2
  • 10
12
votes
3 answers

Chef bash resource not executing as specified user

I'm writing a Chef cookbook to install Hubot. In the recipe, I do the following: bash "install hubot" do user hubot_user group hubot_group cwd install_dir code <<-EOH wget…
Arthur Maltson
  • 312
  • 3
  • 12
11
votes
3 answers

Ansible, Chef, Puppet or ____ : Which has the strongest Windows support and smallest init footprint

We do mostly (but not exclusively) win servers. Preferably, we can start the OS and do little or nothing to it to make it ready to receive commands (we know we may need to create a base image with an agent or ssh server on it). Need to be able to…
Jonesome Reinstate Monica
  • 5,445
  • 10
  • 56
  • 82
11
votes
2 answers

Chef recipe order of execution redux

Given the following recipe: ruby_block "block1" do block do puts "in block1" end action :create end remote_file "/tmp/foo" do puts "in remote_file" source "https://yahoo.com" end I'd expect the ruby_block to run first…
Dan Tenenbaum
  • 193
  • 1
  • 2
  • 10
11
votes
2 answers

Chef: How to run a resource on notification only?

I'd like to declare a resource that I want to run multiple times on notification and only on notification. How can I prevent the resource to run on its own after it is declared? Is there some way to check if there is a notification present, so I can…
Victor Hahn
  • 113
  • 1
  • 1
  • 7
11
votes
1 answer

How to ensure a service is running, using Chef?

I am in a situation where Chef might start a service (postgres) but it might subsequently be stopped out-of-band. I want a subsequent Chef run to cause the service to be running. I have tried this: service "postgresql" do action :start end But…
Partly Cloudy
  • 276
  • 1
  • 2
  • 7
11
votes
1 answer

Shared files/templates between cookbooks

We have multiple cookbooks which reference the same files and templates and were wondering if there is a reasonable way to ensure all of these are the same file to ensure that none go out of date. Is it possible to have a single file/template…
gdurham
  • 879
  • 7
  • 10
1
2
3
42 43