SMA & DSC a winning team!

SMA (Service Management Automation) & DSC (Desired State Configuration) are part of Microsoft’s arsenal for deploying and configuring Microsoft Cloud Infrastructure.

Both are based on PowerShell so that’s a great thing. I have a general idea what DSC is all about (thanks to the PowerShell Summit). I wasn’t familiar with SMA (then again I do know something about Orchestrator, I’ll explain later) until TechEd 2014 @Barcelona. I like where SMA is heading. Both are exciting and new. But when, and more importantly, where do you use them?

So when do you use SMA and when do you use DSC?
Good question. The way the PowerShell team explained it is this: “Everything that needs to be configured inside a VM think DSC. When scripting at a VM think SMA”

DSC
DSC deals with configurations declaratively. Traditional scripts are imperative by design. Think SQL syntax and you get an idea what declarative is. DSC’s strength is preventing configuration drift. Seriously, The DSC Book does a way better job at explaining DSC.

While I understand what the benefits are of DSC, creating and maintaining a DSC Resource is quite the challenge! And at the speed Microsoft is bringing DSC Resources to the masses, the Wave is starting to feel more like a Tsunami…

The latest wave, has a 53% increase! I’ll say that again, 53%… I’ve been chipping away diligently at DSC and I’ve been working on a DSC Resource for ADGroup. It took some time, because I wanted to understand what DSC is up to under the hood. I worked through the DSC Resource book and lots of blogs. The book “Windows PowerShell Desired State Configuration Revealed” also helped a great deal. The best way to learn DSC is by doing. But be prepared for the challenges ahead… I’ll be sure to blog about my adventures creating my very first DSC Resource.

Seeing the speed the Waves are coming you might ask yourself, is it worth creating your own DSC Resource? Learning how and when to use DSC is challenging enough already! The transition to DSC isn’t going to be overnight, but at the same time you can’t really afford not to look into it. So yes, by all means look into it. Don’t be too overwhelmed by the amount of DSC Resources available. My first time opening a DSC Resource module that wasn’t my forte, I kinda felt like a deer caught in the headlights. Sure with a little (ok, a lot 😉 ) effort I could figure out what’s going on. But creating , even using this DSC Resource? Yeah… Imma gonna pass…

Look into DSC Resources within your chosen technology. Having PowerShell skills won’t make you an expert in all of the DSC Resources available, you still need a basic understanding of what that specific DSC Resource will resolve.

SMA
SMA is the runner-up for Orchestrator (formerly known as Opalis). I recently did a project that relied heavily on Orchestrator for workflow automation and I remembered thinking “why aren’t we using PowerShell workflow?” Well with SMA we most certainly are! SMA’s automation engine is based on PowerShell workflows. Nice! In hindsight, SMA would have been a better fit for the project I did, seeing that the project members had PowerShell skill and no Orchestrator skills. For those that are worried that their Runbooks will be obsolete soon, don’t worry, that isn’t going to happen any time soon. Microsoft’s advice is “if you’re new to Automation and thinking about using Orchestrator and you have PowerShell skills, start with SMA. If you’re heavily invested in Orchestrator we got you covered, keep on using it. In time, there will be conversion tools…”

The challenge with SMA isn’t PowerShell per se, but the process that needs to be automated. There is no right or wrong way, just prefered way. The process has to be reproducible, ideally without human intervention. A sure way to stagnate your automation endeavor, is to try automate while reinventing or at times, inventing the process as you go along. If your process sucks, automation won’t change that, it’ll still suck, only faster. I haven’t looked into SMA yet, but I’ve heard great things from a colleague of mine who has.

Well that’s it for now. Is there an order to start learning SMA or DSC? I haven’t looked into SMA yet. DSC is readily available. Try using the Built In DSC Resources. Download the latest DSC Resource Wave. Open the DSC Resource modules that fall within your chosen technology. Get ready to be awed by the scripting talent of the PowerShell team! Oh and… don’t forget to have fun along the way… 🙂

Ain’t PowerShell grand! 🙂

Ttyl,

Urv

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s