Install Fabric
Prerequisites
- A machine with access to the Internet to use Fabricator and build installer with at least 8 GB RAM and 25 GB of disk space
- An 16 GB USB flash drive, if you are not using virtual media
- Have a machine to function as the Fabric Control Node. System Requirements as well as IPMI access to it to install the OS.
- A management switch with at least 1 10GbE port is recommended
- Enough Supported Switches for your Fabric
Overview of Install Process
This section is dedicated to the Hedgehog Fabric installation on bare-metal control node(s) and switches, their preparation and configuration. To install the VLAB see VLAB Overview.
Download and install hhfab
following instructions from the Download section.
The main steps to install Fabric are:
- Install
hhfab
on the machines with access to the Internet - Install Control Node
- Insert USB with control-os image into Fabric Control Node
- Boot the node off the USB to initiate the installation
- Prepare Management Network
- Connect management switch to Fabric control node
- Connect 1GbE Management port of switches to management switch
- Prepare supported switches
- Ensure switch serial numbers and / or first management interface MAC addresses are recorded in wiring diagram
- Boot them into ONIE Install Mode to have them automatically provisioned
Build Control Node configuration and Installer
Hedgehog has created a command line utility, called hhfab
, that helps generate the wiring diagram and fabric configuration, validate the supplied configurations, and generate an installation image (.img) suitable for writing to a USB flash drive or mounting via IPMI virtual media. The first hhfab
command to run is hhfab init
. This will generate the main configuration file, fab.yaml
. fab.yaml
is responsible for almost every configuration of the fabric with the exception of the wiring. Each command and subcommand have usage messages, simply supply the -h
flag to your command or sub command to see the available options. For example hhfab vlab -h
and hhfab vlab gen -h
.
HHFAB commands to make a bootable image
hhfab init --wiring wiring-lab.yaml
- The
init
command generates afab.yaml
file, edit thefab.yaml
file for your needs- ensure the correct boot disk (e.g.
/dev/sda
) and control node NIC names are supplied
- ensure the correct boot disk (e.g.
hhfab validate
hhfab build
The installer for the fabric is generated in $CWD/result/
. This installation image is named control-1-install-usb.img
and is 7.5 GB in size. Once the image is created, you can write it to a USB drive, or mount it via virtual media.
Write USB Image to Disk
This will erase data on the USB disk.
- Insert the USB to your machine
- Identify the path to your USB stick, for example:
/dev/sdc
- Issue the command to write the image to the USB drive
sudo dd if=control-1-install-usb.img of=/dev/sdc bs=4k status=progress
There are utilities that assist this process such as etcher.
Install Control Node
This control node should be given a static IP address. Either a lease or statically assigned.
-
Configure the server to use UEFI boot without secure boot
-
Attach the image to the server either by inserting via USB, or attaching via virtual media
-
Select boot off of the attached media, the installation process is automated
-
Once the control node has booted, it logs in automatically and begins the installation process
- Optionally use
journalctl -f -u flatcar-install.service
to monitor progress
- Optionally use
-
Once the installation is complete, the system automatically reboots.
-
After the system has shutdown but before the boot up process reaches the operating system, remove the USB image from the system. Removal during the UEFI boot screen is acceptable.
-
Upon booting into the freshly installed system, the fabric installation will automatically begin
- If the insecure
--dev
flag was passed tohhfab init
the password for thecore
user isHHFab.Admin!
, the switches have two users createdadmin
andop
.admin
has administrator privileges and passwordHHFab.Admin!
, whereas theop
user is a read-only, non-sudo user with passwordHHFab.Op!
. - Optionally this can be monitored with
journalctl -f -u fabric-install.service
- If the insecure
-
The install is complete when the log emits "Control Node installation complete". Additionally, the systemctl status will show
inactive (dead)
indicating that the executable has finished.
Configure Management Network
The control node is dual-homed. It has a 10GbE interface that connects to the management network. The other link called external
in the fab.yaml
file is for the customer to access the control node. The management network is for the command and control of the switches that comprise the fabric. This management network can be a simple broadcast domain with layer 2 connectivity. The control node will run a DHCP and small http servers. The management network is not accessible to machines or devices not associated with the fabric.
Fabric Manages Switches
Now that the install has finished, you can start interacting with the Fabric using kubectl
, kubectl fabric
and k9s
, all pre-installed as part of the Control Node installer.
At this stage, the fabric hands out DHCP addresses to the switches via the management network. Optionally, you can monitor this process by going through the following steps:
- enter k9s
at the command prompt
- use the arrow keys to select the pod named fabric-boot
- the logs of the pod will be displayed showing the DHCP lease process
- use the switches screen of k9s
to see the heartbeat column to verify the connection between switch and controller.
- to see the switches type :switches
(like a vim command) into k9s
Created: October 26, 2023