Using Pine cluster for Docker Swarm
#1
I just received my first two Pine boards (2GB ram models). My dream is to network these together for use as a Docker Swarm cluster that would host various applications that I develop -- sort of a home-grown replacement for AWS or Docker Cloud. Although I am pretty familiar with Docker, I am rather new at devices like Pine boards. Would anyone be able to help me understand what I need to do to get a reasonably performant cluster that can scale as I purchase more Pine boards?

Here are some questions/thoughts I have:


1) OS

I was thinking Debian base here.

2) Shared Storage

I want shared storage to store docker volumes so that every board in the cluster can mount the volumes into containers.

My first thought was to buy a 1 or 2 TB external hard drive, but:
    a) How do i connect all the boards to the drive? Do I need to have the drive connected to one board and then share the mount over the network?
    b) What can I expect for IO latency? I want to be able to run postgres database containers against the volumes on the external drive. How will that perform?

3) microSD storage per board

This hits a limit on my docker knowledge -- i'm not sure if i need to have internal storage for all the images that I want my swarm to run, or whether the images can be stored on the shared storage from 1) and just loaded into memory when i instantiate containers. If the images must be kept on the microsd, I guess i would need 32 or 64 GB. But if the images can be kept on shared storage, then i imagine i would only need a microsd large enough for the OS and whatever disk space the docker daemon needs to do its job.

4) Accessing over the internet via SSH

I was thinking instead of buying a static IP, which would require business class from my cable company, to use a service like http://www.noip.com/. I want to be able to SSH into this cluster via the domain name, and of course be able to hit web applications over HTTP.


This is as far as I have gotten so far. I am sure there are gaps in my understanding above. Also please point out to me anything I am NOT thinking of that is crucial to my goal of a personal docker swarm cluster -- any help is appreciated!!!
#2
Some answers that I have come up with:

1) OS

Went with Ubuntu base instead, because there are docker packages specifically available for the ubuntu base and arm64 architecture.

2) Shared Storage

For now, just sticking with SD storage.

3) microSD storage per board

Went with 32GB to start

4) Accessing over the internet via SSH

noip is a breeze. I also have an ASUS RT-N56U router that i've got my two boards plugged into. I've set up the port forwarding on the router to route SSH to one of the boards, then I just ssh into the other boards via LAN IP.

The major gotcha is the arm architecture. There is limited support in Docker images for the arm64 architecture, but there is some. I figure I will need to rebuild the images for arm. Some great base images i've discovered:
- https://hub.docker.com/r/owlab/alpine-arm64/ Alpine image. Makes a great base for several official Docker images
- https://hub.docker.com/r/ericvh/arm64-ubuntu/


Possibly Related Threads…
Thread Author Replies Views Last Post
  pine store paulhide 1 3,118 09-17-2020, 04:13 AM
Last Post: bcnaz
  My optimal software configuration for pine A64(+) 2Gb Alkemyboy 3 4,513 03-18-2020, 08:41 AM
Last Post: tophneal
  Pine HDMI -> DVI monitor Pineapple 4 7,651 09-10-2019, 11:28 AM
Last Post: Pineapple
  PINE A64+ 4K Media Computer RWL 4 6,783 11-08-2018, 04:20 PM
Last Post: mindwave
  Multi Room Audio - Pine style mjgoode 4 8,517 09-19-2018, 10:30 AM
Last Post: mjgoode
  sopine cluster board install Smurfbot 1 4,320 03-31-2018, 04:09 AM
Last Post: pfeerick
  Pine 64 LTS Schematic And R18 Reference Manual Akash Gajjar 2 5,182 12-26-2017, 07:01 PM
Last Post: tllim
  [PINE A64+ 2GB] Ubuntu - Losing Signal Arlanps 4 6,074 02-12-2017, 05:12 PM
Last Post: Arlanps
  Applying a fan for the Pine 64+? Maximum 5 9,400 01-20-2017, 03:34 PM
Last Post: Shad0wSt4R
  Pine 64 IR Receiver not working rajatgarg21 1 3,148 08-31-2016, 12:47 AM
Last Post: MarkHaysHarris777

Forum Jump:


Users browsing this thread: 1 Guest(s)