Do one thing well

A good DSC resource will do one thing, and it will do that one thing well. When crafting your DSC resources, you should choose the smallest tasks possible to tackle. For example, consider SQL Server. A DSC resource could be written to install and configure a SQL Server that, even if it got very complicated, could manage both installation and configuration in one resource. However, installing SQL Server is not a simple task when you take into account that it can be installed in a cluster or as part of a recovery set or a great many other options. How do you handle the long list of options to install SQL Server compared to the equally long list of configuration settings?

Consider the configuration of SQL Server. It is likely that the configuration options of SQL Server will change across versions, but the installation steps won't differ as much. Differing configuration steps or options can be handled in smaller DSC resources, reducing the amount of work each has to do while enabling flexibility of choosing when to execute.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset