Skip to content

Commit 6ce4156

Browse files
committed
2 parents 6b4d0ad + 070ec28 commit 6ce4156

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

tools/state-store-cli/readme.md tools/statestore-cli/readme.md

+29-29
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ Supported platforms:
1414

1515
On the machine where the tool will be run, the following are required:
1616

17-
1. [Install kubectl](https://kubernetes.io/docs/tasks/tools/) which will be used to configure the MQTT Broker
17+
1. [Install kubectl](https://kubernetes.io/docs/tasks/tools/) which is used to configure the MQTT broker
1818

1919
1. Clone the `explore-iot-operations` repository, and enter the state store cli directory:
2020

2121
```shell
2222
git clone https://github.com/Azure-Samples/explore-iot-operations
23-
cd explore-iot-operations/tools/state-store-cli
23+
cd explore-iot-operations/tools/statestore-cli
2424
```
2525

26-
1. Download the state store CLI from the [latest GitHub release](https://github.com/Azure-Samples/explore-iot-operations/releases?q=state-store-cli) and save it in the `state-store-cli` directory
26+
1. Download the state store CLI from the [latest GitHub release](https://github.com/Azure-Samples/explore-iot-operations/releases?q=statestore-cli) and save it in the `statestore-cli` directory
2727

2828
1. **OPTIONAL**: If MQTT broker authentication is required, [install step](https://smallstep.com/docs/step-cli/installation/) to generate the required certificates
2929

@@ -68,21 +68,21 @@ If security is a requirement, then you will need to expose the MQTT broker using
6868
```
6969

7070
> [!NOTE]
71-
> The `certs` directory will contain the following files which will be used by the state store cli tool for authenticating with the MQTT broker:
71+
> The `certs` directory will contain the following files which will be used by the state store CLI tool for authenticating with the MQTT broker:
7272
>
73-
> * `broker-ca.crt` : The MQTT broker server certificate
74-
> * `client.crt` : The device certificate for authentication with MQTT broker
75-
> * `client.key` : The device private key for authentication with MQTT broker
73+
> * `broker-ca.crt` : The MQTT broker server certificate
74+
> * `client.crt` : The device certificate for authentication with MQTT broker
75+
> * `client.key` : The device private key for authentication with MQTT broker
7676

7777
## Usage
7878

79-
For accessing help directly from the console just type `statestore --help`.
79+
For accessing help directly from the console just type `statestore-cli --help`.
8080

8181
```shell
82-
$ ./statestore --help
83-
Allows managing key/value pairs in the MQ State Store.
82+
$ ./statestore-cli --help
83+
Allows managing key/value pairs in the state store.
8484
85-
Usage: statestore [OPTIONS] <COMMAND>
85+
Usage: statestore-cli [OPTIONS] <COMMAND>
8686
8787
Commands:
8888
get Gets the value of an existing key
@@ -92,17 +92,17 @@ Commands:
9292
9393
Options:
9494
-n, --hostname <HOSTNAME>
95-
MQ broker hostname
95+
MQTT broker hostname
9696
9797
[default: localhost]
9898
9999
-p, --port <PORT>
100-
MQ broker port number
100+
MQTT broker port number
101101
102102
[default: 8883]
103103
104104
--notls
105-
Do not use TLS for connection with MQ broker
105+
Do not use TLS for connection with MQTT broker
106106
107107
-T, --cafile <CAFILE>
108108
Trusted certificate bundle for TLS connection
@@ -122,29 +122,29 @@ Options:
122122
-h, --help
123123
Print help (see a summary with '-h')
124124
125-
-V, --version
125+
--version
126126
Print version
127127
```
128128

129-
Help specific to each command can be printed through calling `statestore <command> --help`.
129+
Help specific to each command can be printed through calling `statestore-cli <command> --help`.
130130

131131
```shell
132-
$ ./statestore get --help
132+
$ ./statestore-cli get --help
133133
Gets the value of an existing key
134134
135-
Usage: statestore get [OPTIONS] --key <KEY>
135+
Usage: statestore-cli get [OPTIONS] --key <KEY>
136136
137137
Options:
138138
-k, --key <KEY>
139139
Device State Store key name to retrieve
140140
-f, --valuefile <VALUEFILE>
141141
File where to write the key value. If not provided, the value is written to stdout
142142
-n, --hostname <HOSTNAME>
143-
MQ broker hostname [default: localhost]
143+
MQTT broker hostname [default: localhost]
144144
-p, --port <PORT>
145-
MQ broker port number [default: 8883]
145+
MQTT broker port number [default: 8883]
146146
--notls
147-
Do not use TLS for connection with MQ broker
147+
Do not use TLS for connection with MQTT broker
148148
-T, --cafile <CAFILE>
149149
Trusted certificate bundle for TLS connection
150150
-C, --certfile <CERTFILE>
@@ -164,15 +164,15 @@ Options:
164164
For the examples below, assume:
165165

166166
- The MQTT broker is named `mybroker.net`, on port `8883` or `1883`
167-
- The MQTT brokers trusted CA certificate bundle is available locally as saved locally at `./certs/broker-ca.crt`
168-
- Client certificates are set in the AIO MQ Broker, and saved locally at `./certs/client.crt` and `./certs/client.key`.
167+
- The MQTT broker trust bundle is available locally at `./certs/broker-ca.crt`
168+
- Client certificates are saved locally at `./certs/client.crt` and `./certs/client.key`
169169

170170
### X.509 authentication with TLS
171171

172172
To retrieve an existing key:
173173

174174
```shell
175-
./statestore get -n "mybroker.net" -k "keyName1" -f "./keyValue1.txt" -T "./certs/broker-ca.crt" -C "./certs/client.crt" -K "./certs/client.key"
175+
./statestore-cli get -n "mybroker.net" -k "keyName1" -f "./keyValue1.txt" -T "./certs/broker-ca.crt" -C "./certs/client.crt" -K "./certs/client.key"
176176
```
177177

178178
|||
@@ -184,7 +184,7 @@ To retrieve an existing key:
184184
To set the value of a key:
185185

186186
```shell
187-
./statestore set -n "mybroker.net" -k "keyName1" --value "keyValue1" -T "./certs/broker-ca.crt" -C "./certs/client.crt" -K "./certs/client.key"
187+
./statestore-cli set -n "mybroker.net" -k "keyName1" --value "keyValue1" -T "./certs/broker-ca.crt" -C "./certs/client.crt" -K "./certs/client.key"
188188
```
189189

190190
|||
@@ -196,7 +196,7 @@ To set the value of a key:
196196
To delete an existing key:
197197

198198
```shell
199-
./statestore delete -n "mybroker.net" -k "keyName1" -T "./certs/broker-ca.crt" -C "./certs/client.crt" -K "./certs/client.key"
199+
./statestore-cli delete -n "mybroker.net" -k "keyName1" -T "./certs/broker-ca.crt" -C "./certs/client.crt" -K "./certs/client.key"
200200
```
201201

202202
|||
@@ -213,7 +213,7 @@ To delete an existing key:
213213
To retrieve an existing key:
214214

215215
```shell
216-
./statestore get -n "mybroker.net" -k "keyName1" -f "./keyValue1.txt" --notls
216+
./statestore-cli get -n "mybroker.net" -k "keyName1" -f "./keyValue1.txt" --notls
217217
```
218218

219219
|||
@@ -225,7 +225,7 @@ To retrieve an existing key:
225225
To set the value of a key:
226226

227227
```shell
228-
./statestore set -n "mybroker.net" -k "keyName1" --value "keyValue1" --notls
228+
./statestore-cli set -n "mybroker.net" -k "keyName1" --value "keyValue1" --notls
229229
```
230230

231231
|||
@@ -237,7 +237,7 @@ To set the value of a key:
237237
To delete an existing key:
238238

239239
```shell
240-
./statestore delete -n "mybroker.net" -k "keyName1" --notls
240+
./statestore-cli delete -n "mybroker.net" -k "keyName1" --notls
241241
```
242242

243243
|||

0 commit comments

Comments
 (0)