Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News PowerShell Desired State Configuration Takes on Linux

PowerShell Desired State Configuration Takes on Linux

This item in japanese

Microsoft continues to invest in PowerShell, its command-line shell and associated scripting language. PowerShell Desired State Configuration (DSC) can now manage Linux boxes.

PowerShell DSC for Linux was announced at the last TechEd North America. DSC for Linux's first resource providers are the basic building blocks for infrastructure management, following the same path that DSC for Windows treaded. As reported by the PowerShell team's blog, they are:

  • nxFile – manage files and directory state
  • nxScript – runs script blocks on target nodes
  • nxUser – manages Linux users
  • nxGroup – manages Linux groups
  • nxService – manages Linux services (System-V, Upstart, SystemD)

DSC for Linux uses the Open Management Infrastructure (OMI), open-sourced by Microsoft in 2012, as a Common Information Model (CIM) server. Microsoft is positioning PowerShell DSC as a platform on which tool vendors build their products, so it's not in direct competition with tools like Puppet or Chef. Indeed, several tool vendors are working with Microsoft to support PowerShell DSC, as demonstrated (check around minute 51) by Julian C. Dunn, from Chef. Julian shows Chef's cookbooks using Powershell DSC resources, directly embedded in Chef's DSL.

PowerShell DSC Architecture

PowerShell DSC Architecture (Credits: Hemant Mahawar and Narayanan Lakshmaman)

Kris Bash, Senior Program Manager in the Microsoft Open Source Technology Center, wrote a step-by-step guide on how to build, install and use DSC for Linux on a CentOS 6 system, although Kris stated that it should also work on Debian/Ubuntu.

Although DSC for Windows supports both pull and push modes, DSC for Linux's current release only supports the simpler push mode. PowerShell DSC is available as a Community Technology Preview (CTP) and is hosted on GitHub.

InfoQ spoke with Kris to know more about this initiative.

InfoQ: What Linux distributions are supported by PowerShell DSC for Linux?

When DSC for Linux reaches general availability, we will support Red Hat Enterprise Linux, SUSE Linux Enterprise Server, CentOS, Ubuntu Server, Oracle Linux and Debian – the same enterprise distros supported for running with Hyper-V and managing with System Center. We will continue to release the source as we add features, so that DSC can be modified and built to support other operating systems.

InfoQ: Do you intend to release additional resources in the same fashion that you've been doing with Windows? Can you shed a light on what resources are in the pipeline?

Yes, we do have plans to release additional resources. Firstly, we will complete the base set of “built-in” resources, and then move on to other common configuration scenarios, with Linux networking configuration being a likely target. We are also working on guidance for resource development for Linux so that others can build and share their own custom resources.

InfoQ: Why did you choose to host DSC For Linux on GitHub?

We believe that GitHub is familiar to most Linux administrators, and we have a history of releasing Linux-oriented features on GitHub, such as the Windows Azure Linux Agent and Beanspy (for monitoring of JEE application servers).

InfoQ: Do you plan to accept contributions?

We are currently evaluating this topic. In the meantime, we would ask that early adopters report any issues or requests as Issues on the GitHub repo.

Rate this Article