I decided to rebuild my home lab Plex server using Kubernetes and a great Helm chart (https://github.com/munnerz/kube-plex) which dispatches transcode jobs as pods on the Kubernetes cluster. I wanted to do this in a fully automated fashion so that I could destroy and rebuild the whole infrastructure with one command thus saving me precious pennies and preventing any snowflake environments forming. I used Terraform to build the Azure Kubernetes Service (AKS) and all was going well until I tried integrating the Terraform Helm resources into my Terraform code.
Ever found yourself needing to decrypt a secure string knowing that there are a couple of static methods you need to use but can never remember what they are? After a quick Google, you’ll probably stumble upon something similar to this: $BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecurePassword) $UnsecurePassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR) Whilst this works fine, it’s way easier to remember (Tab complete is your friend) that a PSCredential object has the ability to show the password by using GetNetworkCredential().
Myself and a colleague were recently given the task of end-to-end automation of Sytem Center Service Manager using PowerShell DSC. This needed to include prerequisites, installation of the product, and any post configuration. If any of you are familiar with Service Manager, you’ll know that one of the steps is to register Service Manager to the data warehouse. Luckily, there’s a PowerShell cmdlet for that which should make the task a breeze: Register-SCDWSource
I’ve been using vagrant to build up labs for my work recently and it’s an awesome product. One small downside is the sheer amount of space that the new VMs were taking up on my laptop SSD (I’d been testing linked clones and hadn’t cleaned up after myself). As my whole lab build was in code, I felt rather pleased with myself that I could just bin the whole environment including any VMs and then just spin it up again afterwards.
I’m absolutely loving PowerShell DSC at the moment and we’re using it heavily for the automation and configuration of various products. One of the most recent tasks was to create a fully parameterised SQL build function for reusability across the company. All was going swimmingly until I ran into the following error when attempting to run my freshly parameterised DSC function: After a little bit of digging, I stumbled across a great blog post by Jacob Benson which had some nice troubleshooting steps (Link here).
A task that I’ve been working on recently is the automation of VM builds and post configuration using PowerShell and the PowerCLI module (Unfortunately we don’t have a configuration management tool to make our lives easier at the moment). Part of the post-build configuration is to run a bunch of commands on the newly built VMs. I could have used PowerCLI’s Invoke-VMScript command to achieve this however as all of the VMs were joining the domain and tools on some of the VM templates were out of date, I used PowerShell’s Invoke-Command.
Recently, I’ve been thinking about how I can use DevOps tools and processes to improve the way I do things and this has led me to completely revamp my blog. My existing Wordpress blog has now been replaced with a shiny new blog using Hugo - a static website engine, hosted on Github Pages and automated using the continuous integration tool AppVeyor. In this article, I’m going to go through a step-by-step guide on how I set everything up.