It’s been about a month since the first release of the SQL Server Self-Service Kit (SQLSSK), which provides System Center artifacts to automate deployment and self-service of SQL Server components.
As a sample solution, the SQLSSK supports deploying a database/instance on a new/shared standalone server, deploying a database/instance on a shared cluster, deploying a SQL Server-enabled environment of two virtual machines.
If you are not familiar with what the kit is and what it does, you can read all about it here.
The first release leveraged System Center 2012 SP1 components, including Virtual Machine Manager, Orchestrator, and optionally Service Manager for Self-Service. At the time, it felt natural to rely on the SP1 stack, since it’s what most of you are likely running in production today. Now, with System Center 2012 R2 being generally available since last week, some of you may soon want to achieve similar scenarios using new/updated technologies from the R2 wave, like Service Management Automation (SMA).
Well, fear not, we’re here to help! Today, I am happy to publish the SQL Server Self-Service Kit 2.0. I like to call this version the “SMA Edition”, since the deployment types from v1.0 are still present and are now executed with Service Management Automation (SMA) Runbooks. SMA is a new feature in System Center 2012 R2, and you can read all about it in this excellent post series from my peers Charles and Jim.
Also, this release includes instructions and scripts to enable the 2 remaining deployment types not covered in the first release: deploying a database/instance on a new cluster. This relies extensively on the work published by Kurt Scherer in this post, using the new shared VHD feature in Windows Server 2012 R2 and System Center 2012 R2. And, finally, some enhancements have been made to logging and to simplify configuration
Enjoy, and feel free to share your experience using this updated sample solution!
Note : Perhaps one of the main benefits of this v2.0 release is that you can easily compare how SMA Runbooks and Orchestrator Runbooks can be used to achieve the same scenarios. That does not mean you cannot use v1.0 with System Center 2012 R2. Be sure to review the section “What version of the SQL Server Self-Service Kit should I use?” below!
Download and installation instructions
The download is here, and updated installation/configuration follow in this post.
And the following blog post covers installation instructions, including how to enable the new clusters deployments , should you wish to do so:
Note : You will need Jim Britt’s excellent SMART for Runbook Import Export and Tool to import the Runbooks in your SMA install. The instructions cover this requirement.
Content and Overview
18 SMA Runbooks cover 9 different deployment scenarios:
4 “Shared” scenarios for standalone servers and clusters
2 “Dedicated” scenarios for standalone servers
2 “Dedicated” scenarios for clusters
1 “SQL Server-enabled environment” scenario
Here is a schema explaining how everything fits together:
At step 1, Runbooks are being executed from the SMA administration interface, which you can access through the Windows Azure Pack management portal. Runbooks could also be executed via PowerShell.
Launching a Runbook from the SMA interface looks like this (this example would deploy a new named instance on a shared cluster)
Launching the same Runbook through PowerShell would look like this (notice the way you pass parameters):
Note : In v1.0 of the SQLSSK, an optional management pack was provided for the Service Manager service catalog. This time, since the main focus of this first iteration of the SQLSSK for System Center 2012 R2 is to showcase deployments through SMA, no specific front end is provided. The solution is flexible enough to work with the Windows Azure Pack portal (stay tuned, we are going to publish some portal customization examples very soon) or with your own portal/process calling the SMA Runbooks.
At step 2, SMA Runbooks do all the magic of automation, calling the right System Center artifacts depending on the deployment type. These can be one or a combination of the following : Virtual Machine Manager service template, SQL Server unattended installation scripts, PowerShell/CMD scripts. The log shows the progress of our example installation, going through 4 typical steps : placement, deployment, delegation, notification.
At Step 3, the user is notified of the result of the deployment, explaining the location of the database/instance/environment that was deployed and delegated:
Of course, you could customize the email based on new services, or services being soon decommissioned in your organization.
Note : When it deploys Virtual Machines, the SQLSSK does not surface them into the “Virtual Machines” part of the WAP tenant portal : Rather, notifications are being sent at the SQL Server component level, since access is being granted at the database or instance level. In the next iteration of the SQLSSK, you can expect tighter integration with the Windows Azure Pack portal and features (including leveraging the SQL Server databases provisioning built-in feature).
Requirements for SQL Server Self-Service Kit v2.0 – SMA Edition
- From a System Center perspective, the following System Center 2012 R2 components are needed:
- Service Management Automation (SMA) needs to be installed.
- Virtual Machine Manager is also used to deploy new virtual machines and services, when the corresponding deployment type is used.
- Windows Azure Pack (WAP) will also be needed, so you can easily work with SMA Runbooks (the SMA management interface is part of the WAP management portal).
- Windows Server 2012 R2 hosts are needed if you want to leverage the instructions to enable deployment of NEW clusters for databases/instances – since this deployment type specifically relies on the new Shared VHD feature.
What version of the SQL Server Self-Service Kit should I use?
Short answer would be : If you are starting to work with SMA or moving to SMA, using SQLSSK v2.0 (a.k.a. SMA Edition) with System Center 2012 R2 will make more sense. If you are an Orchestrator user, using SQLSSK v1.0 with either System Center 2012 SP1 or R2 will also work.
Apart from the new cluster scenarios, the same deployment types are covered by both versions, using different automation technologies. We wanted to make sure you have sample templates, scripts and Runbooks leveraging features from each System Center version.
The two main dependencies SQLSSK v2.0 has on System Center 2012 R2 are:
- Service Management Automation (SMA)
- The instructions to deploy new clusters, which require new features in Virtual Machine Manager
So, for example, you could even use SQLSSK v1.0 on System Center 2012 R2 and customize it to add the new clusters deployments from SQLSSK v2.0.
Confused? Here is a full breakdown on the compatibility matrix:
- v1.0 provides an optional Service Manager management pack. This works with System Center 2012 SP1 Service Manager or System Center 2012 R2 Service Manager.
- v2.0 does not provide a specific GUI, and you can use the one you want, leveraging how integration was showcased in v1.0
- v1.0 uses Orchestrator Runbooks. This works with System Center 2012 SP1 Orchestrator or System Center 2012 R2 Orchestrator .
- v2.0 uses Runbooks based on SMA, part of System Center 2012 R2.
- VMM service template for standalone VMs:
- v1.0 and v2.0 ship the same service template, which can work with System Center 2012 SP1 Virtual Machine Manager or System Center 2012 R2 Virtual Machine Manager.
- VMM service template for new clusters:
- v1.0 did not support this scenario
- v2.0 provides instructions for this scenario, which requires System Center 2012 R2 Virtual Machine Manager
Some tips and tricks worth highlighting
The last section from this blog post from the v1.0 release highlights some of the hurdles/tips/tricks seen during creation of this solution, and how they were solved. These learnings still apply to how version 2.0 works, with the exception of ”CredSSP” authentication : It is not needed anymore to enable the CredSSP server role on target servers, as the Runbooks do that for you. You might want to disable this in the script, should you wish to manage CredSSP on your own.