Jump to content

Deploy a devops homelab on commodity hardware

From Inqubos Wiki

When thinking of a decent design for a "cheap" devops environment at home (or in a small office), one may consider several aspects to choose the hardware required to run the solution :

  • Noise and heat dissipation, which are often related
  • Affordable energy cost
  • Sufficient sizing to host a decent lab

...

Virtualization is of course at the heart of such a solution and many hypervisors can be found, both open source or proprietary.

Having all things considered, our choice inclined towards Apple Mac mini (Late 2018) that still can be found for a relatively low budget (see https://eshop.macsales.com/configure-my-mac/mac-mini for instance) and has the required specifications :

  • Memory up to 64 GB
  • Storage up to 2.0 TB SSD
  • Intel 3.2 GHz 6-core i7 processor
  • Intel UHD graphics 630 with 1.5 GB VRAM
  • 4 x Thunderbolt 3 ports
  • Built-in 802.11 a/b/g/n/ac WiFi interface (Broadcom)
  • Built-in 10GbE interface (Aquantia)
  • UEFI
  • TPM 2.0

Such a (used) model is around US$ 700 / 600 €, without shipment, at the time of this writing. We'll need two of these to play with cluster functionalities.

For the networking part, we will need a manageable quiet switch, i.e. without fans. The QNAP QSW-M408-2C is a layer 2 web managed switch (https://www.qnap.com/en/product/qsw-m408-2c) which offers the required ports for the lab, including two 10GbE interfaces (NBASE-T). Alternatively, you may consider the QNAP QSW-M408-4C with four 10GbE interfaces if you need to add two extra Mac minis or hardware with a 10GbE interface. The former is around US$ 286 / 245 € and you'll have to spend around US$ 470 / 400 € for the latter.

The wireless network will consist of several access points (Apple Time Capsule 802.11ac - https://support.apple.com/en-us/112420) with the following specifications :

  • 2TB or 3TB hard drives
  • IEEE 802.11a/b/g/n/ac
  • Simultaneous dual-band 2.4GHz and 5GHz
  • WPA/WPA2 Enterprise security
  • USB 2 port
  • GbE LAN and WAN interfaces

Optionally, you may think to add external storage for backups or other purposes. Our choice inclined towards a scalable expansion solution based on OWC miniStack STX enclosures (https://eshopo.macsales.com/item/OWC/T4MS9000/ starting at US$ 250 / 215 €) you can configure with NVMe, SSD or HDD devices.

Here is a graphical representation of such an installation :


For the operating systems, we intend to play extensively with Microsoft Windows Server (Active Directory, Network Policy Server, Hyper-V, Scale Out File Server, Windows Admin Center, Azure DevOps, etc) both on premises and in the cloud (Azure). You can easily find subscriptions (https://visualstudio.microsoft.com/vs/pricing/?tab=paid-subscriptions) that will suit your needs for Microsoft products or consider other solutions.

After connecting all the devices to our network, let's start to install the relevant software, starting with the operating systems.

Create a USB boot media for Microsoft Windows Server 2025

On a computer installed with Windows (say Windows 11 for instance), download the ISO file for the operating system you want to play with; we assume from now on that Windows Server 2025 is the one you chose like us (https://www.microsoft.com/en-us/evalcenter/download-windows-server-2025). Grab a USB key with 16 GB or more space (the one we used is actually 128 GB, roughly. From the command prompt with administrative privileges, open DISKPART and have the following commands (this will wipe the data contained on the key so be sure you intend to do so) :

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          953 GB  1024 KB        *
  Disk 1    Online          117 GB   117 GB

DISKPART> sel disk 1

Disk 1 is now the selected disk.

DISKPART> clean

DiskPart succeeded in cleaning the disk.

DISKPART> convert gpt

DiskPart successfully converted the selected disk to GPT format.

DISKPART> create partition primary size=8192

DiskPart succeeded in creating the specified partition.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
* Partition 1    Primary              8 GB  1024 KB

DISKPART> sel partition 1

Partition 1 is now the selected partition.

DISKPART> format fs=fat32 quick label=WINSRV2025

  100 percent completed

DiskPart successfully formatted the volume.

DISKPART> exit

In the File Explorer, you will mention a new letter, e.g. E: in the right pane corresponding to the partition we just created with DISKPART. Navigate to the ISO file you downloaded previously and double-click on it. This will open (mount) the filesystem of the ISO file and associate a letter, e.g. F: to it. Since the maximum possible size for a file on a FAT32 volume is 4 GB, we're going to split the image of Windows contained in the directory sources of the ISO file, into smaller chunks below this limit.

To be clear, E: is here the letter associated with the partition on the USB key we're preparing to boot and install the Windows Server 2025 operating system. F: is containing the sources of Windows Server 2025 from which we're going to copy the files required to install it.

Install Microsoft Windows Server 2025 on an Apple MacMini (Late 2018)