Colourising Video with OpenFaaS Serverless Functions

Introduction In a previous post I talked about how to deploy serverless functions to an OpenFaaS cluster with ease. This post expands on this to show how we deployed a Machine Learning algorithm to colourise black & white videos using OpenFaaS. We presented the end result of this at DockerCon EU 2017 in the Community Theatre in Copenhagen. In the beginning After DockerCon in April of this year, I spotted this post on Mashable with some really cool examples of colourised photos from World War Two. This really hit home with me because they really bring the era to life; colour photos give you far more context than monotone photos do. I started to wonder how feasible it would be continue...

SSL with Docker Swarm, Let's Encrypt and Nginx

A couple of weeks ago, Let's Encrypt announced that support for wildcard certificates was coming in Jan 2018 which got me and my devops friends very excited. Currently with LE, you have to specify all the domains (including www) you want to include in the certificate which is really annoying. With wildcard certificates, this limitation will be gone and you'll be able to create one certificate for all the different subdomains. 🙌 Getting SSL to work with Docker and Let's Encrypt has been one of my short term goals recently. I started researching and found that there are some convoluted ways of doing it which involve tying in lots of other services into your stack which you don't need. 👎 I've found continue...

Rapid development with Node.js and Docker

I have quite a few Nodejs repos on GitHub and until now I've not migrated any of them to Docker because I didn't really know how. The other day I had a ping on Twitter about the URL shortener I helped complete early this year, so I decided that now was the time to work out the best way to do it: @developius didn't you guys dockerize your URL shortener?maybe heptio can use it?— Leigh Capili (@capileigh) July 11, 2017 The service in question was built with Node and relied on MongoDB for storage. Seeing as the stack was so simple, I quickly wrote a Dockerfile and accompanying compose file so we could deploy the service continue...

Ship Serverless Functions to your Docker Swarm with OpenFaaS

Open Functions as a Service or OpenFaaS (lead by Alex Ellis) is a really neat way of implementing serverless functions with Docker. You can build out functions in any programming language and then deploy them to your existing Docker Swarm. In this post we'll look at an experimental CLI for making that even easier Below is a quick example of how easy this is to do. How it works This diagram gives an overview of how the OpenFaaS function package, the Docker image, and the faas-cli deploy command fit together. To deploy a function onto an OpenFaaS stack, you firstly must write the function itself. This is really easy and you can do it in any language which runs inside continue...

DockerCon 2017 - highlights & experiences

So, DockerCon! It turns out that building cool stuff gets you places. Back in 2016, I built a Docker Swarm from 5 Raspberry Pis by following Captain Alex Ellis’ tutorial and then went on to create two different visualisations for the swarm to demonstrate real time load balancing. This was picked up by Alex who got in touch soon after with the amazing news that Docker wanted to invite me to DockerCon17 in Austin, TX! I was incredibly excited about the prospect and asked if I would be able to give a talk showing some of the things I’ve done with Docker, so it was to my delight that they agreed. What is DockerCon like? DockerCon is the most continue...

TweetDock at DockerCon

A couple of weeks before DockerCon 2017, Victor Coisne asked me whether I would like to create a demo for the DockerCon museum. Having built a hardware gauge with two dials already, it wasn’t going to be very hard to build another! This time, instead of showing load on a swarm, I hooked the dials up to the Twitter Search API to monitor the usage of #DockerCon on Twitter in real time. This was a really fun and quick project to build as I already knew how to make all the hardware. The code is very simple, in essence what it does is: Connect to the Twitter API & configure the servos Every 5s, query the API for the continue...

How and why I migrated from Wordpress to Ghost

To be honest, it wasn't Wordpress that was the issue. Having all my content spread across the web wasn't really working very well anymore so I decided to take the plunge and migrate fxapi.co.uk to finnian.io/blog. To start with, I thought I'd just move the entire site to it's new home on my server but I ended up changing my mind entirely and started using Ghost. Why? I love how hackable Ghost is - writing custom themes is such a breeze compared to Wordpress. I know PHP and have some experience with WP themes but Ghost's Handlebars API is very very well designed and makes the whole process far easier. Research I did some poking around continue...

My programming story... so far

Early days When I was 12, I was given a Raspberry Pi. For the first couple of days, it was really fun. After I had browsed the web for a while and played a bit of Minecraft, it sat in it's box for a few months. I really had no idea what to do with it. That was until I discovered that I could build a website with it. Wow, that was cool. I installed Apache and spent some time finding out where I needed to put the code. I started off getting to grips with HTML in nano (using inline styling, of course) until I realised I could write CSS in separate files and load them in. That was continue...

How does my stuff work?

I have a bit of a complex set up with all my sites and services, mainly due to using a multitude of different tools and languages to deploy different things. Currently, I have one main OVH server which most of my stuff is hosted on, including different database engines, Node.js and PHP apps. Static sites The first thing that traffic comes into contact with on my server is Nginx. It serves as an ultra lightweight traffic 'handler', whereupon it routes the incoming request to the appropriate location. I do this by using different Nginx config files for different domains. Here is an example: server { include /etc/nginx/mime.types; listen 80; listen [::]:80; # IPV6 server_name finnian.io; # compress continue...

Dockering with cardboard

Although the PiGlow visualisation of CPU usage was pretty, we reckoned we could go a couple of steps further and integrate a much more complete tangible solution - a hardware-driven load monitor dashboard. Made of cardboard. This was to be driven by two high torque servos (Ben had them lying around) which would rotate according to whichever performance indicator we chose. Servos are not, of course, very good pointers so with a trusty craft knife to the fore we re-purposed some Pi packaging into a cardboard user interface. On the code side, we particularly wanted to monitor the load across the entire cluster so we ended up writing our own Python HTTP API with Flask and copied client scripts over continue...