Linux DSC

Linux DSC

DSC or Desired State Configuration was a new way of defining Powershell scripts to configure machines as of Powershell 4.0. I say configure machines what I really mean is configure windows based machines that have at least Windows Management Framework 4.0 installed. What if you have some parts of your environment on Linux? Well then you have to use another set of tools to describe this environment and deploy. At least if you were using Microsoft's own tooling. (I am aware of and use Chef and Puppet but this was about trying to see how far I could take DSC). 

In a recent project I had I hit this very problem part of the application infrastructure specifically the ESB was to be hosting in Linux. I had a look at a couple of tools out there but I then noticed that there was a project on git hub that had been launched relatively quietly: https://github.com/MSFTOSSMgmt/WPSDSCLinux. It was rather sparsely documented, however I decided to find out a little bit more about it and took this project squarely off at a tangent. The initial problem was how to install this package, now I do understand how package managers work, and the number of them that are available on the Linux ecosystem astounds me. However the number of packages and the distribution variants can cause no end of bother to a lowly windows user like my self. Thankfully some one had done most of the hard work for me, Michael Greene put together a great step by step for how to install DSC. Also on top of that the post on installing and configuring DSC really help me get connected.

The steps go me up and running an initially I was very excited, especially when I saw that docker had jumped on this band wagon too and have released a tutorial on how to control docker containers on a linux host via DSC. I could manage and control all my containers (if you don't know what docker is I have a post coming on that soon), which made my life quite simple. 

However once I got to this point things started to get a lot more tricky:
- Security: Whilst having root access isn't a big deal in a test system having a user distributed with root access just so I can connect to DSC seems crazy!
- Authentication: Similar issue to above Ionly seemed to create the CIM session using password authentication not Certificate. Again this is less than ideal
- Compatibility: For some of our deployment tooling we use Release Management. However I couldn't get this to connect to a linux DSC host.

In the end I gave up on this approach, lookat the configuration that was required I believe that current Chef is the mature route to take for these cross platform issues now.  

About the author

John Nicholson

John Nicholson

Director

Experienced Developer / Architect with a background in consultancy working with public and private sector client including Local Government Ombudsman, Legal Ombudsman, Virgin Atlantic and Willis Group

Microsoft Certified TrainerALMMicrosoft Certified Solutions Developer: Web ApplicationsProfessional Scrum Master

Read More