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

4
votes
2answers
2k views

How to install PHP 5.4 on AWS Opsworks

I'm trying to get php 5.4 running on AWS Opsworks. When I add the "PHP App Server" layer I get the following description "The PHP Application Server layer is a blueprint for instances that function ...
4
votes
2answers
2k views

Why can't “knife data bag from file” find existing json file on chef server?

Summary: I'm running into a problem with "knife data bag from file", where knife doesn't recognize the .json data bag file pulled down from a remote git repo. Background: I'm currently trying to ...
4
votes
1answer
511 views

nagios automation in big scale

I would like to know if you have an experience or any idea about how to set up nagios in big scale. Previously we used nagios and nagiosql for manual settings, it was pretty comfortable for few ...
4
votes
3answers
4k 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 ...
4
votes
2answers
978 views

Chef recipe to install varnish 3.0 on ubuntu lucid?

Here's my problem. I want Varnish 3.0, but Lucid only has the 2.1 package available. So using Chef, I need to make an install recipe that adds the varnish-cache.org repository to the apt sources and ...
4
votes
3answers
2k 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 -- ...
4
votes
1answer
292 views

Going from Vagrant in development to chef-solo in production, and getting a “FATAL: NoMethodError: undefined method `delete' for #<Chef::Role” error

So I have a set of cookbooks/roles that are configured to work with vagrant. I am now in the process of deploying an application, and I want to run these identical cookbooks using chef-solo on my ...
4
votes
2answers
417 views

chef's knife non deterministic failture to launch new EC2 instances

I'm using chef's knife to launch new ec2 instances. This works generally well, but every 2-3 attempts it fails and I get the following stack: [Sun, 10 Apr 2011 08:11:23 +0000] INFO: Client key ...
3
votes
5answers
7k 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?
3
votes
2answers
158 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 ...
3
votes
3answers
2k views

Upload everything with Knife

Let's say you have a standard Chef repository with directories as follows: cookbooks data_bags environments roles Is there way to upload it all in one go? Otherwise you have to do this: knife ...
3
votes
1answer
791 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 ...
3
votes
1answer
2k 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 ...
3
votes
3answers
129 views

File Caching Proxy Server For Config Management Software (Chef)

I have several servers that I manage with Chef. They all belong to one network and bandwidth among them is big in contrast to bandwidth to outer internet. The problem is: many times there is a need ...
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 ...
3
votes
2answers
4k 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 ...
3
votes
3answers
4k 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" ...
3
votes
2answers
3k 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 ...
3
votes
1answer
3k 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: ...
3
votes
2answers
2k views

Opscode Chef Ohai plugin - How to get a custom plugin to run automatically?

The Ohai docs are incomplete. Here's what I've been able to do so far: I've created a custom plugin that adds one piece of node data called "my_custom_data" it works when I load it manually in IRB ...
3
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 ...
3
votes
1answer
195 views

Is it worth it to do revision control/puppet/etc. on a single-server-setup?

After reading Using revision control for server configuration files?, I decided to install etckeeper on my server. However, it's a one-server setup, so I only have one physical machine and no load ...
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?
3
votes
1answer
572 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 ...
3
votes
2answers
990 views

How to have Chef use a different ip?

I'm using a bridged network on a vagrant VM with chef-client. knife node show test1-vagrant shows an ip address of 10.0.2.15, which is eth0. eth1 is 192.168.1.5, which is what DHCP gave it. How can ...
3
votes
1answer
2k 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 ...
3
votes
2answers
1k views

chef assign elastic ip to instance

I am using a custom bash script to spin up/down EC2 instances as needed. The script creates the instance similar to: knife ec2 server create --config .chef/knife.rb with a few other parameters. It ...
3
votes
2answers
921 views

How to make Chef-Server use Ruby 1.9 on Ubuntu?

I've installed Chef Server on Ubuntu 12.04 using the official instructions, which uses the "omnibus installer" that has embedded ruby 1.8.7. I'm trying to install knife-windows, but when I run gem ...
3
votes
1answer
121 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 ...
3
votes
1answer
1k views

How to create hash or yml from top level attributes values of node?

I have a chef recipe where I want to take all of the attributes under node['cfn']['environment'] and write them to a yml file. I could do something like this (it works fine): content = { ...
3
votes
1answer
216 views

Two chef nodes (two environments) on one machine

We are resource limited here, and want our qa and staging environments on one machine. We are going to run separate binaries and confs for our app & supporting services. According to chef docs ...
3
votes
2answers
840 views

How to organize deployment process in Chef-controlled environment?

I have a web Linux-based infrastructure which consists of 15 virtual machines and over 50 various services. It is fully controlled by Chef. Most of the services are developed internally. Basically ...
3
votes
1answer
2k 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 ...
3
votes
1answer
860 views

How to force actions on “up to date” resources in Chef?

In the following code, I create a service that I would like to start only after deploying files that it depends upon, and to restart it whenever those files change. This very basic recipe does not ...
3
votes
1answer
402 views

Version control of chef nodes and roles

Is it good practice to version control the nodes and roles when using chef? If so, what is a good way to do it? It looks likes one should be able to take a tree of JSON files created using ...
3
votes
1answer
157 views

knife on Windows inconsistently reads ~\.ssh\knife.rb on Management Workstation

I am implementing a new instance of (Open-source v10.12) Chef in an existing environment. Currently the environment is mostly Windows, but more Linux is being introduced. I have used Chef in a ...
3
votes
1answer
461 views

omnibus installed chef and rvm issues

I'm trying to figure out one thing and would like someone's else view on this. I installed chef on my Ubuntu server (11.10) via the awesome omnibus install. It worked perfectly fine. I was able to run ...
3
votes
2answers
863 views

Chef 'notifies' fails to restart or reload services

I'm using chef-solo v10.12.0 to configure an Ubuntu 12.04 VM, and I keep running into an issue where services don't restart or reload as expected when a configuration file is changed. There are no ...
3
votes
1answer
1k views

Why am I getting 'undefined method' exceptions when executing 'run_list add', 'run_list remove' and 'rackspace server delete'?

[Originally posted this to opscode forum, got no response] I’m testing out a free hosted chef-server account and multiple subcommands are failing with ‘Unexpected Errors’. Perhaps my version and the ...
3
votes
1answer
844 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
6answers
4k views

How to edit /etc/shadow on many Linux servers?

I would like to change the root password on about 20 Linux servers. Mostly CentOS and Ubuntu. So I have looked at Puppet, chef, and cfengine, but I can't really tell if they can do that, or if they ...
2
votes
3answers
1k 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 ...
2
votes
4answers
1k views

chef-server-webui session not working when access from external IP address

I have installed chef-server on an Ubuntu 12.10 system using the official .deb package for that release. After the installation had finished I run chef-server-ctl test Which reported success, 0 ...
2
votes
3answers
449 views

Using Chef to backup Windows Servers configs - AD,DNS,IIS,DHCP, Exchange the lot

I have been looking at Chef as a tool for backing up config my windows servers. But from what I can see this is geared more towards *nix doesnt look like there are many scripts for backing windwos ...
2
votes
3answers
1k 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 ...
2
votes
2answers
1k views

Using Chef Solo to provision a Windows EC2 instance and bootstrap it

I'm trying to automate our CI process for a couple of .NET apps, and in a perfect world I'd like to spin up a Windows EC2 instance for each, bootstrap the instance to install Chef Solo and then ...
2
votes
2answers
616 views

bootstrapping an ubuntu ec2 instance using chef and knife

I am bootstrapping a ec2 ubuntu based chef node using chef, it creates an instance but it says Failed to authenticate ubuntu - trying password authand asks for the password. But a newly created ubuntu ...
2
votes
1answer
1k views

Puppet or Chef to configure webapplication

I'm looking for a deployment tool for java based webapps deployment to QA/preprod enviroments. Application is typical webapp, compiled to war/ear with .properties file. During deployment ...
2
votes
1answer
392 views

Vagrant: I need a provisioning system with no dependecies

Getting off the ground with a vagrant config. Host is Windows. I have a really simple config, so I wanted to use Ansible, but got this: [default] Running provisioner: ansible... The executable ...
2
votes
1answer
1k views

Use chef-solo to install Oracle JDK 7

Assume I have the java cookbook and its dependencies downloaded from http://community.opscode.com/cookbooks and can run chef-solo successfully. Is there a command that I can run to install the latest ...