PowerShell and DevOps Implementations

A few Linux guys I know are often talking about their continuous integration setups, which I have to say are impressive. Everything is automated. Effectively they use a combination of GitLab (local GitHub derivative) for version control and release, Jenkins for trapping master branch commits, building, testing, logging, and distribution, and Puppet for the actual configuration.

Would love to hear if anyone has implemented something for PowerShell. I’m trying to get my head round how I can do something like this, but in a heterogeneous Windows environment and with PS versions from 2.0 upwards.

Yep, but as far as I know, this is being done with PowerShell 4.0 and DSC. To support downlevel systems, you’d probably be using a third-party config management solution such as Chef or Puppet. (Chef’s Windows experience is going to be much better with PowerShell 4.0 and DSC, but it does have some functionality without them.)

As far as DSC goes, Stack Exchange used this first, and you can see some of their build script tooling over on https://github.com/PowerShellOrg/DSC . More recently, we’ve been adopting and modifying that same tooling at DevOpsGuys and our clients; you can see the latest changes in the development branch of that same GitHub repository. We also use Octopus Deploy for installing applications and DB schemas, after the DSC config has been sent out.

Our build pipeline currently involves GitHub for source control, TeamCity for CI, the DSC tooling in our build steps (plus whatever the applications themselves require), and a combination of a DSC pull server and Octopus Deploy to push the builds out to their target environments.

BTW, I recorded a video of our DSC demo environment for a client a few months ago, and it’s up on YouTube now. The details have changed a bit, but it’s still basically accurate. :slight_smile: https://www.youtube.com/watch?v=oOncxj96kic (I had no idea this would be made public when I recorded it, so don’t expect much production value.)

And understand that this is natively easier in Linux since more or less everything comes down to being a text file or a folder. Windows, being more API-oriented, is just naturally harder to automate - which is why PowerShell has been such a multi-year effort. Even Puppet is less capable on Windows, because it needs little modules to touch every possible API, and they don’t all exist yet. DSC is Windows’ step in that direction, and you could certainly use Git as a configuration repo and all that.

Thanks for the advice chaps, will look into these.