Shatterdome

Posted on Apr 4, 2018 3 mins read


Overview

Shatterdome is my attempt at teaching how to build a platform tool.

In the course of my career I've run into more than a few companies that are working on building their own internal platform tooling. In some cases this involves using terraform, and in those cases it's very clear that although terraform is a great tool, it has certain gaps that can't be addressed by it's particular methodology.

Terraform is a relativliy new player in the space of infrastructure orchistration and management. Overall it's a great tool for general use. When you use tf you have the advantage of locking your infrastructure developers into a very well defined declaritave space. This is hugely benificial when you have platform teams that either don't know much about how the cloud works, or they enjoy the security of knowing they have "bumpers" which keep them safe.

This body of work is aimed at breaking out of the mindset of the restrictive declarative space. Here we're going to explore how to use CloudFormation and ruby to create the least amount of code to create business value quickly. The goal here is to create something quick and slick that our customers ( usually internal developers ) can start using quickly.

It's entirely possible to take the idea of what's happening here and translate it to tf, and I highly encourage you to look into that. TF is like buying beer off the shelf, where as what we're doing here is more like the home-brewed craft beer experience. The outcome of this work will be a gem that we can package and ship to our customers so that they can easially and safely deploy and interact with the system that we've built. We want our customers to be able to integrate this work into their CI/CD workflows with as little effort on their part as possible.

I want to clearly state that this work isn't for everyone. If you're just looking to belt out some quick and dirty infrastructure bits to get people off your ass, then tf is your best bet. However, if you're looking to create something that is really outside of the box and absolutely a level above the average, this is probably going to be very fun for you. After all, some people long to craft the perfect beer, and others just want to get their buzz on.

Let's get crafting.

Workspace

We'll start this work by setting up a workspace to develop our platform. Most of this work has been done in a project that I'm codenaming Shatterdome after my favorite movies Pacfiic Rim.

Eventually we're going to have a bin file that we can execute on the command line. We'll install this bin via the gem package. You can do the same kind of thing with python or just about any other language.

The bin is going to follow a command pattern in the form of noun verb. For example:

krogebry@ubuntu-secure:~$ shatterdome cluster create

In this case the noun is cluster and the verb is create. We'll have two nouns to start with, but we might expand beyond that later.

  1. cluster: this is essentially the ECS cluster, with associated ASG, and CW triggers.
  2. service: a service is a collection of things that we're going to run on a cluster.

Cluster

  • AutoScale group
  • IAM policies
  • ECS cluster

Service

  • ECS service
  • ECS tasks
  • ALB or NLB
 cloudformation

Share This Post