The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
27 views

Execute chef resource multiple times with variables

Consider the following code: node["cloudwatch"]["alarms"].each do |metric,keys| script_name = "/root/.cloudwatch/create_cloudwatch_alarm-#{metric}.sh" template script_name do source ...
1
vote
0answers
171 views

Cookbook not found with vagrant, berkshelf and chef-solo

I'm attempting to get a vagrant instance up and running, but when I do vagrant up --provision, it fails with the error: ERROR: Cookbook postgres not found. I'm using vagrant-berkshelf, which ...
0
votes
1answer
116 views

Getting particular server config from Git in Chef Solo

I don't want to use Chef Server as for now, but rather want to leverage Chef Solo. I need to keep configs (attributes and files) of particular servers in a separate Git repo. This is needed to keep ...
0
votes
1answer
123 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 ...
2
votes
1answer
366 views

restarting php5-fpm on ubuntu 14.04 with chef

I have this in my chef recipe: service 'php5-fpm' do supports :restart => true action [ :enable, :start ] end However my recipe now barfs in Ubuntu 14.04, as "/etc/init.d/php5-fpm restart" ...
0
votes
1answer
76 views

Git is not working properly when installing with chef

I'm provisioning my servers with Chef. For git I'm using the community cookbook and is installing version 1.8.3.1 in Amazon Linux. However after it gets installed I don't get any output while running ...
0
votes
1answer
28 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
473 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
408 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
vote
2answers
161 views

What is the purpose of openssl passwd

I'm reading "Reliably Deploying Rails Applications" Regarding defining users to be set up by Chef, it says: “Next we need to define users, inside data_bags/users copy the file deploy.json.example to ...
-1
votes
2answers
150 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
423 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 ...
1
vote
0answers
138 views

Chef run process terminated by signal 9

With chef.log_level set to debug, my Vagrant provisioning is stopping with this as the only indicator. If this is due to resources, how can I dig out the culprit that killed my process from the Linux ...
1
vote
2answers
1k 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
80 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
488 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
175 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 ...
1
vote
0answers
28 views

how should I set passwords securly with chef-solo

I assumed thought that the way to go would be encrypted data-bags but when I finally got them to work on chef-solo I found out that chef looks for a AES key on the machine that i'm provisioning. In ...
0
votes
1answer
204 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
158 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
244 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 ...
1
vote
2answers
787 views

“Network unreachable” with centos + chef + vagrant

I'm trying to write a Vagrantfile to install nginx on CentOS 6.4 images. In my Vagrantfile I have (ip's redacted): config.vm.provision :shell, :inline => "echo \"export ...
0
votes
2answers
177 views

Vagrant doesn't detect chef-solo unless re-installed

I am using Vagrant to test my Chef recipes in Amazon AWS, and I am encountering an irritating issue: I initially assumed that Vagrant would install chef itself (as it does when using Virtual Box as ...
7
votes
1answer
1k views

Chef Server vs Chef Solo [duplicate]

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
175 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
98 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 ...
0
votes
1answer
334 views

How to deploy custom ami with chef-solo?

I have been working on a project with chef-solo. I need to deploy several CentOs servers with custom application on EC2. Can anyone tell me if this possible with chef or on OpsWork framework? Thanks ...
1
vote
1answer
869 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
898 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
306 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
432 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
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 ...
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 ...
2
votes
1answer
2k views

Chef Opscode apt cookbook - apt-get install returned 100, expected 0

I'm running Chef solo (version 11.4.0) on a clean VPS with Ubuntu 12 installed, and I'm having some problems with apt. The problem was that any package command raised an error: Chef::Exceptions::Exec ...
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
414 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
87 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
236 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
192 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
316 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?
0
votes
1answer
620 views

Linode setup via Chef [closed]

I'm working on setting up a Linode VPS from scratch but instead of doing it manually I wish to use Chef so I can easily automate it in the future. The question I have is: I realise you can set up ...
1
vote
1answer
985 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
420 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
461 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
266 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
624 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 ...
0
votes
1answer
2k views

PostgreSQL 9.1 on Ubuntu Lucid fails to start - how to debug?

I'm using Vagrant with Chef Solo to setup a Lucid 64 box. I'm using a Chef recipe to install PostgreSQL 9.1 from Martin Pitt's backports. The install goes ok until the point where the database is ...