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. On the “Create Resource Wizard @ node-a”, specify the following values.
Field
Value
Switchback Type Intelligent
Server node-a
Domain Name (Route53 hosted zone) test.local
Host Name node-active
IP Resource realip
Route53 Resource Tag reoute53-node-active
  1. On the “Pre-Extend Wizard” specify the following values:
Field
Value
Target Server node-b
Switchback Type Intelligent
Template Priority 1
Target Priority 10
  1. Once Pre-Extend is completed, move on to “Extend comm/route53 Resource”. Select “route53-node-active”.

  1. Once “Hierarchy successfully extended” is displayed, the creation of the resource is complete.
  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.

フィードバック

お役に立ちましたか?

はい いいえ
お役に立ちましたか
理由をお聞かせください
フィードバックありがとうございました

このトピックへフィードバック

送信