Archive for February, 2015

Testing Chef cookbooks on travis-ci / drone.io with chef-zero

If you are using your own Chef cookbooks you certainly have some sort of tests for them. Likely running test-kitchen with docker or vagrant driver. That setup works perfectly fine locally or on a self-hosted Jenkins server. However building them on public CI platforms like travis-ci or drone.io is not possible like that. Caused by their virtualization technology, we cant use test-kitchen with docker or vagrant driver there.

What people usually do to solve this: Use a cloud driver like EC2, Cloudstack, Rackspace so travis-ci will spin up a VM there. However I found this very clunky. This require additional accounts and costs with a Cloud provider.

So what I did is mimicing how the chef-zero provisioner for test-kitchen works as seen here https://github.com/test-kitchen/test-kitchen/blob/master/lib/kitchen/provisioner/chef_zero.rb
It basically boils down to installing Chef, copying all dependency cookbooks in place along with some configs and then running chef-client with chef-zero.

Read more

Spacewalk Remote Command Execution with Ubuntu / Debian clients

In my last article I’ve shown you how to get OSAD working for Ubuntu clients. Which comes in handy for my new article about remote command execution. With the help of OSAD the commands will be executed immediately and you dont need to wait for clients to check-in and pick them up.

Read on after the jump…

Read more

Enabling Spacewalks OSAD for Ubuntu clients

What is OSAD?

Spacewalk clients are checking in with Spacewalk every 240 minutes by default. You can change this in /etc/rhn/rhnsd but it will still be polling for scheduled actions and not receiving them instantly.
OSAD solves this problem. Its based on Jabber and runs a osa-dispatcher on the Spacewalk server which tells clients to please check-in immediately when there are actions scheduled for them.
You can read more on it here https://fedorahosted.org/spacewalk/wiki/OsadHowTo

Do I really need it?

That depends on your individual setup and what you are using Spacewalk for. For most people its probably ok to have scheduled actions be performed with a delay. For some it might not.
Especially if you want to use the “Command Execution” capability of Spacewalk, you certainly want them to be executed asap. I’ll be showing you how to get that working with Ubuntu clients in my next article.

So read on after the jump how to get OSAD running.

Read more