Overview

DataKeeper Cluster Edition provides replication in a virtual private cloud (VPC) within a single region across availability zones. In this particular SQL Server clustering example, we will launch four instances (one domain controller instance, two SQL Server instances, and a quorum/witness instance) into three availability zones.

Note:This guide will explain the manual deployment of the following configuration:

Single Region Deployment

DataKeeper Cluster Edition provides support for a data replication node outside of the cluster with all nodes in AWS. In this particular SQL Server clustering example, four instances are launched (one domain controller instance, two SQL Server instances and a quorum/witness instance) into three availability zones. Then an additional DataKeeper instance is launched in a second region including a VPN instance in both regions. Please see Configuration of Data Replication From a Cluster Node to External DR Site for more information. For additional information on using multiple regions please see Connecting Multiple VPCs with EC2 Instances.

Optional Configurations

Note: This guide does not give detailed instructions on the deployment of these two configurations:

Replication to a node in a separate region

DataKeeper Cluster Edition also provides support for a data replication node outside of the cluster with only the node outside of the cluster in AWS. In this particular SQL Server clustering example, WSFC1 and WSFC2 are in an on-site cluster replicating to an AWS instance. Then an additional DataKeeper instance is launched in a region in AWS. Please see Configuration of Data Replication From a Cluster Node to External DR Site for more information.

Hybrid On-Premises cluster replication to a node in AWS

Requirements

Description
Requirement
Virtual Private Cloud In a single region with three availability zones
Instance Type Minimum recommended instance type: M1 Medium
Operating System See the DKCE Support Matrix
Elastic IP One elastic IP address connected to the domain controller
Four instances One domain controller instance, two SQL Server instances and one quorum/witness instance
Each SQL Server ENI (Elastic Network Interface) with 4 IPs
  • Primary ENI IP statically defined in Windows and used by DataKeeper Cluster Edition
  • Three IPs maintained by EC2 while used by Windows Failover Clustering , DTC and SQLFC
Volumes Three volumes (EBS and NTFS only)
  • One primary volume (C drive)
  • Two additional volumes
    • One for Failover Clustering
    • One for MSDTC

Release Notes

Before beginning, make sure you read the DataKeeper Cluster Edition Release Notes for the latest information. It is highly recommended that you read and understand the DataKeeper Cluster Edition Installation Guide.

Create a Virtual Private Cloud (VPC)

A virtual private cloud is the first object you create when using DataKeeper Cluster Edition.

  1. Using the email address and password specified when signing up for Amazon Web Services (AWS), sign in to the AWS Management Console.
  2. From the Services dropdown, select VPC.

  1. On the right side of the top navigation bar, select the region for your virtual private cloud.

  1. On the VPC Dashboard, select Your VPCs from the left navigation pane.
  2. Select Create VPC.
  3. Define your virtual private cloud subnet by entering your CIDR (Classless Inter-Domain Routing) as described below, then click Yes, Create.

  1. Once your virtual private cloud has been successfully created,click Close to return to the VPC Dashboard.

Create Internet Gateway and Attach to Virtual Private Cloud

Create and attach an Internet Gateway which provides access to your virtual private cloud from the Internet (from outside the virtual private cloud).

  1. Select Internet Gateways from the left navigation pane.
  2. Select your Gateway ID from the list of Internet Gateways.
  3. Click Attach to VPC.
  4. Select your virtual private cloud from the dropdown list and click Yes, Attach.

Create Subnets and Select Availability Zones

Create network subnets and select an availability zone for each subnet. You will launch your instances into these availability zones and their associated subnet address space. This will enable you to group server instances based on your security and high availability requirements. For a DataKeeper configuration, you will want to configure at least two subnet/availability zones. In this example, we will also configure a third availability zone for the quorum witness server.

  1. From the left navigation pane of the VPC Dashboard, select Subnets.
  2. Click Create Subnet.
  3. On the Create Subnet dialog, select your virtual private cloud and choose an availability zone, then enter a CIDR based on the instructions in the dialog (shown below). Click Yes, Create.

Virtual Network Topology Overview

The VPC with a default Route Table, multiple Subnets each in an Availability Zone, and an Internet Gateway have now been created. Server instances will be created below in each of the Availability Zones. An Elastic IP address will also be created and attached to the domain controller instance to provide a consistent and direct interface to your “virtual lab”. More about these steps below.

Set Up Routing and Security

You will set up routing and security to control the flow of traffic in and out of the availability zones.

Set Up Route Tables

Each subnet in your virtual private cloud must be associated with a route table to determine how the traffic between availability zones flows. If you use the default Route Table created for your VPC, you can skip to step 4 below.

  1. From the left navigation pane of the VPC Dashboard, select Route Tables.
  2. Select Create Route Table.
  3. Select your virtual private cloud and click Yes, Create.
  4. Select your new route table.
  5. Under the Routes tab in the bottom pane, the first row is the local route. This enables communication within the virtual private cloud. Click on Edit routes and associate your Internet Gateway with 0.0.0.0/0. This will appear in the second row and provides access into the virtual private cloud (0.0.0.0/0). This subnet is referred to as public because all traffic from the subnet goes to the Internet Gateway.

In the box under Destination, enter 0.0.0.0/0, then under Target, select your Internet Gateway created above and click Save.

  1. Under the Subnet Associations tab, click on Edit Subnet Associations, select all of your subnets then click Save.

Create Network Security Group

In order to control inbound traffic as well as traffic between availability zones within the virtual private cloud, a security group should be set up.

  1. From the left navigation pane of the VPC Dashboard, select Security Groups.
  2. Click Create Security Group.
  3. Enter Name and Description then select your virtual private cloud and click Create security group.
  4. Under the Inbound rules tab, click on Edit Inbound rules, then click on Add rule.

  1. To enable a Remote Desktop Connection, select RDP from the TYPE selection box and TTY protocol and Port 3389 will be inserted for you. Then enter a custom Source address 0.0.0.0/0 and click Save rules.
  2. Under the Outbound rule tab, ensure that Type is set to All Traffic and Destination is set to 0.0.0.0/0. If not, use the Edit Outbound rules button and set this up.

Launch an Instance

The following walks you through launching an instance into your subnet. You will want to launch two instances into one availability zone, one for your domain controller instance and one for your SQL instance. Then you will launch another SQL instance into another availability zone and a quorum witness instance into yet another availability zone.

  1. Using the email address and password specified when signing up for Amazon Web Service (AWS), sign in to the “Amazon EC2 Console”.
  2. From the top right of the navigation bar, select the region for your instance from the dropdown selection.

  1. Select Instances from the left navigation pane, then click the Launch Instances button.
  2. Choose an AMI. Select the Microsoft Windows Server 2016 Base AMI (Datacenter Edition)
  3. Select your Instance Type. (Note: Select M1 Small or larger.).
  4. Click on Configure Instance Details
    1. For Network, select your VPC.
    2. For Subnet, select an Availability Zone/Subnet that you created.
    3. Accept defaults in the Network Interface section.
    4. Accept defaults in the Advanced Details section.
  5. Click on Review and Launch.
    1. Review the Instance Type information.
    2. Accept a new Security Group, or Edit and select an existing one.
    3. Review Instance Details information (accept defaults)
    4. Review Storage information (accept defaults).
    5. Add a Tag to name your instance and Click on Review and Launch (again).
  6. Perform final review of the Instance and click on Launch.
  7. Unless choosing an existing Key Pair, you’ll select Create a New Key Pair.
  8. Enter a key pair name and then select Create & Download your Key Pair.
  9. Save the Key Pair file in a place you’ll remember. Note: You can use this key pair to launch other instances in the future or visit the Key Pairs page to create or manage existing ones.

Get Windows Admin Password

You will need an administrator password to connect to your instance with Remote Desktop. Note: You will need the private key file that you created when you launched your instance.

  1. Click Instances in the left navigation pane to view the status of your new instance. The status should be pending while it is launching, but status will change to running.
  2. Select your new instance.
  3. From the Actions dropdown menu, select Connect, RDP Client tab, then select Get Password. Browse to your saved Key Pair then press Decrypt Password. The password will be displayed. Save it in a safe place.

Repeat the above steps for all instances.

Assign a Virtual Private Cloud Elastic IP Address to the Domain Controller Instance

For an instance in your virtual private cloud to be reachable from the Internet, it must have a virtual private cloud elastic IP (EIP) address assigned to it. This is your entry point into your “virtual lab.”

This elastic IP address is being associated with the domain controller’s primary elastic network interface (ENI). The domain controller’s elastic network interface is attached to a public subnet and through a rule that you will create, routes 0.0.0.0/0 (all traffic) to the virtual private cloud’s Internet Gateway. You also created a rule in your Security Group (above) to allow Remote Desktop Connections to connect to your instances. You will initially connect to your domain controller through the elastic IP via a Remote Desktop Connection. Once connected to your domain controller, a router allows you to Remote Desktop into your other instances. Alternatively, you can also connect directly to each server instance via Remote Desktop Connection using a temporary Public IPv4 Address created each time an instance is started.

  1. From the left navigation pane of the VPC Dashboard, select Elastic IPs.
  2. Click Allocate Elastic IP Address, then select Allocate.
  3. For the new Elastic IP Address (EIP), enter a name and click Save.
  4. Return to the main Elastic IPs page. The new EIP will appear in the list.
  5. Select the new EIP and Click on Actions > Associate Elastic IP Address.
  6. Choose the Domain Controller Instance to attach this new EIP Address.
  7. Choose a Private IP address (one will be provided), click the Associate button.

Connect to Instances

Once you’ve retrieved your initial administrator password and set up your Remote Desktop Connection (RDP) “Rule”, you can connect to your domain controller instance via Remote Desktop Connection. Once you are connected to your domain controller instance, you can Remote Desktop into your other instances from there. Alternatively, you can also connect directly to each server instance via Remote Desktop Connection using a temporary Public IPv4 Address created each time an instance is started.

  1. Open a Remote Desktop Connection and enter the Elastic IP address of your domain controller instance.
  2. Login as administrator and enter your administrator password.

Configure the Domain Controller Instance

Now that the instances have been created, we started with setting up the Domain Service instance.

This guide is not a tutorial on how to set up an Active Domain server instance. We recommend reading articles on how to set up and configure an Active Directory server. It is very important to understand that even though the instance is running in an AWS cloud, this is a regular installation of Active Directory.

Alternatively you may create an AWS Active Directory Service instead of using a server instance for this purpose.

Static IP Addresses

Configure Static IP Addresses for your Instances

  1. Connect to your domain controller instance.
  2. Click Start / Control Panel.
  3. Click Network and Sharing Center.
  4. Select your network interface.
  5. Click Properties.
  6. Click Internet Protocol Version 4 (TCP/IPv4), then Properties.
  7. Obtain your current IPv4 address, default gateway and DNS server for the network interface from Amazon.
  8. In the Internet Protocol Version 4 (TCP/IPv4) Properties dialog box, under Use the following IP address, enter your IPv4 address.
  9. In the Subnet mask box, type the subnet mask associated with your virtual private cloud subnet.
  10. In the Default Gateway box, type the IP address of the default gateway and then click OK.
  11. For the Preferred DNS Server, enter the Primary IP Address of Your Domain Controller (ex. 15.0.1.72).
  12. Click Okay, then select Close. Exit Network and Sharing Center.
  13. Repeat the above steps on your other instances.

Join the Two SQL Instances and the Witness Instance to Domain

  1. On each instance, click Start, then right-click Computer and select Properties.
  2. On the far right, select Change Settings.
  3. Click on Change.
  4. Enter a new Computer Name.
  5. Select Domain.
  6. Enter Domain Name – (ex. docs.aws.com).
  7. Click Apply.

Assign Secondary Private IPs to the Two SQL Instances

In addition to the Primary IP, you will need to add three additional IPs (Secondary IPs) to the elastic network interface for each SQL instance.

  1. From the left navigation pane of the EC2 Dashboard, select Instances.
  2. Right-click the instance for which you want to add secondary private IP addresses.
  3. Select Actions > Networking > Manage Private IP Addresses.
  4. Select the Network Interface (eth0) and view the current IPv4 address list.
  5. Click on Assign new IP address and enter a Private IP address that is within the subnet range for the instance (ex. For 15.0.1.25, enter 15.0.1.26). Click Save. Repeat to add two more additional IP addresses to this instance.
  6. Click Save to save your work.
  7. Perform the above on both SQL Instances.

Create and Attach Volumes

DataKeeper is a block-level volume replication solution and requires that each node in the cluster have additional volume(s) (other than the system drive) that are the same size and same drive letters. Please review Volume Considerations for additional information regarding storage requirements.

Create Volumes

Create two volumes in each availability zone for each SQL server instance, a total of four volumes.

  1. From the left navigation pane of the EC2 Dashboard, select Instances to display your instances.
  2. Click on your instance ID. In the Instance Summary block at the top, note the Subnet ID/Availability Zone.
  3. Return to the EC2 Dashboard.
  4. From the left navigation pane, select Volumes under Elastic Block Store (EBS).

The console displays a list of the current elastic block store volumes in that region. You should see the elastic block store volume that serves as the root device volume for your instance. The state will be in-use. To quickly identify it in the future add a name to the elastic block store for your instance.

At this time create 2 additional volumes, one for your SQL Database, and another one for a DTC resource. Do this for both SQL instances.

  1. Click Create Volume.
  2. In the Create Volume dialog box, select the General Purpose volume type, enter the desired size, select the correct availability zone/subnet (noted above), enter a Name tag, then click Create Volume at the bottom.

Attach Volumes

Once your volumes are created, attach them to your two SQL instances.

  1. From the left navigation pane of the EC2 Dashboard, select Volumes.
  2. Select a new volume. Click Actions > Attach Volume.
  3. Select the Instance to attach the volume to and accept the default Device. Click Attach. You will see the volume status go from available to in-use.
  4. Do this for all four volumes.

Configure the Cluster

Prior to installing DataKeeper Cluster Edition, it is important to have Windows Server configured as a cluster using either a node majority quorum (if there is an odd number of nodes) or a node and file share majority quorum (if there is an even number of nodes). Consult the Microsoft documentation on clustering in addition to this topic for step-by-step instructions. Note: Microsoft released a hotfix for Windows 2008R2 that allows disabling of a node’s vote which may help achieve a higher level of availability in certain multi-site cluster configurations.

Add Failover Clustering

Add the Failover Clustering feature to both SQL instances.

  1. Launch Server Manager.
  2. Select Features in the left pane and click Add Features in the Features pane. This starts the Add Features Wizard.
  3. Select Failover Clustering.
  4. Select Install.

Validate a Configuration

  1. Open Failover Cluster Manager.
  2. Select Failover Cluster Manager, select Validate a Configuration.
  3. Click Next, then add your two SQL instances.

Note: To search, select Browse, then click on Advanced and Find Now. This will list available instances.

  1. Click Next.
  2. Select Run Only Tests I Select and click Next.
  3. In the Test Selection screen, deselect Storage and click Next.
  4. At the resulting confirmation screen, click Next.
  5. Review Validation Summary Report then click Finish.

Create Cluster

  1. In Failover Cluster Manager, click on Create a Cluster then click Next.
  2. Enter your two SQL instances.
  3. On the Validation Warning page, select No then click Next.
  4. On the Access Point for Administering the Cluster page, enter a unique name for your WSFC Cluster. Then enter the Failover Clustering IP address for each node involved in the cluster. This is the first of the three secondary IP addresses added previously to each instance.
  5. IMPORTANT! Uncheck the “Add all available storage to the cluster” checkbox. DataKeeper mirrored drives must not be managed natively by the cluster. They will be managed as DataKeeper Volumes.
  6. Click Next on the Confirmation page.
  7. On Summary page, review any warnings then select Finish.

Configure Quorum/Witness

  1. Create a folder on your quorum/witness instance (witness).
  2. Share the folder.
    1. Right-click folder and select Share With / Specific People….
    2. From the dropdown, select Everyone and click Add.
    3. Under Permission Level, select Read/Write.
    4. Click Share, then Done. (Make note of the path of this file share to be used below.)
  3. In Failover Cluster Manager, right-click cluster and choose More Actions and Configure Cluster Quorum Settings. Click Next.
  4. On the Select Quorum Configuration, choose Node and File Share Majority and click Next.
  5. On the Configure File Share Witness screen, enter the path to the file share previously created and click Next.
  6. On the Confirmation page, click Next.
  7. On the Summary page, click Finish.

Install and Configure DataKeeper

After the basic cluster is configured but prior to any cluster resources being created, install and license DataKeeper Cluster Edition on all cluster nodes. See the DataKeeper Cluster Edition Installation Guide for detailed instructions.

  1. Run DataKeeper setup to install DataKeeper Cluster Edition on both SQL instances.
  2. Enter your license key and reboot when prompted.
  3. Launch the DataKeeper GUI and connect to server.
  1. Right click on Jobs and connect to both SQL servers.
  2. Create a Job for each mirror you will create. One for your DTC resource, and one for your SQL resource..
  3. When asked if you would like to auto-register the volume as a cluster volume, select Yes.

Configure MSDTC

  1. For Windows Server 2012 and 2016, in the Failover Cluster Manager GUI, select Roles, then select Configure Role.
  2. Select Distributed Transaction Coordinator (DTC), and click Next.
  1. On the Client Access Point screen, enter a name, then enter the MSDTC IP address for each node involved in the cluster. This is the second of the three secondary IP addresses added previously to each instance. Click Next.
  2. Select the MSDTC volume and click Next.
  3. On the Confirmation page, click Next.
  4. Once the Summary page displays, click Finish.

Install SQL on the First SQL Instance

  1. On the domain controller server create a folder and share it..
    1. For example “TEMPSHARE” with Everyone permission.
  2. Create a sub folder “SQL” and copy the SQL .iso installer into that sub folder.
  3. On the SQL server, create a network drive and attach it to the shared folder on the domain controller.
    1. For example “net use S: \\\TEMPSHARE
  4. On the SQL server the S: drive will appear. CD to the SQL folder and find the SQL .iso installer. Right click on the .iso file and select Mount. The setup.exe installer will appear with the SQL .iso installer.

F:\>Setup /SkipRules=Cluster_VerifyForErrors /Action=InstallFailoverCluster

  1. On Setup Support Rules, click OK.
  2. On the Product Key dialog, enter your product key and click Next.
  3. On the License Terms dialog, accept the license agreement and click Next.
  4. On the Product Updates dialog, click Next.
  5. On the Setup Support Files dialog, click Install.
  6. On the Setup Support Rules dialog, you will receive a warning. Click Next, ignoring this message, since it is expected in a multi-site or non-shared storage cluster.
  7. Verify Cluster Node Configuration and click Next.
  8. Configure your Cluster Network by adding the “third” secondary IP address for your SQL instance and click Next. Click Yes to proceed with multi-subnet configuration.
  9. Enter passwords for service accounts and click Next.
  10. On the Error Reporting dialog, click Next.
  11. On the Add Node Rules dialog, skipped operation warnings can be ignored. Click Next.
  12. Verify features and click Install.
  13. Click Close to complete the installation process.

Install SQL on the Second SQL Instance

Installing the second SQL instance is similar to the first one.

  1. On the SQL server, create a network drive and attach it to the shared folder on the domain controller as explained above for the first SQL server.
  2. Once the .iso installer is mounted, run SQL setup once again from the command line in order to skip the Validate process. Open a Command window, browse to your SQL install directory and type the following command:

Setup /SkipRules=Cluster_VerifyForErrors /Action=AddNode /INSTANCENAME=”MSSQLSERVER”

(Note: This assumes you installed the default instance on the first node)

  1. On Setup Support Rules, click OK.
  2. On the Product Key dialog, enter your product key and click Next.
  3. On the License Terms dialog, accept the license agreement and click Next.
  4. On the Product Updates dialog, click Next.
  5. On the Setup Support Files dialog, click Install.
  6. On the Setup Support Rules dialog, you will receive a warning. Click Next, ignoring this message, since it is expected in a multi-site or non-shared storage cluster.
  7. Verify Cluster Node Configuration and click Next.
  8. Configure your Cluster Network by adding the “third” secondary IP address for your SQL Instance and click Next. Click Yes to proceed with multi-subnet configuration.
  9. Enter passwords for service accounts and click Next.
  10. On the Error Reporting dialog, click Next.
  11. On the Add Node Rules dialog, skipped operation warnings can be ignored. Click Next.
  12. Verify features and click Install.
  13. Click Close to complete the installation process.

Common Cluster Configuration

This section describes a common 2-node replicated cluster configuration.

  1. The initial configuration must be done from the DataKeeper UI running on one of the cluster nodes. If it is not possible to run the DataKeeper UI on a cluster node, such as when running DataKeeper on a Windows Core only server, install the DataKeeper UI on any computer running Windows XP or higher and follow the instruction in the Core Only section for creating a mirror and registering the cluster resources via the command line.
  2. Once the DataKeeper UI is running, connect to each of the nodes in the cluster.
  3. Create a Job using the DataKeeper UI. This process creates a mirror and adds the DataKeeper Volume resource to the Available Storage.
  1. If additional mirrors are required, you can Add a Mirror to a Job.
  2. With the DataKeeper Volume(s) now in Available Storage, you are able to create cluster resources (SQL, File Server, etc.) in the same way as if there were a shared disk resource in the cluster. Refer to Microsoft documentation for additional information in addition to the above for step-by-step cluster configuration instructions.

Management

Once a DataKeeper volume is registered with Windows Server Failover Clustering, all of the management of that volume will be done through the Windows Server Failover Clustering interface. All of the management functions normally available in DataKeeper will be disabled on any volume that is under cluster control. Instead, the DataKeeper Volume cluster resource will control the mirror direction, so when a DataKeeper Volume comes online on a node, that node becomes the source of the mirror. The properties of the DataKeeper Volume cluster resource also display basic mirroring information such as the source, target, type and state of the mirror.

Troubleshooting

Use the following resources to help troubleshoot issues:

Additional Resources:

Step-by-Step: Configuring a 2-Node Multi-Site Cluster on Windows Server 2008 R2 – Part 1 — http://clusteringformeremortals.com/2009/09/15/step-by-step-configuring-a-2-node-multi-site-cluster-on-windows-server-2008-r2-%E2%80%93-part-1/

Step-by-Step: Configuring a 2-Node Multi-Site Cluster on Windows Server 2008 R2 – Part 3 — http://clusteringformeremortals.com/2009/10/07/step-by-step-configuring-a-2-node-multi-site-cluster-on-windows-server-2008-r2-%E2%80%93-part-3/

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