PolarSPARC |
Building a ODroid N2 Cluster
Bhaskar S | 04/26/2019 |
Part 1
In the article Building a ODroid XU4 Cluster, we laid out the ingredients to build a 5-node home lab cluster using the powerful 32-bit ODroid XU4's. As was indicated, the ODroid XU4 sports a powerful octa-core ARM-based Samsung Exynos5422 CPU with two sets of quad-cores (also referred to as the big.LITTLE) with Cortex A15 running at 2 Ghz and Cortex A7 running at 1.4 Ghz. It has enough horsepower to run Linux and serve as a mini-development cluster. However, the ODroid XU4 is a 32-bit SBC with 2GB of LPDDR3 on-board memory.
In my quest for a true 64-bit quad-core SBC with each core close to 2 Ghz and with at least 4GB of RAM, came upon this newly released beauty called ODroid N2 (4GB RAM). It sports a powerful hex-core ARM-based Amlogic 922X CPU with two sets of cores (also referred to as the big.LITTLE) with a quad-core Cortex A73 running at 1.8 Ghz and a dual-core Cortex A53 running at 1.9 Ghz. In addition, it comes with a *HUGE* heatsink mounted on the bottom (where the CPU is located). It comes in two configurations, one with 2GB of DDR4 RAM and the other with 4GB of DDR4 RAM (running at 1320 Mhz). It has 4 USB 3.0 ports and a 1G ethernet port.
The following are the necessary items needed to build a 5-node ODroid N2 cluster:
Five ODroid N2 4GB single-board computers
Five 12V/2A power adapters
Five Class 10 64 GB microSDXC cards
Five Ethernet network cables
One pack of M3 60mm male-female brass spacers
One pack of M3 12mm male-female brass spacers
One pack of M3 6mm phillips head steel screws
One Multi-port Ethernet switch (if your home network switch does not have enough of available ports)
In my case, did not need one since have a 24-port Ethernet Switch with enough of free ports to use
One Portable USB card reader (if your desktop does not have a built-in media card reader)
In my case, did not need one since my desktop has a built-in media card reader
One Belkin BE112230-08 12-outlet power strip
We need to firmly secure the ODroid N2 onto a solid, flat platform, which can be stacked on top of one another. In my case, a trip to the local Dollar Tree yielded an interesting option - 12.5 cm x 12.5 cm Square clear plastic artsy tray.
For my cluster, purchased 5 of these.
Part 2
Now comes the next stage - assemble the items to build the 5-node ODroid N2 cluster.
ODroid N2 is a bit unique in its design. Unlike ODroid XU4, there are no holes on the SBC to easily stack them up on top of one another. This is due to the heatsink that occupies the entire bottom of the SBC. However, the heatsink has holes to screw the 12mm M3 brass spacers on to the 4 sides as shown in the illustration below:
Continue this process for the remaining units
We need to drill 4 holes (red circles) to secure the SBC. Ensure the holes align with the four M3 12mm spacers we bolted onto the SBC in Figure. 12. In addition, we need another 4 holes (blue circles) on the corners of the plastic tray for stacking the trays on top of one another as shown in the illustration below:
Continue this process for the remaining units
We need to secure the ODroid N2 on top of the clear plastic tray using the M3 6mm screws through the 4 holes (red circles) from Figure. 13 above as shown in the illustration below:
Continue this process for the remaining units
Insert the 12mm M3 brass spacers through the 4 holes (blue circles) from Figure. 13 above and screw them on top with the 60mm M3 brass spacers as shown in the illustration below:
This is for only one of the units that will be at base of the stack
Stack the next plastic tray with the SBC from Figure. 14 on top of the unit from Figure. 15 and screw them on top with the 60mm M3 brass spacers as shown in the illustration below:
Continue this process for the remaining units. For the topmost tray, secure with the 12mm M3 spacers
The final finished cluster rack should look something like the illustration as shown below:
Next, download the latest stable release of Ubuntu MATE Linux operating system (based on Ubuntu Bionic 18.04) as shown in the illustration below:
At the time of this writing, the version of Ubuntu MATE was 20190325.
Download the latest stable release of Etcher. This tool will be used to burn the Armbian operating system image onto each of the microSDXC cards
Insert a microSDXC card into the sdcard reader, launch Etcher, select the Ubuntu MATE image. Then press the Flash! button to burn the image onto the microSDXC card as shown in the illustration below:
Insert each of the flashed microSDXC card into the ODroid N2 sd-card slot and ensure the toggle switch on the ODroid N2 is positioned at MMC instead of SPI as shown in the illustration below:
Part 3
Now comes the final stage - prepare each of the ODroid N2 nodes for operation. Note, we want to connect, power-up, and setup each of the ODroid N2 boards * ONE* at a time.
Attach the barrel end of the power adapter to the power slot on ODroid N2 and plug the other end to the power strip. Similarly, attached one of the Ethernet cable to the RJ45 slot on ODroid N2 and the other end to the Ethernet Switch as shown in the illustration below:
Connect a HDMI monitor to the ODroid N2 using HDMI and power up the power strip. The ODroid N2 should take few seconds to boot up and after a few seconds would completely power-off. This is the *NORMAL* behavior. Turn off the power strip and turn it back on. In a few seconds, we will be presented with the Ubuntu MATE desktop. The default user-id is odroid and the default password is odroid.
Change the default password to a more stronger and secure password by clicking on the Ubuntu menu on the top-left corner and choosing Control Center from the drop-down. On the Control Center screen, click on Users and Groups icon to change the default user password.
Change the default date/time/timezone to the desired value by clicking on the Ubuntu menu on the top-left corner and choosing Control Center from the drop-down. On the Control Center screen, click on Time and Date icon to change the date/time/timezone.
Open a terminal window by clicking on the Ubuntu menu top-left corner and the choosing System Tools -> MATE Terminal from the drop-down. In the terminal window, execute the following command:
$ sudo pluma /etc/ssh/sshd_config
Change the value of PermitRootLogin from yes to no. Save the changes and exit the editor.
We need to assign a unique host-name for each of the ODroid N2 boards in the cluster. In the same terminal window, execute the following command:
$ sudo pluma /etc/hostname
Change the host-name to, say, my-n2-1. Save the changes and exit the editor. For each of the remaining 4 cards we will assign the host-names from my-n2-2 through my-n2-5.
We need to assign a static ip address to each of the ODroid N2 boards in the cluster. Click on the Ubuntu menu on the top-left corner and choose Control Center from the drop-down. On the Control Center screen, click on Network Connections icon. Choose Wired connection 1 from the menu list and click on the edit icon at the bottom left corner (gear wheel icon). Select the tab labeled IPv4 Settings. Choose the value of Manual for the Method. Set the ip address to, say, 192.168.1.51, network to 255.255.255.0, and the gateway to 192.168.1.1. Finally, set the value for DNS Servers to 8.8.8.8,8.8.4.4. Save the changes by clicking on the Save button.
For each of the remaining 4 cards we will assign the static ip addresses from 192.168.1.52 through 192.168.1.55.
Finally, we need to perform a system update to ensure we have the latest software updates. Click on the Ubuntu menu on the top-left corner and choose Control Center from the drop-down. On the Control Center screen, click on Software Updater icon to perform the system update.
And the last step is to perform a reboot for some of the changes to take effect. In the terminal window, execute the following command:
$ reboot
This will safely reboot the ODroid N2 device
Perform the above steps for each of the remaining ODroid N2 devices. Note that as we reboot each of the remaining ODroid N2 cards, they each will get a different ip address assigned.
Hurray !!! At this point, we should have our ODroid N2 cluster ready for action.
References