Skip to content

Commit

Permalink
Add A6 specific docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Frostman committed May 7, 2024
1 parent 8bfded1 commit ac09549
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 4 deletions.
70 changes: 70 additions & 0 deletions docs/install-upgrade/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,73 @@
into the Fabric API

For more information about how to use `hhfab init`, run `hhfab init --help`.

## Configure switch users

It's currently only possible by using a config yaml file for the `hhfab init -c <config-file.yaml>` command. You can
specify users to be configured on the switches in the following format:

```yaml
config:
...
fabric:
...
switchUsers:
- name: test
password: $5$oj/NxDtFw3eTyini$VHwdjWXSNYRxlFMu.1S5ZlGJbUF/CGmCAZIBroJlax4
role: operator
```
Where `name` is the username, `password` is the password hash created with `openssl passwd -5` command, and `role` is
the role of the user, one of `admin` or `operator` (read-only access to `sonic-cli` command on the switches).

## Forward switch metrics and logs

There is an option to enable Grafana Alloy on all switches to forward metrics and logs to the configured targets using
Prometheus Remote-Write API and Loki API. If those APIs are available from Control Node(s), but not from the switches,
it's possible to enable HTTP Proxy on Control Node(s) that will be used by Grafana Alloy running on the switches to
access the configured targets. It could be done by passing `--control-proxy=true` to `hhfab init`.

Metrics includes port speeds, counters, errors, operational status, transceivers, fans, power supplies, temperature
sensors, BGP neighbors, LLDP neighbors, and more. Logs include agent logs.

Configuring the exporters and targets is currently only possible by using a config yaml file for the
`hhfab init -c <config-file.yaml>` command using the following format:

```yaml
config:
...
fabric:
...
alloy:
agentScrapeIntervalSeconds: 120
controlProxyURL: http://172.30.1.1:31028
lokiTargets:
grafana_cloud: # target name, multiple targets can be configured
basicAuth: # optional
password: "<password>"
username: "<username>"
labels: # labels to be added to all logs
env: env-1
url: https://logs-prod-021.grafana.net/loki/api/v1/push
useControlProxy: true # if the Loki API is not available from the switches directly, use the Control Node as a proxy
prometheusTargets:
grafana_cloud: # target name, multiple targets can be configured
basicAuth: # optional
password: "<password>"
username: "<username>"
labels: # labels to be added to all metrics
env: env-1
sendIntervalSeconds: 120
url: https://prometheus-prod-36-prod-us-west-0.grafana.net/api/prom/push
useControlProxy: true # if the Loki API is not available from the switches directly, use the Control Node as a proxy
unixExporterCollectors: # list of node-exporter collectors to enable, https://grafana.com/docs/alloy/latest/reference/components/prometheus.exporter.unix/#collectors-list
- cpu
- filesystem
- loadavg
- meminfo
unixExporterEnabled: true
unixScrapeIntervalSeconds: 120
```

For additional options, see the `AlloyConfig` [struct in Fabric repo](https://github.com/githedgehog/fabric/blob/master/api/meta/alloy.go).
2 changes: 2 additions & 0 deletions docs/install-upgrade/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ As a result, you will get the following files in the `.hhfab` directory or the o
* `control-os/ignition.json` - ignition config for the Control Node to get OS installed
* `control-install.tgz` - installer for the Control Node, it will be uploaded to the Control Node and run there

More details on configuring the Fabric are available in the [Configuration](./config.md) section.

## Install Control Node

Control Node installation is fully air-gapped and doesn't require Internet access.
Expand Down
6 changes: 3 additions & 3 deletions docs/user-guide/external.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ spec:
### External Attachment

`External Attachment` defines BGP Peering and traffic connectivity between a Border leaf and `External`. Attachments are
bound to a `Connection` with type `external` and they specify a `vlan` that will be used to segregate particular Edge
peering.
bound to a `Connection` with type `external` and they specify an optional `vlan` that will be used to segregate
particular Edge peering.

```yaml
apiVersion: vpc.githedgehog.com/v1alpha2
Expand All @@ -100,7 +100,7 @@ spec:
ip: # IP address of Edge device to peer with
switch:
ip: # IP address on the Border Leaf to set up BGP peering
vlan: # VLAN ID to tag control and data traffic
vlan: # VLAN (optional) ID to tag control and data traffic, use 0 for untagged
```

Several `External Attachment` can be configured for the same `Connection` but for different `vlan`.
Expand Down
5 changes: 5 additions & 0 deletions docs/user-guide/vpcs.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ spec:
permit: # Defines which VPCs could communicate to each other, applied on top of subnets "isolated" flag (doesn't affect VPC peering)
- [subnet-1, subnet-2, subnet-3] # 1, 2 and 3 subnets could communicate to each other
- [subnet-4, subnet-5] # Possible to define multiple lists

staticRoutes: # Optional, static routes to be added to the VPC
- prefix: 10.100.0.0/24 # Destination prefix
nextHops: # Next hop IP addresses
- 10.200.0.0
```
### Isolated and restricted subnets, permit lists
Expand Down
2 changes: 1 addition & 1 deletion overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
{% block announce %}
Documentation is under construction and may be incomplete.
{% endblock %}
#}
#}

0 comments on commit ac09549

Please sign in to comment.