Infrastructure


Templates

How to and other quirks

At work and my spare time, I concentrate and spend a lot of time to minimal amount of work, that entitles me to be able to pick up my projects later and I know exactly how it works. It also gives me the added benefit that it is very easy to teach my colleagues and friends.



Automation with Amazon

CloudFormation

I love working with CloudFormation and automations, lastly I've created a generic Gitlab Runner cloudformation stack, which takes 3-4 input paremeters.

What is needed if you have gitlab at work, and you cannot have Shared Runners, you create a CloudFormation stack using Amazon Linux and CFN-Bootstrap helpers

Input parameters:

  • Gitlab URL
  • Gitlab Group Runner Token
  • Tags
  • Size of the EC2 Instance

A bit of magic using my Makefile

make cf-validate cf-package cf-deploy

I've included AutoScaling policies to add more gitlab runners when the average CPU is above 60 percent, also Scale Out and Scale In policies based on time. Still haven't figured out how to have dynamic scaled for this use case where you have some developers to work late at night, then you want a machine to be able to build, but maybe that is solvable by them installing a Gitlab Runner on their own machine?