Commit 7882c459 authored by Armon Dadgar's avatar Armon Dadgar
Browse files

website: update the bootstrap reset guide

parent e77ecc14
No related merge requests found
Showing with 15 additions and 27 deletions
+15 -27
......@@ -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:
```
$ curl \
--request POST \
https://nomad.rocks/v1/acl/bootstrap?pretty=true
$ nomad acl bootstrap
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:
......@@ -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
```
Now, we can bootstrap like normal using the reset key:
With the reset key setup, we can bootstrap like normal:
```
$ curl \
--request POST \
https://nomad.rocks/v1/acl/bootstrap?pretty=true
```
```json
{
"AccessorID":"52d3353d-d7b9-d945-0591-1af608732b76",
"SecretID":"4b0a41ca-6d32-1853-e64b-de0d347e4525",
"Name":"Bootstrap Token",
"Type":"management",
"Policies":null,
"Global":true,
"Hash":"BUJ3BerTfrqFVm1P+vZr1gz9ubOkd+JAvYjNAJyaU9Y=",
"CreateTime":"2017-09-10T23:11:49.34730714Z",
"CreateIndex":11,
"ModifyIndex":11
}
$ nomad acl bootstrap
Accessor ID = 52d3353d-d7b9-d945-0591-1af608732b76
Secret ID = 4b0a41ca-6d32-1853-e64b-de0d347e4525
Name = Bootstrap Token
Type = management
Global = true
Policies = n/a
Create Time = 2017-09-11 18:38:11.929089612 +0000 UTC
Create Index = 11
Modify Index = 11
```
If we attempt to bootstrap again, we will get a mismatch on the reset index:
```
$ curl \
--request POST \
https://nomad.rocks/v1/acl/bootstrap?pretty=true
$ nomad acl bootstrap
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.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment