robotechredmond / sql-server-2014-alwayson-dr

Extend SQL AlwaysOn AG HA deployment with a remote cluster node for DR
0 stars 1 forks source link

Extend existing SQL Server 2014 AlwaysOn AG for Disaster Recovery

This template deploys an additional SQL Server 2014 AlwaysOn AG cluster node to an existing SQL Server AlwaysOn AG cluster in a remote Azure datacenter region for Disaster Recovery. This additonal node can be leveraged for hosting Async Replicas of databases in an existing AlwaysOn Availability Group.

This template creates the following resources:

A SQL Server always on listener is created using the internal load balancer.

Known Issues

This template is serial in nature for deploying some of the resources, due to some issues between the platform agent and the DSC extension which cause problems when multiple VM and\or extension resources are deployed concurrently.

Notes

Click the button below to deploy from the portal

Deploying from PowerShell

For details on how to install and configure Azure Powershell see [here].(https://azure.microsoft.com/en-us/documentation/articles/powershell-install-configure/)

Launch a PowerShell console

Ensure that you are in Resource Manager Mode


Switch-AzureMode AzureResourceManager

Change working folder to the folder containing this template


New-AzureResourceGroup -Name "<new resourcegroup name>" -Location "<new resourcegroup location>"  -TemplateParameterFile .\azuredeploy-parameters.json -TemplateFile .\azuredeploy.json

Template Parameters

When deploying from this template, you will be prompted for the parameters listed below.

Name Description
newStorageAccountNamePrefix Naming prefix for each new storage account created. Three storage accounts will be created using this string as a prefix for the name. 18-char max, lowercase alpha
storageAccountType Type of new Storage Accounts (Standard_LRS, Standard_GRS, Standard_RAGRS or Premium_LRS) to be created to store VM disks
vmNamePrefix Naming prefix for each VM name. 8-char max, lowercase alpha
sqlVMSize Size of the SQL VM instances to be created
sqlWitnessVMSize Size of the Witness VM instance to be created
sqlServerServiceAccountUserName Service account name for SQL Server services
sqlServerServiceAccountPassword Service account password for SQL Server services
virtualNetworkId Resource ID of the existing VNET. You can find the Resource ID for the VNET on the Properties blade of the VNET.
sqlSubnetName Name of the existing subnet in the existing VNET to which the SQL & Witness VMs should be deployed
domainName DNS domain name for existing Active Directory domain
adPDCVMName Computer name of the existing Primary AD domain controller & DNS server
primaryAdIpAddress IP address of the existing Primary AD domain controller & DNS server
secondaryAdIpAddress IP address of the existing Secondary AD domain controller & DNS server
sqlLBIPAddress IP address of ILB for the new SQL Server AlwaysOn listener to be created
adminUsername Name of an existing Admin user account for the Active Directory domain
adminPassword Password for the existing Admin user account for the Active Directory domain
location Region in which to deploy the new resources
dataBaseNames An array of database names. Each database will be created and added to the availability group
assetLocation Location of resources upon which this template is dependent, such as nested templates and DSC modules

Notable Variables

Name Description
sqlLBName Resource name of the SQL ILB
sqlAvailabilitySetName Name for Azure availability set for SQL and Witness VMs
lbFE Load balancer front-end pool name
lbBE Load balancer back-endpool name
sqlWitnessSharePath Shared folder name for Witness
windowsImagePublisher The name of the pulisher of the AD and Witness Image
windowsImageOffer The Offer Name for the Image used by AD and Witness VMs
windowsImageSKU The Image SKU for the AD and Witness Image
sqlImagePublisher The name of the pulisher of the SQL Image
sqlImageOffer The Offer Name for the Image used by SQL
sqlImageSKU The Image SKU for the SQL Image
windowsDiskSize The size of the VHD allocated for AD and Witness VMs Data Disk
sqlDiskSize The size of the VHD allocated for SQL VMs Data and Log Disks