Deploying SQL Clusters with the PowerShell Deployment Toolkit (PDT)

There are a couple of steps required to deploy Failover Clustered SQL Servers using PDT. You cannot created a SQL Clustered environment directly using the VMCreator “Lab in a box” scenario where it creates your Active Directory domain from scratch. You need to break the process into several steps, because the Failover Cluster must exist before you can deploy SQL Server.

Step 1

  • Create a Variable.xml like you would for a full deployment. For this example, I will use a simple deployment of Service Manager.
  • Here is the Roles Section of the Variable.xml…

image

  • And here is the SQL Section for the cluster…

image

 

  • And here is the definition for the virtual machines.

image

  • Run VMCreator to create your new Active Directory domain controller virtual machine and all System Center role virtual machines.
  • When VMCreator indicates it has started the virtual machines.

image

  • Logon to DC1 and kill the PowerShell Deployment Toolkit PowerShell process window.

image

Step 2

  • You can do these steps while you wait for the role virtual machines to deploy and join the domain…
  • Create your Failover Cluster, in this example, it will be NODE1.Contoso.com and NODE2.Contoso.com. Define your cluster name (CLUSTER1). This is your Cluster Name Object (CNO)

image image

  • Create your network share or shares for your cluster drives, (or create cluster disks if you are using a SAN). I created them on my DC, as this is just a lab after all!

image

  • Very important to grant your SQL Service Account Full Control on the network share and NTFS permissions on the folder.

image

  • Also created a share that will serve as the Fileshare Witness for the cluster. Grant the Cluster CNO (CLUSTER1) full control.

image

  • Configure Cluster Quorum Settings and add your Fileshare Witness.

image

  • Pre-create your Virtual Computer Object (VCO) for your database cluster name, in this example, it will be SMDB1. This is explained in detail here.

image

  • Enable Advanced Features in ADUC

image

  • You need to grant the CNO (CLUSTER1) full control of the Virtual Computer Object (VCO) which is the virtual name you will give your database cluster. In this example, we will use a cluster virtual computer object name of (SMDB1).

image

  • Alternately, you could grant the CNO these permissions on the OU where servers are contained. This might be easier if you will be creating multiple VCO’s on the cluster.

image

Step 3

  • If not already, logon to DC1, start PowerShell as Administrator and switch to the C:\Temp folder.
  • Run ./Installer.ps1

 

To recap…

  1. Must run VMCreator to create your active directory domain and virtual machines. Stop it before it starts deploying your System Center 2012 roles.
  2. Must manually create your Failover Cluster.
  3. Must grant the SQL Service account full control to network shares
  4. Must grant the cluster CNO full control of the Cluster Fileshare Witness
  5. Must grant the Cluster Name Object (CNO) full control of the Virtual Computer Object (VCO)
  6. Restart the Installer.ps1 on the DC.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.