Creating a Resilient Consul Cluster for Docker Microservice Discovery with Terraform and AWS

In this article I'm going to show you how to create a resilient Consul cluster, using Terraform and AWS. We can use this cluster for microservice discovery and management. No prior knowledge of the technologies or patterns is required! The final code is at github.com/dwmkerr/terraform-consul-cluster. Note that it has evolved somewhat since the time of writing, see the Appendices at the end of the article for details. Consul, Terraform & AWS Consul is a technology which enables Service Discovery1, a pattern which allows services to locate each other via a central authority.
Read more

Using Slack for Server Development

I recently found a surprisingly helpful approach for server-side development which uses Slack in a creative way. The Problem The scenario can be roughly simplified to this: We are building a mobile app and application server. This will take data from a user, transform it and then pass it to the enterprise system processing. The problem is that the enterprise system doesn't exist yet! Now this is not too much of a challenge, the first thing we did was build a simple mock of the enterprise system in Node.
Read more

Simple Continuous Integration for Docker Images

In this article I'm going to demonstrate a few tips and tricks which can make your life easier when you are building or maintaining Dockerfiles. The need for a Build Pipeline Do we really need any kind of continuous integration or build pipeline for Dockerfiles? There will be cases when the answer is no. However, if the answer to any of the following questions is ‘yes’, it might be worth considering:
Read more

Run Amazon DynamoDB locally with Docker

tl;dr: Run DynamoDB locally using Docker: docker run -d -p 8000:8000 dwmkerr/dynamodb Try it out by opening the shell, localhost:8000/shell: That's all there is to it! DynamoDB Amazon DynamoDB is a NoSQL database-as-a-service, which provides a flexible and convenient repository for your services. Building applications which use DynamoDB is straightforward, there are APIs and clients for many languages and platforms. One common requirement is to be able to run a local version of DynamoDB, for testing and development purposes.
Read more

Effective Node.js Debugging

If you are interested in improving your Node.js debugging skills, then check out my talk at the recent JSChannel 2016 conference in Bangalore: Comments and observations are always welcome!

Testing the Docker for Mac Beta

I've finally had a chance to install the new Docker for Mac Beta and give it a whirl. In this article I'm going to talk a bit about how Docker works, the challenges of running Docker on a Mac or Windows and how the new Beta helps. Below: The welcome message for the new Docker for Mac app So What is Docker for Mac? If you don't know what Docker is, check out my article Learn Docker by Building a Microservice or the lovely What is Docker page from the docs.
Read more

Is it worth persevering with Golang?

I recently decided to try out the Go Programming Language, by building a little project called google-it which let's me run a google search from a terminal: The idea behind the project is simple - avoid jumping into a browser if you need to quickly look up something which you can find in the first line of a Google search result. The idea is to try and stay in the zone.
Read more

What's your Vim Name?

I'm a few weeks into moving to Vim as my main editor, I've stopped crying and shaking mostly (at least about my editing ability). Now I'm wondering: what's your Vim name? And who's got the best one? As far as I can work out, my Vim name is: Replace everything from the cursor to the end of the line with 've'. Which is what happens if I get bored and type my name (Dave) into Vim.
Read more

Quick Tip: Sending Newlines with cURL

Yikes, this took far too long to figure out! I have a service which takes plain text multi-line input and outputs an object for each line, something like this: Input Line 1 Line 2 Line 3 Output [ {line: "Line 1"}, {line: "Line 2"}, {line: "Line 3"} ] There's a bit more to it than that, but that's the gist. I want to test my service with cURL, trying: curl --data "Line 1\nLine 2\nLine 3" \ -H "Content-Type: text/plain" localhost:3000/parse This did not work.
Read more

Moving from React + Redux to Angular 2

I've just finished working on a very large project written in React and Redux. The whole team were new to both and we loved them. I'm going to share my experiences of experimenting in Angular 2 with you, from the point of view of someone who needs a pretty compelling reason to move away from my JSX and reducers. The Journey So Far Let me highlight a few key moments in my UI development experiences, to give a bit of context to my ramblings.
Read more