Building an Odroid-C2 Docker Cloud

Moderators: mdrjr, odroid

Building an Odroid-C2 Docker Cloud

Unread postby MrDreamBot » Sat Jul 23, 2016 3:35 pm

I’ve just taken delivery of 5 Odroid-C2 single board computers (SBCs) from Hardkernel. 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. I am documenting my progress in my blog. You can find the first installment here:

http://mrdreambot.ddns.net/building-my-odroid-c2-docker-cloud-part-1-in-search-of-a-stable-linux
User avatar
MrDreamBot
 
Posts: 26
Joined: Fri Mar 13, 2015 10:58 am
languages_spoken: english
ODROIDs: ODROID-C2, ODROID-C1/C1+, ODROID-XU3, ODROID-XU4, ODROID-MC1, ODROID-HC1,ODROID-U3

Re: Building an Odroid-C2 Docker Cloud

Unread postby umiddelb » Sun Jul 24, 2016 5:37 am

The problems you've encountered are mostly related to integration issues, Ubuntu Base itself is quite stable.
You can build docker 1.12 from source on the C2 directly if you are unhappy with 1.10.3 .
If you want to learn how to set-up your own Ubuntu, Debian, CentOS Linux from scratch you may take a look here.
umiddelb
 
Posts: 413
Joined: Thu Jan 29, 2015 6:42 am
languages_spoken: English, German
ODROIDs: ODROID-C1, ODROID-XU4, ODROID-C2

Re: Building an Odroid-C2 Docker Cloud

Unread postby MrDreamBot » Sun Jul 24, 2016 8:45 am

I am sure given sufficient time and patience, one can learn to build his own Ubuntu, Debian, CentOS Linux from scratch as you suggested. There are at least to categories of users: one that likes to get into the minute details of the OS and another likes to use the OS to achieve whatever he plans to do. I belong to the latter. I just want to boot up a usable image and build my app on top of it without having to fix the OS. I am sure for Linux guru like yourself, it is a piece of cake. For us, mere motals, we do not want to get there. Another reason is the on-going support of the OS, if you build ithe OS from scratch yourself, you have to keep maintaining/updating it. The same applies to docker for me. There are a lot less docker images for ARM processors than INTEL, less so for ARM64 than armhf. Of course, one can always build his own from scratch but it is much easier to customise existing ones by adding your own layer on top. Whichever one chooses to do depends on the intentions and expectations. What is right for one is not necessarily right for the other. And I don't claim to be right, it is just the way I want to achieve my end goal of my project using Odroid-C2.
User avatar
MrDreamBot
 
Posts: 26
Joined: Fri Mar 13, 2015 10:58 am
languages_spoken: english
ODROIDs: ODROID-C2, ODROID-C1/C1+, ODROID-XU3, ODROID-XU4, ODROID-MC1, ODROID-HC1,ODROID-U3

Re: Building an Odroid-C2 Docker Cloud

Unread postby umiddelb » Mon Jul 25, 2016 5:38 am

If you are looking for a stable OS, take Armbian/Debian.
If you are looking for the latest feature (including Docker), take Archlinux.
Both projects are doing a great job and they address distinct audiences. Both will run Docker without further tweaking.

The Docker version shipped with a specific Ubuntu/Debian/CentOS/... release is not related to a processor architecture (i.e. Ubuntu/X64 comes with Docker 1.10 as well), but building Docker from source for Aarch64 has become very easy.
Code: Select all
git clone https://github.com/docker/docker
cd docker
sudo make build
sudo make binary

Make sure that you have enough memory available (e.g. use zram or activate swap).
umiddelb
 
Posts: 413
Joined: Thu Jan 29, 2015 6:42 am
languages_spoken: English, German
ODROIDs: ODROID-C1, ODROID-XU4, ODROID-C2

Re: Building an Odroid-C2 Docker Cloud

Unread postby MrDreamBot » Mon Jul 25, 2016 6:49 am

Thanks for the advice.
User avatar
MrDreamBot
 
Posts: 26
Joined: Fri Mar 13, 2015 10:58 am
languages_spoken: english
ODROIDs: ODROID-C2, ODROID-C1/C1+, ODROID-XU3, ODROID-XU4, ODROID-MC1, ODROID-HC1,ODROID-U3

Re: Building an Odroid-C2 Docker Cloud

Unread postby MrDreamBot » Sun Aug 14, 2016 4:34 pm

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.
You can read all about my journal here:http://mrdreambot.ddns.net/building-my-odroid-c2-docker-cloud-part-2-building-docker-1-12-0-with-swarm-mode/#more-389
User avatar
MrDreamBot
 
Posts: 26
Joined: Fri Mar 13, 2015 10:58 am
languages_spoken: english
ODROIDs: ODROID-C2, ODROID-C1/C1+, ODROID-XU3, ODROID-XU4, ODROID-MC1, ODROID-HC1,ODROID-U3

Re: Building an Odroid-C2 Docker Cloud

Unread postby MrDreamBot » Sun Aug 21, 2016 2:23 pm

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.
Read about my cluster build here:http://mrdreambot.ddns.net/building-my-odroid-c2-docker-cloud-part-3-build-and-test-drive/#more-404
Image
User avatar
MrDreamBot
 
Posts: 26
Joined: Fri Mar 13, 2015 10:58 am
languages_spoken: english
ODROIDs: ODROID-C2, ODROID-C1/C1+, ODROID-XU3, ODROID-XU4, ODROID-MC1, ODROID-HC1,ODROID-U3

Re: Building an Odroid-C2 Docker Cloud

Unread postby odroid » Mon Aug 22, 2016 9:59 am

Nice impressive progress.
Really want to see the use of docker to run a more realistic production workload. :D
User avatar
odroid
Site Admin
 
Posts: 25303
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Building an Odroid-C2 Docker Cloud

Unread postby MrDreamBot » Thu Sep 15, 2016 9:37 am

I am now back from a business trip and resuming my exploration of docker swarm mode on my ODROID-C2 cluster. You can read the latest article using the link below:
http://mrdreambot.ddns.net/building-my-odroid-c2-docker-cloud-part-4-application-deployment/
In this article, I am going to deploy MySQL and a web application 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.
Image
User avatar
MrDreamBot
 
Posts: 26
Joined: Fri Mar 13, 2015 10:58 am
languages_spoken: english
ODROIDs: ODROID-C2, ODROID-C1/C1+, ODROID-XU3, ODROID-XU4, ODROID-MC1, ODROID-HC1,ODROID-U3

Re: Building an Odroid-C2 Docker Cloud

Unread postby MrDreamBot » Sat Sep 17, 2016 8:09 am

If you are having problem accessing my blog, it was due to DoS attack. The problem has been resolved. :roll: Happy reading!
User avatar
MrDreamBot
 
Posts: 26
Joined: Fri Mar 13, 2015 10:58 am
languages_spoken: english
ODROIDs: ODROID-C2, ODROID-C1/C1+, ODROID-XU3, ODROID-XU4, ODROID-MC1, ODROID-HC1,ODROID-U3

Re: Building an Odroid-C2 Docker Cloud

Unread postby marcellodesales » Tue Sep 27, 2016 6:46 am

Amazing job and it's nice to see results :D I got Docker 1.2.1 compiled on my ODroid-C2 yesterday https://github.com/docker/docker/issues ... 49501640... https://twitter.com/marcellodesales/sta ... 0603807745

Image

* PENDING PROBLEMS

* How to build Docker Machine and Docker Compose for ODroid-C2? Trying to build and the build fails with the latest... :(

Code: Select all
root@odroid64 [09/26/2016 4:20:55] /home/odroid/dev/machine (master) # make build
Sending build context to Docker daemon 29.58 MB
Step 1 : FROM golang:1.7.1
1.7.1: Pulling from library/golang
6a5a5368e0c2: Pull complete
7b9457ec39de: Pull complete
ff18e19c2db4: Pull complete
6c16e36b7fbf: Pull complete
dac6749e202c: Pull complete
80302b4e1d83: Pull complete
2fefc8a47308: Pull complete
Digest: sha256:312137f52f100a005ecebbf75b84ad1f695212ba5c80186d98d29907cb9604a5
Status: Downloaded newer image for golang:1.7.1
 ---> 12231e6a3e14
Step 2 : RUN go get  github.com/golang/lint/golint             github.com/mattn/goveralls             golang.org/x/tools/cover
 ---> Running in b872ab166750
standard_init_linux.go:175: exec user process caused "exec format error"
The command '/bin/sh -c go get  github.com/golang/lint/golint             github.com/mattn/goveralls             golang.org/x/tools/cover' returned a non-zero code: 1
Makefile:15: recipe for target 'build' failed
make: *** [build] Error 1


* How to get Docker Compose compiled? I haven't tried, but I anticipate problems as well... :(

Anyway, thanks a lot!
marcellodesales
 
Posts: 3
Joined: Sun Sep 25, 2016 4:35 am
languages_spoken: english
ODROIDs: ODROID-C2 hardkernel

Re: Building an Odroid-C2 Docker Cloud

Unread postby MrDreamBot » Tue Sep 27, 2016 11:13 am

Congrats Marcello. Finally tasting the fruits of your labour;-) I am planning to build 1.12.1 to see if the swarm mode issues I encountered in Part 4 of my article on Building an ODROID-C2 Docker Cloud have been resolved in the latest version. I shall post the results once I have them.
User avatar
MrDreamBot
 
Posts: 26
Joined: Fri Mar 13, 2015 10:58 am
languages_spoken: english
ODROIDs: ODROID-C2, ODROID-C1/C1+, ODROID-XU3, ODROID-XU4, ODROID-MC1, ODROID-HC1,ODROID-U3

Re: Building an Odroid-C2 Docker Cloud

Unread postby MrDreamBot » Wed Sep 28, 2016 6:38 am

I can sucessfully build statically linked binaries (binary) and dynamically linked binaries (dynbinary) but building deb resulted in error complaining:

(Maybe Marcello can help here! You successfully built DEBs for docker. Do you have such a directory in your docker source code? I surely don't!)
`contrib/builder/deb/aarch64/*/': No such file or directory


Surely enough, there is no such directory in the source code:

root@c2-swarm-00:/media/sata/dockerSrc/docker/contrib/builder/deb# ls
amd64 armhf


Under the armhf directory there are 3 sub-directories:

ayuen@c2-swarm-00:/media/sata/dockerSrc/docker/contrib/builder/deb/armhf$ ls
debian-jessie raspbian-jessie ubuntu-trusty


Each directory contains a Dockerfile which has an instruction:

RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-armv6l.tar.gz" | tar xzC /usr/local


I went to https://storage.googleapis.com/golang and examine the content. There is no arm64 (aarch64)-specific files. This means I cannot create those Dockerfiles and directories to make the build a success.
User avatar
MrDreamBot
 
Posts: 26
Joined: Fri Mar 13, 2015 10:58 am
languages_spoken: english
ODROIDs: ODROID-C2, ODROID-C1/C1+, ODROID-XU3, ODROID-XU4, ODROID-MC1, ODROID-HC1,ODROID-U3

Re: Building an Odroid-C2 Docker Cloud

Unread postby MrDreamBot » Sun Oct 02, 2016 6:04 am

I am using the armbian xenial server which is based on Ubuntu. I had a look at the armbian website recently and noticed that only the ODROID-C2 jessie server, which is based on Debian, is available for download. If you are using the armbian jessie server, docker.io (docker engine) is not in the software repository. As a service to the community, I've put the pre-built docker v1.12.1 binaries and an installation script in the link below:

https://github.com/MrDreamBot/arm64-docker-binaries

These binaries have been tested on armbian xenial and jessie servers.

Enjoy! :lol:
User avatar
MrDreamBot
 
Posts: 26
Joined: Fri Mar 13, 2015 10:58 am
languages_spoken: english
ODROIDs: ODROID-C2, ODROID-C1/C1+, ODROID-XU3, ODROID-XU4, ODROID-MC1, ODROID-HC1,ODROID-U3

Re: Building an Odroid-C2 Docker Cloud

Unread postby MrDreamBot » Fri Oct 07, 2016 7:50 pm

Image

Here is the lastet article in the\is series:

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

You can find it here:

http://mrdreambot.ddns.net/building-my-odroid-c2-docker-cloud-part-5-upgrading-to-docker-v1-12-1/#more-449
User avatar
MrDreamBot
 
Posts: 26
Joined: Fri Mar 13, 2015 10:58 am
languages_spoken: english
ODROIDs: ODROID-C2, ODROID-C1/C1+, ODROID-XU3, ODROID-XU4, ODROID-MC1, ODROID-HC1,ODROID-U3

Re: Building an Odroid-C2 Docker Cloud

Unread postby MrDreamBot » Sun Jul 02, 2017 10:01 am

Docker Swarm Mode finally working on my Facelifted Docker ODROID-C2 cluster
Image
I assembled the VU7 screen and an ODROID-C1+ on the VuShell enclosure. Then I thought to myself, why not put my ODROID-C2 cluster there as well? So I did. You can see the screen displaying a soft keyboard in the photo below. All ODROID single board computers together with an 8-port gigabit switch and a SSD are also put inside the VuShell enclosure. The ODROID cardboard box houses the power supply. The tiny router uses WDS (Wireless Distribution System) to connect to my main router to provide ethernet Internet access for all the ODROIDs housed in the VuSHell as they don’t have inbuilt wifi. I then replaced the Armbian Xenial Server OS with Hardkernel's Ubuntu 16.04 (v2.3) for the ODROID-C2, installed docker.io and made Docker Swarm Mode work, at last.

Read all about it here: http://mrdreambot.ddns.net/running-docker-swarm-mode-on-my-facelifted-odroid-c2-cluster/.
User avatar
MrDreamBot
 
Posts: 26
Joined: Fri Mar 13, 2015 10:58 am
languages_spoken: english
ODROIDs: ODROID-C2, ODROID-C1/C1+, ODROID-XU3, ODROID-XU4, ODROID-MC1, ODROID-HC1,ODROID-U3

Re: Building an Odroid-C2 Docker Cloud

Unread postby odroid » Mon Jul 03, 2017 11:55 am

Great news!
I have waited a very long time for your new article about the working Docker Swarm. ;)
BTW, which Kernel version do you use on the Armbian image?

Also refer this new thread about very promising Docker-Swarm on the C2 mainline kernel.
viewtopic.php?f=138&t=27515
User avatar
odroid
Site Admin
 
Posts: 25303
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Building an Odroid-C2 Docker Cloud

Unread postby MrDreamBot » Mon Jul 03, 2017 1:17 pm

Thanks odroid. Glad that the wait is finally over :lol:

Don't remember the Armbian kernel version as I've re-imaged the SD cards. The maintainer of Armbian has provided a comment at the end of my article stating that he has updated the kernel. Just bring up my article on a browser, go to the bottom of the page and have a read.

Glad to hear about the mainline kernel update based of HypriotOS. Is it going to be another distribution or incorporated into the Hardkernel kernel?
User avatar
MrDreamBot
 
Posts: 26
Joined: Fri Mar 13, 2015 10:58 am
languages_spoken: english
ODROIDs: ODROID-C2, ODROID-C1/C1+, ODROID-XU3, ODROID-XU4, ODROID-MC1, ODROID-HC1,ODROID-U3

Re: Building an Odroid-C2 Docker Cloud

Unread postby odroid » Mon Jul 03, 2017 1:51 pm

Ah! you are using the mainline kernel. :D
Image

Even the mainline kernel is running well for headless server applications, still most of other users are using the C2 as a media player or game console.
But there are tons of VPU/GPU issues in the mainline kernel. So we have no firm plan to support the mainline kernel directly/officially in near future. Sorry about that.
User avatar
odroid
Site Admin
 
Posts: 25303
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Building an Odroid-C2 Docker Cloud

Unread postby MrDreamBot » Tue Jul 18, 2017 7:51 pm

Image
As promised, here is my 'dokcer stack deploy' article:

Docker 1.13.x introduced the new docker stack deployment feature to allow deployment of a complete application stack to the swarm. A stack is a collection of services that make up an application. This new feature automatically deploys multiple services that are linked to each other obviating the need to define each one separately. In this article, I am going to explore how to use dockr stack deploy on my ODROID-C2 cluster.

Read the complete article at http://mrdreambot.ddns.net/using-docker-stack-deploy-on-my-odroid-c2-cluster/
User avatar
MrDreamBot
 
Posts: 26
Joined: Fri Mar 13, 2015 10:58 am
languages_spoken: english
ODROIDs: ODROID-C2, ODROID-C1/C1+, ODROID-XU3, ODROID-XU4, ODROID-MC1, ODROID-HC1,ODROID-U3


Return to Projects

Who is online

Users browsing this forum: No registered users and 1 guest