PolarSPARC |
Building a ODroid XU4 Cluster
Bhaskar S | 02/16/2019 |
Part 1
In the article Building a Raspberry Pi 3 Cluster, we laid out the ingredients to build a 5-node home lab cluster using the in-expensive Raspberry Pi 3's. As was indicated, the Raspberry Pi 3 is a popular single-board computer (SBC for short) with quad-core ARM-based Cortex A53 CPU running at 1.2 GHz each, 1 GB of LPDDR2 on-board memory, and a 100M ethernet port. It has decent horsepower to run Linux and serve as a mini-development cluster. However, the Raspberry Pi 3 cluster runs a little sluggish for certain workloads (even running Docker Swarm or Kubernetes).
In my quest for a little more powerful SBC, came upon this little gem called ODroid XU4. It 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. In addition, it comes with a temperature controlled heatsink pre-mounted, has 2 GB of LPDDR3 on-board memory, and a 1G ethernet port.
The following are the necessary items needed to build a 5-node ODroid XU4 cluster:
Five ODroid XU4 single-board computers
Five 5V/4A power adapters
Five Class 10 64 GB microSDXC cards
Five Ethernet network cables
One pack of M3 40mm male-female brass spacers
One pack of M3 10mm male-female brass spacers
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
Part 2
Now comes the next stage - assemble the items to build the 5-node ODroid XU4 cluster.
Insert the 10mm M3 brass spacers on to the 4 sides of the ODroid XU4 from the bottom and screw them on top with the 40mm M3 brass spacers. Layer another ODroid XU4 on top of the 40mm M3 brass spacers and screw them on top with another set of the 40mm M3 brass spacers shown in the illustration below:
Continue this process for the remaining units
The final finished cluster rack should look something like the illustration as shown below:
Next, download the latest stable release of Armbian Linux operating system (based on Ubuntu Bionic 18.04) as shown in the illustration below:
At the time of this writing, the version of Armbian was 5.72. Once the download is complete, extract the image to a known directory (say, /home/polarsparc/Downloads). The image will be called Armbian_5.72_Odroidxu4_Ubuntu_bionic_next_4.14.87_desktop.img
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 card reader, launch Etcher, select the Armbian image (say from /home/polarsparc/Downloads). 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 cards into each of the ODroid XU4 card slots as shown in the illustration below:
Ensure the toggle switch on the ODroid XU4 card has been positioned at μSD instead of eMMC as shown in the illustration below:
Part 3
Now comes the final stage - prepare each of the ODroid XU4 nodes for operation. Note, we want to connect, power-up, and setup each of the ODroid XU4 cards *ONE* at a time.
Attach the barrel end of the power adapter to the power slot on ODroid XU4 and plug the other end to the power strip. Similarly, attached one of the Ethernet cable to the RJ45 slot on ODroid XU4 and the other end to the Ethernet Switch as shown in the illustration below:
Connect a HDMI monitor to the ODroid XU4 using HDMI and power up the power strip. The ODroid XU4 should take few seconds to boot up and if all goes well, will present a login prompt. The default user-id is root and the default password is 1234. Enter the default user-id and the default password to login. We will be prompted to change the default password. Enter the default current password, followed by the new stronger password and then re-confirm the newer (stronger) password.
Next, we will be prompted to create a new user-id followed by a prompt to assign a password. We will create the user-id xu4 and assign a password.
After the new user-id is created, it will launch the Armbian desktop as shown in the illustration below:
Open a terminal window by clicking on the Applications icon on the top left corner and then choosing the Terminal option from the drop-down. In the terminal window, execute the following command:
$ sudo armbian-config
This will open a screen as shown below:
We will refer to this screen as the MAIN screen
Choose the first option System from the MAIN main screen. Press the tab key to navigate to the <OK> button and press enter. This will open a screen as shown below:
We will refer to this screen as the System Setting screen.
Choose the option SSH to install and enable the SSH server. Press the tab key to navigate to the <OK> button and press enter. This will display the SSHD options screen as shown below:
Uncheck the first option PermitRootLogin and press the tab key to navigate to the <Save> button and press enter. This will save the configuration. Next, press the tab key to navigate to the <Cancel> button to exit this screen. This will take us back to the System Setting screen
Choose the option DTB to optimize the board configuration as shown below:
Press the tab key to navigate to the <OK> button and press enter. This will display a screen with a list of board(s) to choose from as shown below:
Select the first option Odroid XU4 and press the tab key to navigate to the <OK> button and press enter. This will display a screen prompting if we want to reboot the device as shown below:
Press the tab key to navigate to the <OK> button and press enter. This will reboot the board and take us back to the Armbian desktop.
Once again open a terminal window and execute the following command:
$ sudo armbian-config
Choose the first option System from the MAIN main screen. Press the tab key to navigate to the <OK> button and press enter to go back to the System Setting screen
Choose the option Firmware to update the system as shown below:
Press the tab key to navigate to the <OK> button and press enter. We will be prompted to confirm as shown below:
Press the tab key to navigate to the <Yes> button and press enter. This will start the update process and after a few minutes we will be prompted to reboot the board once again as shown below:
Press the tab key to navigate to the <Yes> button and press enter. This will reboot the board and take us back to the Armbian desktop.
Once again open a terminal window and execute the following command:
$ sudo armbian-config
Choose the first option System from the MAIN main screen. Press the tab key to navigate to the <OK> button and press enter to go back to the System Setting screen
Choose the option Desktop to disable the desktop as shown below:
Press the tab key to navigate to the <OK> button and press enter. We will be prompted to confirm if we want to disable the desktop as shown below:
Press the tab key to navigate to the <Stop> button and press enter. This will stop and disable the desktop. This will take us to system login prompt. Login as the user xu4. At the system prompt execute the following command:
$ sudo armbian-config
This will take us to the MAIN screen
Choose the option Network to configure the network settings as shown below:
We will refer to this screen as the Network screen.
Press the tab key to navigate to the <OK> button and press enter. This will open the network options screen as shown below:
Select the first option IP to assign ip-address for this card. Press the tab key to navigate to the <OK> button and press enter. This will display a screen to choose the type of ip-address as shown below:
We desire to assign static ip-addresses to our cards (so there is predictability the next time we boot). Press the tab key to navigate to the <Static> button and press enter. This will open the static ip configuration screen as shown below:
Assign a desired static ip-address for this card. In this case, we choose to assign the ip-address 192.168.1.31 for this card. For each of the remaining 4 cards we will assign the addresses from 192.168.1.32 through 192.168.1.35.
After assigning the desired ip-address, press the tab key to navigate to the <OK> button and press enter.
Press the tab key to navigate to the <Cancel> button and press enter to return to the Network screen. Once again, press the tab key to navigate to the <Cancel> button and press enter to return to the MAIN screen
On the MAIN screen navigate to the option Personal as shown below:
Press the tab key to navigate to the <OK> and press enter. This will open a screen as shown below:
We will refer to this screen as the Personal Setting screen.
Choose the option Hostname to assign a host-name for this card. Press the tab key to navigate to the <OK> and press enter. This will open a screen as shown below:
Assign a desired host-name for this card. In this case, we choose to assign the host-name my-xu4-1 for this card. For each of the remaining 4 cards we will assign the host-names from my-xu4-2 through my-xu4-5.
Press the tab key to navigate to the <OK> button and press enter. This will open a screen as shown below:
Press enter on the <OK> button to return to the MAIN screen.
On the MAIN screen, press the tab key to navigate to the <Cancel> button and press enter. This will exit the armbian-config tool
At the command prompt, execute the following command:
$ sudo shutdown -h now
This will safely shutdown the ODroid XU4 device
Perform the above steps for each of the remaining ODroid XU4 devices. Note that as we boot each of the remaining ODroid XU4 cards, they each will get a different ip address assigned.
Hurray !!! At this point our ODroid XU4 cluster is ready for action.
References