Raspberry Pi Cluster

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
now do you guys like raspberry pies do you like super computers would you want to see a super computer be made out of a Raspberry Pi stick around we're gonna do so In This Very video [Music] what's up guys I'm recent from rossmertech.com and in this video we're going to create a super computer out of four Raspberry Pi 4S now we're gonna have a Raspberry Pi 4 gig one Raspberry Pi 2 gig and two Raspberry Pi one gigs so a total of four Raspberry Pi fours all right so this is only part one of this video series they're gonna be a total of four parts in this video we're gonna go over all the parts we're gonna build the Raspberry Pi cluster connect all the cables and then in the other parts we're gonna set up the cluster so without further Ado let's get started with this build alright so these are all the parts that are going to go in our Raspberry Pi 4 cluster super computer video series here I got four Raspberry Pi 4S we have one Raspberry Pi 4 gig one Raspberry Pi four two gig and two Raspberry Pi 4 one gig so that's a total of four Raspberry Pi Force right we got the power supply now I went to Tinker sphere I got three of them from ticker sphere these are the Raspberry Pi 4 power supplies and I was able to get my hands on one of the official Raspberry Pi power supplies that they sell I got this from Micro Center so this one is an official Raspberry Pi for power supply and these I got from Tinker sphere I'll leave a link to all this in the description now right here this is the recipe Pi cluster case we're able to build up four Raspberry Pi's using this case here it's gonna look cool we're gonna build that in a second I got four micro SD cards there I opened one of the Raspberry Pi 4S this here is the four gigabyte version this is the networking switch we're gonna use to connect the Raspberry Pi 4S this is a Linksys 8 Port gigabit switch this was like 35 I believe I got this at Best Buy I'm Gonna Leave a link to this in the description this is what's gonna allow us to connect all the Raspberry Pi 4S and finally I got the cables here these are the net freaking cables these are CAT5 e three foot uh cables they're different colors so I thought the different colors would make this build look a lot better so that's pretty much it for the parts now let's start the build all right first we're gonna put together the cluster case so this is the cluster case right here I got this one from Tinker sphere and with this case we're allowed to stack up four Raspberry Pi's it was twenty dollars so not too expensive I'll leave a link to this if I can't find this a similar case in the description [Music] thank you [Music] thank you all right guys we finally finished building the case took a while and it looks pretty cool I gotta admit it does look cool we got our four Raspberry Pi 4S here we have a Raspberry Pi 4 we have a four gigabyte we have a two gigabyte and two one gigabytes so that makes a total of four Raspberry Pi fours that we're gonna cluster so the user diversity Pi forest all we have to do now is set up the switch and connect all the cables foreign [Music] thank you all right guys so we finished building the cluster as you can see here that's a eight Port switch we have four ethernet cables connected to our Raspberry Pi 4S we have a total of four Raspberry Pi Force One's a four gig one is a two gig and we have two one gigs so a total of four Raspberry Pi 4S and we have the power connected and all you have to do is Power It Up basically so this is just part one in the next part we're actually going to set up the software we're going to set up the cluster we're going to download raspberry and all that stuff this is going to be a total of four parts by the way so the next part we're gonna set up the cluster that's pretty much it for this part all right guys so that's pretty much it for this video so this was video one now stay tuned for video part two of this build where we set up the cluster if you guys like this video please give me a like if you want more videos like this please subscribe to my channel I'm recent from rosmertech.com and thank you guys for watching what's up guys I'm arson from rossportec.com how you guys doing I'm doing well hopefully you guys are doing well today too now welcome to part two of our Raspberry Pi 4 cluster computer series now in this video we're only going to work with one of the pies in part three we're gonna finish the cluster we're gonna set up the other pies and part four we're gonna test out our super computer to see how it performs so in this video we're going to install rasp being and we're gonna stall a bunch of stuff we're gonna set up our Raspberry Pi we're gonna install all the things we need to install part three again we're going to set up the rest of the Raspberry Pi's and part four will be the cluster test alright guys so this is the website that I created this is called Dev unicorn I created this website to have a place for all my tutorials videos that I create uh regarding Raspberry Pi's programming all of that stuff is going to go here it's going to live here it's gonna Live on YouTube so originally I used to put my stuff on rosberg Tech but I have a new site it's called Deb unicorns all my stuff is going to go on this site now I created a new page this is called the Raspberry Pi 4 cluster supercomputer I'll leave a link to this page this is the main page we're going to be using for this whole series we're going to be copying a lot of the stuff from this page now I added everything to this page now these are the parts with all the links here I have to fix the links by the way these links are not active but by the time you guys watch the video they should be working so I'm just going be links to other parts these are the software that we're gonna need to install like raspy and went through YouTube disk imager all that stuff and these are your full instructions and all the code we're going to be able to copy and paste onto our tournament terminal so without further Ado let's get started so the first thing we're going to need to do is navigate to this page here raspbian raspbian is the OS for Raspberry Pi we're gonna download the light version here now it's raspbian Buster this is the newest version of raspbian now if you guys watch this video in the future it might be a different name don't worry about it just download the light version make sure it's the light version and I'm sorry this is the light version right here and we want to download the zip so download the zip it should take about a minute or so to download all right once it's finished downloading you're gonna extract it to some place I'm gonna extract mine to the desktop press OK it's extracting the file to the desktop it basically was zip so you need to extract it so you you guys have to do the same thing extract it to wherever you want to extract the suit but remember where you extracted it to so that's done now we're going to move on to the next tab this is win32 disk immature uh this program is going to allow us to burn the Raspberry Pi image onto a Micro SD card so you're going to need a Micro SD card reader and it has to be connected to your PC for this to work so we're going to download it click on download I have mine downloaded already so once you've finished downloading win32 disk immature we're going to move on to putty now putty is a program that allows us to remotely access our Raspberry Pi's it's a pretty cool one I've been using it for years so download parif find out which one you want here download it once you finish downloading it we're gonna move on to the next part we finished downloading all that stuff we're going to open up win32 disk Imager we just finished downloading it and installing it so open it up should look something like this now you're going to want to make sure that your micro SD card is connected to your micro SD card reader so I just connected mine and hit OK here I'm going to click this I'm going to close this now we want to open up click on this folder icon here and navigate to wherever you downloaded your image so I'm going to go to desktop that's where I extracted mine and I'm going to look for the image and it should be here Yep this is the image raspbian Buster light again uh if you're doing this in the future it might be called something different Buster is the newest version of raspbian as of today tomorrow might be something else so I'm gonna click on it click open then click on right click on yes now it's going to start burning the image onto the SD card so let that do its thing once it's finished we're gonna come right back all right so it's finished burning it onto our micro SD card we're going to click on OK we can close this now now we're going to open up our file Explorer here and we're going to navigate to our Drive letter uh the one that says boot it's the one we just burned mine says Drive G yours could be whatever so just click on the one that says boot in this directory in this directory here this is the boot directory for raspbian we're going to create a new file so we're going to right click this here the screen I'm going to click on new scroll down uh where it says text document click on that now we're going to delete everything in here don't leave anything including the dot text we don't want this to have any extension so we're going to type in SSH and that's it and we're going to type in yes so uh as type your should be filed it shouldn't be text so all we did was type in SSH and that's it so this is a little trick that will allow us to enable SSH so by default raspbian stopped enabling SSH we're going to need SSH enabled if we want to remotely access our Raspberry Pi which we're going to do with putty so this is a neat trick that I learned uh and it helps us enable SSH so again by default SSH is not enabled for security reasons so I'm going to close this now what we're going to do is we're going to take out our micro SD card connected to our Raspberry Pi make sure our Raspberry Pi is connected to our Network the same network we're using right now on our desktop right and we have to have an internet connection and uh Power on the Raspberry Pi and we could move on to the next step all right guys so now I connected my Raspberry Pi I have the micro SD card connected to the Raspberry Pi I have the raspberry part I have the Raspberry Pi connected to our network using an ethernet cable I powered on the Raspberry Pi now we can move on to the next step and the next step is to find out the IP address of our Raspberry Pi so we can do that by opening up terminal so if you're using Windows type in CMD here in search then hit enter this terminal window should pop up here and uh we're gonna type in ping p-i-n-g hit space then we're going to type in r-a-s-p-b-e-r-r-y pi by default uh the Raspberry Pi network name should be Raspberry Pi so if we ping Raspberry Pi it's gonna get if it's on our Network it will give us back the IP address so we're gonna hit enter and it's working because we're getting an IP address back here so uh the the IP address for my Raspberry Pi is 192.168.1.17. yours is going to be different make sure you write it down so I'm writing mine down right now 192.168 that one that 17. yours is going to be different so make sure you write yours down all right so now that we got that we're going to close this we're going to open up putty click on Yes Putty is the I'm sorry it's not putty this putty okay so putty is basically a lot so what putty does is allows us to remotely access our Raspberry Pi so it's pretty neat so right here we're going to type in our IP address of our Raspberry Pi minesis192.168.1.17 your race will be different so type in yours hit open click on yes as you can see now we're connected to our Raspberry Pi all we need to do is type in the username and password if we didn't add that file originally to the boot directory this wouldn't work because by default SSH is not enabled because of security reasons we don't want hackers to automatically uh log into our Raspberry Pi's by default right so uh login as is going to be pi type in pi P I hit enter Then the password is going to be raspberry so r-a-s-p-b-e-r-r-y that's the username and password by default so now we successfully remotely access our Raspberry Pi so this is why we downloaded the light version by the way we don't need the graphical user interface we only need this right here the terminal the core of the operating system now we're going to type in raspy hyphen config sorry let's just copy it from here sudo I forgot to type in sudo so I'm copying it from here we're using the page on the left here this is the page I created to help you guys with all the steps and all you have to do is really copy and paste so when I say when I'm typing something in you can just copy and paste it from here so pseudo uh space raspy config this opens up like the settings for the Raspberry Pi so we're gonna hit enter now the settings page opens up to our Raspberry Pi it's called the configuration tools all right first thing we want to do is scroll down to Advanced option then we want to go to the first one here where it says expand file system hit enter now it basically expanded the file system so what it's doing is let's say you have a eight gigabyte micro SD card when it first uh installed the raspin on that micro SD card you weren't using the entire like a gig it was only used in a small portion of it so by doing this we expanding the file system to use the entire 8 gig of the micro SD card now we're going to go back to the first screen here under Network options this is number two Network options hit enter or it says hostname hit enter hit enter Again by default again the the name is going to be Raspberry Pi that's the network name or the host name so we're going to change it here we're going to change it to capital P lowercase i zero one this is going to be Pi zero one our first Pi R Master Pi so then we're going to hit OK so now we changed our uh Pi name so now we're gonna hit tab it's going to bring us down to here then we're going to make sure we highlight finished hit enter and that's basically it it kicked us out of uh putty right here because we uh changed some stuff around then it rebooted so we're gonna close this so we're gonna open up putty again I'm gonna type in our IP address so mine says 192.168.1.17 yours will be different hit enter type in the username which is pi then password is raspberry all right now as you can see we've finished this part here where it says installing raspin we're finished with that now we're going to move on to this portion where it says installing MPI ch so all we really have to do is just copy these lines of code here so I'm going to copy it including the sudo paste it onto the terminal here hit enter and give it a couple of minutes to run now that that's finished we're going to copy the second line here sudo make directory and p i c h two so basically what this is doing is uh it's making a directory called MPI ch2 hit enter all right so I finished making that directory basically uh what Sudo is Sudo is a Linux command that gives you uh higher privileges like a uh the highest privileges you could possibly have so if you don't type in sudo for some commands it might not work so that's why I type sudo for everything so just just make it easier for everybody so now we're going to move into the directory so we're going to copy this third line of code here copy it where it says CD so we're going to paste it onto our terminal so what's CD CDs change directly we're moving into the directory you we just created here MPI ch2 so once we hit enter we're going to be in that directory as you can see here now we're in that directory now we're going to copy this line of code here we're going to download something and we're going to download MPI CH version 3.2 so paste that there hit enter it should take a couple minutes to download alright so that's finished downloading we're gonna copy this other line of code right under it which is going to extract the file we just downloaded alright so that's done we're going to create or we're going to copy this line of code here this is going to create a directory in the home directory called RPI MPI so we can hit enter that's done we're going to copy this next line of code here we're going to make another directory inside the direct we just created called MPI hyphen install so copy that paste it there hit enter and uh we're gonna make another directory and I forgot to type in sudo so I'll fix it so before you paste this next one type in sudo here hit space then paste this one here basically it's making another directory called MPI built inside the pi directory hit enter so now we're going to copy this line of code here we're going to uh install something called the g4train so copy this line of code paste it sudo apt-get install so appkit install is the Linux version of getting stuff like downloading something and installing it so what what we're installing is called g4tran so I'm going to hit enter give it a couple of minutes to install if it asks you to continue just type Y and hit enter again all right now that that's done we're going to copy the next line of code underneath it here paste it hit enter this one might take like maybe 10 or 15 minutes so if it takes a really long time don't be scared that's normal all right so that's done now we're gonna copy this next line of code sudo make copy it paste it here and basically this one's going to take the longest because we're making everything we just installed here so sudo make hit enter all right so that's finished now the next step I'm gonna copy this line of code here copy that sudo make install so paste it here the first one was very long now this one is also going to be long so just hit enter and I and I'll be back once it's finished now that that's done we're going to copy this line of code here which is allowing us to move to the last directory we're in or the main directory now copy this line of code here Nano bash RC paste it it should open up a text editor which it does now we're going to copy this here where's this path equals all the way up to right here where it ends with bin copy that all right so we're going to click on a terminal we're going to hit the down arrow you want to go all the way to the end all right this is a document so we're gonna go all the way to the end right to right about there we're going to paste what we just copied right so now we're going to copy this instruction here we're going to hold Ctrl all right hold the control press six and X together 6 x together so on the terminal we're going to hold Ctrl press six x together then y for yes and enter all right so that's it we just edited that file and add this line of code at the bottom of it so now we're going to reboot so we're going to copy this here sudo reboot which will reboot the Raspberry Pi once we reboot the Raspberry Pi we're going to lose the network connection with putty so we're gonna close this up here we're gonna open up putty again we're gonna give the Raspberry Pi about like 10 or 15 seconds to reboot because if it's still rebooting this won't work so we got to give it a couple of seconds to finish rebooting while it's rebooting we're going to type in our IP address so our Raspberry Pi mines is 192.168.1.17 Type in yours I'll click open we're going to move this up over here so you can see it better and once it's finished rebooting it should load up with the username prompt now we're going to type in the username which is Pi Pi hit enter Then the password is a raspberry r-a-s-p-b-e-r-r-y hit enter now we're logged in so now all we have to do is copy this line of code all right so copy this line of code here and if we get our host name that means whatever we did up to this point is it's working so copy it paste it hit enter and we got our host name back we changed it to Pi zero one that means whatever we did works so that's how we were able to test it out we're almost done with this video we've still got to do this part here we're installing MPI for for PI MPI is the software that's going to allow us to Cluster our Raspberry Pi's it's basically us you know one of the more popular ways to create a cluster using computer so MPI for pi is the pi version of that so we're going to install MPI for pi so now we're going to scroll down we're going to copy the first line of code here it's going to install a pi for pi version 2.0 paste it there hit enter okay now that's finished we're going to copy the second ladder code the second line of code it's basically extracting the file we just downloaded so it's pseudo tar tar is basically just extracting and these are permissions these are the type of things we wanted to do the zxf and the file name.gz gz is the is the like a raw file but it's used for uh Linux if you're used to like that roar or that zip that gz it's like the Linux version of it so we're gonna paste it here once we hit enter it's going to extract that file now we're gonna move to to our new directory here copy that paste it here cd2 MPI for pi hyphen 2.0 hit enter or in that directory now as you can see put down here um I'm going to copy this line of code here where it says sudo aptitude install python.dev so uh we're installing python.dev so copy that hit enter oops what we're going to do is type in sudo AP app hyphen g-e-t hit space install p y t h o n hyphen Dev hit enter now it's going to download Python and install it type in y hit enter I have to update this line of code here all right so that's done now we're going to copy this next line of code python set up the pi build copy that I paste it here hit enter all right so that's done now we're going to copy the next line of code pseudo python setup install that's done we're going to copy this line of code here we're almost done guys we got a couple more lines of code for this video so copy that paste it hit enter now finally this is the final line of code for this video so copy it paste it before you hit enter I'm going to explain to you what's going to happen so what this is going to do it's going to test out MPI and it's going to print out our our name plus hello world five times if we see that that means whatever we did up until now worked we installed everything successfully including MPI for pi so now we're going to hit enter and as you can see it says hello world and and it shows you the process and then it shows our name five times so our name is pi zero one that means everything we did up until this point was successful so if you get up to this point and you're getting an error you're gonna try to start from the beginning you might have missed one line of code here and that's pretty much it for this video and part three the next video where we're going to finish the cluster everything should be ready to go in part four we're gonna do the benchmarks we're gonna run a bunch of different scripts to test out the power of our Raspberry Pi cluster compare it to a regular Raspberry Pi without a cluster comparing it to other computers to see how much performance we get out of a cluster computer alright guys so that's pretty much it for this video I'm listen from rosmertech.com and thank you guys for watching what's up guys I'm Arsen from rossmertech.com how you guys doing I'm doing well hopefully you guys are doing well today too now this is video three of our Raspberry Pi 4 cluster super computer video series in this video we're going to finish up the cluster we're going to set up the rest of the Raspberry Pi's and the cluster will be completed in video 4 or part four we're actually going to test out the Raspberry Pi 4 cluster we're going to run some benchmarks we're going to run some Python scripts to see how powerful the Raspberry Pi super computer cluster really is without further Ado let's get started with this video now the first thing you're going to need to do is open up a URL I'm using Chrome and navigate to this URL right here this is a page I created this is the Raspberry Pi 4 cluster page that I created on my Dev unicorn website link will be in the description we're using this page to finish our Raspberry Pi for cluster as all the steps and we're going to copy the code from this page here and once we navigate to that just minimize it now what we're going to need to do is burn raspbian and all of the other Raspberry Pi instead of redoing what we did in the last video to All the Other pies what I'm going to do is copy the image from our PI one and burn it onto the other Raspberry Pi so we don't have to repeat video part two with all the other Raspberry Pi so we just have to just copy it and burn it onto their SD cards it's pretty simple now to get this to work disconnect the micro SD card from your Raspberry Pi the one we were working on the last video connected to your computer so first we need to do is open up win32 this Imager and we're going to navigate to the folder where we want to save our image file I'm going to go to my backup drive here and I'll just save it in the directory of the backup drive now I'm going to call mine uh rasp very high for cluster and just hit open now we're going to hit read now what's going to happen is it's going to read our micro SD card and burn it into a image onto our computer so we're going to take that image and we're going to write it to the rest of the micro SD cards of our Raspberry Pi cluster so we don't have to like repeat video two on the other Raspberry Pi's so once this is finished I'll be right back all right now that's finished I'm going to click on ok now we're going to close this so now we have a image burnt onto our computer now all we have to do is uh I'm gonna do this for all our raspberry pies and all their micro SD cards you have to open up win32 disk imager right you're gonna click on this folder icon you're going to look for wherever you saved that image file I save mine and back up here and uh whenever you're looking for your image file you have to make sure you have to click on this box here and and this option here with the DOT um look for that file this is the one I created Raspberry Pi for cluster click open then make sure that your micro SD card is connected to uh to your drive now you want to connect the second micro SD card you want to take out the one we just made an image of put it back into your Raspberry Pi one take out Raspberry Pi 2's micro SD card plug it in then all you have to do is click on right you're gonna do this for all the micro SD cards so whenever you finish burning them plug them back into the Raspberry Pi once you finish that now we can move on to this next step and this next step is to turn on the Raspberry Pi make sure all your SD cards are connected to all your Raspberry Pi's make sure they're connected to your network the same network where you have internet so once that's done we can move on to the next step okay so now what we need to do is open up putty we're going to open up our web browser and I'm just going to move this here expand this a little bit so that we have both of these windows open at the same time here so uh we left off right here where where we were supposed to install nmap so that's what we're going to do right now I'm gonna log into my Raspberry Pi uh log into your Raspberry Pi one uh the same Raspberry Pi you logged into a video two so mine says 192.168.1.17 yours is going to be different I'm going to move this over here so you guys can see better and login is pi and the password is raspberry r-a-s-p-b-e-r-r-y all right so we're logged into our PI one right now so now again we left off right here installing nmap so we're going to copy this line of code here sudo app get update it's going to update the Raspberry Pi basically and give it about a minute to finish we're going to copy this line of code here but right here I made a mistake see see right here this is a capital S it's not supposed to be a capital S so just uh type in sudo and a command line s-u-d-o hit space then copy it from here app get install and map it's basically installing a map and paste it here hit enter what nmap is it allows us to like scan the IP address so we can get the IP addresses of all our Raspberry Pi's and the current IP address of our current Raspberry Pi so it's going to ask you do you want to continue typing why hit enter all right so that's done now we're going to copy this line of code is if config paste it it's going to show us the IP address of our current Raspberry Pi the one we're logged into now which is recipe Pi number one hit enter and I'm going to scroll all the way up and as you can see this is our Raspberry Pi IP address 192.168.1.117. yours is going to be different so now we we want to use the next line of code here which is going to scan the entire network and it's going to give us the IP addresses of all our Raspberry Pi so we're going to copy this paste this here hit enter and what we're going to do is once that's finished uh scanning I'm going to copy the IP addresses of our Raspberry Pi so all right so these are the IP addresses for my Raspberry Pi here yours is going to be different we know that these are the IP addresses for the Raspberry Pi because they all have the same name we haven't changed their name because we copied the SD card from part two so they're all named Pi one we're going to change the names in this video but as you can see Pi one IP just got 192.168.1.14 the next one is 192.168.1.18 uh then we have 192 then 168.1.19 then the final one is the one we're working with right now it's 192.168.1.17 copy these down on a piece of paper I'm going to do that as well so what I'm gonna do with mine because I like to have mine in number order um dot one four this one right here I'm Gonna Keep It uh Raspberry Pi number one uh the next one that wants seven I'm gonna make it a Raspberry Pi number two and uh this one here dot eight I'm gonna make it Raspberry Pi number three and the final 1.9 I'm gonna make it Raspberry Pi that four so we can do that right now all right so the first thing we want to do is because Pi number one my Pi number one is gonna be that one four it's already Pi number one I have to change the host name of the pie that we're in right now but I'm gonna wait to change that to last so I'm in that one seven and I want that one seven as Pi number two so I have to wait till the end to do that so so we're gonna go into so we're gonna SS H into Pi number three to do that copy this right here SSH and this IP address there dot paste and we're just going to change the ending here to my uh Pi 3's IP address my Pi 3 IP address is dot one eight so I'm going to hit enter I want to type in yes hit enter then the password is raspberry and we're logged into our PI number three or on my Pi number three uh yours is going to be different so let's change the hosting is pretty simple just copy this line of code here sudo raspy config this will bring up the configuration page that hit enter all right so it's pretty simple we're going to scroll to networking hit enter and click on where it says host name click ok now by default is uh Pi one because we copied the image from PI one so we're going to change this to Pi number three just delete the one and put a three and hit tab I'm going to press ok and we're gonna hit tab click on finished type in yes it's going to reboot the pi and we're going to lose connection to our PI number three now we're back to Pi number dot one seven which I want to be Pi number two so right now we're going to SSH into Pi number four so we can change the hostname of Pi number four so to do that again we're going to copy this line of code here SSH and then the IP address here it's SSH Pi at then the IP address so I'm going to change mine to 8.19 all right hit enter type in yes I'm gonna hit enter passwords raspberry now I'm logged into Pi number four again we have to change the host names to change the hostname again copy this line of code here sudo raspy config copy it paste it hit enter now we're going to scroll down to option number two which is networking hit okay under N1 which is hostname hit enter hit OK again now we're going to change this to Pi number four right so we're going to hit the tab button hit enter now we're going to hit the tab button again move over to finished then hit enter then click on yes now we logged out from PI number four so now I'm going to show you that Pi number one which is uh that one four is actually Pi number one because we copy the image from the other because we copy the image of the original one so what I'm gonna do is I'm going to copy the SSH here right now I'm gonna I'm gonna change this to that one four which is pi number one for me I'm gonna hit enter password is harass very hit enter and copy this code here sudo recipe config to open up the configuration page paste it hit enter scroll down to networking options host name okay as you can see it's already Pi number one because we copy the image from last videos so I'm going to hit tab I hit OK I'm going to hit tab again move over to finish hit Okay click on yes we logged out of Pi number one which is 1 4. so now the final step is to actually change the IP address of the pi we're actually in right now which was Pi one now it's going to be Pi 2. so to do that I don't have to SSH into anything because we're already logged inside of Pi so I'm just going to do is copy sudo raspy config copy it paste it hit enter scroll down to network options and click in hostname okay right now it's Pi one we're going to change it to Pi number two so hit tab hit OK hit tab again move over to finished hit enter yes cover boot so now we lost uh connection to our Raspberry Pi you gotta close putty so now what we're going to do is we're going to start from Raspberry Pi one so we're going to start logging into Raspberry Pi 1 then SSH into the other one so I'm gonna open up putty and my Raspberry Pi one is 192.168.1.14 remember your guys number is not going to be the same as mine so whenever I say Pi 1 log into yours so mine says that one four I'm gonna hit open typing yes here or click yes then the login is pi and the password is raspberry all right so we logged into our PI number one all right so now we're finished with this part here we have to do this part here where it says edit machine file we're going to copy this line of code here where it says Nano machine file so copy this line of code Nano machine file paste it hit enter so all we have to do is add I'm going to type it into here so press I to edit right now we're going to type in our IP addresses so now we're going to type in the IP addresses of our Raspberry Pi's we're going to start with pi one my Pi one is 192.168.1.14 then we're going to hit enter then we're going to type in our IP address of our PI number two mines is 192. mine says [Music] 192.168.1.17 now I'm going to hit enter go to the next line then I'm going to type in 192.168.1.18 is my number three I'm gonna hit enter Then 192.168.1.19 is my Pi number four so I'm going to hit enter there now to save this all we have to do is hold control on your keyboard hold Ctrl press 6 x y then type in yes to save y for Save then hit enter now we saved our file and we can check to see if it's saved we're going to type in Nano and the Machine file again as you see these files are saved in there all right so we edited our machine file with the IP addresses of our Raspberry Pi's in Raspberry Pi order with the first one being Pi one the second one being pi two the third one being Pi three and the fourth one being Pi four so now we're moving on to the next step here we're going to copy this line of code here and we're going to paste it here and we're going to hit enter and if we see Pi 1 that means whatever we did up inside now works so now we're going to try to copy this line of code and paste it so if we try to copy this line of code and paste it what's going to happen is we're going to get we're going to see Pi 1 right because we're logged into Pi one but we're getting errors for the rest of the Raspberry Pi's what we should have saw is all the uh Pi names here Pi one two three and four but to get that to work we have to scroll down to here and let's just escape this here it worked I'm going to press Ctrl C all right and I'm going to type in clear to get rid of all that text right there clear just gets rid of this clears the screen up basically alright guys so now we're gonna start this next step here we're gonna copy this line of code SSH key gym paste it you're gonna hit enter a few times all right I'm gonna type in yes because I already did this the first time but you all you have to do is type in enter and so you see this thing here this like graphics so now we're going to copy this next line of code I'm going to copy this next line of code here enter I'm going to copy this next line of code here and hit enter so now we're going to scroll down I'm going to do the same thing with pi 2 so we're going to SSH into Pi number two copy that paste it my Pi 2 IP address is that one seven so delete this changes to that one seven euro is going to be different hit enter passwords raspberry passwords are raspberry we're logged into our PI number two now all we have to do is copy this line of code here I'm going to do the same thing we did with pi number one paste this here hit enter a few times I'm gonna have to type in yes because I did this before you're just going to type in enter a couple of times so you see this here I'm going to copy this next line of code here I paste I'm going to hit enter copy this next line of code here paste hit enter now we're going to copy this line of code here change this IP address here to this to our PI one my Pi one is that one four then we're going to hit enter passwords raspberry or s p b e r r y we're gonna hit enter all right so I'm gonna copy the next line of code here paste it hit enter and then we're going to type in exit e x i t which is going to exit up which is going to exit the SSH session which would bring us back to Pi number one so now we're going to start with pie number three SSH into Pi number three type in the IP address of UR Raspberry Pi number three mine here is the one eight I'm gonna hit enter type in yes hit enter password to raspberry all right so I'm logged into a pi number three we're going to copy this here SSH key gen paste it you're going to hit enter a few times I'm gonna have to type in yes because I've done this before but you're just going to type in enter a few times until you see this image here now we're going to copy this next line of code here paste it hit enter copy this next line of code here paste it hit enter copy this line of code here including the space and the dot here hit enter we're going to change this to Pi number one's IP address right here 1 8 is.14 so I'm just going to add the four so we're gonna hit enter I didn't copy the whole thing so I'm going to do it again copy paste here change my IP address to Pi number threes by pi number threes IP or Pi number ones I'm sorry my Pi number ones IP address is that one four so we're gonna we're gonna hit enter so we can change the IP address of our PI number one minus dot one four so we're gonna hit enter alright guys so we're going to copy this line of code here SSH key gen copy it paste it here hit enter and enter a few times CCN code I'm going to type in yes for mine because I already did mine I'm gonna keep hitting enter to see this graphic here I'm going to copy this line of code here paste it hit enter I'm going to copy this line of code here hit piece hit enter copied this line of code right here paste I'm going to change this to Pi number one's IP address which is that one four for me yours is going to be something different make sure you added that space hit enter passwords raspberry and answer that's done now we're going to copy this next line of code here paste it hit enter then we're going to type in exit exit and answer now we're exited from PI number three we're going to SSH into Pi number four copy this line of code here as stage at Pi or SSH Pi add an IP address my IP address of Pi number four is that one nine so I'm going to delete that edit that one I hit enter type in yes and the password should be raspberry sensor now we're logged into our PI number four we're gonna do the same thing we did with the other Raspberry Pi it's going to copy this code here paste it hit enter keep hitting it there I'm going to type in yes because I've already done this before you're just going to keep hitting enter so you see this graphic here and I'm going to copy the slider code here enter we're going to copy this line of code here paste it here hit enter now we're going to copy this line of code here including the space and the DOT make sure you add the space in the dot right there unless it won't work we're going to change this to our PI number ones IP address our PI number one's IP address is the one four mics is that one four years it's going to be different so I'm just going to add 1 4 there hit enter password hit enter finish with that we're going to copy this line of code here paste and hit enter I'm going to exit e x i c so we're exiting Pi four we're back in pi number one now so now we're almost done we have a few more commands to do so this here we're going to do this all Pi so we're going to copy this line of code here paste it here we're going to change this to our PI number two's IP address my Pi number two's IP address is that one seven so delete that I'm gonna add one seven I'm gonna hit enter typing yes I'm gonna hit enter again the passwords for us Barry all right so now we're going to copy this line of code paste it here hit it now we're going to copy this line of code here make sure we change this IP address to our PI number three's IP address by pi number three is dot one eight or it's going to be different I'm gonna hit an enter passwords for us Berry hit enter now we're going to copy this lineup code here paste it hit enter now we're almost there I'm going to copy this line of code here including the space in the DOT I'm going to change it to our PI number fourth address my Pi number Force address is that one nine so delete that at a one nine we're gonna hit enter our password is raspberry and answer now we're going to copy this here and this is the last line of code to actually configure a Raspberry Pi cluster so hit enter now we're done with that all right so now all we have to do is just copy this line of code here I'm going to copy this line of code here paste it hit enter now we're going to copy this line of code here and hit enter if we if we hit enter and we get the host names of all our Raspberry Pi's everything worked so we hit enter I got back the hosting for all the Raspberry Pi's that means everything we did worked our cluster is configured all the nodes are talking to each other we have a master node everything is working fine now if you don't see this if you're getting an error uh just go back from like Start From Here Again log back into Raspberry Pi number one and redo this whole part also check your Nano file make sure your Nano file the IP address of all your Raspberry Pi's are correct like uh before I made this video I made a error I added a two instead of a one here in my Nano file and you know it took me forever to figure that out but oh check your Nano file first make sure that the IP addresses of your Nano file everything is correct start from the beginning like 192.168.1 and then the whatever IP address your number ends with then to do the same thing with the second one then the third one then the fourth one make sure it's exactly the same then save the Nano file again then go start from the step again log into um your Raspberry Pi number one wherever your putty into your recipe Pine number one basically then start from here then work your way all the way to here again then that should fix your problem and yeah that's pretty much it alright guys so that's pretty much it for this video we're pretty much finished with our Raspberry Pi cluster now on video part 4 we're actually going to test out our Raspberry Pi 4 cluster super computer performance to see if it actually does improve our performance we're going to run some benchmarks we're going to run some Python scripts we're going to do a bunch of cool stuff so stay tuned for that video If you guys like this video please give me a like if you want more videos like this please subscribe to my channel I am rasim from rossportec.com and thank you guys for watching
Info
Channel: Rasmurtech
Views: 2,090
Rating: undefined out of 5
Keywords: raspberry pi projects, raspberry pi cluster, raspberry pi, raspberry pi 4
Id: zgj44hhw_1I
Channel Id: undefined
Length: 51min 48sec (3108 seconds)
Published: Mon Jul 24 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.