Skip to content

ncantor/designate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

designate

Designate is a simple Ruby wrapper for the Zerigo API v1.1 specification.

Usage

d = Designate::Client.new("[email protected]", "30f1b76a010d062c22b07bda66c1d9f0")

Get all zones:

d.zones

Create a new zone:

d.create_zone("example.com")

Find a specific zone:

d.find_zone_by_id(12345)
d.find_zone_by_domain("example.com")

Get all zone templates:

d.templates

Find a template:

d.find_template(12345)

Get all hosts in a zone:

d.find_zone_by_domain("example.com").hosts

Create host:

d.find_zone_by_domain("example.com").create_host("MX", "mx1.example.com.")

The next features have only been tested in conjunction with capify-ec2. I recommend further testing before adding them to your projects. Also works via Capistrano, using zerigo.yml:

:username: "username"
:key: "API Key"
:domain: "example.com"

Within your project:
application = "test"
cap <server_name> zerigo:first_time

retrieves the first part of the <hostname> from the remote machine and creates:
CNAME, <hostname>.example.com => actual DNS name, as specified in your server address.
CNAME, <hostname>-test.example.com => web.example.com

Nothing will be created if the DNS names are already in use.
If the domain does not exist, it will be created.

Copyright © 2010 James Miller. See LICENSE for details.

About

Ruby wrapper for Zerigo DNS API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages