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
6
votes
1 answer

Should I use this simple hack for working around chef-solo's lack of environment support?

Chef-solo’s lack of environment support seems to be pretty controversial. On one hand, one of the features of environments is the ability to pin cookbooks to specific environments, and this makes absolutely no sense with chef-solo. On the other…
Mike Conigliaro
  • 3,195
  • 2
  • 25
  • 24
6
votes
2 answers

How to create hash or yml from top level attributes values of node?

I have a chef recipe where I want to take all of the attributes under node['cfn']['environment'] and write them to a yml file. I could do something like this (it works fine): content = { "environment_class" =>…
Sarah Haskins
  • 303
  • 3
  • 10
6
votes
2 answers

Copy a whole directory structure in Chef

I have a directory structure (sample data) that I want to copy from within a Chef recipe. It seems the only way to do this is to explicitly create each individual directory and file: directory "/mnt/data/experiment1/dataset1" do recursive true …
Steve Bennett
  • 5,750
  • 12
  • 47
  • 59
6
votes
2 answers

Chef recipe read attributes from another node

I'm writing a very simple chef cookbook to manage the deployment of a web app, and I have a chef managed node for the database server, and would like to bring in the IP address (and a few other attributes) from that database server, into the recipe…
tarnfeld
  • 471
  • 2
  • 7
  • 13
6
votes
5 answers

Chef stop and start service in sequence

I have the following lines in my recipe service "apache" do action :stop end # Do something.. service "apache" do action :start end I found that the 2nd block is not executed. Any reason?
Howard
  • 2,135
  • 13
  • 48
  • 72
6
votes
2 answers

Which EC2 instance best for Chef server?

I want to setup chef server as cheaply as possible, while leaving it enough room to run without crashing. The only article I found on the subject warned that RabbitMQ would crash on a micro instance due to insufficient memory. The question is:…
Max Chernyak
  • 650
  • 8
  • 21
6
votes
5 answers

Why does chef list my node name as "localhost"?

I installed chef-client on a Linux node, and it seems to have successfully connected to my chef server. However, when I do: chef node list, it appears as "localhost". Why doesn't chef pick up the proper name of the node? If I ask for more details,…
Lorin Hochstein
  • 5,028
  • 15
  • 56
  • 72
6
votes
5 answers

Bare minimal Chef provisioning and deployment?

I've read the documentation on Chef twice over. I still can't wrap my head around it's concept because they skip but fundamentals and jump to complex deployments with chef-server. Using chef-solo and possibly knife, is there a simple way to…
6
votes
3 answers

Using vagrant and chef to setup a Windows VM in Ubuntu

I'm running Ubuntu and I want to setup a VM in Virtualbox via Vagrant and Chef. I think what I'm missing is a .box for the Windows Server 2008 R2 x64 trial I have. Does anyone know where I could find a .box? If not, how would I go about building a…
Mark L
  • 568
  • 2
  • 9
  • 19
6
votes
1 answer

Permission denied when opening file as root with mode 777

I'm attempting to install and run syslog-ng but I'm blocked with the following error. Error opening configuration file; filename='/etc/syslog-ng/syslog-ng.conf', error='Permission denied (13)' I'm running this with sudo and the file and directory…
Sarge
  • 189
  • 2
  • 8
5
votes
1 answer

What are the pros/cons of running Chef/Puppet at regular intervals?

I always worked where they used to run Puppet at regular intervals. So, distributing changes was easy and on the fly. In the new team, they frown upon running the Chef agent at regular intervals. They only use it to bootstrap the OS and then kill…
deppfx
  • 429
  • 3
  • 13
5
votes
1 answer

What do the default opsworks cookbooks actually do?

The company I'm working for is making a move to AWS and so I've been given the opportunity to start investigating the various services they provide. OpsWorks looks really good for rolling out mass architecture changes, however the 'custom' layer…
James
  • 173
  • 4
5
votes
1 answer

Can you use configuration management (Puppet/Chef) behind a firewall?

I'm tasked with designing and implementing configuration management (Chef) for a infrastructure where the production servers are completely segmented and isolated behind a jump box. --------------------------------- | Production | Staging, Test,…
spuder
  • 1,725
  • 3
  • 26
  • 42
5
votes
3 answers

Chef - SSH without password

When executing: knife bootstrap {{IP}} --ssh-user centos --ssh-password '' \ --sudo --use-sudo-password --node-name node1 \ --run-list 'recipe[learn_chef_httpd]' I am getting the following error: ERROR: Net::SSH::AuthenticationFailed:…
James McDougall
  • 151
  • 1
  • 1
  • 9
5
votes
1 answer

Out-of-order chef recipes causing apt package install to fail

I'm writing a Chef recipe to install among other things nginx and Phusion Passenger. The short summary is that the recipes on my run list are not executing in the order I expect, and that's causing an apt package installation to fail in a way I…