0
votes
1answer
90 views

chef remote_file is throwing Encoding::UndefinedConversionError

I have the following in a chef recipe: remote_file '/tmp/zint-2.4.2.zip' do source 'https://s3.amazonaws.com/mybucket/zint-2.4.2.zip' checksum ...
0
votes
1answer
24 views

Installing nginx via chef Role is not applying my changes

I wrote a role to use the default nginx cookbook. The role is not applying any of my attributes. It keeps installing nginx 1.2.1. { "name": "nginx", "json_class": "Chef::Role", "chef_type": ...
-2
votes
1answer
413 views

Why chef, puppet, ansible, salt, etc.? [duplicate]

The devops tools ecosystem is puzzling to me. Instead of shell scripts that work everywhere everyone in the server orchestration/management space is bolting on their own proprietary formats. Ansible ...
1
vote
1answer
296 views

Can I use Chef-Solo to provision a server created with knife-eucalyptus

I am able to create a new server using knife-eucalyptus like so: knife euca server create The server gets created but provisioning fails with the following message: "ERROR: Errno::ENOENT: No such ...
-1
votes
2answers
135 views

How to use wrapper recipes in chef?

How can I cal a custom recipe from my default recipe? If I try recipe 'my-base-server' I get an error 1 argument for 0 What I want to achieve is a logical division of my recipe into base, ...
0
votes
2answers
334 views

Permission to write using 'deploy' user

I'm currently new to Chef and Capistrano. I'm using version 3.x of Capistrano to deploy Rails 4 application. I have successfully bootstrapped a server using chef solo. One cookbook that I'm using is ...
0
votes
2answers
854 views

How to install Redis with Chef?

I am trying to install Redis with Chef. I would think, it's easy, since I only want to have the default configuration. So, I add to a Berksfile: site :opscode cookbook 'apt' cookbook 'node' ...
0
votes
2answers
77 views

Can I still benefit from using Chef (et al) when I'm not in total control of the server?

I would like to get better control over my deployment environments, but I share the system administration responsibility with an IT department that has their own (not fully automated) processes for ...
1
vote
1answer
395 views

A chef recipe to install ruby 1.9.3 system wide without rvm nor rbenv

I'm looking for an Opscode Chef cookbook that installs system-wide Ruby version 1.9.3, patch-level latest at the time of the run_list execution. Have done some research and there is a Brightbox PPA ...
0
votes
2answers
149 views

chef deploy start service and restart service in sequence

Chef stop and start service in sequence and would like to ask different procedure. Step 1: framework bootstrap to jboss service bash "bootstrap application" do code <<-EOF ant ...
0
votes
1answer
192 views

How do I “duplicate” a server?

I have a EC2 and Digital Ocean servers and I want to re-create them locally (same config files and everything). By local I mean virtual box (vagrant). I had started out by managing them with Chef but ...
0
votes
0answers
151 views

How to override a resource defined by another cookbook?

I'm writing a cookbook for nginx with a mix of HWRPs and LWRPs to handle resources such as upstreams, sites and locations, so it's easier for us to create and deploy the development environments on ...
1
vote
2answers
214 views

Specify Chef provider for windows_feature

I originally asked this question on StackOverflow, but did not receive any working answers: http://stackoverflow.com/questions/18648713/specify-chef-provider-for-windows-feature. I'm trying to use ...
5
votes
1answer
1k views

Chef Server vs Chef Solo

I'm putting together a structure to run a Rails application. The application itself runs on Heroku. However, it makes requests to a cluster, which performs the call through a program in C. To be able ...
0
votes
1answer
158 views

How to update chef with knife solo?

I ran knife solo bootstrap [myserverssh] to initially install recipes on my server. Everything got installed correctly. I then made changes the recipes. I ran knife solo cook [myserverssh] to update ...
0
votes
1answer
27 views

Managing Multiple Configurations for the Same Software in Chef?

I'm new to Chef. I've been using chef-solo and I really like it so far. One thing that's not clear to me is the best practice on handling software configurations for the same software for different ...
0
votes
1answer
94 views

Can't compile nginx::source

I have downloaded nginx cookbook manually today from http://community.opscode.com/cookbooks/nginx and started it with include_recipe nginx::source, using chef-solo 11.4 on Ubuntu 12.04 But I have ...
1
vote
1answer
800 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: ...
2
votes
2answers
833 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
280 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
397 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 ...
3
votes
2answers
2k 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 ...
1
vote
1answer
835 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 ...
2
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
403 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
86 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
225 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
180 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 ...
1
vote
1answer
303 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
925 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 = { ...
2
votes
1answer
392 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 ...
2
votes
1answer
436 views

Configuring Chef-Solo-different override_attributes in one role

First off, im using Chef Solo and I would like things to stay as automated as possible. So I have a problem that i'm not quite sure how to solve. I'm setting up the deployment of a lot of different ...
3
votes
1answer
263 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 ...
2
votes
2answers
562 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 ...
2
votes
1answer
1k views

Overriding attributes with Chef Solo

I'm trying to install Maven 3 using Chef Solo and the following cookbook: http://community.opscode.com/cookbooks/maven The cookbook installs Maven 2 by default, and the first time I ran it, it ...
1
vote
2answers
2k views

Net::SSH::AuthenticationFailed when using Chef's Knife ssh

Facts: I have a Chef server installed. I have registered a node to this server, and I can see the node in the webUI (This is an existing node, NOT bootstrapped using knife bootstrap When I execute ...
0
votes
2answers
142 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 ...
2
votes
5answers
5k 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?
9
votes
2answers
439 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
771 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 ...
0
votes
2answers
1k 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 ...
6
votes
5answers
2k 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
106 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
2answers
865 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 ...
15
votes
4answers
4k 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?
13
votes
3answers
5k 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 ...
1
vote
1answer
853 views

sudo and chef-solo problems

I'm facing a weird problem when executing chef-solo commands on Ubuntu 10.04. If I execute this (as root): # chef-solo -c /opt/mycorp/mycorp-chef-code/config/solo.rb -j ...
1
vote
1answer
310 views

Rerunning Execute block in chef-solo

I have an execute block that runs an external install script, that I have no power over. That install script sometimes immediately does what I want and at other times first runs an arbitrary number of ...