Skip to content

Configuration

Open the development shell, which includes all the tools needed:

nix develop

Run the following script to configure the homelab:

make configure

Example

Text editor (nvim):
Enter seed repo (github.com/khuedoan/homelab): github.com/example/homelab
Enter your domain (khuedoan.com): example.com

It will prompt you to edit the inventory:

  • IP address: the desired one, not the current one, since your servers have no operating system installed yet
  • Disk: based on /dev/$DISK, in my case it's sda, but yours can be sdb, nvme0n1...
  • Network interface: usually it's eth0, mine is eno1
  • MAC address: the lowercase, colon separated MAC address of the above network interface

Example

metal/inventories/prod.yml
all:
  vars:
    control_plane_endpoint: 192.168.1.100
    load_balancer_ip_pool:
      - 192.168.1.224/27
metal:
  children:
    masters:
      hosts:
        metal0: {ansible_host: 192.168.1.110, mac: '00:23:24:d1:f5:69', disk: sda, network_interface: eno1}
        metal1: {ansible_host: 192.168.1.111, mac: '00:23:24:d1:f3:f0', disk: sda, network_interface: eno1}
        metal2: {ansible_host: 192.168.1.112, mac: '00:23:24:e7:04:60', disk: sda, network_interface: eno1}
    workers:
      hosts:
        metal3: {ansible_host: 192.168.1.113, mac: '00:23:24:d1:f4:d6', disk: sda, network_interface: eno1}

At the end it will show what has changed. After examining the diff, commit and push the changes.