One of the easiest ways of building resilience into a system running in AWS is to use an autoscaling group. Generally speaking, I use one for any service which is required to self-heal - even when aiming to maintain a steady number of instances, as is desirable when running servers for Consul and Nomad, as well as a whole host of other clustered systems. Unhealthy instances can simply be replaced, usually without operator intervention, and launch configurations can be used to simplify upgrading clustered software one instance at a time.
[Read More]Cloud-Init Configuration Merging
Part of the boot process for Linux instances across many cloud systems (including AWS and OpenStack) is the Cloud-Init system, part of the Ubuntu project. It describes itself as “the defacto multi-distribution package that handles early initialization of a cloud instance”. It has a wide range of capabilities, and is an important yet under-used piece of infrastructure.
[Read More]User-level Git Exclusions
I recently adopted JetBrains IntelliJ IDEA IDE with the rapidly-improving Go plugin for working on Go code (of course using IdeaVim!). I’ll post more about using IntelliJ as an IDE for Go in future (it recently grew support for debugging using Delve), but the only downside for me so far is that it generates a directory in each project you work in to contain caches and so forth.
[Read More]Windows AMIs Without The Tears
Twice in the last couple of weeks I’ve helped automate build infrastructure in AWS, first for Event Store and then secondly for another company. Both times we got 90% of the way there using great tools like Terraform and Packer, and fell at the last hurdle: how do you build Windows images in an automated fashion (i.e. no point-and-click)?
[Read More]Generating self-signed certificates with OpenSSL
I occasionally need to generate self-signed certificates using OpenSSL and convert them into a format that Windows can understand. I have to look this up every time, so I’m putting it here in order that I can look in a known place!
[Read More]Reading .NET BinaryWriter serialized strings from Go
I recently had the need (for a side project) to be able to read a file written
from a .NET application using the BinaryWriter
class from an application
written using Go. The MSDN documentation was somewhat vague on the format in
which strings were written, but it turns out to be a LEB128 encoded length
prefix and then the UTF8 bytes which make up the string.
Event Sourcing in Go
As one of the contributors to Event Store, it should probably not be surprising that sooner or later I’m going to get around to figuring out nice patterns for implementing Event Sourcing in whatever languages I’m working in!
[Read More]Moving to Go - What I Wish I'd Known
Quite a few people I know are expressing interest in learning Go, so I decided to put down a couple of notes about my experience after having had the same conversation a few times over. None of the points are particularly original and are mostly here so I can point people at one place when they ask me about it! Your mileage may vary on any of this stuff and it’s in no particular order!
[Read More]