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

learn more… | top users | synonyms

2
votes
3answers
2k views

creating cookbooks and roles with out chef-server

I want to run: knife role create blah I use chef-solo and don't need knife to connect to a server. I just would like to run these commands for helping me prepopulate the files quickly. Everytime ...
0
votes
1answer
296 views

chef and monit files

I have several processes running on servers with different roles that are monitored by monit. For example, say I have an Apache server and a DB server with MySQL. I have several monitrc files that ...
0
votes
3answers
281 views

writing a chef cookbook for an application with lots of dependencies

If i have a a software system that has a lot of dependencies on other libraries, like libssl, or libxml etc, should I be creating separate cookbooks for each of these libraries (with a recipe that ...
0
votes
2answers
195 views

chef and software packages with long running builds

I'm experimenting with chef and moving my server configuration over to it. One hurdle I'm encountering is how to deal with packages that must be compiled and installed manually (configure, make, make ...
5
votes
3answers
3k views

Deploy an AWS Auto Scaling groups using Chef Server

You can, for example, to deploy an an Auto Scaling groups consists of web severs, ELB and DB using AWS CloudFormation (with Chef server): http://aws.amazon.com/cloudformation/aws-cloudformation-...
5
votes
5answers
14k views

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

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 ...
14
votes
8answers
22k 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 ...
-8
votes
1answer
162 views

how to Moniter cpu status using chef? [closed]

i try with java and ruby for moniter EC2 instance with aws sdk but not able to find any example how to moniter ec2 instacne with chef. can any one help to find example to moniter ec2 instance so we ...
2
votes
1answer
4k views

Show output of chef Execute in console as it runs

I have the following snippet in a chef recipe: chef::Log.info("Installing pips using requirements file: #{requirements_file}") execute "pip install -E #{ve.path} -r #{requirements_file}" do user ...
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: /etc/...
9
votes
2answers
531 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
919 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
516 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
6k 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 ...
8
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 https://...
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
9k 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
18k 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
313 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: chef-...
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 installed-...
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
3k 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
867 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
8k 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?