Questions tagged [chef-solo]
92 questions
4
votes
2 answers
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 execute a Chef recipe to install some dependencies and…

Kieran Benton
- 131
- 1
- 5
- 16
4
votes
2 answers
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 that array with another object (i.e. merge the two arrays):…

Joseph S.
- 171
- 1
- 2
- 4
4
votes
3 answers
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 security updates. I then run sudo apt-get upgrade…

Jimmy
- 193
- 2
- 6
4
votes
1 answer
Going from Vagrant in development to chef-solo in production, and getting a "FATAL: NoMethodError: undefined method `delete' for #
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 server. So I simply installed chef-solo(the same…

JayD3e
- 191
- 1
- 1
- 5
3
votes
1 answer
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" does not work on Ubuntu 14.04 (it returns with 1 and…

Josh Nankin
- 722
- 12
- 27
3
votes
1 answer
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 available at least for Ubuntu flavors.
I wonder if…

Leo Gallucci
- 160
- 9
3
votes
2 answers
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 /opt/myapp/done.log"
only_if…

Ryan
- 5,831
- 24
- 72
- 91
3
votes
2 answers
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 this.

pablo
- 3,040
- 1
- 19
- 23
2
votes
1 answer
Chef dynamic inventory like Ansible?
In Ansible, I can use a shell script to provide a list of hosts to be configured, in Chef, I knew Chef Server provide the similar features.
However, I don't want to install a heavy server to provide just this feature, are there any workaround so I…

Ryan
- 5,831
- 24
- 72
- 91
2
votes
1 answer
AWS CloudFormation templates and a bash init script
Up until now I've been launching EC2 instances manually, copying over a bash script that downloads my chef + chef artifacts, and calls chef-solo to provision an instance.
A former AWS engineer in the company had at one point created CF templates;…

Sam Hammamy
- 189
- 5
- 17
2
votes
2 answers
Any way to re-run the chef-solo provisioner on a packer built machine?
I'm building VirtualBox machines using Packer and the chef-solo provisioner. Is there a way to re-run chef from within the VM as recipes are updated without needing to re-run packer build?

jwh
- 41
- 4
2
votes
1 answer
Chef node.name not being set
What I am working with:
Debian Wheezy 7.6
Chef: 11.14.6
Up to this point, I have always used node.name to set the hostname of an instance. Example:
{
"name": "web-01",
"chef_environment": "_default",
"normal": {
"tags": [
]
},
…

Jahkobi Digital
- 121
- 3
2
votes
1 answer
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 file or directory - /etc/chef/validation.pem"
This…

StFS
- 273
- 2
- 9
2
votes
3 answers
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'
cookbook 'rvm', :git =>…

poseid
- 559
- 4
- 10
- 20
2
votes
2 answers
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 bootstrap
EOF
end
Step 2: then start jboss
service "jboss"…

Ryan
- 21
- 3