-
Notifications
You must be signed in to change notification settings - Fork 8
Expand troubleshoot #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
pau-hedgehog
wants to merge
4
commits into
master
Choose a base branch
from
expand_troubleshoot
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
nav: | ||
- Fabric API: api.md | ||
- Fabric CLI: cli.md | ||
- Fabricator CLI: hhfab-cli.md | ||
- ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
|
||
# Fabricator CLI Reference | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need it if it's available by running |
||
|
||
The `hhfab` CLI is the Hedgehog Fabricator command-line tool for building, installing, and managing Hedgehog Fabric environments. | ||
|
||
## Usage | ||
|
||
```bash | ||
hhfab [global options] command [command options] | ||
``` | ||
|
||
## Version | ||
|
||
Check the version with: | ||
|
||
```bash | ||
hhfab --version | ||
``` | ||
|
||
## Commands and Options | ||
|
||
| Command | Subcommand | Options | Description | | ||
|---------|------------|---------|-------------| | ||
| **init** | — | `--registry-repo`, `--registry-prefix`, `--config`, `--force`, `--wiring`, `--fabric-mode`, `--tls-san`, `--default-authorized-keys`, `--default-password-hash`, `--dev`, `--include-onie`, `--import-host-upstream`, `--control-node-mgmt-link`, `--gateway` | Initialize working directory and create `fab.yaml` and other files. | | ||
| **validate** | — | `--hydrate-mode` *(default: "if-not-present")* | Validate configuration and wiring files. | | ||
| **diagram** | — | `--format` *(default: "drawio")*, `--style` *(default: "hedgehog")* | Generate network topology diagrams. | | ||
| **versions** | — | — | Print versions of all components. | | ||
| **build** | — | `--mode` *(default: "iso")* | Build installers. | | ||
| **vlab** | generate | `--spines-count`, `--fabric-links-count`, `--mclag-leafs-count`, `--eslag-leaf-groups`, `--orphan-leafs-count`, `--mclag-session-links`, `--mclag-peer-links`, `--vpc-loopbacks`, `--mclag-servers`, `--eslag-servers`, `--unbundled-servers`, `--bundled-servers`, `--no-switches`, `--gateway-uplinks` *(default: 2)* | Generate VLAB wiring diagram. | | ||
| | up | `--recreate`, `--kill-stale` *(default: true)*, `--controls-restricted` *(default: true)*, `--servers-restricted` *(default: true)*, `--build-mode` *(default: "iso")*, `--control-upgrade`, `--fail-fast` *(default: true)*, `--ready`, `--collect-show-tech` | Start the Virtual Lab environment. | | ||
| | ssh | `--name` | SSH to a VLAB VM or hardware. | | ||
| | serial | `--name` | Get serial console of a VLAB VM or hardware. | | ||
| | seriallog | `--name` | Get serial console log of a VLAB VM or hardware. | | ||
| | show-tech | — | Collect diagnostic information from all VLAB devices. | | ||
| | setup-vpcs | `--wait-switches-ready` *(default: true)*, `--force-cleanup`, `--vlanns` *(default: "default")*, `--ipns` *(default: "default")*, `--servers-per-subnet` *(default: 1)*, `--subnets-per-vpc` *(default: 1)*, `--dns-servers`, `--time-servers`, `--interface-mtu` | Setup VPCs and VPCAttachments. | | ||
| | setup-peerings | `--wait-switches-ready` *(default: true)* | Setup VPC and external peerings. | | ||
| | test-connectivity | `--wait-switches-ready` *(default: true)*, `--pings` *(default: 5)*, `--iperfs` *(default: 10)*, `--iperfs-speed` *(default: 8500)*, `--curls` *(default: 3)*, `--source`, `--destination` | Test connectivity between servers. | | ||
| | wait-switches | — | Wait for switches to be ready. | | ||
| | inspect-switches | `--wait-applied-for` *(default: 120)*, `--strict` *(default: true)* | Wait for readiness and inspect switches. | | ||
| **switch** | reinstall | `--name`, `--mode` *(default: "hard-reset")*, `--wait-ready`, `--switch-username`, `--switch-password`, `--pdu-username`, `--pdu-password` | Reboot/reset and reinstall NOS on switches. | | ||
| | power | `--name`, `--action` *(default: "cycle")*, `--pdu-username`, `--pdu-password` | Manage switch power state using the PDU. | | ||
| **_helpers** | setup-taps | `--count` *(max: 100)* | Setup tap devices and a bridge for VLAB. | | ||
| | vfio-pci-bind | — | Bind devices to vfio-pci driver for passthrough. | | ||
| | kill-stale-vms | — | Kill stale VLAB VMs. | | ||
|
||
## Command Details | ||
|
||
### `init` | ||
Initializes working directory and configuration files. | ||
|
||
**Usage:** | ||
```bash | ||
hhfab init [options] | ||
``` | ||
|
||
**Options:** | ||
|
||
- `--registry-repo` – Download artifacts from specific registry repository. | ||
- `--registry-prefix` – Prepend artifact names with specific prefix. | ||
- `--config` – Use existing config file. | ||
- `--force` – Overwrite existing files. | ||
- `--wiring` – Include wiring diagram file. | ||
- `--fabric-mode` *(default: "spine-leaf")* – Set fabric mode. | ||
- `--tls-san` – IPs and DNS names used to access the API. | ||
- `--default-authorized-keys` – Default authorized keys. | ||
- `--default-password-hash` – Default password hash. | ||
- `--dev` – Use default dev credentials (unsafe). | ||
- `--include-onie` – Include ONIE updaters for supported switches. | ||
- `--import-host-upstream` – Import host repo/prefix as an upstream registry mode. | ||
- `--control-node-mgmt-link` – Control node management link. | ||
- `--gateway` – Add and enable gateway node. | ||
|
||
--- | ||
|
||
### `validate` | ||
Validates the configuration and wiring files. | ||
|
||
**Usage:** | ||
```bash | ||
hhfab validate [options] | ||
``` | ||
|
||
**Options:** | ||
|
||
- `--hydrate-mode` *(default: "if-not-present")* – Set hydrate mode. | ||
|
||
--- | ||
|
||
### `diagram` | ||
Generate network topology diagrams. | ||
|
||
**Usage:** | ||
```bash | ||
hhfab diagram [options] | ||
``` | ||
|
||
**Options:** | ||
|
||
- `--format` *(default: "drawio")* – Diagram format. | ||
- `--style` *(default: "hedgehog")* – Diagram style. | ||
|
||
--- | ||
|
||
### `versions` | ||
Print versions of all components. | ||
|
||
**Usage:** | ||
```bash | ||
hhfab versions | ||
``` | ||
|
||
--- | ||
|
||
### `build` | ||
Build Hedgehog installer. | ||
|
||
**Usage:** | ||
```bash | ||
hhfab build [options] | ||
``` | ||
|
||
**Options:** | ||
|
||
- `--mode` *(default: "iso")* – Build mode (iso, qcow2, raw). | ||
|
||
--- | ||
|
||
### `switch reinstall` | ||
Reinstall the OS on switches. | ||
|
||
**Usage:** | ||
```bash | ||
hhfab switch reinstall [options] | ||
``` | ||
|
||
**Options:** | ||
|
||
- `--name` – Switch name. | ||
- `--mode` *(default: "hard-reset")* – Restart mode. | ||
- `--wait-ready` – Wait until switch is ready. | ||
- `--switch-username` – Switch username for reboot mode. | ||
- `--switch-password` – Switch password for reboot mode. | ||
|
||
--- | ||
|
||
## Global Options | ||
- `--workdir` – Specify working directory. | ||
- `--cache-dir` – Specify cache directory. | ||
- `--verbose`, `-v` – Verbose output (includes debug). | ||
- `--brief`, `-b` – Brief output (only warnings and errors). | ||
- `--yes`, `-y` – Assume "yes" for potentially dangerous operations. | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kinda the same as for the hhfab CLI - I think there is a very little value to just list available commands and flags, but it's good to keep some overview of the capabilities and what could be done using it as well as some examples like ssh to switch, vpc/peering creations, etc.