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

learn more… | top users | synonyms

8
votes
3answers
2k 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 ...
2
votes
1answer
1k views

chef-client “can not find config file”

I have a handful of servers who have not checked into the (in-house open-source) chef server in some time. When running chef-client as root, I get the message WARN: Can not find config file: ...
9
votes
2answers
527 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, ...
1
vote
1answer
915 views

Chef server bootstrap fails on Amazon Linux

I am trying to bootstrap chef-server on Amazon Linux 64-bit instance, but for some reason chef-solo gives some errors. It seems that chef can't determine that Amazon Linux is actually a RedHat ...
2
votes
2answers
506 views

Run config script on next/first boot?

I'm wearing the devops hat for my company. All our infrastructure is manually configured in AWS and I would like to start using Chef for configuration. First step: Make it easy to bootstrap an ...
3
votes
2answers
3k views

setting chef hostname to nodename on/after bootstrap

I do tests atm with Chef and I have a virtual machine which I'm cloning to generate new nodes. I do bootstrap with the knife command and the -N Parameter to give each host a nodename. The Problem is ...
4
votes
2answers
2k views

Chef Server Migration

A company that I'm contracting with has determined that they need to migrate their Chef (Open-Source Edition) instance to a new server. They do not want to migrate to the Hosted platform. I have not ...
0
votes
2answers
2k views

How to use only Chef's “php_pear” provider from “php” cookbook

When using Vagrant (and subsequently Chef), I'm provisioning my VM using Zend Server CE, which automatically installs the usually *AMP stack. I'd like to install some packages via PEAR, for which the ...
6
votes
1answer
11k 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 ...
1
vote
1answer
2k views

Knife command to check last node check-ins?

Is there a knife incantation that allows me to check the Last Check-In time of given (or all) nodes in my environment. (As opposed to the http:///status page in Open-Source Chef.)
1
vote
2answers
3k views

How to generate a config file from node attribute (array) with Chef?

One of chef node's attributes is an array of hashes: "array_of_hashes": [ { "hash_key_1": "value1", "hash_key2": "value2", }, { "hash_key_2": "value4", ...
0
votes
2answers
2k views

Chef-solo cannot locate an nginx recipe template

I have been recently experimenting with Chef. I thought I would attempt to rebuild my personal web server using chef-solo. It's an AWS instance running the Amazon 64bit Linux AMI. My first ...
3
votes
3answers
3k views

In Chef, how do I access attributes set in the environment JSON from cookbook attributes files?

I have a chef system where we have multiple environments and have attributes set in evironment JSON. I'm having trouble accessing these from within cookbook attribute files and recipes.
6
votes
5answers
8k views

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

Setting properties in chef-client.rb

I have a use-case where a chef recipe needs to use 'remote_file' to fetch a file on a virtual, and the fetch needs to be do through an HTTP proxy. This is not working because chef-client doesn't use ...
7
votes
3answers
5k 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 ...
8
votes
3answers
4k 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 ...
3
votes
1answer
3k views

Chef recipe order of execution

I'm writing a recipe that compiles and installs an application from source but also changes configuration files in directories that get created when the application finishes installing. The recipe ...
3
votes
1answer
2k views

new user with authorized_keys: how to NOT ask for the old password when setting one?

when I create a user in the system with Chef, I always upload its public key to .ssh/authorized_keys. When user logs in for the first time, he is required to "change" his password. For that a stub ...
1
vote
1answer
1k views

Multiple related resources in chef recipe

I need to run some commands depending on a result of previous execution, which again depends on some package being installed. On the first run, I'd expect something like: install package "XXX" get ...
11
votes
5answers
8k 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 ... ...
13
votes
4answers
4k 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 ...
26
votes
7answers
17k 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 ...
3
votes
1answer
3k views

Create/Update apache virtualhost on the same node for diff subdomains using Chef server?

I've two applications to deploy/run using chef on a single node under the same domain/subdomain. One is a Rails app and another is a Wordpress app. The Rails app will reside as the main app at say ...
6
votes
5answers
3k views

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 ...
0
votes
2answers
309 views

CouchDB/xulrunner hang on Ubuntu 10.04 LTS

I have an Ubuntu 10.04 LTS box setup as a Chef server. This was all working fine until the first time the box was rebooted, after which the following three (possibly unrelated) things happened: ...
1
vote
2answers
8k views

In Chef how do you override default attribute values in node.json

I'm running chef-solo with chef-solo -c solo.rb -j node.json -ldebug and it's failing because nginx cookbook/recipe refers to user "www-data" which I don't have. Can I change the value in node.json ...
6
votes
3answers
6k views

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 ...
8
votes
2answers
5k 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. ...
1
vote
2answers
112 views

Running scripts before Chef-solo starts?

I'm using Vagrant with Chef-solo to create a dev environment VM. Problem is, the Debian Chef package depends on a certain version of RubyGems to run, but I want the VM to have a much newer ...
2
votes
1answer
3k views

How do I use Chef Data bags to setup a mysql server

Ok I'm getting started with Chef using the opscode server. I'm using the community cookbooks, and I've got basics working (I created a users/myname.json data bag and added the user::sysadmins recipe ...
2
votes
1answer
1k views

Bootstrap and Deploy - Chef and Capistrano

I've been looking online for what practices people are using when scaling their site using chef/capistrano and have not found much procedural information on this so thought I would ask here. We are ...
2
votes
1answer
144 views

Tools helpful for setting up virtual test environment

I'm looking for something similar to vagrant, but working with KVM. I'd like to setup a couple of machines with packages I point at using a single command, but I don't really want to write the whole ...
43
votes
1answer
15k 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 ...
1
vote
1answer
2k views

chef/knife environment configuration help

I have the following as my knife.rb: log_level :info log_location STDOUT node_name 'user' client_key '/home/user/.chef/user.pem' ...
6
votes
1answer
2k views

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

How to find all local user accounts in chef

Using opscode chef, is there a way to find or loop over all user accounts? I need to create a configuration file in each users home directory. I do not want to loop over any directory structure for ...
3
votes
1answer
866 views

Recommendations for hosting Rails on Amazon EC2? [closed]

There are a number of solutions for easily hosting Rails on Amazon EC2 like the following Poolparty Rubber Amazon Cloud Formation Opscode Chef Rolling your own (and I'm sure others I'm not aware ...
2
votes
3answers
2k views

emulate fabric/capistrano with puppet or chef

i have a few remote environments where i can only connect from outside but not from inside to outside. for my deployments/configuration needs i used fabric and capistrano that works fine but I have ...
18
votes
4answers
7k 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?
1
vote
3answers
2k views

Installing something from source using chef, should I be doing some checks

I'm installing something from source using chef and the script resource. Should I be doing a check for the resultant executable etc. as part of it? e.g. What I currently have is: remote_file ...
0
votes
2answers
290 views

How to dynamically setup DNS

I trying to setup as part of a study a PaaS (Platform as a service) for Ruby on Rails applications. I have already played with Amazon EC2 and Chef creating EC2 instances based on Chef's recipes and ...
1
vote
1answer
997 views

Bootstrapping servers with chef, and changing the SSH Port

I have a full set of recipes that are working to bootstrap a server at Rackspace, it configures and installs everything as needed. Now, I want to change the default port SSH runs on. This is fairly ...
4
votes
1answer
3k views

Chef: import definitions from other cookbooks

Basically I have a couple cookbooks I've written, and currently they all have the same definition file copied on each. Obviously this is a bad situation, as it makes adding new cookbooks more ...
1
vote
1answer
462 views

Chef clients are unable to connect after Ubuntu upgrade

After I upgraded Ubuntu on my chef server from 10.04 to 10.10, all my knife and chef clients stopped working. I received 401: Unauthorized exceptions for every query and operation. I tried ...
0
votes
1answer
2k views

Configuring Virtual Hosts with Chef - Best Practice

I'm getting started with Chef and I've got a couple of things work which is great. I'm a little stuck though with how to use the Apache2 recipe to configure a virtual host. I have 5 hosts to set up ...
1
vote
2answers
2k views

chef clients behind firewall

I am currently learning about chef. What I understood so far: I have to install chef-server on an own server or use the hosted chef. I have to install chef-client on the servers that I want to ...
25
votes
3answers
10k 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 ...
0
votes
1answer
7k views

Chef conditional execute in recipe

I'd like to create an execute block which is only run when some specific condition is met (in this case if an interface wlan0 is present). Alternatively, I'd like to prevent the notifies clause of a ...
1
vote
1answer
701 views

How to get feedback from chef-clients

We are considering using chef to manage our application servers. So, we are creating recipes which configure resources for us as needed in certain situations. But what happens if the execution fails? ...