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
|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).
- On the AWS management console, go to Route53.
- Select Hosted Zone.
- Select “Create Hosted Zone”.
- Enter the following values:
|Type||Private hosted zone|
|VPC Association||Select region and name of VPC (e.g., LK-VPC)|
- The Hosted Zone is now created. At this point, there are only two entries (NS & SOA) created.
- To connect from another 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
- Create records as shown below:
- 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.
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.
- Select Route53 as Recovery Kit.
- On the “Create Resource Wizard @ node-a”, specify the following values.
|Domain Name (Route53 hosted zone)||test.local|
|Route53 Resource Tag||reoute53-node-active|
- On the “Pre-Extend Wizard” specify the following values:
- Once Pre-Extend is completed, move on to “Extend comm/route53 Resource”. Select “route53-node-active”.
- Once “Hierarchy successfully extended” is displayed, the creation of the resource is complete.
- 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.