Note: Please go to to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > Library > 3rd Parties > DNS > Cloud DNS > Domain Setup with Rackspace Cloud DNS

Domain Setup with Rackspace Cloud DNS


To set up DNS hostnames for a deployment's load balancing and database tiers using Rackspace's Cloud DNS service. 

Table of Contents


Rackspace's Cloud DNS ( service is a supported DNS Provider that offers dynamic DNS services. It's a free API service designed to help you easily manage domains, sub-domains & DNS records for your Rackspace cloud servers.


  • An existing Rackspace account
  • A running Rackspace cloud server
  • Use of RightScale's Chef-based ServerTemplates to launch the database servers. (The use of Cloud DNS with 11H1 ServerTemplates is not supported.)


Create a New Account

If you have an existing Rackspace account, you can automatically use their Cloud DNS service. 

Log into the Rackspace Cloud Console

Log into your Rackspace account. (

Create DNS A Records

The next step is to create DNS hostnames for your cloud servers.  You'll need to create DNS Hostnames for both your frontend / load balancing tier, as well as your database tier.  

Database Tier



  1. Go to the DNS tab.
  2. If a domain has not been created, you must create one. Click the Create Domain button and enter a domain name (e.g., contact email address and the default TTL for the DNS records. For database servers, it's strongly recommended that you use the default TTL (5 minutes). 
    Note: You will be able to specify a different TTL when you create each DNS record. 
  3. Update the name servers with your domain registrar (i.e. the company with whom you registered the domain) for your domain that you want to manage with Cloud DNS. Change the DNS name server settings to point to Rackspace's Name Servers instead. Note: It typically takes 1-2 days before the domain name server changes are applied globally. You may need to wait a few days to test your DNS records from your location. 
  4. The next step is to add a record. Click Add Record and provide the required information. First, create the A record that will point to the "master" database server. If you are using the records for a database server, use the lowest allowable TTL for Cloud DNS, which is 5 minutes (300 seconds). 
  • Record Type - Select 'A/AAAA Record' as the DNS record type.
  • Record Name - Enter a unique subdomain to create a hostname for your domain. (e.g.
  • IP Address - Enter a valid IP Address. (e.g. This IP Address serves as a placeholder since you will not know the private IP address that the Master-DB server will be assigned when it is launched. Later, when you set up your database servers, a script will be run that will update the DNS record with the instance's private IP address. 
  • Time To Live (TTL) - Use the minimum TTL that is allowed by Cloud DNS, which is 5 minutes (300 seconds).
  1. Click Add Record to save the create the A record. Note: You may need to refresh the web page in the browser in order to see the new record.
  2. Repeat steps 5-6 to create additional DNS records. Examples below.
    •  - Points to the "master" database server.
    • (optional) - Points to a "slave" database server.
    • - Points to one of the load balancer servers. Once the load balancer server is operational, you will need to manually update the record with the appropriate public IP address. Create additional records for other load balancer servers. If you are using a load balancing service like Rackspace Cloud Load Balancers, you will only need to create one record that points to the CLB's public IP address.

Retrieve DNS Record IDs

In order to update the DNS A Records with an IP address, you must specify the record's unique ID as an input. Currently, you cannot retrieve the ID from Rackspace Cloud Console. However, you can follow the steps outlined below to retrieve the information. 

The easiest way to retrieve the record ID is by executing a Rackspace API call. However, before you can execute an API call, you must first generate an API token for authentication purposes.

  1. Create a new RightScript (e.g. Generate a Rackspace API Authentication Token) that will generate an API token.  For Rackspace US, use the following code:
    • curl -D - -H "X-Auth-Key: $RACKSPACE_AUTH_KEY" -H "X-Auth-User: $RACKSPACE_USERNAME"
  2. Run the above script on a running server using the 'Any Script' option. You will need to pass your Rackspace cloud credentials as inputs in order to run the script. For example:
  3. After the script is completed, go to the server's Audit Entry tab. After the script is complete, view the audit entry and find the authentication token ("X-Auth-Token"):
  4. (Recommended) Create the following credentials, which you'll use to run the next script. (Design > Credentials)
    • RACKSPACE_ACCOUNT_NUMBER - To retrieve this information, log into the Rackspace Cloud Console. The account number should appear next to the username at the top of the page.
    • RACKSPACE_API_TOKEN - The Rackspace API Token that you just generated with the previous script.
    • RACKSPACE_DOMAIN_ID - Rackspace Domain ID. To retrieve this information, log into the Rackspace Cloud Console and go to DNS and select the domain. The ID is the last number in the URL. For example, if the URL is, 3514324 is the Domain ID.
  5. Create another RightScript (e.g. Retrieve DNS ID for Rackspace Cloud DNS) with the following code:
    • curl -X GET -H "X-Auth-Token:$RACKSPACE_API_TOKEN" -H "Accept:application/xml"$RACKSPACE_ACCOUNT_NUMBER/domains/$RACKSPACE_DOMAIN_ID
  6. Run the above script on a running server using the 'Any Script' option. Use the created credentials (if available) or use the 'text' option to pass the appropriate values for the required inputs.
  7. Once the script is complete, go to the audit entry and find the unique ID for each DNS Record. (e.g. A-1234567)  Later, you will set this value as an input so that you can run a script that will update the DNS record with the database server's IP address. You will find a DNS Record ID for each A record associated with your domain. If you created multiple A records (e.g. master and slave), make sure that you select the appropriate ID for the matching FQDN.

Load Balancing Tier

Although you can use Cloud DNS to create A records for load balancing purposes, it's not required. For example, you may use a load balancing service like Rackspace's Cloud Load Balancers or use a different DNS provider to create DNS records for your dedicated load balancer servers.

If you are using ServerTemplates to launch dedicated cloud servers for load balancing purposes, you can create A records for each load balancer in Cloud DNS. It will be easiest to create A records that point to the load balancers once they are operational.

If you are using Rackspace Cloud Load Balancers, go to the CLB's details page to find its public IP address. Create a single DNS A record that points to the IP.


Input Name Matrix

When you configure the deployment's inputs, specify the following information so that the scripts will be able to update the DNS hostnames inside Cloud DNS.

Note: Cloud DNS is not a supported DNS provider for the RightScript-based (11H1) or Chef-based ServerTemplates.

Input Name - v12, v13 (Chef) Example Value

DNS Service Provider

text:  CloudDNS

DNS Password


(Password to access the Rackspace account)

DNS User


(Username to access the Rackspace account)

Database Master FQDN


(Hostname for the Master-DB server)

Database Master DNS Record ID


text:  3456789:A-1234567

Database Slave DNS Record ID (Optional)


text:  3456789:A-2223334

You must to post a comment.
Last modified
09:31, 5 Nov 2013


This page has no custom tags.


This page has no classifications.



© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.