This library provides a simple set of helper methods and Capistrano tasks to manage slices and DNS zones/records on your Slicehost account (http://slicehost.com).
sudo gem install slicehost
There are two capistrano tasks:
cap slicehost:zone:add # Create DNS zone cap slicehost:zone:mx:google # Add Google Apps MX records
To your config/deploy.rb, add the following:
require "slicehost/recipes/capistrano" if Capistrano::Version::MAJOR >= 2 # Used to setup/update DNS registry of url => ip set :domain_mapping, "myurl.com" => "123.456.789.012" set :slicehost_config, File.dirname(__FILE__) + "/slicehost.yml"
cap slicehost:zone:add to create a base DNS zone. This will include the
www entry, PLUS three nameserver entries for Slicehost’s namesevers.
If you are using Google Apps for your Email, then once you have created the Google Apps account, and you are asked to point the MX records to Google, you simply need to run one capistrano task:
cap slicehost:zone:mx:google and all 5 MX records are added automatically.
The current API is very alpha. It was just the simplest thing that worked. There are unit tests demonstrating it working and everything.
Future releases will have a nicer, class-based API.
To discuss bugs and features, go to the Google Group forum
How to submit patches
The trunk repository is
svn://rubyforge.org/var/svn/slicehost/trunk for anonymous access.
This code is free to use under the terms of the MIT license.