Creating a Supercomputer with a Raspberry Pi 5 Cluster and Docker Swarm!

  Рет қаралды 33,463

Kevin McAleer

Kevin McAleer

Күн бұрын

Sponsored by PCBWay: www.pcbway.com
PCBWay, your ultimate destination for PCB manufacturing and assembly. Whether you're a hobbyist, a startup, or a seasoned professional, PCBWay has got you covered.
Unlock the Future of Computing with Your Raspberry Pi 5 Cluster!
Welcome to our step-by-step tutorial on building a powerful supercomputer using a Raspberry Pi 5 Cluster and Docker Swarm.
In this exciting video, we'll guide you through the process of creating your very own high-performance computing cluster, turning your Raspberry Pi 5 devices into a collaborative powerhouse.
What You'll Learn
Installing and configuring Docker Swarm
Building a scalable cluster network
Deploying containers and managing services
Harnessing the combined processing power of your cluster
Whether you're a tech enthusiast, a student, or a professional looking to explore the possibilities of parallel computing, this tutorial has got you covered!
For more information on Kevs Robots, tutorials and more visit: www.kevsrobots.com​
To join the membership at bronze, silver or gold levels, head over to
www.smarsfan.com/membership
Join me on Discord - www.kevsrobots.com/discord
Join the list - www.kevsrobots.com/join
️ Enjoy this video? Buy me a coffee! www.buymeacoffee.com/kevinmca...
Follow me on Instagram - @kevinmcaleer / kevinmcaleer
Follow me on Twitter - @kevsmac / kevsmac
Join the Facebook group - Small Robots / smallrobots
My Code on GitHub: www.github.com/kevinmcaleer
Music by Epidemic Sounds www.epidemicsound.com/referra...
#RaspberryPi5​ #Docker​ #Cluster
Building a Supercomputer Cluster using Raspberry Pi 5s
Kevin walks us through the process of building a supercomputer cluster using Raspberry Pi 5s. He details the features of the Pi 5 and explains how to use Docker Swarm for clustering. The video takes a hands-on approach as he builds the cluster, demonstrating the utility of Docker Swarm. The tutorial also outlines how to use Portainer for managing a Docker Swarm, highlighting its advantages such as visualizing and spreading workload. Further, Kevin explains how to dockerize a Python app and deploy it across nodes, add a new worker, and remove services from nodes, thereby showcasing the flexibility and control that Docker offers. The tutorial concludes with a brief note on how to support Kevin’s channel. Please note that this video is aimed at an intermediate level audience.
00:00 Introduction to Building a Supercomputer Cluster with Raspberry Pi 5
00:21 Overview of the Raspberry Pi 5 Cluster
01:29 Sponsor Message: PCBWay
03:00 Introduction to Docker Swarm
04:28 Setting Up the Raspberry Pi 5 Cluster
05:02 Benefits of Using Raspberry Pi 5 for the Cluster
06:23 Requirements for Building the Cluster
08:54 Introduction to Docker Swarm: Part 2
09:44 Setting Up the Docker Swarm
17:27 Visualizing the Docker Swarm with Portainer
22:59 Deploying Apps and Spreading Workload in the Swarm
27:50 Building a Custom App for the Cluster
28:59 Introduction to Dockerizing a Python Program
29:36 Creating a Dockerfile and Docker Compose File
29:45 Building, Tagging, and Uploading the Docker Image
30:06 Deploying the Dockerized Python Program
30:53 Exploring the Dockerfile and Docker Compose File
32:52 Building and Deploying the Dockerized Python Program
33:24 Testing the Deployed Python Program
39:59 Adding and Removing Nodes in the Docker Swarm
43:59 Managing Docker Containers and Images
48:35 Promoting a Worker Node to a Manager Node
49:56 Removing Services from the Docker Swarm
53:31 Conclusion and Acknowledgements

Пікірлер: 72
@tommyvanpelt2408
@tommyvanpelt2408 5 ай бұрын
Hello Kevin from Pensacola, Florida... because of work and time availability, haven't been able to watch your live events but great videos and i appreciate your Raspberry Pi tips and projects. Thanks again! Be well!
@aravjain
@aravjain 5 ай бұрын
Great video, Kevin! Thanks again for creating this!
@sunday-thequant8477
@sunday-thequant8477 4 ай бұрын
i loved the tutorial bro! im actually loving to learn docker, i wanna create my own cluster.
@HometownUnicorn
@HometownUnicorn 5 ай бұрын
Hey Kevin, I really love your videos. This one's great but I'm just wanting to set up a portainer .Would you be able to if you've not already show us how to set up portainer and docker and some containers? Because I like the way that you present it and the way that you can teach us how to do this. Thank you.
@TreeLuvBurdpu
@TreeLuvBurdpu 5 ай бұрын
The live debugging adds value to the video.
@BjornNeven
@BjornNeven 4 ай бұрын
Hi, great video, can you please elaborate on the network setup part?
@DeepakNayak-vg8vu
@DeepakNayak-vg8vu 3 ай бұрын
Hey Kevin, absolutely gr8 and superbly done presentation. Question: can I use PoE instead individual power adapter to above cluster configuration?
@kevinmcaleer28
@kevinmcaleer28 3 ай бұрын
Yes - you’ll need a PoE Hat to use that power though as I understand it
@TreeLuvBurdpu
@TreeLuvBurdpu 5 ай бұрын
"what the bot's going on there?" Is a new favorite phrase.
@armisis
@armisis 5 ай бұрын
Building mine bit by bit, I want to make a cluster powerful enough to run my plex, nas, home assistant, and maybe if I can figure it out a local Mincraft server... I am aiming for a 8 Raspberry PI 5 cluster but due to finances will have to add the nodes as i get them or change them from pi 4 to pi 5 as I get the 5 in, I have a load of 4s laying around.
@armisis
@armisis 3 ай бұрын
Not had luck ran a Minecraft server no one could join.
@molonlabe8792
@molonlabe8792 3 ай бұрын
I'd be interested to know your opinion on uilding a Pine4 RockPro cluster.
@consig1iere294
@consig1iere294 4 күн бұрын
Can you do a Blender render with the cluster for some of simpletons to understand the power of the cluster please.
@abzs5811
@abzs5811 4 ай бұрын
Can you make the screen bigger next time so we can see up close what you’re typing in the terminals cheers bro, good video
@steve230870
@steve230870 5 ай бұрын
Great video, just put together a Pi cluster with 3 raspberry pi 4 using the uctronics case, will add a 4th node eventually. New to docker and swarms, so your videos have been really useful.
@ivint
@ivint 5 ай бұрын
Great video, thank you. But can't understand why use Docker Swarm instead of Kubernetes.
@kevinmcaleer28
@kevinmcaleer28 5 ай бұрын
Uses less memory, which is essential on single board computers with limited resources. Its also simpler to learn for people with no experience in container orchestration.
@abzs5811
@abzs5811 4 ай бұрын
Hey Kev. I have a q! I was thinking to use wifi for my clusters . But now I’m seriously thinking about Ethernet. Which Cat/ Cat e cable to use? Cat 6/ 7 or even 8???
@RickySupriyadi
@RickySupriyadi 5 ай бұрын
in terms of security i really want to hear your thought this setup vs qubes os setup
@kevinmcaleer28
@kevinmcaleer28 5 ай бұрын
I'm not familar with qubes os. I'll look into this and let you know
@neilvass6805
@neilvass6805 5 ай бұрын
Great Clear Video Thank you. I have just setup a super6c CM4 cluster with a view to learning about clusters. I was planning to use k3s but Docker swarm looks easier to use and still meets my needs. My Questions: 1/ Do I need to worry about setting up public-key authentication on all the nodes before I start. (This is confusing me right now) 2/ I am am planning to run InfluxDB and Grafana so do I need/can I setup persistent storage for this. 3/ Can I use the multiple attached NVME drives in such a way as to provide a duplicate of all the swarm data and containers in case one manager node fails and how many manager nodes would you suggest! 4/ Is there a way to simply backup this storage every night to my seperate NaS storage in case I have a major problem. Thanks.
@kevinmcaleer28
@kevinmcaleer28 5 ай бұрын
Hi Neil, Some great questions there. 1 - don't think you need to worry about that, ssh is fine, 2) Yes you'll need to setup a bind volume rather than using a container volume, that way you can persist the data even if the container is recreated. This also means you'll need to constrain that container to a specific node (where the data is). 3) I'm not aware of any multi-NVMe hats or bases yet, but I'm sure they will be available **soon**. Docker doesn't do live file system replication across the cluster. 4) Yes - just follow the docker docs - docs.docker.com/desktop/backup-and-restore/
@neilvass6805
@neilvass6805 5 ай бұрын
Thank you for a quick response. I can move forward now using your answers@@kevinmcaleer28
@armisis
@armisis 3 ай бұрын
I thought swarm would be parellel processing for containerised applications. Not what I experienced. Got all these devices but cannot find a great home use yet....
@Pngwolffman
@Pngwolffman 5 ай бұрын
Can I use different Raspberry Pi's in a cluster? So basically, a combination of Raspberry Pi 3, Pi 4, and Pi 5. Could I even possibly add an X86 computer like a Zimaboard to run specific x86 containers? How about managing them so that the lower powered Pis get the easier workloads?
@aslukili
@aslukili 3 ай бұрын
interesting
@seridyan
@seridyan 5 ай бұрын
Hi Kevin, how do you power your Raspberry PI 5 cluster? POE?
@kevinmcaleer28
@kevinmcaleer28 5 ай бұрын
I use 4 27watt power supplies!
@srsqtee
@srsqtee 5 ай бұрын
Thanks for the video. Curious, are you running a single power supply per pi? I have two raspberry pi 5s and 2 4bs and Im wondering if theres a more efficient way to power them
@offakerala
@offakerala Ай бұрын
You can use multiport mobile chargers like Anker charger, 60w 6 port charging station or you get cheaper Chinese charges.
@srsqtee
@srsqtee Ай бұрын
@@offakerala i have actually tried this, but because I use SSD as storage instead of SD card, my power requirements are a lot higher :(
@offakerala
@offakerala Ай бұрын
@@srsqtee Oh ok, then its better to use power supplies as per the current consumption. Did you install K3S or Swarm?
@srsqtee
@srsqtee Ай бұрын
@@offakerala yea I ended up having a separate power supply for each. Once i can get my hands on some PoE hats for these, Ill swap to those. I have been running k3s on my pi cluster for a few years now. Whatre you installing on yours?
@offakerala
@offakerala Ай бұрын
@@srsqtee I am a newbie, made a K3S cluster with 5 X pi 4B's. I tied to make custom power supplies, unfortunately dint work. I feel pi's need some kind of isolation. Or may be something like an Online UPS setup backed by a battery might work. Not sure though :)
@TreeLuvBurdpu
@TreeLuvBurdpu 5 ай бұрын
What about using them for running local LLMs? Do we need a GPU?
@kevinmcaleer28
@kevinmcaleer28 5 ай бұрын
You can absolutely run a LLM on the cluster - that's what I used for a recent video on Ollama and WebUI
@eMgotcha77
@eMgotcha77 5 ай бұрын
Can the LLM workload be distributed? I know you can run multiple instances, yes, but can you "split" a huge LLM to multiple PIs. LLMs can use way more RAM than any PI has.
@kevinmcaleer28
@kevinmcaleer28 5 ай бұрын
@@eMgotcha77 Thats a great question - I've not seen that done yet, but it should be possible to break the work in to parallel tasks and for them to work on it independently. Pretty sure Ollama could be used to do that
@investidorcalejado8344
@investidorcalejado8344 3 ай бұрын
would a raspberry pi cluster, with 30+ raspberries, be good for metatrader 5 backtesting?
@kevinmcaleer28
@kevinmcaleer28 3 ай бұрын
Save your money (buy the pis though)
@bluesdog88
@bluesdog88 5 ай бұрын
Hi Kevin, sorry I cant quite make out where you got the cluster rack from?
@kevinmcaleer28
@kevinmcaleer28 5 ай бұрын
Hey - its from ThePiHut
@bluesdog88
@bluesdog88 5 ай бұрын
@@kevinmcaleer28 Thank you ;)
@wanjalaproduction
@wanjalaproduction Ай бұрын
@kevinmcaleer28 Can you share the link to the case?
@marcusworrell7175
@marcusworrell7175 5 ай бұрын
I can't get my nvme base to work. I have pineberry pi. I think I know what the issue is. I'm waiting on a raspi5 charger. The old ones worm, but I don't think I have enough juice for external pcie. We will see. I want to make sure I can get one to work before I buy 4, lol. Also, I'm running Ubuntu. I don't think that changes anything except the name of the configuration file that you edit to enable pcie. If anyone else is running Ubuntu with nvme base, and you have it working, please let me know if that's the only difference.
@cicadaskoan6260
@cicadaskoan6260 Ай бұрын
Might want to check the compatibility of the drive on the pineboard. Not all work.
@Robert-sj8ld
@Robert-sj8ld 5 ай бұрын
👍👍👍👍👍👍
@rca7591a
@rca7591a 5 ай бұрын
Pi 5, you gonna heat your house with that cluster? I'm trying to figure out how to mitigate the heat generated from a single Pi 5.
@chrisparker8539
@chrisparker8539 5 ай бұрын
Great video as usual, Kevin. One note for you though. You said "depreciate" when talking about, well I forget what it was now, but the word is "deprecate". Keep up the great work!
@kevinmcaleer28
@kevinmcaleer28 5 ай бұрын
Thanks Chris
@ananyabhat9874
@ananyabhat9874 3 ай бұрын
Could I use Raspi 3 instead of Raspi 5?
@kevinmcaleer28
@kevinmcaleer28 3 ай бұрын
Yes! Raspberry Pi 3B only have 1Gb of Ram, which might restrict what you can do with it, but it will work fine (One of my Pi 4's is a 1Gb and that's happily serving up www.kevsrobots.com to 1000s of people per month)
@ananyabhat9874
@ananyabhat9874 3 ай бұрын
Hey! Thanks a lot for replying! Could this be done for a college project using just one or two raspi boards!?
@kevinmcaleer28
@kevinmcaleer28 3 ай бұрын
@@ananyabhat9874Sure - you'll need to Pi's minimum to make a swarm, otherwise if its just on one Pi its a standalone docker instance
@kevinmcaleer28
@kevinmcaleer28 3 ай бұрын
I've created a free docker course you can check out here: www.kevsrobots.com/learn/docker/
@abzs5811
@abzs5811 4 ай бұрын
Please do better close ups please! 🙏🏽
@Sven_Dongle
@Sven_Dongle 5 ай бұрын
A "supercomputer" with boulder sized granularity of tasking and dog slow switching fabric isnt very interesting. To make this shine ideally a crossbar that would plug into the PCIe to interconnect the nodes combined with a custom linux distro that would present a virtualized, unified image of a multi-core processor architecture and a ccNUMA memory that could run native apps transparently, even if recompilation of source was necessary. Granted, the cost would increase but usability and performance would be orders of magnitude beyond this setup. There are already switching fabrics that could be utilized so it wouldnt be a ground up endeavor; infiniband, or even ethernet thats now pushing 10gb+ and MPI drivers integrated into the linux kernel would make it doable.
@kevinmcaleer28
@kevinmcaleer28 5 ай бұрын
That would be an entirely different show; this show was about showing everyone how to build a cluster using a bunch of Raspberry Pi 5 (first 4 seconds). I am interested in the progress you make on your suggestion, though
@Sven_Dongle
@Sven_Dongle 5 ай бұрын
@@kevinmcaleer28 Perhaps then the term "supercomputer" could have been de-clickbaited from the title 😀
@kevinmcaleer28
@kevinmcaleer28 5 ай бұрын
@@Sven_Dongle it’s not inaccurate
@Sven_Dongle
@Sven_Dongle 5 ай бұрын
@@kevinmcaleer28 And yet somehow, not truly accurate. It's like the Schrödinger's Cat of titles.
@somenygaard
@somenygaard 2 ай бұрын
“Super” is a pretty relative word.
@marci1270
@marci1270 3 ай бұрын
Docker swarm is very uncool in 2024 better use kubernetes.
@kevinmcaleer28
@kevinmcaleer28 3 ай бұрын
It’s not a fashion cluster - it has work todo.
@marci1270
@marci1270 3 ай бұрын
@@kevinmcaleer28 K8s is heavly production ready and used by your most used apps like youtube. I dont know why you think, that k8s cannot do some work.
@RichardKovacs
@RichardKovacs 3 ай бұрын
​@@marci1270 utilization should be higher compare to docker swarm, but the features are not comparable :) if i have to run something simple i wote on Nomad
@darah.k3221
@darah.k3221 4 ай бұрын
buy a rpi 5 was waste of my time and money
@abzs5811
@abzs5811 4 ай бұрын
Explain pls??? Cause I got 4
@darah.k3221
@darah.k3221 4 ай бұрын
@@abzs5811 with adaptor, case, heatsink and memory the price will be equal to a mini pc. mini pc is more powerfull and faster pci with m2 nand and better os support. i wish i would buy a mini pc instead
@jamescarrico1233
@jamescarrico1233 4 ай бұрын
How is that? Just out of curiosity.
@armisis
@armisis 3 ай бұрын
Wow I have 6 rpi 5 and their all. Clustered and brilliant
The ULTIMATE Raspberry Pi 5 NAS
32:14
Jeff Geerling
Рет қаралды 1,7 МЛН
When Did Raspberry Pi become the villain?
21:54
Jeff Geerling
Рет қаралды 1,5 МЛН
THEY made a RAINBOW M&M 🤩😳 LeoNata family #shorts
00:49
LeoNata Family
Рет қаралды 41 МЛН
Heartwarming Unity at School Event #shorts
00:19
Fabiosa Stories
Рет қаралды 14 МЛН
Happy 4th of July 😂
00:12
Alyssa's Ways
Рет қаралды 63 МЛН
Raspberry Pi 5 Argon NEO 5 NVMe Case
15:46
ExplainingComputers
Рет қаралды 101 М.
10 Watt HA Proxmox Cluster ft. ZimaBoard
12:41
Raid Owl
Рет қаралды 222 М.
the Raspberry Pi 5
17:57
NetworkChuck
Рет қаралды 1 МЛН
The Petabyte Pi Project
22:27
Jeff Geerling
Рет қаралды 2,2 МЛН
I replaced my Apple TV-with a Raspberry Pi
16:12
Jeff Geerling
Рет қаралды 529 М.
I ditched my Raspberry Pi for this
18:45
NetworkChuck
Рет қаралды 478 М.
Low Power Cluster - Small, Efficient, BUT Powerful!
12:18
Techno Tim
Рет қаралды 173 М.
It's Clusterin' Time!
1:53:42
Jeff Geerling
Рет қаралды 160 М.
How NVIDIA just beat every other tech company
9:20
Mrwhosetheboss
Рет қаралды 994 М.
39kgのガリガリが踊る絵文字ダンス/39kg boney emoji dance#dance #ダンス #にんげんっていいな
0:16
💀Skeleton Ninja🥷【にんげんっていいなチャンネル】
Рет қаралды 7 МЛН
Sigma Kid Hair #funny #sigma #comedy
0:33
CRAZY GREAPA
Рет қаралды 30 МЛН
え、、、!
0:11
美好秋人
Рет қаралды 10 МЛН
Бушмен и бабуин. В поисках воды.
0:42