Clustering Microsoft SQL Server
Amazon Web Services
For more information; email@example.com
This document describes how to use Zadara supplied iSCSI volumes attached to AWS EC2 instances to build a traditional SQL Server failover cluster across availability zones in a VPC. At AWS Zadara uses redundant, low latency Direct Connect interconnects to supply traditional, high performance, highly available iSCSI LUNs to EC2 instances.
This document is designed for an audience familiar with Zadara Storage, AWS EC2 and VPCs, Microsoft SQL Server, and Microsoft Failover Clustering.
- An AWS account.
- An IAM role with permissions to run ‘assign-private-ip-addresses’ and ‘associate-address’
- A Zadara Storage account.
- A Virtual Private Cloud (VPC) with two public subnets.
- A connection between your VPC and Zadara storage.
- A Zadara Virtual Private Storage Array
- Two free Elastic Network Interfaces (ENI) with a EIP attached to each. Make note of the Allocation ID of each EIP.
- An iSCSI LUN for the quorum device and additional LUNs for SQL Server data, logs and indexes.
Start by launching two Windows 2008 Datacenter edition AMIs (as of 7/2014 ami-c77932c6 in us-east–1), or Windows 2012 Standard edition AMIs (ami–21622920), or their variants with SQL Server Standard installed, one in each of your public subnets. Make sure to attach the role you created to each instance, also attach one of the ENIs to each instance. Make note of what ENI you attached to each instance, you will need to know this for the next step.
- On each instance download two scripts to ’c:' -
- Use notepad to modify the ‘move_ips_role.bat’ script on each instance-
- On line 4 set ‘NW_IFACE’ = the ENI-id of the ENI attached to the instance.
On line 7 set ‘IP_ADDR’ = a RFC 1918 address that would be valid in your VPC. This value should be the same on both instances.
On line 10 set ‘ALLOC_ID’ = the Allocation ID of the EIP attached to the local ENI.
Save the modified scripts.
Create a Microsoft Failover Cluster
Use your Zadara VPSA to create and zone at least two iSCSI LUNs to your Windows instances, 1 for the quorum device and the other for SQL Server.
- Windows 2008
- Windows 2012
- On your new cluster create a Generic Script Resource, referencing ‘c:\GenericScriptRes.vbs’.
Now when the cluster fails over the AWS EC2 IPs will moved automatically.