PowerShell and DevOps Implementations

This topic contains 4 replies, has 3 voices, and was last updated by Profile photo of Tim Pringle Tim Pringle 1 year, 10 months ago.

  • Author
    Posts
  • #22327
    Profile photo of Tim Pringle
    Tim Pringle
    Participant

    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.

  • #22330
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    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.

  • #22331
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    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. 🙂 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.)

  • #22332
    Profile photo of Don Jones
    Don Jones
    Keymaster

    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.

  • #22336
    Profile photo of Tim Pringle
    Tim Pringle
    Participant

    Thanks for the advice chaps, will look into these.

You must be logged in to reply to this topic.