Home » DevOps » DevOps lab on TVBox

Among the ARM based devices that I have, Orange Pi 3 (H6) development board and the Amlogic S905X2 based TVBox are happens to be the most cost effective compute ones. The O’PI 3 running supported version of Armbian OS and with its GPIO pins does a decent job for my home networking and automation needs. However, the 2GB RAM limits the ability to use it for DevOps lab, primarily since the official docker image for apps like Jenkins, ansible etc. are either not availble in docker form or image for ARM64 not availble. This is where I started looking for the TVBOX. Besides, having a second node helps with distributed workloads like docker swarm as well as ansible.

The TVBOX has been the heart of my home entertainment. With its NTFS support and KODI app, it gives a consistence experience to watch the favorites stored into portable disks. Hence instead of disturbing its internal MMC running Android OS and Apps, I decided to go for TF card option. Grabbed a supported copy of Armbian image for it and dd’ed that into a TF card. Edited the extlinux.conf to point to the right DTB file and required console configuration, and renamed the u-boot-s905x2-s922 to u-boot.ext. Placed the TF card into TVBox to boot and voilà, I have a Armbian Linux booting on the TVBOX without impacting whatever on its internal MMC.

After completing the standard apt update and upgrade, did a quick Armbian benchmark test and results are positive even through running from a TF card.

After completing xrdp and xorgxrdp to make RDP connection to the box, installed docker through apt. Quick check with docker system info.

Now that things look good, time to build a test image. Below is a python flask on alpine based image that works on this ARM64 platform.

docker image build -t webapp1 https://github.com/prasanta4u/py3flask-app.git

Bellow to run the container exposing port 5000 of flask app as port 8080 to outside world.

docker run -p 8080:5000 –name web1 webapp1

The webapp can be accessed now by browsing the host IP on port 8080. Note the app gives external URL of photos, not stored locally on the server.

Now that the docker is working fine, time to initialize docker swarm and join the OPI 3 to form the cluster.

docker swarm init

docker swarm join-token manager

Leave a Reply

Your email address will not be published. Required fields are marked *