Homelab
What is a homelab? A homelab is whatever you have in place that you use for learning stuff and experimenting. Sure you can work on a remote lab learning things, build up a bunch of stuff with free azure/aws/gcp credits, or just read all kinds of textbooks/articles online. I’ve always found my best way of learning was tinkering and experimenting. Making mistakes and having to fix them.
I discovered there is a huge following of homelabs. There’s even specific companies that repurpose used data center hardware to keep it out of landfills! I guess I’m doing my part to help save the environment and helping myself learn at the same time. Go me.
What’s the real reason to buy and build one out? I want to better myself and my understanding of all kinds of stuff.
History of hardware
I started down the path of raspberry pis. I have a pi zero and some rpi4s. Sure you can load up Linux on them and run all kinds of things networked together. Adding up the costs of 2 rpi4s is about $100 all in. This will provide you with 2 ARM cpus and about 4-8 GB of RAM and 32-64 GB of drive space (depending on the chosen RPi and SD card). This is a simple system that is networked together and small. Total actual space will but about the size of 1-2 pop cans. Your headset will take up more room on your desk/under your desk/in your closet.
ARM has gained a lot of ground but there is still a lot of limitations to it. An x86 or a AMD64 system will perform much different from an ARM system.
Finding the right hardware
Full-fledged servers are expensive. A brand new latest generation server can run in the thousands if not tens of thousands of dollars. Cloud data centers are continually updating the hardware that runs the vast majority of the Internet these days. Older hardware does not have the cost effectiveness of power-consumption vs compute power as newer hardware. As data centers upgrade it now becomes a boon for home labs and those wanting to learn. Instead of sending servers to landfills, an entire industry has sprang up around refurbishing old servers for use by individuals/home use.
Companies and Generations
The most notable servers are those from DELL, HP, SuperMicro, and IBM. The main two are DELL and HP although according to quick searches - SuperMicro use to be on par but have started losing ground to DELL and HP recently. This comes down to a supply and demand driving down the prices of DELL and HP thus creating a larger community using those pieces of hardware.
Installation And Setup
Install ESXi
With the Dell 720 that I picked up I had to go and add in a usb stick into the back USB port right in front of the hot swappable power supplies. Slide it in power it on and boot it up. Hit F2 to boot up and install just like you would install anything else (aka windows or linux form a USB stick).
Install VCenter on ESXi
Download the ISO for VCenter because cloning VMs is a lot better than spinning them up from nothing. You can mount this locally then go and connect up to your ESXi host to install it as a VM on the ESXi host.
VM Setup
Root VM Image
Log into VCenter with username you set up for the administrator. This will allow you to be easily able to create VMs on the ESXi host(s) that you have in place. Make sure you downloaded the ISO for the VMs you are going to use: Ubuntu Server
Now you need to upload this into your data store on your ESXi host (or another accessible data store you have set up). Once you have this set up you need to mount it as a CD rom by going in to the settings of the VM and mounting it. You may also want to ensure that you have a resource cluster set up for your k8s cluster in VCenter.
- Create a new virtual machine
- Set up a name and choose your location for the VM to reside
- Select the Computer Resource for the VM (k8s or whatever you called it)
- Select the Data store where the VM will be located
- Select Compatibility for the VM witht he ESXi version
- Select the Guest OS you will be using (Linux->Ubuntu Linux (64-bit))
- Customize Hardware
- CPUs: 2
- Memory: 8/16 GB
- Hard Disk: 32 GB (also be sure to select Thin Provision or risk running out of space quickly)
- CD/DVD Drive: Datastore ISO -> choose the location of you ISO for installation
- Review and Finish
Image customization
Check current hostname
hostname
Or for more detailed information
hostnamectl
To change the hostname:
sudo hostnamectl set-hostname <newName>
Set the IP address to a static IP through the VM:
sudo nano /etc/netplan/00-installer.config.yaml
Configuration yaml for netplan installer file: Ensure that you modify the addresses for the eth160 and set the eth160 to which ethernet you are settting up. Original:
# This is the network config written by 'subiquity'
network:
ethernets:
ens160:
dhcp4: true
version: 2
Modified:
network:
version: 2
renderer: networkd
ethernets:
ens160:
addresses:
- 192.168.1.12/24
gateway4: 192.168.1.254
192.168.1.254 is the IP of my main router and DHCP host. Hit this with a sudo netplan apply
and you should have a new IP address for your VM.
Stay tune for part 2 where we get a Control plan node up and running (after we got all of the software installed on the Ubuntu VM). I’ll also try to go more into details on setting up the various ESXi/VCenter installs I went through. I did it once and I don’t really plan on doing it again but I should in order to better document it.