Questions tagged [cookbook]

A cookbook is the fundamental unit of configuration and policy distribution in Chef.

510 questions
0
votes
1 answer

Ubuntu chef cookbook recipe condition need it

I have to following lines: execute "hostname -f >> /etc/mail/local-host-names" do command "hostname -f >> /etc/mail/local-host-names" end I would like to add a condition, in case the hostname already exists in the file and the command should not…
VGM
  • 69
  • 14
0
votes
1 answer

in windows package resource of cookbook -installer_type showing error

While am executing this package resource in a cookbook, it shows the following error: windows_package 'PuTTY version 0.60' do source 'http://the.earth.li/~sgtatham/putty/latest/x86/putty-0.60-installer.exe' installer_type :inno action…
indra
  • 11
  • 5
0
votes
1 answer

Cannot deploy nodejs application with error "NoMethodError: undefined method `owner' for Chef::Resource::DeployRevision"

I cannot deploy a nodejs app with application & application_nodejs cookbook. My environment : Chef 11.12.2 Application cookbook : 4.1.4 Application_nodejs cookbook : 2.0.1 Ubuntu : 12.04 LTS Full error : "[2014-06-02T10:51:51+00:00] INFO:…
PhungLe
  • 352
  • 3
  • 6
0
votes
2 answers

How to test final Chef server configuration with the help of community cookbooks?

I saw most of the community cookbooks have tests. As I read some articles those tests can be, simply put, described as unit tests (does the cookbook does what it says?) and integration tests (does it work on the OS?). I setup a LAMP virtual…
tsusanka
  • 4,801
  • 7
  • 36
  • 42
0
votes
1 answer

Error Provisioning Tomcat Cookbook on `restart`

Using test-kitchen, my provisioning/converging fails when running the opscode/tomcat cookbook (please see below). .kitchen.yml 'tomcat': { 'keytool': '/usr/bin/keytool', 'home': '/some/path/tomcat' …
Kevin Meredith
  • 41,036
  • 63
  • 209
  • 384
0
votes
1 answer

cakephp blog tutorial error whith mysql now()

I am triing the blog tutorial from the cookbook CREATE TABLE posts ( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, title VARCHAR(50), body TEXT, created DATETIME DEFAULT NULL, modified DATETIME DEFAULT NULL ); But when I insert the values that he…
MahmoudSenSei
  • 13
  • 1
  • 3
0
votes
1 answer

knife ec2 server create returning 403 Forbidden

I'm trying to install tomcat cookbook on an AWS instance, but is experiencing an error as below: Role tomcat.rb: name 'tomcat' description 'A single tomcat server' run_list( 'recipe[tomcat]' ) Running: knife ec2 server create --availability-zone…
Tiago Rolim
  • 65
  • 1
  • 11
0
votes
2 answers

How to run setup activities when using application cookbook?

I am trying to deploy my Rails app using application_ruby cookbook. I need to run a few one-time setup activities (like seeding the database using rake db:seed). These should not be done during subsequent chef runs. What's the right way to define…
Emil
  • 1,240
  • 1
  • 15
  • 27
0
votes
0 answers

How run multiple instance of mongodb on the same node using mongodb cookbook?

I am using the mongodb cookbook from edelight/chef-mongodb repo to install multiple instance of mongodb on the same node (OS System: Ubuntu 12.04), but when I follow the file instructions to obtain this goal I can't derive the result expected. My…
enrique-carbonell
  • 5,836
  • 3
  • 30
  • 44
0
votes
1 answer

store shell command output to ruby variable or chef

Hi I want to store output of a shell command into chef variable. I have seen some way but not able to get how to do it. Here is what I have tried so far current_version = `#{node['kayako_nginx']['prefix']}/sbin/nginx -v | grep -Po…
user3382084
  • 1
  • 1
  • 1
0
votes
1 answer

apache2 Chef cookbook start failure

I'm trying to use Chef to create a local virtual host and for that I had added the "recipe[apache2]" recipe in my runlist and it worked great until I also added another recipe in the runlist that includes the default apache2 recipe. Now, even if I…
0
votes
1 answer

Chef Cookbook: service is not starting

I have a problem with my JBoss-cookbook, the service is created correctly in /etc/init.d and can be started/stopped/restarted by using service start/stop/restart jboss, but it is not started after Chef finished deploying my infrastructure. This is…
0
votes
0 answers

Cookbook_file is not copying resource

I'm trying to copy a file that's included with a cookbook. This doesn't seem to be working: cookbook_file node[:confluence][:mysql_jar] do path "#{node[:confluence][:install_path]}/confluence/WEB-INF/lib/" action :create_if_missing end I've…
Tim Nuwin
  • 2,775
  • 2
  • 29
  • 63
0
votes
1 answer

chef couldn't find HOME environment -- expanding `~'

When my chef-client runs in intervals it raises this error and just quits without syncing any cookbooks. But it work in my prompt if I manually invoke it. Any idea how to fix it? [2014-02-26T11:58:12+00:00] INFO: Forking chef instance to…
user88975
  • 610
  • 1
  • 9
  • 18
0
votes
0 answers

chef cookbook not starting the service in bootstrap

I am trying to install a binary and start the service. When I try to do that while I bootstrap the node, it just install the binary and never start the service. Any idea? bash "install_package" do cwd "/tmp/abcd" user "root" …
user88975
  • 610
  • 1
  • 9
  • 18