Questions tagged [chef]

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

Filter by
Sorted by
Tagged with
83 votes
7 answers
34k views

Why use Chef/Puppet over shell scripts?

New to Puppet and Chef tools. Seems like the job that they are doing can be done with shell scripting. Maybe it was done in shell scripts until these came along. I would agree they are more readable. ...
resting's user avatar
  • 1,059
57 votes
4 answers
20k views

Relationship between Vagrant, Docker, Chef and OpenStack (or similar products)?

I am a web developer, but I am also interested in a few administrative tasks. Hence, the new move from pure administration to dev-ops comes handy for me. Anyway, I have some problems to put a few ...
Golo Roden's user avatar
55 votes
6 answers
14k views

Puppet vs Chef, pro and contra from users and use cases [closed]

I already googled and read the "to-puppet-or-to-chef-that-is-the-question" article. I'm interested in use cases, real world implementations in which people had choosen one or the other on real ...
drAlberT's user avatar
  • 11k
48 votes
1 answer
17k views

Chef best Practices/Questions

I use and love Puppet. I moved to a new company and they are adopting Chef. So I'm trying to learn Chef but am having a hard time piecing it all together because I still think in Puppet =) These ...
rizen's user avatar
  • 503
40 votes
0 answers
6k views

What advantages/features does Puppet or Chef offer over Salt (or vice versa)? [closed]

I am looking at rolling out a new configuration management tool to replace our home-grown solution. The defacto standards are Chef and Puppet, both of which are Ruby-centric (though can be used to ...
jamieb's user avatar
  • 3,437
32 votes
3 answers
14k views

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-...
linusthe3rd's user avatar
32 votes
7 answers
31k views

Do chef and puppet cost money?

I intend to use chef or puppet to do administration (I'm thinking more of chef as it's younger and I get a better feeling about it). In both home pages I saw there is an "enterprise edition" that ...
Jas's user avatar
  • 711
31 votes
2 answers
38k views

How to find the Chef environment in a recipe?

I want to run a cookbook_file resource only if the current environment is "dev". How can this be expressed? The documentation suggests this: In a recipe, a code block like this would be useful: ...
Steve Bennett's user avatar
30 votes
2 answers
27k views

How to automate changed config files during apt-get upgrade in Ubuntu 12

I like to use "knife cloudstack server create ..." to build a new VM. My bootstrap template starts off with an "apt-get update" and "apt-get -y upgrade". The upgrade then halts with: 10.190.113.11 ...
Mojo's user avatar
  • 965
29 votes
10 answers
14k views

Are configuration management tools (Puppet, Chef) capable of keeping installed packages up to date?

This is probably a simple question for those of you already running configuration management tools. Are configuration management tools such as Puppet or Chef the right approach for keeping installed ...
daff's user avatar
  • 4,869
24 votes
3 answers
21k views

Configuration management: push versus pull based topology

The more established configuration management (CM) systems like Puppet and Chef use a pull-based approach: clients poll a centralized master periodically for updates. Some of them offer a masterless ...
Willem's user avatar
  • 2,922
21 votes
6 answers
39k views

Is there a more elegant way to remotely run chef-client?

This is the way recommended in the Chef Fast Start tutorial: knife ssh name:mynode -a ipaddress -x ubuntu -i mycredentials.pem "sudo chef-client" This is really clumsy. Is there really not a better ...
Steve Bennett's user avatar
21 votes
2 answers
20k views

What are the pros and cons of AWS Elastic Beanstalk compared with other deployment strategies?

I'm pretty new to the whole Netflix OSS stack and deployments in general. As a background for my current level of knowledge ops-wise, my main role is as a front-end application engineer. However, I ...
18 votes
5 answers
9k views

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?
linusthe3rd's user avatar
18 votes
9 answers
44k views

How to set ulimits for a service starting at boot?

I need, for mysql to use large-pages, to set a ulimit - I've done this in limits.conf. However, limits.conf (pam_limits.so), doesn't get read in for init, only for "real" shells. I solved this before ...
jayofdoom's user avatar
  • 191
17 votes
5 answers
2k views

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 ...
Rhyven's user avatar
  • 183
17 votes
2 answers
30k views

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 '...
Matthew's user avatar
  • 1,927
17 votes
5 answers
5k views

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

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 ...
16 votes
7 answers
2k views

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. ...
John Feminella's user avatar
15 votes
2 answers
7k views

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 ...
Brad Wright's user avatar
13 votes
4 answers
5k views

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 ...
Alex Recarey's user avatar
13 votes
5 answers
13k views

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 ... ...
Max's user avatar
  • 439
13 votes
2 answers
8k views

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 (...
ironsand's user avatar
  • 707
13 votes
2 answers
8k views

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" ...
Ophir Radnitz's user avatar
12 votes
3 answers
9k views

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 https://...
Arthur Maltson's user avatar
11 votes
2 answers
15k views

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 ...
Victor Hahn's user avatar
11 votes
3 answers
14k views

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 ...
Jonesome Reinstate Monica's user avatar
11 votes
1 answer
5k views

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 ...
gdurham's user avatar
  • 879
11 votes
2 answers
10k views

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....
Dan Tenenbaum's user avatar
11 votes
1 answer
15k views

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: ...
Partly Cloudy's user avatar
10 votes
2 answers
12k views

Best strategy to keep chef cookbooks versions under control

I'm looking for ideas about chef cookbooks versions management. I know that you pin specific versions in the environment, but I'm not sure how to go about it. We use librarian-chef which installs 3rd ...
gansbrest's user avatar
  • 845
10 votes
1 answer
931 views

Configuration Management overkill for 3 node clusters?

I have 2-3 node clusters for our load balancers and various web applications. I'm having to make the change in QA first, then in staging (on 2-3 servers), then in production (on 2-3) servers. Is a ...
Bradford's user avatar
  • 295
9 votes
2 answers
633 views

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, ...
Kyle's user avatar
  • 1,599
9 votes
3 answers
6k views

How can I download Maven artifacts in chef?

I want to do something like this in a chef recipe: maven_artifact "/opt/foo/my.jar" do source "com.foo:my:0.1:jar" end But I can't find a cookbook which provides this. I've written something which ...
recampbell's user avatar
9 votes
3 answers
24k views

Chef-client not updating a cookbook from the server

I have a chef cookbook (for apache2). It fails to work on one node. So I'm trying to tweak it and update it, but the node doesn't seem to download the new version. I have been able to upload ...
Amandasaurus's user avatar
  • 32.3k
8 votes
3 answers
7k views

How do I provide dpkg configuration parameters to aptitude or apt-get?

When installing gitolite I find that: # aptitude install gitolite The following NEW packages will be installed: gitolite 0 packages upgraded, 1 newly installed, 0 to remove and 29 not upgraded. ...
user avatar
8 votes
2 answers
22k views

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 ...
Matthew J Morrison's user avatar
8 votes
1 answer
5k views

Chef Server vs Chef Solo [duplicate]

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 ...
João Daniel's user avatar
8 votes
3 answers
3k views

Chef: encrypted data bags, protecting the encryption key

When you are using the encrypted data bag feature for Chef how do you go about deploying the key to many servers? If you put it into a recipe anyone who has access to any of the chef servers or ...
Kyle's user avatar
  • 1,599
8 votes
3 answers
4k views

Idiomatic way to invoke chef-solo?

What is the idiomatic way to invoke chef-solo? Most sites do this: chef-solo -c ~/solo.rb -j ~/node.json -r http://www.example.com/chef-solo.tar.gz But that's long. There are a few shorter ways to ...
kerkeslager's user avatar
8 votes
2 answers
4k views

Simple Windows+Linux server provisioning? Chef/Puppet/Ansible etc [closed]

I'm primarily a developer, part time devops; and manage servers here and there for my projects. I want to automate provisioning of web/app/database servers going forward for my projects I manage a ...
Andrew's user avatar
  • 231
8 votes
1 answer
4k views

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 ...
Sarah Haskins's user avatar
7 votes
2 answers
5k views

debugging chef recipes on opsworks instances - access to custom json / data bag attributes

I'd like to use a chef-shell session on an aws opsworks ec2 server so I can test some environment and instance specific code I'd like to include in a custom recipe. For example, I'd like to see the ...
Peter M's user avatar
  • 973
7 votes
1 answer
459 views

What are compelling use cases for having both Chef/Puppet and RightScale/Scalr?

I was wondering about the differences between cloud computing management tools and server configuration software as there seems to be an overlap between them. I would like to have some feedback from ...
Anonymous's user avatar
7 votes
2 answers
6k views

Chef cookbook dependencies of dependencies

This might be a simple question - I am trying to install a cookbook (gitlab) I cloned the cookbook into a folder on my local drive and ran knife cookbook upload gitlab. Immediately it threw an ...
Jeff V's user avatar
  • 229
7 votes
3 answers
6k views

Service doesn't start when using chef

I've written a script which I trigger as a service. When I call service myservice start the service starts fine. However, when the same service is triggered using chef, the service doesnt start. My ...
Jay's user avatar
  • 173
7 votes
4 answers
20k views

What permissions in IAM do i need to start EC2 instances with chef knife?

Q1: I am trying to create user in IAM AWS console that has restricted permissions only to start new instances using knife ec2 method. Currently only full access with policy "Amazon EC2 Full access" ...
Andrei Mikhaltsov's user avatar
7 votes
1 answer
17k views

Chef - Howto compute attributes from node specific values?

Let say I have a cookbook which configures and installs a magical deamon: magical-deamon/recipes/default.rb: template "/etc/magical-deamon/magical.conf" do source "magical.conf" mode 0644 ...
Alex Jäger's user avatar
7 votes
3 answers
16k views

Chef bootstrap giving 401 unauthorized

I'm trying to bootstrap a new chef node by running: knife bootstrap <server ip> -x lewis -N gitlab --sudo But I get the following output: [Mon, 03 Sep 2012 14:45:17 +0000] INFO: *** Chef 10.12.0 ...
loddy1234's user avatar
7 votes
4 answers
7k views

bootstrap (add node) localhost in chef

Problem. Following command line knife bootstrap 127.0.0.1 -r 'recipe[chef-client]' -x user -p password --sudo returns Bootstrapping Chef on 127.0.0.1 WARNING: Failed to connect to 127.0.0.1 -- ...
V_V's user avatar
  • 171

1
2 3 4 5
13