Quantcast
Channel: CodeSection,代码区,Linux操作系统:Ubuntu_Centos_Debian - CodeSec
Viewing all articles
Browse latest Browse all 11063

Raspberry Pi Swarm

$
0
0

A couple of weeks ago, a friend of mine reminded me about Docker . Docker is a containeri s ation platform which allows you to deploy different systems very quickly and efficientlyon the same host machine. Not only that, you can put several Docker hosts together in order to create a swarm . It’s like VMs, but cooler.

Having followed a fantastic tutorial by the Docker Captain, Alex Ellis , I had Docker running on one of my Pies in under an h0ur. I thought this was pretty cool, but I soon got bored of firing up containers which ran little Node.js apps for me. I started to wonder what it would be like if I could build a Docker swarm out of them. Having had a little look on Alex’s site, I spotted another guide for how to make a swarm of Pies . Well, I just had to try it out. I ordered some supplies in the form of SD cards from Amazon (how do they disappear like they do?!) and two Multi-Pi stackable cases from ModMyPi .

I waited on tenterhooks for a couple of days.

Once everything had arrived, I jumped straight into the assembly. I now had a 5-strong Raspberry Pi super computer sitting in front of me, nicelystacked up in the casing.


Raspberry Pi Swarm
Docker Pi Stack

The next step was to download the Raspbian image and flash 5 SD cards. No need to go into that here, there are plenty of good guides about. Once I had them all hooked up to a switch and powered up, I installed Docker on each one of them.

Now that Docker was installed, I needed to get all the nodes to join the swarm. To do this, I borrowed Alex’s script whichhe shows in his video and modified it to include my own Pi IP addresses and issued the join command. Hey presto! I now had a Docker swarm with 5 nodes in it. That’s a total of 5 cores and 2.5 GB RAM.


Raspberry Pi Swarm
The Docker Pi nodes

Ha. That was kinda neat. The next day, my friend Ben was coming to stay and ifour preview exploits were anything to go by, we were about to have a lot of fun…

To be continued.


Viewing all articles
Browse latest Browse all 11063

Trending Articles