Building Elder Signs Cluster - Part 0
How to turn six Odroid-MC1 Solos I found on sale for 9 dollars into a PXE booted computer cluster on which to engage in further FOSS hijinks.
Parts
Quantity | Description | Source |
---|---|---|
6 | Odroid-MC1-Solo 8 CPU/2GB RAM 32bit | Hardkernel |
1 | MEAN WELL LRS-350-5 300W 5V 60 Amp Single Output Switchable Power Supply | Amazon |
1 | Gigabit switch with >=7 open ports | E-Bay |
7 | Cat6 RJ45 Snagless Ethernet Patch Cable in Yellow Color | Amazon |
6 | MicroSD cards >= 8GB capacity | Amazon |
6 | 18 AWG DC Power Pigtail Cable, 2.1mm x 5.5mm Barrel Plug Wire Male Connectors | Amazon |
1 | 15A 250V Rocker Switch Power Socket Inlet Module Plug 5A Fuse Switch | Amazon |
1 | Power cord | Amazon |
Tools
- Cable Ties
- Digital multimeter
- Soldering iron, electrical solder, flux
- Screw driver
- Wire stripper
- Electrical tape
Assembly
Power Supply
- Checked on Mean Well power supply, changing switch on side from default of 230V to 115V.
- Wired power socket to AC posts on power supply
- Plugged power cord into socket and wall jack.
- Turned socket switch on.
- Measured DC output of power supply with multimeter, finding 5V as expected.
- Turned off switch and unplugged cord from AC power.
Pigtails
- Stripped lead ends of power pig tails to make slightly longer connections and tinned ends with soldering iron.
- Removed a bit of the wire sheathing to allow lead ends to be separated further for connection between the most spread DC posts of the power supply.
- Wired six pig tail power leads across the DC posts of the power supply.
- Tested for continuity, against short circuits and to be sure center positive, outer negative connection on plug ends.
- Wrapped pigtail bundle with electrical tape and cable tied wiring on power supply.
Cluster
- Stacked the six MC1 units on top of each other and used cable ties on each side to hold stack together as a single unit.
- Plugged a power lead from power supply onto each MC1 unit in stack.
- Checked wiring connections over, plugged in power cord and turned power switch on.
- Verified orange power indicator visible on each MC1 unit.
- Turned off power switch and cabled connected each MC1 unit to network switch using Cat 6 patch cables.
- Connected new network switch to rest of my network using Cat 6 patch cable to another switch already on the network.
- Plugged in new network switch confirming active link on connection to existing network switch.
MicroSD Setup
With things mechanically assembled and seemingly electrically sound, the next step is to create a configuration to boot the MC1 off of on a MicroSD card.
On my computer, I downloaded a minimal Ubuntu 18.04 LTS image for the MC1 from Hardkernel.
Apply image to MicroSD
- Open terminal window
- Changed to directory where downloaded image file was saved.
- Image file was downloaded as an XZ compressed file so I uncompressed using
unxz
command from XZ Utils - Inserted a blank MicroSD card into reader on my computer, noting from system log which device it was detected as. In this case the SD card was detected as
/dev/sdc
- I used the following command to apply image to SD card:
dd if=ubuntu-18.04.3-4.14-minimal-odroid-xu4-20190910.img of=/dev/sdc bs=4M
- The
dd
utility is powerful and can break things on your system if used incorrectly. It is critically important that you are certain of the device you wish the image written to, the bit afterof=
. If this worries you, or you are uncertain of what I am saying, you may wish to consider other methods for transferring the image to the MicroSD card such as using Etcher as documented by Hardkernel. - Be sure to use the correct image file name after
if=
and the correct destination device name afterof=
as there is a high probability of not succeeding and actually damaging your system if you execute the exact command I used without understanding it and adjusting for you specific circumstances. - Additional guidance on the use of dd and transferring images to MicroSD cards, can be found at this link from the Raspberrypi Foundation.
- The
- After the
dd
command completed it’s work and reruned me to a command prompt, I issued thesync
command twice in a row to be certain buffer caches were committed to disk before removing the MicroSD card from my computer.
Initial MC1 Boot, Connection and Update
With image applied to MicroSD card, we are ready to boot one of the MC1 units into Ubuntu, connect to it, and apply some updates.
First time boot
- Inserted the MicroSD card in one of the MC1 units, and turned on the power supply switch on the power socket.
- All orange power indicators came on as expected, and after about 20 seconds, the MC1 unit with the SD card inserted began displaying an additional linking blue led indicating the heartbeat of a successfully booted system. Additionally the network switch was now showing an active network connection for this MC1’s port.
Find and Connect to Active MC1
- The image I am using from HardKernel is configured to pick up an IP address from DHCP, so should have an address from you DHCP server or device such as a router providing DHCPi service. If you are not using DHCP then I will assume you know or can lookup how to find and connect to Automatic Private IP Addressing (APIPA) devices on your network. I run a DHCP server so I was able to identify what IP address on my local network was assigned to the MC1 node booted off the MicroSD card.
- The image I am using, in addition to automatically picking up an IP address automatically via DHCP, also is configured to run an SSH server. Since the MC1 is a headless device, the easiest way to connect to it is over the network via an SSH client of your choice.
- With the IP address of the device from my DHCP server log and the image default user name, I was able to successfully connect to the MC1 node using the following command in a terminal window,
ssh root@192.168.1.109
and providing the default password.
- With the IP address of the device from my DHCP server log and the image default user name, I was able to successfully connect to the MC1 node using the following command in a terminal window,
Configure and Update
Now that I have successfully connected to the node, there are several things I want to change and update immediately. There are many additional changes which will be needed, but the ones listed below are a matter of urgency for me.
- Change the default password
- Create a new user account.
- Grant new user ability to use sudo
- Disable ability of
root
user to connect via ssh.- Before disabling root access via ssh be sure the new account created can connect and use sudo.
- Since sudo works for user, it is time to disable root login via ssh.
- Now let’s make sure
root
can’t get in anymore.
- Make sure name DNS name resolution is working.
- In the resolved.conf.d/ directory, create two files to set the DNS servers you want to use,and any serch domains needed. Files can be named whatever you like, but should have a .conf extension. Files in this directory will override the defaults for the systemd-resoved service. Below ar the files I used and the setting that work for me.
- Finally change the
/etc/resolv.conf
link and restartsystemd-resolved
- Apply all available updates to applications and the Ubuntu distribution.
Next Steps
At this point we have a single MicroSD card which is reasonable base for either creating a new image off of and duplicating to the other five SD cards for the remaining MC1 nodes ore we can take things a little further and use what we have created as the foundation for a PXE boot solution for all of the nodes, as well as shifting the root file system off the SD cards and onto an NFS server, though that will be for another post.