Website Logo. Upload to /source/logo.png ; disable in /source/_includes/logo.html

Zuzur’s wobleg

technology, Internet, and a bit of this and that (with some dyslexia inside)

Notebook: Importing Existing Users From Chef

| Comments

I recently had (too much) fun trying to import a few existing chef users (opscode’s platform) to another chef server. There is currently no facility to export your existing users (‘clients’ if you are running your own server, ‘users’ on the opscode platform).

Notebook: Chef Interactive Testing Using Irb

| Comments

I’m using this trick a lot to check what are the values of attributes in chef nodes without having to navigate through the UI. You can do everything in the UI or whatnot (change attributes, save them …). I usually do that from the top of my chef repository, but you can specify any valid path to a proper knife or chef-client configuration when calling Chef::Config.from_file

Notebook: MacBook - Battery Calibation

| Comments

A few weeks ago, my apr’09 13” MacBook started behaving strangely. After a few minutes off the power cord, it would simply shutdown without warning (no display of the low battery warning message … blam ! Black screen of death). The led battery indicators would show the battery to be at 80%, and if you started the laptop again, it would work for 5-10 minutes … then blam !

Scripting With Chef

| Comments

Chef is a very cool platform management solution. Once it is setup, you have a very clean solution to distribute server configurations across as many servers as you need, very cleanly (Ruby DSL) and quickly. A must on AWS.

One thing that you can’t find easily in Chef’s documentation is how to use the chef API to write scripts that would use the information chef is storing.

Notebook: Running a Unix Command for a Given Amount of Time

| Comments

Sometimes, you need to run a command (capture, etc …) for a given amount of time. Here’s an example of a script capturing mysql traffic for half an hour :

wait.sh
1
2
3
4
5
    #!/bin/sh
    DATE=`date +%Y%m%d%H%M%S`
    tcpdump -i eth0 port 3306  -s 65535 -x -n -q -tttt > capture-$DATE.out &
    sleep 1800
    kill $!

Notebook: Nagios / Ndo2db on centOS 5.5 64 Bits

| Comments

Trying to setup nagios 3.1 with ndo2db on a 64bits platform, ndo2bd may not work properly and crash over and over.

The symptoms are:

1
[1286679019] ndomod: Still unable to connect to data sink.  7575 items lost, 5000 queued items to flush.