github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

postpostmodern / slicehost-dns

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 22
    • -1
  • Source
  • Commits
  • Network (-1)
  • Issues (0)
  • Downloads (0)
  • Wiki (2)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

A ruby script for automatically creating DNS records for Slicehost Slices — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

NS records should be slicehost.net, not slicehost.com 
postpostmodern (author)
Thu Jan 22 21:02:41 -0800 2009
commit  131029d90bc322ca38c0d1c5f8d403e5b7118b7d
tree    c62388e8442d210c5d92010bcc86d092c0a6283f
parent  5abf08729858fa661404eb993133ff033a379f59
slicehost-dns /
name age
history
message
file README.markdown Thu Jan 22 21:02:41 -0800 2009 NS records should be slicehost.net, not sliceho... [postpostmodern]
file slicedns.rb Thu Jan 22 21:02:41 -0800 2009 NS records should be slicehost.net, not sliceho... [postpostmodern]
README.markdown

Slicehost DNS Script

I found the SliceManager to be a little time consuming when creating multiple DNS records for multiple domains. This ruby script interfaces with Slicehost's API to add the basic DNS records for a domain.

If you need DNS entries other than (or instead of) those that come with the script (see below), it should be fairly easy to open the script and modify the records to your liking.

Installation

  • There's just a single file (slicedns.rb). Get it.
  • Get an API key from your SliceManager at: https://manage.slicehost.com/api/
  • Open the script and replace "your_api_key_goes_here" with your API key.
  • Save the script.
  • Make sure the script is executable by you: chmod 744 slicedns.rb
  • Run the script (see 'Usage' below).

Usage

./slicedns.rb slice_name domain.com.

There are two required arguments for the script. The first is the name of your slice. The second is the domain name (with trailing period [.]).

The script will create a zone with the DNS records shown below. It will ask you if you want to also create the Google Apps records.

If the zone already exists, you will be prompted to Cancel or Overwrite the existing records. Choosing overwrite will delete the whole zone (including any custom records you have previously set up) and start from scratch.

DNS Records Created

The following records will be created in the example.com. zone:

example.com.                    A       [your slice's IP]
*.example.com.                  A       [your slice's IP]

example.com.                    NS      ns1.slicehost.net.
example.com.                    NS      ns2.slicehost.net.
example.com.                    NS      ns3.slicehost.net.

If you respond with Y to "Add records for Google Apps? [Yn]" the following will also be created:

example.com.                    MX      10 ASPMX.L.GOOGLE.COM.
example.com.                    MX      20 ALT1.ASPMX.L.GOOGLE.COM.
example.com.                    MX      20 ALT2.ASPMX.L.GOOGLE.COM.
example.com.                    MX      30 ASPMX2.GOOGLEMAIL.COM.
example.com.                    MX      30 ASPMX3.GOOGLEMAIL.COM.
example.com.                    MX      30 ASPMX4.GOOGLEMAIL.COM.
example.com.                    MX      30 ASPMX5.GOOGLEMAIL.COM.

mail                            CNAME   ghs.google.com.
start                           CNAME   ghs.google.com.
docs                            CNAME   ghs.google.com.
calendar                        CNAME   ghs.google.com.

_xmpp-server._tcp.example.com.  SRV      5 0 5269 xmpp-server.l.google.com.
_xmpp-server._tcp.example.com.  SRV     20 0 5269 xmpp-server1.l.google.com.
_xmpp-server._tcp.example.com.  SRV     20 0 5269 xmpp-server2.l.google.com.
_xmpp-server._tcp.example.com.  SRV     20 0 5269 xmpp-server3.l.google.com.
_xmpp-server._tcp.example.com.  SRV     20 0 5269 xmpp-server4.l.google.com.
_jabber._tcp.example.com.       SRV      5 0 5269 xmpp-server.l.google.com.
_jabber._tcp.example.com.       SRV     20 0 5269 xmpp-server1.l.google.com.
_jabber._tcp.example.com.       SRV     20 0 5269 xmpp-server2.l.google.com.
_jabber._tcp.example.com.       SRV     20 0 5269 xmpp-server3.l.google.com.
_jabber._tcp.example.com.       SRV     20 0 5269 xmpp-server4.l.google.com.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server