Search code examples
powershelldsc

Deploying web frontend, service backend and SQL Server to VM via DSC?


I've got a new project in VS and I'm trying to "do the right thing" by deploying a web client, a web service and a database backend to a VM using DSC. I'm new to DSC, but my understanding is that I want to have DSC resources, i.e. a VM, an IIS instance, a SQL Server instance, and then make sure the latest version of my frontend, my backend and my database schema are all deployed. This seems like almost the smallest sample of what I'd actually want to do with DSC, but I'll be damned if I can find anything even close to an end-to-end sample. Pointers? Thanks!


Solution

  • You're in for a bumpy ride! DSC is pretty new. Official documentation is severely lacking. Best practices are practically non-existent.

    For your specific situation, have you decided on push vs. pull? Pull is what most people are looking to do but it's way simpler to get acquainted with DSC using push. There are a lot of gotchas that aren't very clear when using Pull, and you'll have to deploy a pull server to test them.

    Complicating this is that most of the things you want to deploy don't have built-in resources for them yet. A lot of those resources are provided in the DSC Resource Kit.

    Although this is provided by the Microsoft team it's still not included with the base product and has to be treated like any other custom resource you wrote yourself, and this gets even more complex with a pull server because there specific requirements for having custom resources distributed through your pull server.

    I say all of this as someone who is a few weeks into getting started with DSC. I have my pull server deployed, I've written custom and compound resources, I am able to distribute them from the pull server. I'm still working out the workflow for my team.

    There's a lot to it and I'm super excited about it, but the resources available are very fragmented and not comprehensive. There's a lot of ambiguity that I'm having to resolve on my own.

    Resources

    Ultimately, you should get started with it and post more specific questions about the snags you're running into if you can't work them out from the resources that are out there at the moment. Start with a pushed config that only changes a little bit, maybe creates a file or sets a registry entry, then go from there.

    As you go along you'll have more specific questions that are probably better suited for a site like this.

    Hope this helps; good luck!