From e77ecc14e2b46e3397a670386fca0e39198a3002 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Mon, 11 Sep 2017 10:46:43 -0700 Subject: [PATCH] website: document bootstrap CLI and update ACL guide --- website/source/docs/commands/acl.html.md.erb | 25 ++++++++++++ .../docs/commands/acl/bootstrap.html.md.erb | 40 +++++++++++++++++++ website/source/guides/acl.html.markdown | 28 +++++-------- website/source/layouts/docs.erb | 8 ++++ 4 files changed, 84 insertions(+), 17 deletions(-) create mode 100644 website/source/docs/commands/acl.html.md.erb create mode 100644 website/source/docs/commands/acl/bootstrap.html.md.erb diff --git a/website/source/docs/commands/acl.html.md.erb b/website/source/docs/commands/acl.html.md.erb new file mode 100644 index 000000000..b3e60d032 --- /dev/null +++ b/website/source/docs/commands/acl.html.md.erb @@ -0,0 +1,25 @@ +--- +layout: "docs" +page_title: "Commands: acl" +sidebar_current: "docs-commands-acl" +description: > + The deployment command is used to interact with ACL policies and tokens. +--- + +# Nomad ACL + +Command: `nomad acl` + +The `acl` command is used to interact with ACL policies and tokens. + +## Usage + +Usage: `nomad acl [options]` + +Run `nomad acl -h` for help on that subcommand. The following +subcommands are available: + +* [`acl bootstrap`][bootstrap] - Bootstrap the initial ACL token + +[bootstrap]: /docs/commands/acl/bootstrap.html + diff --git a/website/source/docs/commands/acl/bootstrap.html.md.erb b/website/source/docs/commands/acl/bootstrap.html.md.erb new file mode 100644 index 000000000..6bbd92aed --- /dev/null +++ b/website/source/docs/commands/acl/bootstrap.html.md.erb @@ -0,0 +1,40 @@ +--- +layout: "docs" +page_title: "Commands: acl bootstrap" +sidebar_current: "docs-commands-acl-bootstrap" +description: > + The deployment list command is used to list deployments. +--- + +# Command: acl bootstrap + +The `acl bootstrap` command is used to bootstrap the initial ACL token. + +## Usage + +``` +nomad acl bootstrap [options] +``` + +The `acl bootstrap` command requires no arguments. + +## General Options + +<%= partial "docs/commands/_general_options" %> + +## Examples + +Bootstrap the initial token: + +``` +$ nomad acl bootstrap +Accessor ID = 5b7fd453-d3f7-6814-81dc-fcfe6daedea5 +Secret ID = 9184ec35-65d4-9258-61e3-0c066d0a45c5 +Name = Bootstrap Token +Type = management +Global = true +Policies = n/a +Create Time = 2017-09-11 17:38:10.999089612 +0000 UTC +Create Index = 7 +Modify Index = 7 +``` diff --git a/website/source/guides/acl.html.markdown b/website/source/guides/acl.html.markdown index 0efa10295..5a7cff521 100644 --- a/website/source/guides/acl.html.markdown +++ b/website/source/guides/acl.html.markdown @@ -83,25 +83,19 @@ Please take care to restart the servers one at a time, and ensure each server ha ### Generate the initial token -Once the ACL system is enabled, we need to generate our initial token. This first token is used to bootstrap the system and care should be taken not to lose it. Once the ACL system is enabled, we use the [Bootstrap API](/api/acl-tokens.html#bootstrap-token): +Once the ACL system is enabled, we need to generate our initial token. This first token is used to bootstrap the system and care should be taken not to lose it. Once the ACL system is enabled, we use the [Bootstrap CLI](/docs/commands/acl/bootstrap.html): ```text -$ curl \ - --request POST \ - https://nomad.rocks/v1/acl/bootstrap?pretty=true -``` -```json -{ - "AccessorID":"b780e702-98ce-521f-2e5f-c6b87de05b24", - "SecretID":"3f4a0fcd-7c42-773c-25db-2d31ba0c05fe", - "Name":"Bootstrap Token", - "Type":"management", - "Policies":null, - "Global":true, - "CreateTime":"2017-08-23T22:47:14.695408057Z", - "CreateIndex":7, - "ModifyIndex":7 -} +$ nomad acl bootstrap +Accessor ID = 5b7fd453-d3f7-6814-81dc-fcfe6daedea5 +Secret ID = 9184ec35-65d4-9258-61e3-0c066d0a45c5 +Name = Bootstrap Token +Type = management +Global = true +Policies = n/a +Create Time = 2017-09-11 17:38:10.999089612 +0000 UTC +Create Index = 7 +Modify Index = 7 ``` Once the initial bootstrap is performed, it cannot be performed again unless [reset](#reseting-acl-bootstrap). Make sure to save this AccessorID and SecretID. diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 8db66ab10..cb98350fd 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -167,6 +167,14 @@ > Commands (CLI)