Deploy a devops homelab on commodity hardware: Difference between revisions
No edit summary |
|||
| (28 intermediate revisions by the same user not shown) | |||
| Line 5: | Line 5: | ||
... | ... | ||
Virtualization is of course at the heart of such a solution and many hypervisors | Virtualization is of course at the heart of such a solution and many hypervisors exist, 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 | Having all things considered, our choice inclined towards Apple Mac mini (Late 2018) that still can be found for a [https://eshop.macsales.com/configure-my-mac/mac-mini relatively low budget] and has the required specifications : | ||
* Memory up to 64 GB | * Memory up to 64 GB | ||
| Line 16: | Line 16: | ||
* Built-in 802.11 a/b/g/n/ac WiFi interface (Broadcom) | * Built-in 802.11 a/b/g/n/ac WiFi interface (Broadcom) | ||
* Built-in 10GbE interface (Aquantia) | * 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. | 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 | For the networking part, we'll need a manageable quiet switch, i.e. without fans. The [https://www.qnap.com/en/product/qsw-m408-2c QNAP QSW-M408-2C] is a layer 2 web managed switch which offers the required ports for the lab, including two 10GbE interfaces (NBASE-T). Alternatively, you may consider the [https://www.qnap.com/en/product/qsw-m408-4c 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 | The wireless network will consist of a bunch [https://support.apple.com/en-us/112420 Apple Time Capsule 802.11ac] access points with the following specifications : | ||
* 2TB or 3TB hard drives | * 2TB or 3TB hard drives | ||
| Line 30: | Line 32: | ||
* GbE LAN and WAN interfaces | * 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 | Optionally, you may think to add external storage for backups or other purposes. Our choice inclined towards a scalable expansion solution based on [https://eshop.macsales.com/item/OWC/T4MS9000 OWC miniStack STX] enclosures starting at US$ 250 / 215 €) you can configure with NVMe, SSD or HDD devices. | ||
Here is a graphical representation of such an installation : | 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). | 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 [https://visualstudio.microsoft.com/vs/pricing/?tab=paid-subscriptions 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 [https://www.microsoft.com/en-us/evalcenter/download-windows-server-2025 Windows Server 2025] is the one you chose like us. Grab a USB key with 16 GB or more space (the one we used is roughly 128 GB). 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) : | |||
<syntaxhighlight lang="powershell"> | |||
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 | |||
Leaving DiskPart ... | |||
</syntaxhighlight> | |||
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 we downloaded from which we're going to copy the files required to install it. | |||
<syntaxhighlight lang="powershell"> | |||
C:\Users\Archibald> F: | |||
F:\> robocopy F:\ E:\ /copyall /xj /e /xf install.wim /r:3 /w:1 | |||
[ ... ] | |||
------------------------------------------------------------------------------ | |||
Total Copied Skipped Mismatch FAILED Extras | |||
Dirs : 100 99 1 0 0 1 | |||
Files : 1074 1073 1 0 0 0 | |||
Bytes : 7.580 g 847.95 m 6.752 g 0 0 0 | |||
Times : 0:00:36 0:00:32 0:00:00 0:00:03 | |||
Speed : 27,196,816 Bytes/sec. | |||
Speed : 1,556.214 MegaBytes/min. | |||
Ended : Thursday, 8 January 2026 21:06:40 | |||
F:\>dism /Split-Image /ImageFile:F:\sources\install.wim /SWMFile:E:\sources\install.swm /FileSize:4096 | |||
Deployment Image Servicing and Management tool | |||
Version: 10.0.26100.5074 | |||
The operation completed successfully. | |||
F:\>dir /x /a E:\sources\install* | |||
Volume in drive E is WINSRV2025 | |||
Volume Serial Number is D472-1B99 | |||
Directory of E:\sources | |||
08/01/2026 21:15 4,293,788,440 install.swm | |||
08/01/2026 21:15 2,943,648,286 install2.swm | |||
2 File(s) 7,237,436,726 bytes | |||
0 Dir(s) 444,178,432 bytes free | |||
</syntaxhighlight> | |||
You now have a bootable USB key that contains the required installation files for Windows Server 2025. Eject it and connect it to the first of our two Mac minis. | |||
=== Install Microsoft Windows Server 2025 on an Apple Mac mini (Late 2018) === | |||
Power on the computer while pressing the Alt (Option) key on a USB wired keyboard, whether USB-A or USB-C. You'll have the option to choose the USB key to boot from. The installation starts and you'll see soon a Windows blue logo. Wait until the first window is displayed : | |||
After a successful installation, time is to fetch and install the relevant drivers for our Mac mini. [https://github.com/timsutton/brigadier Brigadier] is a GitHub repository where you can fetch the BootCamp ESD for a specific model of Mac. See the [https://everymac.com EveryMac] website to determine which model is yours; Mac mini (Late 2018) is labeled [https://everymac.com/systems/apple/mac_mini/specs/mac-mini-core-i7-3.2-late-2018-specs.html Macmini8,1]. | |||
<syntaxhighlight lang="powershell"> | |||
C:\Users\Archibald\Downloads> mkdir -p "Macmini8,1" | |||
C:\Users\Archibald\Downloads> cd ".\Macmini8,1" | |||
</syntaxhighlight> | |||
Download [https://github.com/timsutton/brigadier/blob/main/brigadier.ps1 brigadier.ps1] in this directory, then have the following command to fetch the relevant drivers for your Mac mini : | |||
<syntaxhighlight lang="powershell"> | |||
C:\Users\Archibald\Downloads>MacMini8,1> .\brigadier.ps1 -m "Macmini8,1" -o ".\" | |||
Using model: Macmini8,1 | |||
Downloading software update catalog... | |||
Found supported ESD: 041-91731, posted 2019-10-14T21:15:11Z | |||
Selected 041-91731 as it's the most recently posted. | |||
Starting download from http://swcdn.apple.com/content/downloads/23/15/041-91731-A_LBI7Q8UWOG/juk1ng0hm623gxh3jv4qxt190ga1h5p0lw/BootCampESD.pkg | |||
Download complete | |||
Extracting... | |||
</syntaxhighlight> | |||
You'll then will have a corresponding BootCamp-041-91731 directory where you'll find the drivers required to finalize the installation of Windows Server 2025. In the end, here's what you should come with : | |||
[[File:Macmini8,1-WindowsServer2025-Devices.png|thumb|960px|alt=Windows Server 2025 - Computer Management view of devices|Windows Server 2025 - Computer Management > Device Manager]] | |||
Latest revision as of 07:14, 9 January 2026
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 exist, 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 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'll need a manageable quiet switch, i.e. without fans. The QNAP QSW-M408-2C is a layer 2 web managed switch 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 a bunch Apple Time Capsule 802.11ac access points 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 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 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. Grab a USB key with 16 GB or more space (the one we used is roughly 128 GB). 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
Leaving DiskPart ...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 we downloaded from which we're going to copy the files required to install it.
C:\Users\Archibald> F:
F:\> robocopy F:\ E:\ /copyall /xj /e /xf install.wim /r:3 /w:1
[ ... ]
------------------------------------------------------------------------------
Total Copied Skipped Mismatch FAILED Extras
Dirs : 100 99 1 0 0 1
Files : 1074 1073 1 0 0 0
Bytes : 7.580 g 847.95 m 6.752 g 0 0 0
Times : 0:00:36 0:00:32 0:00:00 0:00:03
Speed : 27,196,816 Bytes/sec.
Speed : 1,556.214 MegaBytes/min.
Ended : Thursday, 8 January 2026 21:06:40
F:\>dism /Split-Image /ImageFile:F:\sources\install.wim /SWMFile:E:\sources\install.swm /FileSize:4096
Deployment Image Servicing and Management tool
Version: 10.0.26100.5074
The operation completed successfully.
F:\>dir /x /a E:\sources\install*
Volume in drive E is WINSRV2025
Volume Serial Number is D472-1B99
Directory of E:\sources
08/01/2026 21:15 4,293,788,440 install.swm
08/01/2026 21:15 2,943,648,286 install2.swm
2 File(s) 7,237,436,726 bytes
0 Dir(s) 444,178,432 bytes freeYou now have a bootable USB key that contains the required installation files for Windows Server 2025. Eject it and connect it to the first of our two Mac minis.
Install Microsoft Windows Server 2025 on an Apple Mac mini (Late 2018)
Power on the computer while pressing the Alt (Option) key on a USB wired keyboard, whether USB-A or USB-C. You'll have the option to choose the USB key to boot from. The installation starts and you'll see soon a Windows blue logo. Wait until the first window is displayed :
After a successful installation, time is to fetch and install the relevant drivers for our Mac mini. Brigadier is a GitHub repository where you can fetch the BootCamp ESD for a specific model of Mac. See the EveryMac website to determine which model is yours; Mac mini (Late 2018) is labeled Macmini8,1.
C:\Users\Archibald\Downloads> mkdir -p "Macmini8,1"
C:\Users\Archibald\Downloads> cd ".\Macmini8,1"Download brigadier.ps1 in this directory, then have the following command to fetch the relevant drivers for your Mac mini :
C:\Users\Archibald\Downloads>MacMini8,1> .\brigadier.ps1 -m "Macmini8,1" -o ".\"
Using model: Macmini8,1
Downloading software update catalog...
Found supported ESD: 041-91731, posted 2019-10-14T21:15:11Z
Selected 041-91731 as it's the most recently posted.
Starting download from http://swcdn.apple.com/content/downloads/23/15/041-91731-A_LBI7Q8UWOG/juk1ng0hm623gxh3jv4qxt190ga1h5p0lw/BootCampESD.pkg
Download complete
Extracting...You'll then will have a corresponding BootCamp-041-91731 directory where you'll find the drivers required to finalize the installation of Windows Server 2025. In the end, here's what you should come with :
