My ODROID-C2 Docker Swarm: Part 1 – Swarm Mode Features

Here is part 1 of my docker swarm article published in the ODROID Magazine. ODROID Magazine is a free monthly e-zine featuring hardware and software articles related to the latest ARM and single board computer technology since January 2014. Although this tutorial is designed to run on the ODROID-C2 single board computer, all the commands that you learn apply equally well on INTEL-based machines running the docker engine. The commands are exactly the same. Once learnt and you can apply your docker command line knowledge to different environments including Linux, macOS, Windows and on a cloud host.

Part 1 discusses the docker swarm features.

Part 2 describes the ‘docker stack deploy’, you can think of it as Docker Compose for swarm mode, capabilites.

Enjoy!

Click here to read my ODROID Magazine Article.

Running Docker Swarm Mode on My Facelifted ODROID-C2 Cluster

Recap

Around 6 months ago, I was experimenting with Docker swarm mode on my ODROID-C2 cluster consisting of 5 ODROID-C2s. Docker was running fine on a single machine using ‘docker run’ command but neither overlay network, routing mesh nor load balancing was working in the swarm mode. I tried using different versions of docker (1.12.x and 1.13.x) compiled on my ODROID-C2 to no avail as documented in a previous article. I also tried running Kubernetes on the ODROID-C2 cluster. Again I couldn’t get the networking part work. I suspected that the kernel was missing certain modules needed for Docker/Kubernetes networking. As the OSes at that time I tested were not stable enough, I stopped my experimentation on ARM-based machines.  Instead I played with Openshift running on INTEL 64 bit machines as INTEL always has better support than ARM in any open source project. What rekindled my passion to get Docker swarm mode working is the hardware I have lying around not being used: an ODROID VU7 multi-touch screen and a VuShell for VU7. I wanted to make use of them to do some useful work. Continue reading Running Docker Swarm Mode on My Facelifted ODROID-C2 Cluster

A Reusable Fuse Integration Services 2.0 Demo

Introduction

Recently a potential customer wants to see how FIS 2.0-based services and API Management can work together to replace the integration platform he is currently using. The customer has asked another vendor to do a PoC on AWS. Red Hat has been invited to do the same but called it a demo. Consequently, we set up Openshift on Google Cloud Platform for the demo. In this article, I am going to describe only the FIS implementation of the use case mandated by the customer. The FIS 2.0 and 3Scale integration is covered in another article. Continue reading A Reusable Fuse Integration Services 2.0 Demo

Building My Odroid-C2 Docker Cloud Part 5 – Upgrading to Docker V1.12.1

 

Why Docker v1.12.1

In part 4 of this series, I tested Docker v1.12.0 and found that it had two serious issues:

  1. Load balancing not working
  2. Overlay network name service not working

Another reason is that I recently noticed the following warning in the log which worries me.

WARN[0000] Udev sync is not supported. This will lead to unexpected behavior, data loss and errors

 

A ticket has been raised which suggests that the issue may be curcumvented by using dynamically linked binaries.

I am hoping that v1.12.1 has resolved these issues. And I’d like to explore building dynamically linked binaries this time. Continue reading Building My Odroid-C2 Docker Cloud Part 5 – Upgrading to Docker V1.12.1

Building My Odroid-C2 Docker Cloud Part 4 – Application Deployment

Web Application with Database Backend

So far, I’ve only deployed trivial application on my docker cluster. In this article, I want to explore the level of difficulty in deploying a more realistic application. Being a lazy person who does not want to create a web application from scratch, I searched the Internet for a ready-made web application using a database backend as this kind of application is commonly deployed in the production environments. I came across a WEB4J sample application called the “Fish and Chips Club” which should do the job. From now on, I am going to refer to this application as “Fish”. This application includes features to:

  • edit club members
  • edit local restaurants
  • edit ratings of each restaurant
  • add new lunches (a given restaurant on a given day)
  • RSVP for each upcoming lunch
  • interact using a simple discussion board
  • produce simple reports
  • provide a simple search page

And it uses 3 databases running on MySQL. You can find out more about how to configure this application here.

The disadvantage of using ARM64 architecture machines like ODROID-C2 is that you don’t have that many docker images readily available to you on Docker Hub to choose from like INTEL-based machines. I can find only 1 MySQL docker image and no Apache Tomcat images at all! And this application requires Tomcat to run. However, this is not a showstopper as I can always create my own docker image!

In the following sections, I am going to deploy MySQL and Fish in different ways and assess their pros and cons. It will be a great learning experience for me as, like most of you, I am new to this too ;-) Continue reading Building My Odroid-C2 Docker Cloud Part 4 – Application Deployment

Building My Odroid-C2 Docker Cloud Part 3 – Build and Test Drive

The journey so far

My last article documented how I built Docker 1.12.0 from source on my Odroid-C2. Docker 1.12 has swarm mode ie, clustering built in. In this article, I am assembling my 5 Odroid-C2 single board computers into a cluster and test-driving the cluster with simple swarm mode commands.  This is to make sure that Docker 1.12 is working before getting into more advanced swarm mode features and executing a more realistic workload on the cluster in Part 4. Continue reading Building My Odroid-C2 Docker Cloud Part 3 – Build and Test Drive

Building My Odroid-C2 Docker Cloud Part 2 – Building Docker 1.12.0 (with Swarm Mode)

Recap

In my previous article, I documented my search for a stable Linux to run my Docker cloud on. The next thing for me to do is to select the version of Docker to use. I am in a dilemma in which I want to use the latest Docker 1.12 with inbuilt swarm mode instead of having to build my own cluster using additional packages such as Consul, Zookeeper, etc. but the version I got using apt-get is version 1.10. There is an update but it is still only 1.11. Since clustering (swarm mode) is in-built in 1.12, there is no point pursuing a dead end in Docker 1.11. Looking around the Internet, I could not find any pre-built Docker 1.12 package for Odroid-C2 anywhere. Reluctant as I was, I had no choice but to build my own Docker 1.12 for my Odroid-C2 from source. As I was new to this, I expected issues and confirmed that Murphy’s Law still rules. This article documents my attempt to build Docker 1.12.0 on my Odroid-C2. Continue reading Building My Odroid-C2 Docker Cloud Part 2 – Building Docker 1.12.0 (with Swarm Mode)

Building My Odroid-C2 Docker Cloud Part 1 – In Search of a Stable Linux

Introduction

I’ve just taken delivery of 5 Odroid-C2 single board computers (SBCs) from Hardkernel. In case you don’t know, ODROID-C2 is a 64-bit quad-core SBC with specifications above and beyond those of Raspberry Pi 3. For example Odroid-C2 runs the quad-core 64-bit A53 processors at 2GHz (vs Raspberry Pi 3’s 1.2 GHz), Gigabit ethernet (vs 10/100 Mbps Ethernet), 2Gbytes of memory (vs 1Gbytes), supports 4K display (vs HD), etc.

I am planning to set up my 5 Odroid-C2 SBCs as a Docker cluster to form an experimental private cloud. But before I can do that, I must choose a stable Operating System (OS) for the SBCs to run on. Here is what I went through in selecting my OS. Continue reading Building My Odroid-C2 Docker Cloud Part 1 – In Search of a Stable Linux