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
7
votes
2 answers

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 error: Cookbook gitlab depends on cookbook postgresql…
Jeff V
  • 229
  • 3
  • 11
7
votes
4 answers

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" works. Creating user and granting start/stop…
Andrei Mikhaltsov
  • 3,027
  • 1
  • 23
  • 31
7
votes
3 answers

Chef bootstrap giving 401 unauthorized

I'm trying to bootstrap a new chef node by running: knife bootstrap -x lewis -N gitlab --sudo But I get the following output: [Mon, 03 Sep 2012 14:45:17 +0000] INFO: *** Chef 10.12.0 *** [Mon, 03 Sep 2012 14:45:17 +0000] INFO: Client key…
loddy1234
  • 71
  • 1
  • 1
  • 2
7
votes
1 answer

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 customers who have been using both software.
Anonymous
  • 71
  • 1
7
votes
1 answer

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 notifies :restart, resources(:service =>…
Alex Jäger
  • 73
  • 1
  • 1
  • 6
7
votes
4 answers

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 -- Errno::ECONNREFUSED: Connection refused -…
V_V
  • 171
  • 1
  • 3
6
votes
8 answers

any way to use puppet or chef without launching daemons?

Is there any way to use puppet or chef recipes without launching daemons and such? I'd like to be able to interpret files and apply them without all of the heavy lifting. If not, is there an alternate product that can be used to setup arbitrary…
Adrian
6
votes
1 answer

Which way is the correct way to pass variables to chef templates?

Looking at this official documentation: https://docs.chef.io/resource_template.html I see examples of passing variables to the Template resource that use either "{", "({" or "(" to scope the variables. I cannot find a place explaining the…
cb2
  • 163
  • 1
  • 1
  • 5
6
votes
1 answer

How to check if chef databag exists?

I want to check if there is a slaves databag. If there is one, and it contains data then I want to execute an action for every slave. I have the following code: slaves = data_bag('slaves') if slaves.length > 0 for slave in slaves ...xyz.. …
Merlijn Sebrechts
  • 469
  • 1
  • 5
  • 16
6
votes
2 answers

Berksfile source doesn't recognize self-hosted Chef server

I have a self-hosted Chef server. I can knife upload to that server, and otherwise interact with it. Therefore, my knife.rb works fine. I have recently parameterized a cookbook in order to make it the basis for a family of related cookbooks. The…
Rothbard
  • 71
  • 1
  • 4
6
votes
1 answer

Can Chef AWS cookbook query EC2 instance tags?

Chef has the official AWS cookbook (https://github.com/opscode-cookbooks/aws), which allows for spinning up of AWS resources, as well as updating of resource tags. Can the custom resources introduced by the AWS cookbook be used within recipes to…
geekifier
  • 595
  • 7
  • 9
6
votes
2 answers

Running "sudo chef-client" does not update with latest version of cookbook

Here's the situation: I have a recipe that I've been working on to install monit and install a custom monit configuration. That configuration has changed the past couple of days. I have a chef server and a chef node. The server has the most…
farleyknight
  • 171
  • 2
  • 6
6
votes
1 answer

uWSGI permissions issue

I'm trying to set up a chef recipe that will get my site running and everything seems to be working fine except for uWSGI which is giving me the following error: *** has_emperor mode detected (fd: 6) *** [uWSGI] getting INI configuration from…
Nalum
  • 259
  • 1
  • 3
  • 13
6
votes
2 answers

Chef: connection refused for cookbook upload

Be gentle, I'm new to chef, trying to get my environment set up and have some new recipes to upload to my new chef server. I'm able to do some commands, and I was able to knife bootstrap the new node, so I'm pretty sure my configuration is…
Eve Freeman
  • 228
  • 1
  • 2
  • 9
6
votes
3 answers

Is there a way to pass parameters at run time in Chef?

I wanted to pass some attributes to chef-client at runtime. Is there a way to do the same? I was looking into chef-client -j option, but to my knowledge it can be used to specify run_list. Can I pass some attributes in it? If yes, how?
Manak Wadhwa
  • 61
  • 1
  • 1
  • 3