Introduction Welcome! This is the start of a series of posts where I am going to document (and probably update) my personal AWS setup. I spun up my first Amazon EC2 instance back in 2010, and, since then, grown my setup to use 8 different AWS accounts, mostly automated with Terraform. This series will cover all choices & tradeoffs I made, and also document the Terraform code I use to set it all up.
I’ve been neglecting my blog, and decided it is time to start writing again. So like any good software developer, I don’t actually write a post, I start by tinkering with my blog setup. I initially ran it as a Jekyll generated static site on GitHub using GitHub Pages, and then as part of a live-stream, moved it to use AWS Amplify to host it in on of my many AWS accounts.

Remapping the Home and End keys on OSX

- [2 mins read]
The Problem As I was pasting something into Chrome this morning, I, once again, expected the Home key to take me to the start of the URL. It. Did. Not. So I decided that I won’t be able to change this ingrained behaviour and need to fix it. First Google hit led me to a post by Damian Guard that I will be pasting below to keep as notes for myself.

Yak Shaving - Makefiles

- [9 mins read]
The Problem I woke up this morning wanting to start on a long post about Terraform and how I ended up with the structure shown in my repo. I recently reinstalled my Macbook using Netatalk for a timemachine , and as I fired up my vagrant image, it started to pull down the Ubuntu box first and then started configuring it. This is very useful, but it is slow. And it broke.
I am currently unable to upgrade to the latest version of Slack due to this bug. That combined with my user profile confusion (originally I set up using a US account, then changed to an South African one) that causes requests to update to versions of iPhoto which aren’t available in my region made me decide that it is time for a reformat. The Problem To create a full backup to my raid’ed server, I need to set up netatalk.
I’ve been working with multiple AWS accounts for the last few months between various organisations. Logging into each one when I need to make a change quickly became tedious and slow. Each environment (dev, test, staging, production) has their own AWS account. The need to log in stems from taming the infrastructure with Terraform for systems that have been set up by hand and dealing with the discrepancies between them, so I tend to jump between dev and staging very often.
I’ve been working on a pair of Centos servers using GluserFS for a volume that is shared by various other servers. Each time the server reboots, I had to log in and manually start the service. Turns out this is due to the networking no yet being started when the glusterd service starts. I found this post with the solution: Execute systemctl enable NetworkManager-wait-online Add the following to /lib/systemd/system/crond.service under [Unit]: Requires=network.

Upgrading a Chef cookbook with Berkshelf

- [2 mins read]
I just upgraded my chef-clients via the omnibus_updater cookbook when things started breaking: 192.168.5.5 [2016-02-18T21:41:13+02:00] WARN: Current apt_package[apt-transport-https]: /var/chef/cache/cookbooks/datadog/recipes/repository.rb:24:in `from_file' 192.168.5.5 192.168.5.5 ================================================================================ 192.168.5.5 Recipe Compile Error in /var/chef/cache/cookbooks/chef-wrapper-omnibus-updater/recipes/default.rb 192.168.5.5 ================================================================================ 192.168.5.5 192.168.5.5 NameError 192.168.5.5 --------- 192.168.5.5 uninitialized constant Chef::REST 192.168.5.5 192.168.5.5 Cookbook Trace: 192.168.5.5 --------------- 192.168.5.5 /var/chef/cache/cookbooks/omnibus_updater/libraries/omnitrucker.rb:84:in `url' 192.168.5.5 /var/chef/cache/cookbooks/omnibus_updater/recipes/downloader.rb:27:in `from_file' 192.168.5.5 /var/chef/cache/cookbooks/omnibus_updater/recipes/default.rb:25:in `from_file' 192.168.5.5 /var/chef/cache/cookbooks/chef-wrapper-omnibus-updater/recipes/default.rb:27:in `from_file' 192.168.5.5 192.168.5.5 Relevant File Content: 192.168.5.5 ---------------------- 192.168.5.5 /var/chef/cache/cookbooks/omnibus_updater/libraries/omnitrucker.rb: 192.168.5.5 192.168.5.5 77: if(url_or_node.

Parameterizing Web.config

- [6 mins read]
Most people would have experienced the issue of setting values in web.config for a project on different environments, i.e. the connection string for the database. My first attempt at resolving this was to simply create multiple configurations and build the appropriate one per environment. This has multiple issues: you are including sensitive information in your build artifact, creating different builds for the same version (to allow different values) and tightly coupling your build process to your environment values.

NTP on AWS

- [2 mins read]
Ran into an issue where a Linux instance running on AWS in a private subnet was not updating the system time via NTP. First check was for the config file, but it had a list of servers, both inside and 1 outside AWS: server 0.amazon.pool.ntp.org server 0.us.pool.ntp.org server 1.amazon.pool.ntp.org server 2.amazon.pool.ntp.org From this post (I would like to link to it, but it has been 8.5 years since I wrote this, and only found the missing link today on 2024/05/29) I tried both ntpdate and ntpdate-debian with the following results: