|
| 1 | +Plexus Agent CLI |
| 2 | +---------------- |
| 3 | + |
| 4 | +plexus-agent commands can be run by an ordinary user with exception of run commmand (agent daemon) which is intended to be run by plexus user |
| 5 | +``` |
| 6 | +plexus agent to setup and manage plexus wireguard |
| 7 | +networks. Communicates with plexus server for network updates. |
| 8 | +CLI to join/leave networks. |
| 9 | +
|
| 10 | +Usage: |
| 11 | + plexus-agent [command] |
| 12 | +
|
| 13 | +Available Commands: |
| 14 | + completion Generate the autocompletion script for the specified shell |
| 15 | + drop unregister from server |
| 16 | + help Help about any command |
| 17 | + join join network |
| 18 | + leave leave network |
| 19 | + loglevel set log level of daemon (error, warn, info, debug) |
| 20 | + register register with a plexus server |
| 21 | + reload reload network configuration(s) |
| 22 | + reset reset interface peers for specified network |
| 23 | + run plexus-agent deamon |
| 24 | + status display status |
| 25 | + version display version information |
| 26 | +
|
| 27 | +Flags: |
| 28 | + --config string config file (default is /etc/plexus/plexus-agent.yaml) |
| 29 | + -h, --help help for plexus-agent |
| 30 | + -v, --verbosity string logging verbosity (default "INFO") |
| 31 | +
|
| 32 | +Use "plexus-agent [command] --help" for more information about a command. |
| 33 | +``` |
| 34 | +Register |
| 35 | +======== |
| 36 | +The register command registers a peer with the plexus server. |
| 37 | +To use, copy a registration key token from the plexus server |
| 38 | +and run command |
| 39 | + |
| 40 | +``` plexus-agent register <token> ``` |
| 41 | +``` |
| 42 | +register with a plexus server using token |
| 43 | +
|
| 44 | +Usage: |
| 45 | + plexus-agent register token [flags] |
| 46 | +
|
| 47 | +Flags: |
| 48 | + -h, --help help for register |
| 49 | +
|
| 50 | +Global Flags: |
| 51 | + --config string config file (default is /etc/plexus/plexus-agent.yaml) |
| 52 | + -v, --verbosity string logging verbosity (default "INFO") |
| 53 | +``` |
| 54 | + |
| 55 | +Drop |
| 56 | +==== |
| 57 | +The drop command will delete all networks and drop registration with server |
| 58 | +``` |
| 59 | +unregister from server. Also deletes networks controlled by server |
| 60 | +
|
| 61 | +Usage: |
| 62 | + plexus-agent drop [flags] |
| 63 | +
|
| 64 | +Flags: |
| 65 | + -h, --help help for drop |
| 66 | +
|
| 67 | +Global Flags: |
| 68 | + --config string config file (default is /etc/plexus/plexus-agent.yaml) |
| 69 | + -v, --verbosity string logging verbosity (default "INFO") |
| 70 | +``` |
| 71 | + |
| 72 | +Join |
| 73 | +==== |
| 74 | +Join command joins an existing network |
| 75 | +``` |
| 76 | +join network |
| 77 | +
|
| 78 | +Usage: |
| 79 | + plexus-agent join network [flags] |
| 80 | +
|
| 81 | +Flags: |
| 82 | + -h, --help help for join |
| 83 | +
|
| 84 | +Global Flags: |
| 85 | + --config string config file (default is /etc/plexus/plexus-agent.yaml) |
| 86 | + -v, --verbosity string logging verbosity (default "INFO") |
| 87 | +``` |
| 88 | + |
| 89 | +Leave |
| 90 | +===== |
| 91 | +Leave network command deletes network on peer |
| 92 | +``` |
| 93 | +Usage: |
| 94 | + plexus-agent leave network [flags] |
| 95 | +
|
| 96 | +Flags: |
| 97 | + -h, --help help for leave |
| 98 | +
|
| 99 | +Global Flags: |
| 100 | + --config string config file (default is /etc/plexus/plexus-agent.yaml) |
| 101 | + -v, --verbosity string logging verbosity (default "INFO") |
| 102 | +Leave command deletes current network on peer |
| 103 | +``` |
| 104 | + |
| 105 | +Status |
| 106 | +====== |
| 107 | +Status command displays infomation about server and networks/wireguard interfaces. The server information includes server endpoint and connectivity status. The network/wireguard interface information is displayed in a format similar to ```wg show``` but with additional information about networks/interfaces and peers. |
| 108 | + |
| 109 | +Networks additional information |
| 110 | +* network name |
| 111 | +* network address |
| 112 | +* public listen port |
| 113 | + |
| 114 | +Peers additional information |
| 115 | +* peer name |
| 116 | +* peer address |
| 117 | +``` |
| 118 | +~> plexus-agent status |
| 119 | +Server |
| 120 | + nats://plexus.nusak.ca:4222 : true |
| 121 | +
|
| 122 | +interface: plexus0 |
| 123 | + network name: plexus |
| 124 | + public key: p1AvfOzFgL2nEJrr8pvBeqEt+DPWGrcBfdHfKivjqVk= |
| 125 | + listen port: 51820 |
| 126 | + public listen port: 51820 |
| 127 | + address: 10.10.10.1 |
| 128 | +peer: WhpdSseydj0jpJcNqsnzt8PZ93FUlpKFbR4ZyoUpVDo= winterfell 10.10.10.2 |
| 129 | + endpoint: 129.222.192.188: 30403 |
| 130 | + allowed ips: 10.10.10.2/32 |
| 131 | + last handshake: 117.5493160.0 seconds ago |
| 132 | + transfer: 9980 sent 10328 received |
| 133 | + keepalive: 20s |
| 134 | +peer: pG8tT7Yj0e50JAk9MQw3vZuuN256ispkOfXDzzHC+kI= firefly 10.10.10.3 |
| 135 | + endpoint: 140.238.132.144: 51820 |
| 136 | + allowed ips: 10.10.10.3/32 10.225.211.0/24 |
| 137 | + last handshake: 104.2563300.0 seconds ago |
| 138 | + transfer: 3216 sent 12336 received |
| 139 | + keepalive: 20s |
| 140 | +peer: vrn9w9h8CwmZ++M7BS6EBDSpUUdu+gOXPmp7lZX37m0= oracle 10.10.10.4 |
| 141 | + endpoint: 150.230.31.118: 51820 |
| 142 | + allowed ips: 10.10.10.4/32 |
| 143 | + last handshake: 37.8089930.0 seconds ago |
| 144 | + transfer: 12364 sent 3272 received |
| 145 | + keepalive: 20s |
| 146 | +``` |
| 147 | +Reload |
| 148 | +====== |
| 149 | +Reload commands fetches fresh data from plexus server and reinitializes wireguard interfaces. |
| 150 | +``` |
| 151 | +reload network configurations(s) |
| 152 | +
|
| 153 | +Usage: |
| 154 | + plexus-agent reload [flags] |
| 155 | +
|
| 156 | +Flags: |
| 157 | + -h, --help help for reload |
| 158 | +
|
| 159 | +Global Flags: |
| 160 | + --config string config file (default is /etc/plexus/plexus-agent.yaml) |
| 161 | + -v, --verbosity string logging verbosity (default "INFO") |
| 162 | +``` |
| 163 | + |
| 164 | +Reset |
| 165 | +===== |
| 166 | +Reset command resets the wireguard interface for a given network |
| 167 | +``` |
| 168 | +resets wg interface peers for given network |
| 169 | +
|
| 170 | +Usage: |
| 171 | + plexus-agent reset network [flags] |
| 172 | +
|
| 173 | +Flags: |
| 174 | + -h, --help help for reset |
| 175 | +
|
| 176 | +Global Flags: |
| 177 | + --config string config file (default is /etc/plexus/plexus-agent.yaml) |
| 178 | + -v, --verbosity string logging verbosity (default "INFO") |
| 179 | +``` |
| 180 | + |
| 181 | +Version |
| 182 | +======= |
| 183 | +Version command displays version information: |
| 184 | +* semantic version number |
| 185 | +* git commit hash |
| 186 | +* local modifications to commit |
| 187 | + |
| 188 | +-l --long flags displays version infomation for |
| 189 | +* current binary |
| 190 | +* agent daemon |
| 191 | +* server |
| 192 | +``` |
| 193 | +plexus-agent version |
| 194 | +v0.1.0: git 2dee6a3b1e8551dc637bcbecd62d1a298b9c3f1f 2024-03-25T11:38:43Z true |
| 195 | +
|
| 196 | +plexus-agent version -l |
| 197 | +Server: v0.1.0: git 873255e5f846292c787fe4e332818592d6991baa 2024-03-31T13:51:06Z false |
| 198 | +Agent: v0.1.0: git 2dee6a3b1e8551dc637bcbecd62d1a298b9c3f1f 2024-03-25T11:38:43Z true |
| 199 | +Binary: v0.1.0: git 2dee6a3b1e8551dc637bcbecd62d1a298b9c3f1f 2024-03-25T11:38:43Z true |
| 200 | +``` |
| 201 | + |
| 202 | +LogLevel |
| 203 | +======== |
| 204 | +LogLevel command sets the logging level of agent daemon |
| 205 | +``` |
| 206 | +plexus-agent loglevel -h |
| 207 | +set log level of damemon |
| 208 | +debug, info, warn, or error |
| 209 | +. |
| 210 | +
|
| 211 | +Usage: |
| 212 | + plexus-agent loglevel level [flags] |
| 213 | +
|
| 214 | +Flags: |
| 215 | + -h, --help help for loglevel |
| 216 | +
|
| 217 | +Global Flags: |
| 218 | + --config string config file (default is /etc/plexus/plexus-agent.yaml) |
| 219 | + -v, --verbosity string logging verbosity (default "INFO") |
| 220 | +``` |
| 221 | + |
| 222 | +Run |
| 223 | +=== |
| 224 | +Run command stars the plexus-agent daemon. It is intended to be called as systemd service. If it is run as an ordinary user it will fail with permission errors. |
| 225 | + |
| 226 | + |
| 227 | + |
0 commit comments