bjbq4d | 18 Sep 04:33 2014
Picon

knife-toruby

Hi everyone,

Just wanted to share a knife plugin I wrote to convert roles and environments
into ruby code - https://github.com/bbaugher/knife-toruby

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 (http://denver.riotfest.org/events/2014/09/19/), 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,
Adam
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

[1] https://github.com/opscode/vagrant-omnibus/pull/97
Augie Schwer | 17 Sep 02:33 2014
Picon

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> Schwer.us    -    http://schwer.us
Jim Fluke | 16 Sep 19:40 2014

Application cookbook/bitbucket problem

Hello,

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 
server.

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 
/var/chef/cache/chef-stacktrace.out
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> bitbucket.org:cira-dpc/api.ciradata.edu.git" "HEAD" ----
STDOUT:
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> bitbucket.org:cira-dpc/api.ciradata.edu.git" "HEAD" ----
Ran git ls-remote "git <at> bitbucket.org:cira-dpc/api.ciradata.edu.git" 
"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.

Thanks,
Jim
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  # Every Vagrant virtual environment requires a box to build off of.
  config.vm.box = "trusty64"
  config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
  config.vm.hostname = "testChefCsp3-4" # vagrant 1.2.2

  config.vm.provider :virtualbox do |vb| 
    vb.customize ["modifyvm", :id, "--memory", "4096"] 
  end 

  config.vm.network :forwarded_port, guest: 22, host: 2228, id: "ssh"

  config.vm.network :forwarded_port, guest: 80, host: 9098

  config.vm.network "public_network", ip: "10.0.10.20", bridge: "eth0", :netmask => "255.255.0.0"
  #config.vm.network "public_network", bridge: "eth0"

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

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

Error in chef-server web ui

Hi

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
Picon

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
Picon

hello


hello testing Subscription to the list

Ashutosh Narayan | 16 Sep 06:03 2014
Picon

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
Picon

If nil how to set attributes

Hi,

Why oh why is this happening?


If nil I need to set an attribute.

node['kafka']['broker_id']

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

Thanks




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

Greg Barker | 15 Sep 22:20 2014
Picon

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=*.mycompany.com, 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!

Gmane