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...

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...

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...

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...

Visualising Docker on Pi with PiGlow

In my last post I described how I set up a 5-strong Raspberry Pi Docker swarm. It wasn't long before I realised I wanted some ambient way to see how they were performing which a) didn't involve staring at a screen and b) would wind up the cat. Luckily my friend Ben was round and he's quite into tangible stuff so after rummaging in a few dusty boxes for inspiration we found a PiGlow and wondered if that would do the trick. We stuck the PiGlow on top of the swarm and sure enough, thanks to the great Python PiGlow library from the pirates over at Pimoroni, we managed to get the LEDs to map the CPU usage. As ever continue...

The Pi-Powered Hamster Hunter Part 4: Reflections

Reflections At the end of our project our initial objectives had now been added to and matured through the development process. Objectives at the start The objective of this project was to build an all terrain vehicle which could be used for various applications and controlled from anywhere in the world. We wanted it to be operational in all circumstances, which meant being able to operate in low light/pitch dark conditions and being able to traverse all terrain. It was essential for the user to be able to see from the ReCoRVVA’s point of view in real time. We also wanted the ReCoRVVA to be able to sense when it was about to crash and automatically stop to continue...

The Pi-Powered Hamster Hunter Part 3: Putting it all together

Assembling the components The first prototypes we put together used an Arduino, and it was with these first prototypes that we had many problems with the motors. The first thing we tried was to run each motor from one of the Arduino’s digital pins. They were 5v motors, and the digital pins on the Arduino supplied 5v each, so we assumed the motors would run. We wrote then uploaded a simple drive script to the Arduino. However, the motors didn’t turn. We debugged the code and found no errors, we checked the pins were supplying voltage and yet the motors still didn’t turn. Eventually, we realised that there was a limit on the amount of current able continue...

The Pi-Powered Hamster Hunter Part 2: Tech development

Technical development Hardware Core controller This was to be the brains of the ReCoRVVA. Its task was to control all the peripherals on the ReCoRVVA, to manage all communications with the client and, by extension, the user. It needed to be capable of handling multiple tasks at once and be able to use multiple electrical inputs/outputs to control the physical aspects of the ReCoRVVA. It also needed to be customisable, so that we could quickly and easily change things, e.g. software or, if we had a accident, interchangeable controllers. It needed to be able to support the data inflows/outflows shown in figures 4 and 5. Arduino The first option we explored was to use an Arduino (a continue...

The Pi-Powered Hamster Hunter Part 1: The Beginning

Last year, I and two of my friends, Ben James and Angus Ledesma, decided to create a Raspberry Pi powered robot for a Silver CREST project. I posted an overview of the project last July and have finally got around to converting the CREST report to a blog-friendly write-up! Background The ReCoRVVA will help and assist people in many different ways; as the name suggests, it is designed to be used for many purposes. At its simplest it is a vehicle designed to be controlled remotely by an operator with the aid of a live video stream from the robot. It could be used as a security patrol vehicle for surveillance, or to regularly check on an elderly relative remotely. continue...