You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also remove mentions of vlab outside of vlab section. Take Pau's
suggestion to document password hash generation. Add links to external
telemetry.
Signed-off-by: Logan Blyth <logan@githedgehog.com>
--bundled-servers value number of bundled servers to generate for switches (only for one of the second switch in the redundancy group or orphan switch) (default: 1)
41
-
--eslag-leaf-groups value eslag leaf groups (comma separated list of number of ESLAG switches in each group, should be 2-4 per group, e.g. 2,4,2 for 3 groups with 2, 4 and 2 switches)
42
-
--eslag-servers value number of ESLAG servers to generate for ESLAG switches (default: 2)
43
-
--fabric-links-count value number of fabric links if fabric mode is spine-leaf (default: 0)
44
-
--help, -h show help
45
-
--mclag-leafs-count value number of mclag leafs (should be even) (default: 0)
46
-
--mclag-peer-links value number of mclag peer links for each mclag leaf (default: 0)
47
-
--mclag-servers value number of MCLAG servers to generate for MCLAG switches (default: 2)
48
-
--mclag-session-links value number of mclag session links for each mclag leaf (default: 0)
49
-
--no-switches do not generate any switches (default: false)
50
-
--orphan-leafs-count value number of orphan leafs (default: 0)
51
-
--spines-count value number of spines if fabric mode is spine-leaf (default: 0)
52
-
--unbundled-servers value number of unbundled servers to generate for switches (only for one of the first switch in the redundancy group or orphan switch) (default: 1)
53
-
--vpc-loopbacks value number of vpc loopbacks for each switch (default: 0)
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 documents inside of a single file. Per the YAML spec 3 hyphens (`---`) on a single line separate the end of one document from the beginning of the next. There are two YAML documents in the `fab.yaml` file. For more information about how to use `hhfab init`, run `hhfab init --help`.
3
+
The `fab.yaml` file is the configuration file for the fabric. It supplies
4
+
the configuration of the users, their credentials, logging, telemetry, and
5
+
other non wiring related settings. The `fab.yaml` file is composed of multiple
6
+
YAML documents inside of a single file. Per the YAML spec 3 hyphens (`---`) on
7
+
a single line separate the end of one object from the beginning of the next.
8
+
There are two YAML objects in the `fab.yaml` file. For more information about
9
+
how to use `hhfab init`, run `hhfab init --help`.
4
10
11
+
## HHFAB workflow
5
12
6
-
## Typical HHFAB workflows
13
+
After `hhfab` has been [downloaded](../getting-started/download.md):
7
14
8
-
### HHFAB for VLAB
9
-
10
-
For a VLAB user, the typical workflow with hhfab is:
11
-
12
-
1.`hhfab init --dev`
13
-
1.`hhfab vlab gen`
14
-
1.`hhfab vlab up`
15
-
16
-
The above workflow will get a user up and running with a spine-leaf VLAB.
17
-
18
-
### HHFAB for Physical Machines
19
-
20
-
It's possible to start from scratch:
21
-
22
-
1.`hhfab init` (see different flags to customize initial configuration)
15
+
1.`hhfab init`(see different flags to customize initial configuration)
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.
34
27
35
-
## Fab.yaml
36
-
37
-
### Configure control node and switch users
38
-
39
-
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`. You can specify users to be configured on the control node(s) and switches in the following format:
40
-
41
-
```{.yaml .annotation linenums="1"}
42
-
spec:
43
-
config:
44
-
control:
45
-
defaultUser: # user 'core' on all control nodes
46
-
password: "hashhashhashhashhash" # password hash
47
-
authorizedKeys:
48
-
- "ssh-ed25519 SecREKeyJumblE"
49
-
50
-
fabric:
51
-
mode: spine-leaf # "spine-leaf" or "collapsed-core"
52
-
53
-
defaultSwitchUsers:
54
-
admin: # at least one user with name 'admin' and role 'admin'
55
-
role: admin
56
-
#password: "$5$8nAYPGcl4..." # password hash
57
-
#authorizedKeys: # optional SSH authorized keys
58
-
# - "ssh-ed25519 AAAAC3Nza..."
59
-
op: # optional read-only user
60
-
role: operator
61
-
#password: "$5$8nAYPGcl4..." # password hash
62
-
#authorizedKeys: # optional SSH authorized keys
63
-
# - "ssh-ed25519 AAAAC3Nza..."
64
-
65
-
```
28
+
## Complete Fab.yaml Example File
66
29
67
-
Control node(s) user is always named `core`.
68
-
69
-
The role of the user,`operator` is read-only access to `sonic-cli` command on the switches. In order to avoid conflicts, do not use the following usernames: `operator`,`hhagent`,`netops`.
70
-
71
-
### NTP and DHCP
72
-
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](#complete-example-file).
73
-
74
-
## Control Node
75
-
The control node is the host that manages all the switches, runs k3s, and serves images. This is the YAML document configure the control node:
76
-
```{.yaml .annotation linenums="1"}
77
-
apiVersion: fabricator.githedgehog.com/v1beta1
78
-
kind: ControlNode
79
-
metadata:
80
-
name: control-1
81
-
namespace: fab
82
-
spec:
83
-
bootstrap:
84
-
disk: "/dev/sda" # disk to install OS on, e.g. "sda" or "nvme0n1"
85
-
external:
86
-
interface: enp2s0 # interface for external
87
-
ip: dhcp # IP address for external interface
88
-
management:
89
-
interface: enp2s1 # interface for management
90
-
91
-
# Currently only one ControlNode is supported
92
-
```
93
-
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.
94
-
95
-
### Forward switch metrics and logs
96
-
97
-
There is an option to enable Grafana Alloy on all switches to forward metrics and logs to the configured targets using
98
-
Prometheus Remote-Write API and Loki API. If those APIs are available from Control Node(s), but not from the switches,
99
-
it's possible to enable HTTP Proxy on Control Node(s) that will be used by Grafana Alloy running on the switches to
100
-
access the configured targets. It could be done by passing `--control-proxy=true` to `hhfab init`.
101
-
102
-
Metrics includes port speeds, counters, errors, operational status, transceivers, fans, power supplies, temperature
103
-
sensors, BGP neighbors, LLDP neighbors, and more. Logs include agent logs.
104
-
105
-
Configuring the exporters and targets is currently only possible by editing the `fab.yaml` configuration file. An example configuration is provided below:
106
-
107
-
```{.yaml .annotation linenums="1"}
108
-
spec:
109
-
config:
110
-
...
111
-
defaultAlloyConfig:
112
-
agentScrapeIntervalSeconds: 120
113
-
unixScrapeIntervalSeconds: 120
114
-
unixExporterEnabled: true
115
-
lokiTargets:
116
-
grafana_cloud: # target name, multiple targets can be configured
useControlProxy: true # if the Loki API is not available from the switches directly, use the Control Node as a proxy
134
-
unixExporterCollectors: # list of node-exporter collectors to enable, https://grafana.com/docs/alloy/latest/reference/components/prometheus.exporter.unix/#collectors-list
135
-
- cpu
136
-
- filesystem
137
-
- loadavg
138
-
- meminfo
139
-
collectSyslogEnabled: true # collect /var/log/syslog on switches and forward to the lokiTargets
140
-
```
141
-
142
-
For additional options, see the `AlloyConfig`[struct in Fabric repo](https://github.com/githedgehog/fabric/blob/master/api/meta/alloy.go).
unixExporterCollectors: # list of node-exporter collectors to enable, https://grafana.com/docs/alloy/latest/reference/components/prometheus.exporter.unix/#collectors-list
169
+
- cpu
170
+
- filesystem
171
+
- loadavg
172
+
- meminfo
173
+
collectSyslogEnabled: true # collect /var/log/syslog on switches and forward to the lokiTargets
174
+
175
+
```
176
+
177
+
For additional options, see the `AlloyConfig`[struct in Fabric repo](https://github.com/githedgehog/fabric/blob/master/api/meta/alloy.go).
0 commit comments