How to Scale DSC - Desired State Configuration in PowerShell
This series of posts will cover my ideas of how to scale DSC beyond just a few servers or VM's.
Make the servers cattle, not pets.
But when you have to scale this DevOps process to 10's, 100's, or 1000's of servers, writing code for each server and configuration does not scale.
Data Driven
PowerShell can help generate the DSC code necessary to scale and make DSC data driven.
Why Data Driven?
A common deployment scenario is you want to create a small scale SharePoint farm of one SQL Server, one front end web server, and one App server.
The server for SQL has to be created and configured first, then web and App.
Each server type has different requirement for creation and configuration.
Using DSC manually, you have to remember the order of deployment and many attributes for each server type.
DSCDB can treat this farm as a collection (example Collection_SPsmall). Multiple collections can be created or cloned into a collection library.
It can know in what order the servers have to be deployed, and almost all the attributes that need to be passed to DSC to create MOFs including credentials.
In order to deploy using DSCDB, you only need the name of the server set (example SPsmall_1) and optionally a few additional parameters. The server set uses the collection (Collection_SPsmall) to know the farm configuration.
The deployment can then run either sequentially or in parallel.
The Scaling DSC Series
A DSCDB is a simple set of tables in a database that is used to capture attributes about each server that is needed for deployment.
#2 Populating a DSCDB
There are four ways to populate the database:
- Importing an Excel file of server names and attributes
- Importing a text file of server names
- Importing server names from AD - Active Directory
- Manually update the SQL tables
#3 Deploying using DSCDB
This post will talk about how to deploy servers in a automated fashion using the DSCDB.
#4 Future Features for DSCDB
This post will discuss potential features for future releases.
Conclusion
This database is not a CMDB but a database specifically designed for deployment using DSC.
All the source code and documentation for this series will be in Github.