website: update the bootstrap reset guide

This commit is contained in:
Armon Dadgar 2017-09-11 10:53:01 -07:00
parent 9344f58b27
commit fa6579098b

View file

@ -310,11 +310,9 @@ If all management tokens are lost, it is possible to reset the ACL bootstrap so
First, we need to determine the reset index, this can be done by calling the reset endpoint: First, we need to determine the reset index, this can be done by calling the reset endpoint:
``` ```
$ curl \ $ nomad acl bootstrap
--request POST \
https://nomad.rocks/v1/acl/bootstrap?pretty=true
ACL bootstrap already done (reset index: 7) Error bootstrapping: Unexpected response code: 500 (ACL bootstrap already done (reset index: 7))
``` ```
Here we can see the `reset index`. To reset the ACL system, we create the `acl-bootstrap-reset` file in the data directory: Here we can see the `reset index`. To reset the ACL system, we create the `acl-bootstrap-reset` file in the data directory:
@ -323,37 +321,27 @@ Here we can see the `reset index`. To reset the ACL system, we create the `acl-b
$ echo 7 >> /nomad-data-dir/server/acl-bootstrap-reset $ echo 7 >> /nomad-data-dir/server/acl-bootstrap-reset
``` ```
Now, we can bootstrap like normal using the reset key: With the reset key setup, we can bootstrap like normal:
``` ```
$ curl \ $ nomad acl bootstrap
--request POST \ Accessor ID = 52d3353d-d7b9-d945-0591-1af608732b76
https://nomad.rocks/v1/acl/bootstrap?pretty=true Secret ID = 4b0a41ca-6d32-1853-e64b-de0d347e4525
``` Name = Bootstrap Token
Type = management
```json Global = true
{ Policies = n/a
"AccessorID":"52d3353d-d7b9-d945-0591-1af608732b76", Create Time = 2017-09-11 18:38:11.929089612 +0000 UTC
"SecretID":"4b0a41ca-6d32-1853-e64b-de0d347e4525", Create Index = 11
"Name":"Bootstrap Token", Modify Index = 11
"Type":"management",
"Policies":null,
"Global":true,
"Hash":"BUJ3BerTfrqFVm1P+vZr1gz9ubOkd+JAvYjNAJyaU9Y=",
"CreateTime":"2017-09-10T23:11:49.34730714Z",
"CreateIndex":11,
"ModifyIndex":11
}
``` ```
If we attempt to bootstrap again, we will get a mismatch on the reset index: If we attempt to bootstrap again, we will get a mismatch on the reset index:
``` ```
$ curl \ $ nomad acl bootstrap
--request POST \
https://nomad.rocks/v1/acl/bootstrap?pretty=true
Invalid bootstrap reset index (specified 7, reset index: 11) Error bootstrapping: Unexpected response code: 500 (Invalid bootstrap reset index (specified 7, reset index: 11))
``` ```
This is because the reset file is in place, but with the incorrect index. This is because the reset file is in place, but with the incorrect index.