Questions tagged [chef-solo]

93 questions
32
votes
3 answers

What are the benefits of running chef-server instead of chef-solo?

I am looking at automated deployment solutions for my team and have been playing with Chef for the past few days. I've been able to get a simple web app up an running from a base Red Hat VM using chef-solo. Our end goal is to use Chef (or another…
linusthe3rd
  • 625
  • 1
  • 7
  • 7
18
votes
5 answers

Best practice for testing chef recipes?

My team has created a large number of chef cookbooks. I was wondering what methods and frameworks I should look into so we can start creating tests to assure that our nodes are configured properly?
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,769
  • 4
  • 21
  • 32
9
votes
2 answers

Why use chef-solo on a single instance?

I understand the advantages of using Chef and puppet in a multiserver environment. Its fantastic for enforcing and describing configuration across many servers. But lets say you have a single server, what advantage does chef-solo give you over…
Kyle
  • 1,589
  • 9
  • 14
8
votes
1 answer

Chef Server vs Chef Solo

I'm putting together a structure to run a Rails application. The application itself runs on Heroku. However, it makes requests to a cluster, which performs the call through a program in C. To be able to recover from crashes faster, I want to create…
João Daniel
  • 349
  • 3
  • 6
  • 10
8
votes
2 answers

What is the correct way to loop in a Chef (solo) recipe?

Can someone please explain to me how chef works? That is a pretty broad question, so to narrow it down I have this very simple recipe that loops over a list of users and creates each one if they do not already exist. It does not work. From what I…
Matthew J Morrison
  • 165
  • 1
  • 1
  • 8
8
votes
1 answer

no default value for required attribute

What is the recommended approach for using an attribute in a resource, like a template, when there is no reasonable default for that attribute. The attribute value is expected to be provided at runtime. If it is not, the chef recipe execution…
Sarah Haskins
  • 303
  • 3
  • 10
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,105
  • 2
  • 24
  • 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
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,005
  • 11
  • 47
  • 70
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…
5
votes
2 answers

What is the purpose of openssl passwd

I'm reading "Reliably Deploying Rails Applications" Regarding defining users to be set up by Chef, it says: “Next we need to define users, inside data_bags/users copy the file deploy.json.example to deploy.json. Generate a password for your deploy…
joshua.paling
  • 1,115
  • 2
  • 10
  • 13
5
votes
1 answer

Vagrant / chef - nginx cookbook extend

I am fairly new to using chef, particularly with vagrant so this will most likely be a silly question to the more experienced users out there. I am using this cookbook: https://github.com/opscode-cookbooks/application_nginx I simply want to add my…
5
votes
4 answers

Chef 'notifies' fails to restart or reload services

I'm using chef-solo v10.12.0 to configure an Ubuntu 12.04 VM, and I keep running into an issue where services don't restart or reload as expected when a configuration file is changed. There are no errors in the log although it's clearly doing…
John Debs
  • 287
  • 1
  • 4
  • 10
4
votes
1 answer

Cookbook not found with vagrant, berkshelf and chef-solo

I'm attempting to get a vagrant instance up and running, but when I do vagrant up --provision, it fails with the error: ERROR: Cookbook postgres not found. I'm using vagrant-berkshelf, which appears to be copying the cookbooks across. That is: when…
Roger Lipscombe
  • 2,057
  • 5
  • 24
  • 37
1
2 3 4 5 6 7