Skip to content

Configuration

Open the tools container, which includes all the tools needed:

make tools
nix-shell

Note

It will take a while to build the tools container on the first time

Run the following script to configure the environment:

make configure

Example

Text editor (nvim):
Enter seed repo (github.com/cjcshadowsan/ubiquity): github.com/my-cluster/ubiquity
Enter your domain (ubiquitycluster.uk): 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, could be en<s for slot, number><f for function number starting from 0> - so ens4f0
  • External address: an address. Can be the same as the internal IP address
  • External interface (optional): usually it's eth0, mine is eno1, could be en<s for slot, number><f for function number starting from 0> - so ens4f0
  • Wake on Lan: true or false, or otherwise whether to use IPMI or not
  • MAC address: the lowercase, colon separated MAC address of the above network interface

Example

metal/inventories/prod.yml
---
# Copyright The Ubiquity Authors.
#
# Licensed under the Apache License, Version 2.0. Previously licensed under the Functional Source License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://github.com/ubiquitycluster/ubiquity/blob/main/LICENSE
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# This software was previously licensed under the Functional Source License but has now transitioned to an Apache 2.0 License
# as of June 2025.
# See the License for the specific language governing permissions and
# limitations under the License.

# The metal group contains the physical nodes in the cluster
metal:
  children:
    masters:
      hosts:
        cp1: {ansible_host: 10.1.0.1, mac: 'de:ad:be:ef:be:ef', disk: sda, ipmi_addr: 10.0.0.1, ipmi_user: USERID, ipmi_pass: 'PASSW0RD', wol: false }
        cp2: {ansible_host: 10.1.0.2, mac: 'de:ad:be:ef:be:ef', disk: sda, ipmi_addr: 10.0.0.2, ipmi_user: USERID, ipmi_pass: 'PASSW0RD', wol: false }
        cp3: {ansible_host: 10.1.0.3, mac: 'de:ad:be:ef:be:ef', disk: sda, ipmi_addr: 10.0.0.3, ipmi_user: USERID, ipmi_pass: 'PASSW0RD', wol: false }
    workers:
      hosts:
#        worker1: {ansible_host: 192.168.1.121, mac: 'de:ad:be:ef:83:b9', disk: sda, network_interface: eno1, ipmi_addr: 192.168.0.121, ipmi_user: root, ipmi_pass: calvin2, wol: false }
#        worker2: {ansible_host: 192.168.1.122, mac: '90:b1:1c:58:83:b9', disk: sda, network_interface: eno1, ipmi_addr: 192.168.0.122, ipmi_user: root, ipmi_pass: calvin2, wol: false }
#        worker3: {ansible_host: 192.168.1.123, mac: '90:b1:1c:58:83:b9', disk: sda, network_interface: eno1, ipmi_addr: 192.168.0.123, ipmi_user: root, ipmi_pass: calvin2, wol: false }

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