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

0
votes
1answer
91 views

Is there a way to specify versions for programs using Vagrant and Hosted Chef?

I am trying to improve my development workflow but am running into some major roadblocks. Currently, we develop on local Windows machines running XAMPP then after tested on an individual machine, push ...
0
votes
1answer
342 views

How to copy the appropriate config file, with CHEF, in a recipe?

I'm starting to learn how develop recipes to chef. I need to install Ganglia Monitor in some servers (or nodes in ganglia literature). So that's why I'm checking if the plataform is ubuntu, centOS and ...
1
vote
1answer
900 views

Vagrant / chef - nginx cookbook extend

I am fairly new to using chef, particularly with vagrant so this will most likely be a silly question to the more experienced users out there. I am using this cookbook: ...
1
vote
1answer
196 views

What is the most automated way to deploy a new server being managed by Chef?

We use knife-vsphere to deploy and configure new chef-managed servers in our virtual environments, but don't have any one-step solution for physical servers. Currently the process involves imaging a ...
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 ...
1
vote
2answers
460 views

“one-off” use of http_proxy in a Chef remote_file resource

I have a use case where most of my remote_file resources and yum resources download files directly from an internal server. However, there is a need to download one or two files with remote_file that ...
0
votes
1answer
390 views

Chef rbenv cookbook recipe user not found

I have a problem with Chef rbenv cookbook. Once I start to bootstrap a server it gives me a error: could not find user recipe for cookbook rbenv But the recipe is in the recipes folder. I can not ...
1
vote
2answers
492 views

Service doesn't start when using chef

I've written a script which I trigger as a service. When I call service myservice start the service starts fine. However, when the same service is triggered using chef, the service doesnt start. My ...
1
vote
1answer
244 views

Manage multiple ssh-keys for one user with Chef

I started to use Chef in my infrastructure, but cannot make recipe like this: -each developer has own public ssh-key. -in remote server there is an unique user, named ubuntu I want to use data bags ...
0
votes
1answer
376 views

Chef how to run a run list in filtered node

How to run a run list in several nodes? Now I wrote a script loop those severs and run using knife bootstrap. Is there better way to do it? Like how we use "knife ssh 'id:*', can we run a run list in ...
0
votes
0answers
576 views

How do I load JSON attributes pass via knife through chef recipes?

I have a web server that basically accepts input for a knife ec2 create server command. In my knife command, I pass in -j '{"branch":"clone"}' From documentation I thought I would be able to do ...
2
votes
2answers
926 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 ...
0
votes
1answer
36 views

Can I get a clear summary of how and when each part of a chef cookbook is loaded/executed?

Here's what a chef cookbook looks like: . ├── attributes │   ├── default.rb │   └── bla.rb ├── files │   ├── default │   │   └── some_file.txt │   └── windows │      └── some_file.txt ├── libraries ...
2
votes
1answer
556 views

How to create a group with chef

I assume this is straightforward, but I'm lost in the abstractions in Chef. I want to create a new Unix group on Red Hat Linux, called deployers, and then add some of my users to that group. What are ...
2
votes
1answer
253 views

What is preferred approach to deploy Python app using RPM? [closed]

I am new to the dev-ops side of things, and I've been working to get a Python application packaged into an RPM (using python setup.py bdist_rpm) deployed onto a centos VM via Yum. Chef is used to ...
2
votes
2answers
576 views

keeping chef data bags on server in sync via git repository

I recently started using chef and I love it for provisioning my vagrant boxes and quickly spawning new machinges. Now I started using a hosted chef server. It's pretty easy to manage my cookbooks ...
0
votes
1answer
320 views

Pass override attribute via command line for chef-solo

For chef-solo, is it possible to pass the override attributes via command line? Because sometimes the attribute is just adhoc decision and is diffent from host to host, e.g. hostname, we don't want ...
4
votes
2answers
2k views

Chef: create a directory for a template if it doesn't already exist

If I have a template being created, how can I ensure that the directory exists? For instance: template "#{node[:app][:deploy_to]}/#{node[:app][:name]}/shared/config/database.yml" do source ...
1
vote
2answers
457 views

Prevent chef recipe from executing previously executed action?

I have a simple recipe like the following, and currently I am using a local file to indicate if the command has been run or not execute "test" do command "sh test.sh && touch ...
0
votes
1answer
716 views

Can't get yum repository (ius) to install because of (epel) dependency that seems to be installed

So I'm trying to install the epel repository and then also install the ius repository. I'm managing this server with chef, and my run list goes ... "recipe[yum::yum]", "recipe[yum::epel]", ...
3
votes
2answers
3k 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 ...
0
votes
2answers
613 views

node's FQDN is missing in chef

I am a newbie to the chef and knife, I am running couple of ec2 instances and have install chef-client and I can see all the instances in the node list of the chef, but couple of them are missing FQDN ...
0
votes
1answer
80 views

unable to bootstrap ec2 ubuntu instance

Hi I am trying to bootstrap an ubuntu ec2 instance using knife command line tool, but when ever I run this command knife ec2 server create -x ubuntu --region ap-southeast-1 -i ami-0cdf4965 -S key ...
2
votes
2answers
522 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 ...
0
votes
1answer
193 views

Cloning and deploying existing Linux builds via Chef, Puppet, etc

Is Chef, Puppet, etc able to be pointed at an existing Linux server and suck down 100% of the 'stuff' that would be required to build the server OS/package-versions/custom-files/etc including the ...
1
vote
2answers
1k views

Merging Chef attribute arrays

Let's say I have two cookbooks, Foo and Bar. In cookbook Foo, attributes/default.rb contains the following: default[:test] = [{:baz => 'A', :qux => 'B'}] In cookbook B, I'd like to expand ...
5
votes
2answers
5k views

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

How to set up/customize configuration-specific attributes in a recipe?

I am starting to use chef to automate setting up build machines for a build farm. Some of our dependencies here are machine specific (e.g. license key for proprietary compiler), and other recipe ...
1
vote
2answers
104 views

Inter-site linking with a WAN cluster infrastructure

I am planning to deploy an infrastructure of 11 nodes using Opscode Chef, providing for a high availability web application. I would like to spread the nodes across datacentres for availability, for ...
1
vote
2answers
3k views

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 ...
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
417 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
88 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
77 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
721 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
35 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
679 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
3answers
3k 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
102 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
317 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
811 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
327 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
240 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
170 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
368 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
1k 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 ...