Fabric Configuration
Overview
The fab.yaml file is the configuration file for the fabric. It supplies
the configuration of the users, their credentials, logging, telemetry, and
other non wiring related settings. The fab.yaml file is composed of multiple
YAML objects inside of a single file. Per the YAML spec 3 hyphens (---) on
a single line separate the end of one object from the beginning of the next.
There are two YAML objects in the fab.yaml file. For more information about
how to use hhfab init, run hhfab init --help.
HHFAB workflow
After hhfab has been downloaded:
hhfab init(see different flags to customize initial configuration)- Adjust the
fab.yamlfile to your needs - Build your wiring diagram
hhfab validate- (optionally)
hhfab diagram hhfab build
Or import existing fab.yaml and wiring files:
hhfab init -c fab.yaml -w wiring-file.yaml -w extra-wiring-file.yamlhhfab validate- Build your wiring diagram
- (optionally)
hhfab diagram hhfab build
After the above workflow a user will have a .img file suitable for installing the control node, then bringing up the switches which comprise the fabric.
Complete Example File
The following example outlines a comprehensive Fabricator configuration. You can find further configuration details in the Fabricator API Reference.
Configure Control Node and Switch Users
Control Node Users
Configuring control node and switch users is done either passing
--default-password-hash to hhfab init or editing the resulting fab.yaml
file emitted by hhfab init. The default username on the control node is
core.
Switch Users
There are two users on the switches, admin and operator. The operator user has
read-only access to sonic-cli command on the switches. The admin user has
broad administrative power on the switch.
To avoid conflicts, do not use the following usernames: operator,hhagent,netops.
NTP and DHCP
The control node uses public NTP servers from Cloudflare and Google by default. The control node runs a DHCP server on the management network. See the example file.
Control Node
The control node is the host that manages all the switches, runs k3s, and serves images. The management interface is for the control node to manage the fabric switches, not end-user management of the control node. For end-user management of the control node specify the external interface name.