The command-line interface tool for Warnet.
Once warnet is running it can be interacted with using the cli tool warnet.
Execute warnet --help to see a list of command categories.
Help text is provided, with optional parameters in [square brackets] and required parameters in .
warnet commands are organized in a hierarchy of categories and subcommands.
Authenticate with a Warnet cluster using a kubernetes config file
options:
| name | type | required | default |
|---|---|---|---|
| revert | Bool | False | |
| auth_config | String |
Create a new warnet network
Open the Warnet dashboard in default browser
Deploy a warnet with topology loaded from <directory>
options:
| name | type | required | default |
|---|---|---|---|
| directory | Path | yes | |
| debug | Bool | False | |
| namespace | String | ||
| to_all_users | Bool | False |
Bring down a running warnet carefully
Get one cluster node IP, used for accessing NodePorts
Create a network from an imported lightning network graph JSON
options:
| name | type | required | default |
|---|---|---|---|
| graph_file_path | Path | yes | |
| output_path | Path | yes |
Initialize a warnet project in the current directory
Show the logs of a pod
options:
| name | type | required | default |
|---|---|---|---|
| pod_name | String | "" | |
| follow | Bool | False | |
| namespace | String | "default" |
Create a new warnet project in the specified directory
options:
| name | type | required | default |
|---|---|---|---|
| directory | Path | yes |
Run a scenario from a file.
Pass -- --help to get individual scenario help
options:
| name | type | required | default |
|---|---|---|---|
| scenario_file | Path | yes | |
| debug | Bool | False | |
| source_dir | Path | ||
| additional_args | String | ||
| admin | Bool | False | |
| namespace | String |
Setup warnet
Create a snapshot of a tank's Bitcoin data or snapshot all tanks
options:
| name | type | required | default |
|---|---|---|---|
| tank_name | String | ||
| snapshot_all | Bool | False | |
| output | Path | ./warnet-snapshots | |
| filter | String |
Display the unified status of the Warnet network and active scenarios
Stop a running scenario or all scenarios
options:
| name | type | required | default |
|---|---|---|---|
| scenario_name | String |
Display the installed version of warnet
Create kubeconfig files for ServiceAccounts
options:
| name | type | required | default |
|---|---|---|---|
| kubeconfig_dir | String | "kubeconfigs" | |
| token_duration | Int | 172800 |
Initialize a warnet project in the current directory
Namespaces commands
Fetch the Bitcoin Core debug log from <tank pod name>
options:
| name | type | required | default |
|---|---|---|---|
| tank | String | yes | |
| namespace | String |
Grep combined bitcoind logs using regex <pattern>
options:
| name | type | required | default |
|---|---|---|---|
| pattern | String | yes | |
| show_k8s_timestamps | Bool | False | |
| no_sort | Bool | False |
Fetch messages sent between <tank_a pod name> and <tank_b pod name> in [chain]
tank_b can be a tank pod name, an onion address, or any external peer identifier.
Optionally, include a namespace like so: tank-name.namespace
options:
| name | type | required | default |
|---|---|---|---|
| tank_a | String | yes | |
| tank_b | String | yes | |
| chain | String | "regtest" |
Call bitcoin-cli <method> [params] on <tank pod name>
options:
| name | type | required | default |
|---|---|---|---|
| tank | String | yes | |
| method | String | yes | |
| params | String | ||
| namespace | String |
Build a Bitcoin Core Docker image with specified parameters from specified commit or tag.
�
Usage Examples:
# Build an image for Warnet repository
warnet image build --repo bitcoin/bitcoin --commit-sha d6db87165c6dc2123a759c79ec236ea1ed90c0e3 --tags bitcoindevproject/bitcoin:v29.0-rc2 --action push
# Build from a tag instead of commit hash
warnet image build --repo bitcoin/bitcoin --commit-sha v31.0 --tags bitcoindevproject/bitcoin:v31.0 --action push
# Build an image for local testing on arm64 only
warnet image build --repo bitcoin/bitcoin --commit-sha d6db87165c6dc2123a759c79ec236ea1ed90c0e3 --tags bitcoindevproject/bitcoin:v29.0-rc2 --arches arm64 --action load
options:
| name | type | required | default |
|---|---|---|---|
| repo | String | yes | |
| commit_sha | String | yes | |
| tags | String | yes | |
| build_args | String | ||
| arches | String | ||
| action | String | "load" |
Get lightning node host from <ln pod name>
options:
| name | type | required | default |
|---|---|---|---|
| pod | String | yes |
Get lightning node pub key from <ln pod name>
options:
| name | type | required | default |
|---|---|---|---|
| pod | String | yes |
Call lightning cli rpc <command> on <ln pod name>
options:
| name | type | required | default |
|---|---|---|---|
| pod | String | yes | |
| method | String | yes | |
| params | String | ||
| namespace | String |