Skip to content

Commit 4010cfc

Browse files
committed
Update deployment-examples.md
Minor updates to formatting and grammar.
1 parent 6180930 commit 4010cfc

File tree

1 file changed

+38
-25
lines changed

1 file changed

+38
-25
lines changed

docs/deployment-examples.md

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Example Deployment Methods
2-
There are a number of methods to deploy the OpenMetrics exporter depending on your environment. In this document we explore some of the common features and deployment methods and by providing walk through examples.
2+
There are a number of methods to deploy the OpenMetrics exporter. In this document we explore some of the common features and deployment methods by providing walk through examples.
33

44
## Contents
55
- [Prerequisites](#prerequisites)
@@ -16,18 +16,29 @@ There are a number of methods to deploy the OpenMetrics exporter depending on yo
1616
# Prerequisites
1717
All deployments will require an API token to authenticate with the array. Read-only only user access is recommended.
1818

19-
1. Generate an API token from your chosen user account or create a new readonly user.
20-
API token can be retrieved from either Purity GUI ot CLI.
19+
Generate an API token from your chosen user account or create a new readonly user.
20+
API token can be retrieved from either Purity GUI ot CLI.
2121

22-
```console
23-
pureuser@array01> pureadmin create --role readonly svc-readonly
24-
Name Type Role
25-
svc-readonly local readonly
22+
<details>
23+
<summary>Expand for CLI example</summary>
2624

27-
pureuser@array01> pureadmin create --api-token svc-readonly
28-
Name Type API Token Created Expires
29-
svc-readonly local a1b2c3d4-e5f6-1234-5678-a1b2c3d4e5f6 2023-11-02 12:00:00 EST -
30-
```
25+
```console
26+
pureuser@arrayname01> pureadmin create --role readonly o11y-readonly
27+
Name Type Role
28+
o11y-readonly local readonly
29+
30+
pureuser@arrayname01> pureadmin create --api-token o11y-readonly
31+
Name Type API Token Created Expires
32+
o11y-readonly local 11111111-1111-1111-1111-111111111111 2022-11-30 08:58:40 EST -
33+
```
34+
35+
</details>
36+
37+
<details>
38+
<summary>Expand for GUI example</summary>
39+
40+
![Alt text](../extra/images/purefa_create_api_token.png)
41+
</details>
3142

3243
# Container Deployment
3344
## Container - default - http passing API token with query
@@ -53,7 +64,7 @@ In this example we will use the default port 9490, set the name as pure-fa-om-ex
5364
Use `curl` to test the exporter returns results.
5465
```console
5566
$ curl -H 'Authorization: Bearer a1b2c3d4-e5f6-1234-5678-a1b2c3d4e5f6' -X GET 'http://localhost:9490/metrics/array?endpoint=array01' -silent | grep ^purefa_info
56-
purefa_info{array_name="ARRAY01",os="Purity//FA",system_id="12345678-abcd-abcd-abcd-abcdef123456",version="6.5.0"} 1
67+
purefa_info{array_name="ARRAY01",os="Purity//FA",system_id="11111111-1111-1111-1111-111111111111",version="6.5.0"} 1
5768
```
5869

5970
We expect to return a single line displaying `purefa_info` returning the name, Purity OS, system ID and the Purity version.
@@ -74,7 +85,7 @@ In this example we will use the default port 9490, set the name as pure-fa-om-ex
7485
# Example of a second array
7586
array02:
7687
address: 'array02.fqdn.com'
77-
api_token: 'a1b2c3d4-e5f6-1234-5678-a1b2c3d4e5f7'
88+
api_token: '11111111-1111-1111-1111-111111111111'
7889
```
7990

8091
2. **Run the container**
@@ -95,7 +106,7 @@ In this example we will use the default port 9490, set the name as pure-fa-om-ex
95106
Use `curl` to test the exporter returns results. We don't need to pass the bearer (API) token for authorization as the exporter has a record of these which makes queries simpler.
96107
```console
97108
$ curl -X GET 'http://localhost:9490/metrics/array?endpoint=array01 ' -silent | grep ^purefa_info
98-
purefa_info{array_name="ARRAY01",os="Purity//FA",system_id="12345678-abcd-abcd-abcd-abcdef123456",version="6.5.0"} 1
109+
purefa_info{array_name="ARRAY01",os="Purity//FA",system_id="11111111-1111-1111-1111-111111111111",version="6.5.0"} 1
99110
```
100111

101112
## Container - TLS - https passing API token with query
@@ -118,7 +129,7 @@ Deploying the binary requires [go](https://go.dev) to compile the code and runni
118129
3. **Clone git repo**
119130
120131
```console
121-
$ git clone git@github.com:PureStorage-OpenConnect/pure-fa-openmetrics-exporter.git
132+
$ git clone https://github.com/PureStorage-OpenConnect/pure-fa-openmetrics-exporter.git
122133
```
123134

124135
4. **Build the package**
@@ -134,14 +145,14 @@ Deploying the binary requires [go](https://go.dev) to compile the code and runni
134145
```console
135146
$ ls out/bin
136147
$ .out/bin/pure-fa-openmetrics-exporter
137-
Start Pure FlashArray exporter v1.0.9 on 0.0.0.0:9490
148+
Start Pure FlashArray exporter v1.0.10 on 0.0.0.0:9490
138149
```
139150

140151
6. **Test the exporter**
141152
Use `curl` to test the exporter returns results.
142153
```console
143154
$ curl -H 'Authorization: Bearer a1b2c3d4-e5f6-1234-5678-a1b2c3d4e5f6' -X GET 'http://localhost:9490/metrics/array?endpoint=array01' -silent | grep ^purefa_info
144-
purefa_info{array_name="ARRAY01",os="Purity//FA",system_id="12345678-abcd-abcd-abcd-abcdef123456",version="6.5.0"} 1
155+
purefa_info{array_name="ARRAY01",os="Purity//FA",system_id="11111111-1111-1111-1111-111111111111",version="6.5.0"} 1
145156
```
146157

147158
We expect to return a single line displaying `purefa_info` returning the name, Purity OS, system ID and the Purity version.
@@ -217,21 +228,21 @@ Follow steps 1-4 and 7-8 of the default binary deployment, but substitute the fo
217228
# Example of a second array
218229
array02:
219230
address: 'array02.fqdn.com'
220-
api_token: 'a1b2c3d4-e5f6-1234-5678-a1b2c3d4e5f7'
231+
api_token: '11111111-1111-1111-1111-111111111111'
221232
```
222233

223234
5. **Run the binary**
224235
```console
225236
$ ls out/bin
226237
$ .out/bin/pure-fa-openmetrics-exporter --tokens /directorypath/tokens.yaml
227-
Start Pure FlashArray exporter v1.0.9 on 0.0.0.0:9490
238+
Start Pure FlashArray exporter v1.0.10 on 0.0.0.0:9490
228239
```
229240

230241
6. **Test the exporter**
231242
Use `curl` to test the exporter returns results.
232243
```console
233244
$ curl -X GET 'http://localhost:9490/metrics/array?endpoint=gse-array01' -silent | grep ^purefa_info
234-
purefa_info{array_name="ARRAY01",os="Purity//FA",system_id="12345678-abcd-abcd-abcd-abcdef123456",version="6.5.0"} 1
245+
purefa_info{array_name="ARRAY01",os="Purity//FA",system_id="11111111-1111-1111-1111-111111111111",version="6.5.0"} 1
235246
```
236247

237248
## Binary - TLS - https passing API token with query
@@ -241,9 +252,11 @@ Follow steps 1-4 and 7-8 of the default binary deployment, but substitute the fo
241252
Create the certificate and key and pass the exporter the files. There are many different methods of generating certificates which we won't discuss here as each organizations has different standards and requirements.
242253

243254
5. **Pass the certificate and private key to the exporter**
244-
```console
245-
pure-fa-om-exporter --port 9490 -c /etc/pki/tls/certs/purefa-ome/pure-ome.crt -k /etc/pki/tls/private/pure-ome.key
246-
```
255+
256+
```console
257+
$ pure-fa-om-exporter --port 9490 -c /etc/pki/tls/certs/purefa-ome/pure-ome.crt -k /etc/pki/tls/private/pure-ome.key
258+
```
259+
247260
6. **Test the exporter**
248261

249262
Use `curl` to test the exporter returns results.
@@ -254,7 +267,7 @@ pure-fa-om-exporter --port 9490 -c /etc/pki/tls/certs/purefa-ome/pure-ome.crt -k
254267

255268
cURL with -k skips SSL verification.
256269
```console
257-
>curl -k -H 'Authorization: Bearer 12345678-abcd-abcd-abcd-abcdef123456' -X GET 'https://localhost:9490/metrics/array?endpoint=array01' --silent | grep ^purefa_info
270+
$ curl -k -H 'Authorization: Bearer 11111111-1111-1111-1111-111111111111' -X GET 'https://localhost:9490/metrics/array?endpoint=array01' --silent | grep ^purefa_info
258271
```
259272

260273
**TLS https - with SSL verification**
@@ -320,7 +333,7 @@ pure-fa-om-exporter --port 9490 -c /etc/pki/tls/certs/purefa-ome/pure-ome.crt -k
320333

321334
Full check using certificate.
322335
```console
323-
$ curl --cacert pure-ome.crt -H 'Authorization: Bearer 12345678-abcd-abcd-abcd-abcdef123456' -X GET 'http://pure-ome.fqdn.com:9490/metrics/array?endpoint=array01'
336+
$ curl --cacert pure-ome.crt -H 'Authorization: Bearer 11111111-1111-1111-1111-111111111111' -X GET 'http://pure-ome.fqdn.com:9490/metrics/array?endpoint=array01'
324337
```
325338

326339

0 commit comments

Comments
 (0)