Uncategorized

From my experience in IT, mainly in what we call IT operations or more specifically platform Engineering, there’s an emphasis on some noble design principles such as reliability, resiliency, high availability, monitoring, MTTR, MTBF and so on, but something is missing.

None of them should be ignored, obviously, but the capacity for change is often overlooked. I’m convinced it should be a core design principle, re-evaluated for each change, especially for automation architecture.

Read Full Article

Another common challenge with DSC, is how to compose DSC configurations.

People have seen the trick of having a Configuration, and the following code within:


Configuration MyDSCConfig {
Node $ConfigurationData.AllNodes.nodename {
if($Node.roles -contains 'MyRole') {
# do stuff here, like calling DSC Resources
MyCompositeResource StuffForMyRole {
#
}
}
if($Node.roles -contains 'MyOtherRole') {
MyOtherResource OtherStuff {
#
}
}
}
}

view raw

MyDscConfig.ps1

hosted with ❤ by GitHub

This is a good way to get started and works well for small-ish configurations, but it gets out of hand pretty quickly, as it’s hard to read all the if statements and their content. Some variant of this are using Where clauses around the Node expression.

Read Full Article

Here’s a quick function to allow you something close to splatting with DSC resources:


function Get-DscSplattedResource {
[CmdletBinding()]
Param(
[String]
$ResourceName,
[String]
$ExecutionName,
[hashtable]
$Properties
)
$stringBuilder = [System.Text.StringBuilder]::new()
$null = $stringBuilder.AppendLine("Param([hashtable]`$Parameters)")
$null = $stringBuilder.AppendLine(" $ResourceName $ExecutionName { ")
foreach($PropertyName in $Properties.keys) {
$null = $stringBuilder.AppendLine("$PropertyName = `$(`$Parameters['$PropertyName'])")
}
$null = $stringBuilder.AppendLine("}")
Write-Debug ("Generated Resource Block = {0}" -f $stringBuilder.ToString())
[scriptblock]::Create($stringBuilder.ToString()).Invoke($Properties)
}
Set-Alias Name x Value Get-DscSplattedResource

Here’s why you may need it.

Read Full Article

I really wanted to play with the Azure Stack, but as a Cloud automation consultant, I don’t have access to a lot of hardware. Most of what I deal with is already in the Cloud, so how do you run one? Moreover, the hardware requirements are high, because the technical preview is only installable on a single host, colocating all its components for now.
WP_20160224_10_04_27_Pro

Read Full Article

The idea behind this post has been started with a pertinent note from Steve Murawski during #DSCCamp, and ensuing discussions: The preference of an Iterative process against Incremental, and why the difference is important.

As LaoZi said, “a journey of a thousand miles begins with a single step“, whether it’s about knowledge, career, project, or this blog…

Read Full Article