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 ...

learn more… | top users | synonyms

3
votes
3answers
2k views

Running `apt-get upgrade` with Chef Solo

I'm using Chef Solo to provision a Vagrant VM based on Opscode's "Bento" box for Ubuntu 12.04. When it's done provisioning and I SSH in for the first time, the MOTD tells me there are packages and ...
6
votes
1answer
429 views

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 ...
0
votes
1answer
90 views

Storing extra data in .json role/environment files for external (i.e. non-Chef) applications

I’m thinking about converting my roles to JSON syntax and storing some extra data in there for an external, non-chef application (specifically Vagrant). My idea is that if I stick to a convention in ...
0
votes
2answers
93 views

Running recipe name

In Chef, is possible to get the recipe name when this recipe is running? I want to add recipe name on logging/debugging. Something like: Chef:Log.info "#{recipe_name} xxxx"
0
votes
2answers
1k views

How do you execute a command in the background with a Chef recipe on Windows?

I have a Java application I am deploying with Chef. I would like it to start, and allow the Chef client to exit. However, it seems like chef-client waits for the command to finish, no matter how I ...
1
vote
3answers
1k views

Chef Knife Upload Cookbook: Method not Allowed

I'm running Chef server 11 on a CentOS 6 box. Installed via the RPM from Opscode. I set up my workstation on a Windows 7 box. I can run the usual knife client list and get a response, so I'm confident ...
0
votes
0answers
805 views

vagrant - Could not find chef

New ubuntu 10.04 vagrant setup, and trying to run vagrant up $ vagrant up [default] VM already created. Booting if it's not already running... [default] Clearing any previously set forwarded ...
0
votes
1answer
62 views

Assigning default attributes at a time

Why in all OpsCode's cookbooks there is a default[:netkernel][:version] = "4.1.1" default[:netkernel][:install_url] = ...
0
votes
1answer
36 views

Omnibus uniform Chef version install across platforms

So I'm looking for a uniform way to install chef on a number of different servers running different platforms. I know I can use the omnibus installer for this, but I also need a way to lock or ...
3
votes
1answer
737 views

How to create an EC2 instance with knife?

I was able to make knife access AWS by following: http://www.agileweboperations.com/amazon-ec2-instances-with-opscode-chef-using-knife Now, I get a knife command almost working: $ knife ec2 server ...
1
vote
4answers
4k views

How to configure knife and EC2 to create a new instance from the command line?

I am playing with Amazon EC2 to create instance. I was reading here: here in the knife documenation for EC2, that I would need to set: # EC2: knife[:aws_access_key_id] = "Your AWS Access Key" ...
1
vote
2answers
111 views

In the chef resource document, why do they have parenthesis around the name in the template resource in the execute examples?

I'm looking at the http://docs.opscode.com/chef/resources.html#execute and under "Execute" in "Execute a command using a template", they call template with parenthesis around the argument. Just a ...
3
votes
1answer
321 views

Chef Error “RuntimeError: Please save server before accessing metadata”

I'm trying to create a new server on the Rackspace Cloud using Chef and I keep coming across this error in Chef: RuntimeError: Please save server before accessing metadata Any ideas?
0
votes
1answer
893 views

Is it safe to change the IP address and domain name of an Chef Node?

I have a Chef Node that I'm initially setting up on one network that I need to (physically) move to another network. When this happens, I want the IP address and domain name to change, and the Node ...
0
votes
1answer
351 views

cscript fails when executed by winrm via but works when executed locally

I'm running the following as a part of chef deployment of a windows server. cscript /nologo C:\chef\wget.vbs /url:http://www.opscode.com/chef/install.msi ...
0
votes
2answers
261 views

Provision server with chef-solo as root?

I'm using knife to bootstrap my VM with vanilla Debian 7.0 installation. In bootstrap stage I'm just setting sources.list, updating & upgrading system, then I install buil-essential, rsync and ...
0
votes
1answer
182 views

Using Chef Server, what is a good pattern for removing duplicate calls to a particular resource?

I have a recipe with multiple calls to a given resource, let's say directory. The calls to directory, for the most part, have very similar parameters (i.e. same owner, same action, etc.) - i.e. a lot ...
0
votes
2answers
2k views

Using Chef, can I use include_recipe in an If statement and count on it working multiple times?

I would like to include a recipe based on a conditional branch in another recipe. This is currently planned to be during the execution of a Ruby .each iterator. The opscode wiki says the following ...
0
votes
1answer
425 views

Chef bootstrap chef-server, deploy my own validation.pem and webui.pem

I have existing validation and webui private keys that I wish to use on a new chef-server deployment. Part of my bootstrap template copies these keys to /etc/chef/. When chef-solo does its run and ...
2
votes
2answers
2k 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 ...
1
vote
1answer
777 views

How to install APC on a vagrant box running Ubuntu 12.04 with PHP 5.4?

In my "Vagrant" file I have this line: chef.add_recipe("php::module_apc") But it gives me this error: [2013-01-11T22:14:53+00:00] INFO: Processing package[php-apc] action install (php::module_apc ...
0
votes
1answer
2k views

Chef / ruby / erb files - How does this example code work?

I am working on a custom bootstrap template, based on a sample template. I am looking at the example of getting the validation key from the workstation to the brand new server, and from what I can ...
0
votes
2answers
294 views

Chef nagios cookbook doesn't install check_nrpe on server

I'm trying to build an updated monitoring server, using the current version of the Chef nagios cookbook (3.1). It installs nagios-3.4.3 from source on my Ubuntu VM. But I don't find any evidence of ...
1
vote
1answer
1k views

How do I remove a package with Chef? [closed]

I am trying to remove packages using a chef. i.e. remove java 1.6 and install java 1.4
0
votes
1answer
279 views

Spinning up multiple EC2 servers with knife and assigning elastic ips from a pool

I'm wondering how to go about spinning up multiple EC2 servers using knife of the same type, say 4 app servers, and assigning them each an elastic IP from a pool of available Elastic IPs. I have ...
0
votes
1answer
367 views

Removing an ubuntu package with chef

An older version of a cookbook installed a package that I no longer want on my systems. My understanding is that chef doesn't have a straightforward way to explicitly remove a package, so I resorted ...
3
votes
1answer
117 views

Chef - how much abstraction is smart?

We have > 20 individual apps that we support. Most do not see changes more than a couple times a year. We think chef will help us down the line. I am trying to find a happy medium between manual ...
1
vote
3answers
449 views

Chef bootstrap ec2 — use resulting IP in another chef client's configuration

Say I have an app comprised of a web server and a database. If I ec2 deploy a chef client with the DB role, how can I automatically insert the IP of this new ec2 machine into my web server's config? ...
2
votes
1answer
730 views

Chef - multiple files dynamic template resource

I'm trying to find a way to apply template resource dynamically on all files which are in a folder inside the cookbook's template folder. something like: Dir.foreach("../templates/default/shared/") ...
1
vote
1answer
82 views

chef user action logging

I am using chef for managing all our cookbooks. The problem is not only me who uses chef, I wonder if whether there is a way to logging all actions that uses completes. In particular, I am ...
1
vote
1answer
544 views

Opscode Chef nginx compile from source issue reports successful run but does nothing

I am trying to install nginx from source in Opscode Chef and its bit weird, it runs complaining nothing but does not install it either. This is how my role attributes look like looks like "nginx":{ ...
0
votes
1answer
173 views

Chef Integration Tasks Best Practices

I am new to chef (using hosted chef server) and am muddling along ok and basically understand how to provision individual servers. What I am having trouble with is figuring out how to integrate the ...
1
vote
1answer
526 views

Chef: how to run actions if git deploy has pulled new code?

Most of the time there's nothing new in the git repo that is deployed to a local directory, but if there are any changes, the node.js application should be restarted to start working with the latest ...
1
vote
2answers
204 views

replicate an existing chef node

I have a VM (hosted "in the cloud") that has been provisioned with chef using my organisation's own chef server. I would like to replicate that VM locally (using a vagrant managed VM), in order to do ...
0
votes
1answer
363 views

chef apt_repository fetching fails

I am trying to fetch a specific repository to install a php version but I keep getting 404 NOT FOUND. chef recipe code: apt_repository "dotdeb-php54" do uri "http://archives.dotdeb.org" ...
0
votes
1answer
103 views

installing php .deb files

I am using dotdeb.org php 5.4.8 http://archives.dotdeb.org/dists/squeeze/php5/5.4.8/binary-amd64/ I download all the files on to my box and run the following cd /tmp/php-deb-5.4.8 dpkg -i ...
1
vote
1answer
719 views

Chef command to create new ec2 instance with second ebs volume attached and mounted instead of the default ephemeral volume?

We currently use this command to create a new ec2 instance with chef: knife ec2 server create --node-name=prod-apache-1 --availability-zone us-east-1c --image ami-3d4ff254 --distro ubuntu12.04-gems ...
0
votes
1answer
122 views

How do projects manage chef cookbooks when multiple teams manage multiple sets of cookbooks?

I am wondering how projects that have multiple component teams manage their sets of cookbooks? We are trying to figure out how we can have an ops team provide a set of "common component" cookbooks ...
0
votes
1answer
213 views

Install custom php modules with chef solo

I've tried to search but unfortunately I don't find any documentation or article about how to install custom php modules like pdo_mysql when provisioning with chef solo. If you do know, I'd be very ...
2
votes
2answers
227 views

Chef-client kills processes

I use the knife ec2 plugin to bootstrap a new instance (Ubuntu 12.04) and install a software on it. Everything works great but after chef-client ends, some processes of the new software are killed. ...
1
vote
2answers
493 views

How do you configure rvmsudo using chef?

I am using the chef-rvm cookbook by fnichol to perform a system wide installation of Ruby via RVM with the rvm::system recipe. I.e. In my run list, I have (with no additional attributes set): ...
0
votes
1answer
737 views

Getting a chef node to re-register a new identity with the server

I'm using chef-server to manage resources deployed on AWS. But when I want a new node, I don't like waiting the 30+ minutes it takes for a full chef run to install everything. So I've created an AMI ...
1
vote
1answer
49 views

Multiple identical GPG Keys. What can cause that?

I'm using OpsCode Chef to manage all my VMs, but since the last week, I'm having issues with one VM. When running chef, it hangs right at the beginning. After a bit of investigation, I found out that ...
3
votes
3answers
3k 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" ...
1
vote
1answer
354 views

How to pass attributes from knife command (ssh)?

Is it possible to attributes from knife command (ssh), e.g. knife ssh ‘role:server’ ‘sudo chef-client’ <-- how to pass attributes to remote?
1
vote
1answer
551 views

How to get the public instance address from knife ec2 server create with chef-solo

I'd like to somehow get the public instance address or hostname from knife ec2 create ..., but I can't find any mechanism for doing so. Since I'm currently using chef-solo, I've written a simple ...
1
vote
1answer
1k views

What is the correct way to use Chef-server's 'validation key'?

It seems to me that the recommended way of adding clients to a chef server - or my understanding of it - is flawed. from the docs: When the chef-client runs, it checks if it has a client key. ...
2
votes
1answer
147 views

Where is the history for the knife executing on the open-source chef server?

For example, after I run a knife command of 'knife cookbook upload cookbook_name' from a chef workstation or somewhere, where can I find the history or log about who sent the knife command and when, ...
1
vote
1answer
94 views

Chef-Server fails startup

I've installed chef-server from the chef apt repository using these instructions and everything seems to work until I try to start chef-server. I'm running Debian Squeeze in a Linux container (LXC). ...
1
vote
1answer
69 views

Server specific usernames for each SSH connection in Chef with Knife

To set a default user for each ssh connection, I would normally adjust my .ssh/config file to Host *.server1.com User joe Host *.server2.com User mike I am now using Chef. The knife tool ...