Here we will discuss how to switch between nodes using Route53 by creating a DNS entry that points to the active node.

Record Set on Route 53 to be Created

Name
Type
Value
node-a A-IPv4 Address 10.20.1.10
node-b A-IPv4 Address 10.20.2.10
node-active A-IPv4 Address 10.20.1.10 (same as node-a)

Create a Hosted Zone

First, you need a Hosted Zone (this should look like a DNS domain such as example.com).

  1. On the AWS management console, go to Route53.
  1. Select Hosted Zone.
  1. Select “Create Hosted Zone”.
  1. Enter the following values:

Field
Value
Domain test.local
Type Private hosted zone
VPC Association Select region and name of VPC (e.g., LK-VPC)
  1. The Hosted Zone is now created. At this point, there are only two entries (NS & SOA) created.

  1. To connect from another VPC, the other VPC must be associated.

Go to the VPC settings and ensure that these two values are set to enabled.

Create Entries on the Hosted Zone

  1. Create records as shown below:

  1. Confirm the hosts can be resolved by name.

Create an IP Resource

Now you can create an IP resource. Note that the IP address of the resource has to be an active node (the IP address of node-active.test.cl: 10.20.1.10). Refer to Creating an IP Resource for more information. Once the IP address of the active node (10.20.1.10) has been selected, the “IP Resource Tag” field is set to “realip” and the IP address of node-b (secondary) is set to 10.20.2.10 (the actual IP address of the second node). Those are automatically selected by selecting the “realip” id for the first node.

Once the IP resource is created, the LifeKeeper User Interface should look like this.

Assign Permission to Update Route 53 Entries to Instances

To allow LifeKeeper (running on the EC2 Instance) to update a Route53 entry, the instance must have roles that allow DNS updates.

  • route53:ListHostedZones
  • route53:GetChange
  • route53:ChangeResourceRecordSets
  • route53:ListResourceRecordSets

To achieve this, create a policy like the one seen below (note that it may be necessary to limit the resources that may be accessed), then assign it to a Role.

Once a Role is defined, assign it to these EC2 Instances.

Create the Route53 Resource

Creating the Route53 Resource should be straightforward once we have created the IP Resource.

  1. Select Route53 as Recovery Kit.

  1. For required settings, enter the domain name, local host name, and corresponding Virtual IP resource. Then click Next.

Field
Value
Domain Name test.local
Host Name node-active
Domain Name (Route53 hosted zone) test.local
  1. For the additional settings, select a resource tag and Switchback type. In this guide, the defaults are used. Then click Next.

Field
Value
Switchback Type Intelligent
Route53 Resource Tag reoute53-node-active
  1. Review the settings provided and when ready, click “Execute”
Field
Value
Server node-a
Application Recovery Kit Amazon Route53
Domain Name (Route53 hosted zone) test.local
Host Name node-active
IP Resource realip-eth0
Route53 Resource Tag reoute53-node-active
Switchback Type Intelligent
  1. Once the resource Hierarchy is created, click on “Extend Resource Hierarchy”.
  1. When prompted to select options for extending the resource hierarchy, use the default options. Then click Next.

Field
Value
Template Server node-a
Template Priority 1
Target Server node-b
Target Priority 10
  1. Once the “Pre-Extend Checks” succeed, click “Next”.
  2. For additional Settings, select “Intelligent” for switchback type, and select the route53 resource created in steps 1-4. Then click “Next”.

Field
Value
Switchback Type Intelligent
Resource route53-node-active
  1. Review the selected options, then click “Execute” when ready to proceed.

Field
Value
Template Server node-a
Resource route53-node-active
Template Priority 1
Target Server node-b
Target Priority 10
Switchback Type Intelligent
Resource route53-node-active
  1. The Route53 resource is now created as shown below.

Notice that realip is located under route53-node-active. This indicates that the “route53-node-active” resource depends on the “realip” resource.

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment