To set up DNS hostnames for a deployment's load balancing and database tiers using DNS Made Easy (DME) as the DNS provider.
Table of Contents
After you have registered a domain name, you will need to create an account on DNS Made Easy (If you do not have a domain, you can also register a domain directly through DME. RightScale does not register domain names.)
Log into your DME account. Select DNS > Managed DNS. Click Add Domains.
Enter a single domain name and click OK.
Select the text link to the newly added domain.
The next screen will show a list of DNS Made Easy's DNS nameservers. You will need to update the name servers with your domain registrar to point to DME's nameservers for DNS management of your domain. You can also find the nameservers under your domain's Name Servers tab. You might have to wait up to 24 hours for the DNS changes to take effect globally.
You now have a domain that's configured to be managed by DNS Made Easy.
The next step is to create URIs (records) for your cloud servers.
Warning!
You cannot use DNS A records of a sub-account because DNS Made Easy currently does not support the ability to manage sub-account DNS records with their API.
If you're creating a 4-server setup, you'll need a pair of records for your master-slave databases and a pair for your front end load balancer servers.
Note: For 11H1 ServerTemplates, you must create an A record for the Slave-DB. This is not a requirement for Chef-based ServerTemplates.
Click on the Records tab that corresponds to your domain and click the [+] button to create a new A record.
Click on Add A Record.
Name the new record, db-master and set the IP to 1.2.3.4 and the TTL to 60 (seconds). Make sure that the "Dynamic DNS" option is checked and click Submit.
Note: If you are using RightScale's Database Manager for MySQL ServerTemplates, you are expected to use a TTL of 60 or less for the DNS record that points to the "master" database server. However, if you are using Rackspace's CloudDNS service, you must use a TTL of 300. Although, you can override the default setting and use a larger TTL, it's not recommended for most use cases.
If the Dynamic DNS (DDNS) option is checked, a 7-digit identifier (DDNSID) will be assigned to the A Record. (e.g. 7682709) Later, you will run a script on a MySQL database server to make it the "Master-DB" it will use the DDNSID to update the placeholder 'db-master' A Record (e.g. 1.2.3.4) with the Private IP Address that it was randomly assigned by your cloud provider. This way, the application servers will be able to connect to the "Master-DB" server over the private IP address to access the database (assuming that firewall permissions have been set appropriately to allow incoming requests from a related application server).
If you are using 11H1 ServerTemplates, repeat these steps and create an A Record for db-slave. (This step is not required if you are using the Chef-based ServerTemplates.)
The screenshot below reflects a basic DNS setup using the 11H1 ServerTemplates. If you are using the Chef-based ServerTemplates, you will only need an A record for the Master-DB.
If you are using dedicated cloud servers for load balancing purposes (e.g. RightScale's "Load Balancer" or "RightScale Load Balancer with Apache/HAProxy - 11H1" ServerTemplates), you will also need to create new A Records for the two load balancer servers so that you can have Round-Robin DNS. However, if you are using a load balancing service such as Amazon's Elastic Load Balancing (ELB) or Rackspace's Cloud Load Balancing (CLB), this step does not apply to you.
Except this time, instead of using a placeholder IP address (e.g. 1.2.3.4), you'll need to specify a public IP address that your account has access to use. If you're using AWS, you will need to create an Elastic IP address for each load balancer. See Create a New Elastic IP.
Create a separate A record for each load balancer server. However, unlike the A record(s) that you created for the database tier, the A records for the load balancers will point to public (not private) IP addresses since they are used to receive public web requests. Typically, you will have at least two load balancer servers for redundancy and failover purposes. When creating the A records, instead of using a placeholder IP address (e.g. 1.2.3.4), you'll need to specify a public IP address. If you are using AWS, it's strongly recommended that you use Elastic IPs. So if you reserved two Elastic IPs, you should create an A record for each Elastic IP. If you do not know what public IP address will be assigned to your load balancer servers you can manually update the A records after the load balancer servers are operational.
When you create the A records for the load balancer servers, use a high TTL (e.g. 1800) unlike the database A Records, since your load balancer servers are more static than database servers. Leave the Dynamic DNS option unchecked since you will manually update the A Records for your load balancer servers. Dynamic DNS is only required for the database servers for failover/upgrade scenarios.
Remember, you are creating A Records for directing traffic to the appropriate servers based upon the URI. In the example below, the 'www' A Records are being created to handle public requests to the load balancer servers that are accepting requests for your domain. (e.g. www.rightscaletraining.com) Similarly, if you created a staging site, you might create a pair of 'staging' A Records to point to the test site (e.g. staging.rightscaletraining.com).
Note: You don't have to use a dynamic DNS provider like DNS Made Easy to manage your public facing, load balancer web servers. If you're using a different DNS provider, make sure the registrar of your domain is pointing to the public IP addresses of your front end servers, regardless of whether or not you're using Elastic IPs.
If you are using 11H1 ServerTemplates, you should now have four A Records.
If you are using Chef-based ServerTemplates, you will not have an A Record for the "slave" database server (so a total of three A Records).
Later, when you set up the database tier, the DNS A Records for the database servers scripts will be used to update the A records appropriately inside of DNS Made Easy.
When you configure the deployment's inputs, specify the following information so that the scripts will be able to update the DNS hostnames inside DNS Made Easy. The names of the inputs are slightly different depending on whether you're using RightScale's RightScript-based (11H1) or Chef-based ServerTemplates.
Input Name - 11H1 (RightScripts) | Input Name - v12, v13 (Chef) | Example Value |
DNS_PROVIDER | DNS Service Provider | text: DNSMadeEasy |
DNS_PASSWORD | DNS Password | cred: DNS_PASSWORD or DNSMADEEASY_PASSWORD |
DNS_USER | DNS User | cred: DNS_USER or DNSMADEEASY_USER |
MASTER_DB_DNSNAME | Database Master FQDN | text: db-master.example.com |
MASTER_DB_DNSID | Database Master DNS Record ID | text: 1234567 |
SLAVE_DB_DNSID | Database Slave DNS Record ID (Optional) | text: 2223334 |
© 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.