The Shining Path of Least Resistance

LeastResistance.Net

Archive for the ‘chef’ Category

Updates to the Opscode Chef drbd cookbook

Posted by mattray on September 30, 2011

I’ve recently been working on some updates to the OpenStack Cookbooks with Dell & Rackspace for use with Crowbar and we wanted to make a few of the services more fault-tolerant. The first step was to add drbd-based drive mirroring, so it was time to update the existing drbd cookbook.

I tested with Ubuntu 10.04 and 10.10 server installations. You must have the ‘linux-server’ and ‘linux-headers-server’ packages installed to properly support the drbd module. The drbd cookbook does not partition the drives, you’ll need to have that configured in advance or with another cookbook. It will format partitions given a filesystem type, set the node['drbd']['fs_type'] to ‘xfs’ or ‘ext4’ or whatever. I used ‘xfs’ in my example roles.

The drbd::pair recipe can be used to configure 2 nodes to mirror a mount point. The master node (identified by node['drbd']['master'] = true) will claim the primary, format the filesystem and mount the partition. The slave will simply mirror without mounting. It currently takes 2 chef-client runs to ensure the pair is synced properly, there is some timing issue with the mount resource that I haven’t identified yet.

Setting up the 2 boxes is fairly simple, just update the 2 included example roles.

drbd-pair-master drbd-pair
name "drbd-pair-master"
description "DRBD pair role."

override_attributes(
  "drbd" => {
    "remote_host" => "ubuntu2-1004.vm",
    "disk" => "/dev/sdb1",
    "fs_type" => "xfs",
    "mount" => "/shared",
    "master" => true
  }
  )

run_list(
  "recipe[xfs]",
  "recipe[drbd::pair]"
  )
name "drbd-pair"
description "DRBD pair role."

override_attributes(
  "drbd" => {
    "remote_host" => "ubuntu1-1004.vm",
    "disk" => "/dev/sdb1",
    "fs_type" => "xfs",
    "mount" => "/shared"
  }
  )

run_list(
  "recipe[xfs]",
  "recipe[drbd::pair]"
  )

Add the roles to your 2 nodes with the proper ['drbd']['remote_host'] values set and the next chef-client run will configure drbd mirroring. Run chef-client again on the master and the share will be mounted. I’ll be hooking this up to pacemaker next.

Posted in chef, opschef, opscode | Tagged: , , , | Leave a Comment »

Potential OpenStack Compute Demo Box

Posted by mattray on November 17, 2010

I was fortunate enough to be at the OpenStack Design Summit last week in San Antonio, TX and one of the ideas that came up that I found really intriguing was the concept of a single-box easy install for OpenStack Compute (maybe Object Storage could fit on the same machine, not sure yet). To help facilitate this, we started up an OpenStack-Chef mailing list where we’ll be discussing automating installation of OpenStack Compute as well as deploying to a running Compute instance.

Hopefully we’ll free up some time to work on it soon, but while I was there I started putting together some rough specs for a machine we could use for testing and eventually using with Chef training to replace using EC2. We figured we needed enough horsepower to run 20 or so instances on the server, and shoot for around $1000 on the price. Here’s what I found on NewEgg.

So really it comes down to about $730 plus whatever storage option you go with. SSD is still expensive but might be worthwhile, but $165 for 1.1TB RAID5 isn’t too shabby and might make running Object Storage a potential option. Prices keep dropping of course, so this is probably close to being out of date already.

Posted in chef, geekery, openstack | Tagged: , , | 2 Comments »