Overview
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 | |
---|---|
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
|
Volumes | Three volumes (EBS and NTFS only)
|
Bitmap File/Intent Log Location | A Local Instance Store (i.e. Ephemeral Disk) should be used with the bitmap file. See information on Relocating a Bitmap/Intent Log. |
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.
- Using the email address and password specified when signing up for Amazon Web Services (AWS), sign in to the AWS Management Console.
- From the Services dropdown, select VPC.
- On the right side of the top navigation bar, select the region for your virtual private cloud.
- On the VPC Dashboard, select Your VPCs from the left navigation pane.
- Select Create VPC.
- Define your virtual private cloud subnet by entering your CIDR (Classless Inter-Domain Routing) as described below, then click Yes, Create.
- 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).
- Select Internet Gateways from the left navigation pane.
- Select your Gateway ID from the list of Internet Gateways.
- Click Attach to VPC.
- 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.
- From the left navigation pane of the VPC Dashboard, select Subnets.
- Click Create Subnet.
- 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.
- From the left navigation pane of the VPC Dashboard, select Route Tables.
- Select Create Route Table.
- Select your virtual private cloud and click Yes, Create.
- Select your new route table.
- 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 provide 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.
- Under the Subnet Associations tab, click on Edit Subnet Associations, select all of your subnets then click Save.
Create Network Security Group
To control inbound traffic as well as traffic between availability zones within the virtual private cloud, a security group should be set up.
- From the left navigation pane of the VPC Dashboard, select Security Groups.
- Click Create Security Group.
- Enter Name and Description then select your virtual private cloud and click Create security group.
- Under the Inbound rules tab, click on Edit Inbound rules, then click on Add rule.
- 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.
- 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.
- Using the email address and password specified when signing up for Amazon Web Service (AWS), sign in to the Amazon EC2 Console”.
- From the top right of the navigation bar, select the region for your instance from the dropdown selection.
- Select Instances from the left navigation pane, then click the Launch Instances button.
- Choose an AMI. Select the Microsoft Windows Server 2016 Base AMI (Datacenter Edition)
- Select your Instance Type. (Note: Select M1 Small or larger.).
- Click on Configure Instance Details
- For Network, select your VPC.
- For Subnet, select an Availability Zone/Subnet that you created.
- Accept defaults in the Network Interface section.
- Accept defaults in the Advanced Details section.
- Click on Review and Launch.
- Review the Instance Type information.
- Accept a new Security Group, or Edit and select an existing one.
- Review Instance Details information (accept defaults)
- Review Storage information (accept defaults).
- Add a Tag to name your instance and Click on Review and Launch (again).
- Perform final review of the Instance and click on Launch.
- Unless choosing an existing Key Pair, you’ll select Create a New Key Pair.
- Enter a key pair name and then select Create & Download your Key Pair.
- 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.
- 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.
- Select your new instance.
- 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.
- From the left navigation pane of the VPC Dashboard, select Elastic IPs.
- Click Allocate Elastic IP Address, then select Allocate.
- For the new Elastic IP Address (EIP), enter a name and click Save.
- Return to the main Elastic IPs page. The new EIP will appear in the list.
- Select the new EIP and Click on Actions > Associate Elastic IP Address.
- Choose the Domain Controller Instance to attach this new EIP Address.
- 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.
- Open a Remote Desktop Connection and enter the Elastic IP address of your domain controller instance.
- 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
- Connect to your domain controller instance.
- Click Start / Control Panel.
- Click Network and Sharing Center.
- Select your network interface.
- Click Properties.
- Click Internet Protocol Version 4 (TCP/IPv4), then Properties.
- Obtain your current IPv4 address, default gateway and DNS server for the network interface from Amazon.
- In the Internet Protocol Version 4 (TCP/IPv4) Properties dialog box, under Use the following IP address, enter your IPv4 address.
- In the Subnet mask box, type the subnet mask associated with your virtual private cloud subnet.
- In the Default Gateway box, type the IP address of the default gateway and then click OK.
- For the Preferred DNS Server, enter the Primary IP Address of Your Domain Controller (ex. 15.0.1.72).
- Click Okay, then select Close. Exit Network and Sharing Center.
- Repeat the above steps on your other instances.
Join the Two SQL Instances and the Witness Instance to Domain
- On each instance, click Start, then right-click Computer and select Properties.
- On the far right, select Change Settings.
- Click on Change.
- Enter a new Computer Name.
- Select Domain.
- Enter Domain Name – (ex. docs.aws.com).
- 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.
- From the left navigation pane of the EC2 Dashboard, select Instances.
- Right-click the instance for which you want to add secondary private IP addresses.
- Select Actions > Networking > Manage Private IP Addresses.
- Select the Network Interface (eth0) and view the current IPv4 address list.
- 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.
- Click Save to save your work.
- 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.
- From the left navigation pane of the EC2 Dashboard, select Instances to display your instances.
- Click on your instance ID. In the Instance Summary block at the top, note the Subnet ID/Availability Zone.
- Return to the EC2 Dashboard.
- 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.
- Click Create Volume.
- 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.
- From the left navigation pane of the EC2 Dashboard, select Volumes.
- Select a new volume. Click Actions > Attach Volume.
- 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.
- 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.
- Launch Server Manager.
- Select Features in the left pane and click Add Features in the Features pane. This starts the Add Features Wizard.
- Select Failover Clustering.
- Select Install.
Validate a Configuration
- Open Failover Cluster Manager.
- Select Failover Cluster Manager, select Validate a Configuration.
- 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.
- Click Next.
- Select Run Only Tests I Select and click Next.
- In the Test Selection screen, deselect Storage and click Next.
- At the resulting confirmation screen, click Next.
- Review Validation Summary Report then click Finish.
Create Cluster
- In Failover Cluster Manager, click on Create a Cluster then click Next.
- Enter your two SQL instances.
- On the Validation Warning page, select No then click Next.
- 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.
- 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.
- Click Next on the Confirmation page.
- On Summary page, review any warnings then select Finish.
Configure Quorum/Witness
- Create a folder on your quorum/witness instance (witness).
- Share the folder.
- Right-click folder and select Share With / Specific People….
- From the dropdown, select Everyone and click Add.
- Under Permission Level, select Read/Write.
- Click Share, then Done. (Make note of the path of this file share to be used below.)
- In Failover Cluster Manager, right-click cluster and choose More Actions and Configure Cluster Quorum Settings. Click Next.
- On the Select Quorum Configuration, choose Node and File Share Majority and click Next.
- On the Configure File Share Witness screen, enter the path to the file share previously created and click Next.
- On the Confirmation page, click Next.
- 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.
- Run DataKeeper setup to install DataKeeper Cluster Edition on both SQL instances.
- Enter your license key and reboot when prompted.
- Launch the DataKeeper GUI and connect to server.
- Right click on Jobs and connect to both SQL servers.
- Create a Job for each mirror you will create. One for your DTC resource, and one for your SQL resource..
- When asked if you would like to auto-register the volume as a cluster volume, select Yes.
Configure MSDTC
- For Windows Server 2012 and 2016, in the Failover Cluster Manager GUI, select Roles, then select Configure Role.
- Select Distributed Transaction Coordinator (DTC), and click Next.
- 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.
- Select the MSDTC volume and click Next.
- On the Confirmation page, click Next.
- Once the Summary page displays, click Finish.
Install SQL on the First SQL Instance
- On the domain controller server create a folder and share it..
- For example “TEMPSHARE” with Everyone permission.
- Create a sub folder “SQL” and copy the SQL .iso installer into that sub folder.
- On the SQL server, create a network drive and attach it to the shared folder on the domain controller.
- For example “net use S: \\\TEMPSHARE
- 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
- On Setup Support Rules, click OK.
- On the Product Key dialog, enter your product key and click Next.
- On the License Terms dialog, accept the license agreement and click Next.
- On the Product Updates dialog, click Next.
- On the Setup Support Files dialog, click Install.
- 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.
- Verify Cluster Node Configuration and click Next.
- 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.
- Enter passwords for service accounts and click Next.
- On the Error Reporting dialog, click Next.
- On the Add Node Rules dialog, skipped operation warnings can be ignored. Click Next.
- Verify features and click Install.
- 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.
- 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.
- 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)
- On Setup Support Rules, click OK.
- On the Product Key dialog, enter your product key and click Next.
- On the License Terms dialog, accept the license agreement and click Next.
- On the Product Updates dialog, click Next.
- On the Setup Support Files dialog, click Install.
- 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.
- Verify Cluster Node Configuration and click Next.
- 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.
- Enter passwords for service accounts and click Next.
- On the Error Reporting dialog, click Next.
- On the Add Node Rules dialog, skipped operation warnings can be ignored. Click Next.
- Verify features and click Install.
- Click Close to complete the installation process.
Common Cluster Configuration
This section describes a common 2-node replicated cluster configuration.
- 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.
- Once the DataKeeper UI is running, connect to each of the nodes in the cluster.
- Create a Job using the DataKeeper UI. This process creates a mirror and adds the DataKeeper Volume resource to the Available Storage.
- If additional mirrors are required, you can Add a Mirror to a Job.
- 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:
- Troubleshooting issues section
- For customers with a support contract – http://us.sios.com/support/overview/
- For evaluation customers only – Pre-sales support
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/
Post your comment on this topic.