Top Banner
Implementing Windows and SQL Server for High Availability on AWS Presented by Miles Ward Content by David Pae & Ulf Schoo Deck by Colin White 1
30

AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Jan 15, 2015

Download

Technology

This webinar is on high availability features for Microsoft Windows Server and SQL Server running on the AWS Cloud. Windows Server Failover Clustering (WSFC) and SQL AlwaysOn Availability Groups are part of the underpinnings for many enterprise-class solutions, including Microsoft SharePoint and .NET applications.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Implementing Windows and SQL Server

for High Availability on AWS

Presented by Miles Ward

Content by David Pae & Ulf Schoo

Deck by Colin White

1

Page 2: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Before You Get Started

This is an advanced topic. If you are new to AWS, please visit

the “Getting Started with AWS” section of the documentation.

You should also be familiar with the following topics:

• Amazon EC2

• Amazon VPC

• Windows Server 2008 R2 and Windows Server 2012

• Windows Server Active Directory and DNS

• Windows Server Failover Clustering (WSFC)

• SQL Server 2012 AlwaysOn Availability Groups

2

Page 3: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Introduction The goal of a high availability configuration is to protect from failure of a single instance.

This guide discusses architectural considerations and configuration steps when launching

the necessary AWS services to run WSFC across different subnets and Availability Zones,

and also provides instructions for installing and configuring WSFC and an AlwaysOn

Availability Group. We also provide you with two sample AWS CloudFormation templates to

help deploy the necessary infrastructure predictably and repeatedly.

Implementing a WSFC cluster and AlwaysOn Availability Group in the AWS cloud is not

different from deploying on-premises as long as two requirements are met:

• Deploy the cluster nodes inside a VPC

• Put WSFC cluster nodes in separate subnets

This presentation gives an overview of the process to create the example solution. It does

not outline each step. For the detailed overview, please consult the whitepaper available

here: http://aws.amazon.com/whitepapers/microsoft-wsfc-sql-alwayson/

3

Page 4: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Microsoft Platform on AWS

• Partnership to support running Windows

Server-based workloads on AWS

• Windows Server, SQL Server on AWS today

– Amazon Machine Images (AMIs) jointly

developed by Microsoft and AWS

• SharePoint Server and other Microsoft

server products can be licensed to run on

AWS

Two licensing models:

•Windows Server

•SQL Server Standard

Pay-as-you-go – AMI pricing includes

software

•SQL Server Enterprise

•SharePoint Server

•Other Microsoft Windows Server products

BYOL – use existing licenses on AWS

General info on AWS and License Mobility for a variety of MS server products:

http://aws.amazon.com/windows/mslicensemobility/

Detail on AWS and License Mobility with SQL Server:

http://aws.amazon.com/windows/mslicensemobility/sql/

Microsoft “License Mobility through Software Assurance” gives Microsoft Volume Licensing

customers the flexibility to deploy Windows server applications with active Microsoft Software

Assurance on Amazon Web Services (AWS).

4

Page 5: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Summary – What You Will Learn

Part 1 Configure the Virtual Network and Active Directory Infrastructure

Part 2 Launch the WSFC Cluster Nodes

Part 3 Install a SQL Server 2012 AlwaysOn Availability Group

5

Page 6: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Summary – What You Will Build

One Amazon VPC

One public route

One Internet Gateway

Security Groups to control the secure flow of traffic between the instances deployed in the Amazon VPC

•4 private subnets and 1 public subnet

•1 private route

•1 Windows Server 2008 R2–based Remote Desktop Gateway instance

•1 Linux-based NAT instance to enable administrative ingress and egress

•2 Elastic IP Addresses associated with the NAT and RDGW instances

•1 Windows Server 2008 R2–based instance to host the Active Directory

•1 Windows Server 2008 R2–based instance to host the WSFC Node and SQL Server 2012 Instance

Per Availability Zone

6

Page 7: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

7

Page 8: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Part 1: Configure the Virtual Network

and Active Directory Infrastructure

8

Page 9: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Part 1: Configure the Virtual Network and Active Directory Infrastructure

Introduction

Let’s start with the necessary infrastructure and virtual network setup to provide

the environment in which you instantiate and configure your servers and

database. WSFC provides infrastructure features that complement the high

availability and disaster recovery scenarios supported in the AWS cloud.

Amazon EC2 provides the ability to place instances in multiple locations,

composed of Availability Zones and regions. Regions are dispersed and located

in separate geographic areas. Availability Zones are distinct locations within a

region that are engineered to be isolated from failures in other Availability Zones.

We provide two sample AWS CloudFormation templates to help you deploy the

necessary and correctly configured infrastructure predictably and repeatedly.

9

Page 10: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Scripted Deployment

Sample Template-1 allows for customization

of 23 defined parameters:

Template-1 takes about 1 hour and 20 minutes to complete all tasks

KeyPairName ADServer1InstanceType ADServer2InstanceType ADServer1NetBIOSName ADServer2NetBIOSName ADServer1PrivateIp ADServer2PrivateIp NATInstanceType RDGWInstanceType

DomainDNSName DomainNetBIOSName RestoreModePassword DomainAdminUser DomainAdminPassword SQLAdminUser SQLAdminPassword PublicSubnet1CIDR PublicSubnet2CIDR

PrivateSubnet1CIDR PrivateSubnet2CIDR PrivateSubnet3CIDR PrivateSubnet4CIDR PrivateSubnet5CIDR PrivateSubnet6CIDR PrivateSubnet7CIDR PrivateSubnet8CIDR VPCCIDR

default values for all parameters are included in the whitepaper

10

Page 11: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

11

Page 12: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Part 2: Launch the WSFC Cluster Nodes

12

Page 13: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Part 2: Launch the WSFC Cluster Nodes

Scripted Deployment

Template-2 helps you deploy the

WSFC Nodes into AWS architecture

Template-2 takes about 50 minutes to complete all tasks

• Deploys Windows Server 2008 R2–based instances as WSFC nodes into their respective subnets

• Renames the instance to a friendly NetBIOS name of your choice

• Joins the Windows instances to the domain

• Adds the SQL Service Account (e.g., sqlsa) to the local Administrator Group

• Installs the WSFC feature

• Downloads a SQL Server 2012 Enterprise Edition Evaluation copy onto the instance

• Opens the TCP ports 1433, 1434, 4022, 5022, and 135

13

Page 14: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Part 2: Launch the WSFC Cluster Nodes

Create the WSFC Cluster

Steps to create the cluster:

• Create private IP addresses

for both nodes of the cluster

• Test and validate configuration

• Create cluster

• Change to static IP and assign

private addresses

• Bring online

• Create file share witness and

set Quorum Configuration

(full 29 step process outlined in the whitepaper)

14

Page 15: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

15

Page 16: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Part 3: Install a SQL Server 2012

AlwaysOn Availability Group

16

Page 17: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Part 3: Install a SQL Server 2012 AlwaysOn Availability Group

Introduction

The next steps are to download and install SQL Server

2012 Enterprise Edition from Microsoft, enable AlwaysOn

high availability for your database, and create a new

Availability Group.

If you have chosen the scripted deployment option, the trial

version of the software from the Microsoft download site is

automatically added to the instance for you.

17

Page 18: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Part 3: Install a SQL Server 2012 AlwaysOn Availability Group

Part 3 in Steps

• Set Up SQL Server 2012 Enterprise Edition

• Enable AlwaysOn High Availability

• Create a Test Database or Attach an Existing Database

• Create an Availability Group

18

Page 19: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Part 3: Install a SQL Server 2012 AlwaysOn Availability Group

Part 3 in Steps

• Set Up SQL Server 2012 Enterprise Edition

• Enable AlwaysOn High Availability

• Create a Test Database or Attach an Existing Database

• Create an Availability Group

19

Page 20: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Part 2: Launch the WSFC Cluster Nodes

Set Up SQL Server 2012 Enterprise Edition

Create service account on primary Domain Controller

• Connect with Remote Desktop

• Open Server Manager

• Create service account

• Create and share replica folder

Install SQL on each node

• Connect with Remote Desktop

• Install SQL Server

• Follow wizard steps provided

20

Page 21: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Part 3: Install a SQL Server 2012 AlwaysOn Availability Group

Part 3 in Steps

• Set Up SQL Server 2012 Enterprise Edition

• Enable AlwaysOn High Availability

• Create a Test Database or Attach an Existing Database

• Create an Availability Group

21

Page 22: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Part 3: Install a SQL Server 2012 AlwaysOn Availability Group

Enable AlwaysOn High Availability

For each cluster node:

• Connect with Remote Desktop

• Enable AlwaysOn Availability Groups

in SQL Configuration Manager

• Restart the SQL Server service

MSSQLSERVER

22

Page 23: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Part 3: Install a SQL Server 2012 AlwaysOn Availability Group

Part 3 in Steps

• Set Up SQL Server 2012 Enterprise Edition

• Enable AlwaysOn High Availability

• Create a Test Database or Attach an Existing Database

• Create an Availability Group

23

Page 24: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Part 3: Install a SQL Server 2012 AlwaysOn Availability Group

Create a Test Database or Attach an Existing Database

• Using SQL Server Management

Studio, connect to the first cluster

node (e.g., WSFCNode1)

• Create a new database or attach

a test database

• Set the Recovery model to Full

• Run a Backup

24

Page 25: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Part 3: Install a SQL Server 2012 AlwaysOn Availability Group

Part 3 in Steps

• Set Up SQL Server 2012 Enterprise Edition

• Enable AlwaysOn High Availability

• Create a Test Database or Attach an Existing Database

• Create an Availability Group

25

Page 26: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Part 3: Install a SQL Server 2012 AlwaysOn Availability Group

Create an Availability Group

• In Object Explorer launch the New

Availability Group wizard and follow it

according to the guide provided

• Run Windows PowerShell to adjust the

Listener Host Record TTL

• Connect via Remote Desktop Gateway to

the Primary Domain Controller

• Open Server Manager and Check DNS to

ensure all availability group Listeners’ IP

addresses are listed

26

Page 27: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

27

Page 28: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Conclusion

Summary In this presentation, we gave an overview of the steps to implement the necessary infrastructure in the AWS cloud to set up and configure Windows Server Failover Clustering and SQL Server AlwaysOn Availability Groups. The resulting sample implementation supports the following scenarios:

• Protect from failure of a single instance • Provide automatic failover between the cluster nodes • Protect from failure of the instance placed in the secondary Availability Zone and

automatically failover to the primary one

We recommend you consult the Microsoft documentation and customize some of the steps described in this guide to deploy a solution that best meets your HA and DR needs.

Testing Before putting the solution into production, you should test your deployment and familiarize yourself with the clusters behavior during a high availability automatic failover or a disaster recovery event. There is a full testing process outlined in the whitepaper.

28

Page 29: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Additional Resources

Web Pages

Microsoft on AWS http://aws.amazon.com/microsoft/

Windows on AWS (includes pricing) http://aws.amazon.com/windows/

AWS Windows and .NET Developer Center (with sdk) http://aws.amazon.com/net/

Amazon EC2 Windows Guide http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/

SharePoint on AWS (new video tutorial) http://aws.amazon.com/windows/sharepoint/quickstart/

Microsoft License Mobility http://aws.amazon.com/windows/mslicensemobility/

Whitepapers

“Implementing Microsoft Windows Server Failover Clustering (WSFC)

and SQL Server 2012 AlwaysOn Availability Groups in the AWS Cloud”

http://aws.amazon.com/whitepapers/microsoft-wsfc-sql-alwayson/

“Secure Microsoft Applications on AWS”

http://aws.amazon.com/whitepapers/secure-microsoft-applications-on-aws/

"Amazon’s Corporate IT Deploys SharePoint 2010 to the AWSCloud“

http://aws.amazon.com/whitepapers/amazon-corporate-it-sharepoint/

Contact Us We now have contact forms on aws.amazon.com specifically

for questions about Microsoft on AWS.

Microsoft (general)

https://aws.amazon.com/microsoft/contact-us/

SharePoint

https://aws.amazon.com/sharepoint/contact-us/

29

Page 30: AWS Webcast - Implementing Windows and SQL Server for High Availability on AWS

Implementing Windows and SQL Server

for High Availability on AWS

Thank You

30