bjbq4d | 18 Sep 04:33 2014


Hi everyone,

Just wanted to share a knife plugin I wrote to convert roles and environments
into ruby code -

Adam Jacob | 18 Sep 02:55 2014

Tomorrows IRC meeting

Hi folks! The agenda for tomorrows IRC meeting is here:

As I'll be heading off to Denver to go to to Riot Fest (, I won't be able to make the meeting. For the purposes of any decisions that need to be made in my role as Decider in the RFC process, Nathen Harvey has all of my authority and good-times.

Be good to each other, see you soon,
Christopher Webber | 18 Sep 01:11 2014

vagrant-omnibus Issues

# Cross posted from the Chef Blog

Ohai Chefs!

Yesterday evening during the process of building a new release of Chef the chef gem was pushed to RubyGems
ahead of the complete omnibus release making it out to OmniTruck. Unfortunately, this has broken
vagrant-omnibus for anyone that has the version set to latest or hasn't explicitly set a version. We are
sorry about this and are working to get a fix out quickly.

Because pulling a gem creates a different set of problems, we have decided to leave the gem up, as it is. We are
working to get the release this is tied to out as quickly as possible, but, in the meantime, specifying
version 11.16.0, instead of latest, will work around this issue. We are sorry for the trouble this has caused.

Additionally, a pull request[1] has been opened against the vagrant-omnibus project to correct the
underlying issue going forward.

Thank you for your patience as we work through this issue.

— cwebber

Augie Schwer | 17 Sep 02:33 2014

Best practice for measuring and monitoring chef-client runs?

What are people using to monitor and measure their chef-client runs?

I would like to monitor for when chef-client runs fail on a node.

It would be nice to measure chef-client run times.

Is it safe to assume people are using handlers for both of these? What are some popular ways to accomplish these goals? Thanks!

Augie Schwer    -    Augie <at>    -
Jim Fluke | 16 Sep 19:40 2014

Application cookbook/bitbucket problem


I am trying to install a local application from bitbucket to a Ubuntu 
14.04 virtualBox VM. I keep getting an error on the keys for the ssh 
connection, but I can't see what is wrong with how I specify the private 
key. I have attached the Vagrant and cookbook files I am using. My 
cookbook is called CIRAdataApp and I am installing it to our local chef 

Also note that the repository is under a bitbucket group account, 
cira-dpc, but that my ssh key is under my personal account. But, I have 
been able to check out the repository using this key pair with git 
commands on my desktop.

And here is the last part of the chef-client output with the git error:

Running handlers:
[2014-09-16T16:54:12+00:00] ERROR: Running exception handlers
Running handlers complete
[2014-09-16T16:54:12+00:00] ERROR: Exception handlers complete
[2014-09-16T16:54:12+00:00] FATAL: Stacktrace dumped to 
Chef Client failed. 3 resources updated in 25.022724174 seconds
[2014-09-16T16:54:12+00:00] ERROR: deploy_revision[CIRAdataApp] 
(/var/chef/cache/cookbooks/application/providers/default.rb line 122) 
had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to 
exit with [0], but received '128'
---- Begin output of git ls-remote 
"git <at>" "HEAD" ----
STDERR: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
---- End output of git ls-remote 
"git <at>" "HEAD" ----
Ran git ls-remote "git <at>" 
"HEAD" returned 128
[2014-09-16T16:54:12+00:00] FATAL: Chef::Exceptions::ChildConvergeError: 
Chef run process exited unsuccessfully (exit code 1)

Any help would be appreciated.

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  # Every Vagrant virtual environment requires a box to build off of. = "trusty64"
  config.vm.box_url = ""
  config.vm.hostname = "testChefCsp3-4" # vagrant 1.2.2

  config.vm.provider :virtualbox do |vb| 
    vb.customize ["modifyvm", :id, "--memory", "4096"] 
  end :forwarded_port, guest: 22, host: 2228, id: "ssh" :forwarded_port, guest: 80, host: 9098 "public_network", ip: "", bridge: "eth0", :netmask => "" "public_network", bridge: "eth0"

  config.vm.provision "shell", path: "./"

Attachment ( application/x-shellscript, 405 bytes
Attachment (metadata.rb): application/x-ruby, 466 bytes
Attachment (recipesDefault.rb): application/x-ruby, 782 bytes
Attachment ( application/x-shellscript, 312 bytes
anjumr06 | 16 Sep 13:55 2014

Error in chef-server web ui


I installed chef-server on a server machine, but on accessing the Web UI

I'm getting the following errors

1. Users -> "ERROR: undefined method 'name='for nil:NilClass''"
2. Clients -> "Could not list clients: 403 "Forbidden""
3. Nodes (When assign roles to the node) -> Exception raised updating node, 403
"Forbidden": 403 "Forbidden"

Thank you.

reenaacharya35 | 16 Sep 06:19 2014

vCloud PowerCLI and Chef

Hi all,
I have written vCloud PowerCLI scripts and they are all running fine.Now I want
to integrate those scripts with Chef .I have written recipes for them.When I do
Chef Client ,it runs successfully without any error but the scripts are not
executed . 
Can anyone help on this? Any help will be appriciated.

Thank You,
Reena Acharya

reenaacharya35 | 16 Sep 06:15 2014


hello testing Subscription to the list

Ashutosh Narayan | 16 Sep 06:03 2014

VMware PowerCLI and Chef

Hello folks,

I am implementing vCloud director using PowerCLI commands. Now I wish to
execute those PowerCLI commands using Chef, it seems that the resources are
executed properly but the commands on vCloud end are not running successfully.
The PoweCLI scripts are running successfully when I execute them from
PowerShell promt. I have used "powershell" and "execute" resources, they also
run successfully, but there is no effect in the vCloud environment.
Has anyone in the list has tried so ? Any help is appreciated.

Thank you,
Ashutosh Narayan

David Montgomery | 16 Sep 05:09 2014

If nil how to set attributes


Why oh why is this happening?

If nil I need to set an attribute.


Why do I get the below error?  How do I resolve?


[] out:   ================================================================================
[] out:   Recipe Compile Error in /var/feed-chef/chef-repo/cookbooks/kafka/recipes/default.rb
[] out:   ================================================================================
[] out:  
[] out:   NoMethodError
[] out:   -------------
[] out:   undefined method `[]' for nil:NilClass
[] out:  
[] out:   Cookbook Trace:
[] out:   ---------------
[] out:     /var/feed-chef/chef-repo/cookbooks/kafka/recipes/default.rb:88:in `from_file'
[] out:  
[] out:   Relevant File Content:
[] out:   ----------------------
[] out:   /var/feed-chef/chef-repo/cookbooks/kafka/recipes/default.rb:
[] out:  
[] out:    81:  PYCODE
[] out:    82:  end
[] out:    83:    if File.exists?("#{Chef::Config[:file_cache_path]}/zookeeper_hosts")
[] out:    84:      zookeeper_hosts ="#{Chef::Config[:file_cache_path]}/zookeeper_hosts")
[] out:    85:    end
[] out:    86:   
[] out:    87:     
[] out:    88>>   if node['kafka']['broker_id'].nil?
[] out:    89:      node.set['kafka']['broker_id'] =
[] out:    90:    end
[] out:    91:    broker_id = node['kafka']['broker_id']
[] out:    92:    template "/var/kafka/config/" do
[] out:    93:      path "/var/config/"
[] out:    94:      source ""
[] out:    95:      owner "root"
[] out:    96:      group "root"
[] out:    97:      mode "0644"
[] out:  
[] out:  

Greg Barker | 15 Sep 22:20 2014

Should I be using roles?

After googling around and reading various blog posts about roles, I'm still not sure if I should be using them. Since I'm new to chef, I wanted to describe my line of thinking and hear if maybe I'm going about things the wrong way.

There are certain things I think might be the same on all my servers, so I created a base_role.rb. It's fairly simple: specifies set_fqdn=*, some openssh & postfix attributes, and a run_list of hostname, openssh, fail2ban, and postfix.

So now I want to spin up a jenkins server. I see there is a popular community cookbook with some LWRPs that I'll probably use, so I run `berks cookbook mycompany-jenkins` to create my jenkins cookbook and add "depends 'jenkins'" to the metadata.rb file. But I also need the stuff from my base_role on the jenkins server, so I create a new role, mycompany_jenkins.rb. Inside that role I specify some attributes for the java version, and the run_list is role[base_role], java, maven, jenkins, and mycompany-jenkins. Or maybe the attributes I specified in the role should actually be in the mycompany-jenkins cookbook default attributes?

Now I go back to the mycompany-jenkins metadata.rb file and start adding more depends lines for hostname, openssh, fail2ban, postfix, java, and maven. Even though the mycompany-jenkins cookbook doesn't have anything in it yet, it depends on all these things because of the role. But the role doesn't even live inside the cookbook, why should the cookbook have to declare all those dependencies. Now I'm thinking that maybe my base_role should be a recipe instead? Then berks could figure out all those dependencies for me. Or should the run_list I put in the rule actually be a couple of include_recipe lines in my default.rb? That would make all the depends lines in the metadata make more sense.

The 2nd google result for "chef roles" is this article that states versioned roles are likely coming with Chef 12. I was thinking maybe that is something that will help me here. So I googled "chef 12 versioned roles" and it led me to CHEF-4837. It didn't really add much clarity though, I am still confused where the discussion ends and it doesn't seem to pick up on github.

At any rate, hopefully this describes some of my confusion with the use of roles. Please help steer me in the right direction.

Thanks in advance!