quota command docs

This commit is contained in:
Alex Dadgar
2017-10-13 14:02:30 -07:00
parent 002e31ae1b
commit c8cfcab793
15 changed files with 498 additions and 7 deletions

View File

@@ -3,7 +3,7 @@ layout: "docs"
page_title: "Commands: acl"
sidebar_current: "docs-commands-acl"
description: >
The deployment command is used to interact with ACL policies and tokens.
The acl command is used to interact with ACL policies and tokens.
---
# Nomad ACL

View File

@@ -24,7 +24,7 @@ The `acl policy delete` command requires the policy name as an argument.
## Examples
Delete a new ACL Policy:
Delete a ACL Policy:
```
$ nomad acl policy delete my-policy

View File

@@ -0,0 +1,34 @@
---
layout: "docs"
page_title: "Commands: quota"
sidebar_current: "docs-commands-quota"
description: >
The quota command is used to interact with quota specifications.
---
# Nomad Quota
Command: `nomad quota`
The `quota` command is used to interact with quota specifications.
## Usage
Usage: `nomad quota <subcommand> [options]`
Run `nomad quota <subcommand> -h` for help on that subcommand. The following
subcommands are available:
* [`quota apply`][quotaapply] - Create or update a quota specification
* [`quota delete`][quotadelete] - Delete a quota specification
* [`quota init`][quotainit] - Create an example quota specification file
* [`quota inspect`][quotainspect] - Inspect a quota specification
* [`quota list`][quotalist] - List quota specifications
* [`quota status`][quotastatus] - Display a quota's status and current usage
[quotaapply]: /docs/commands/quota/apply.html
[quotadelete]: /docs/commands/quota/delete.html
[quotainit]: /docs/commands/quota/init.html
[quotainspect]: /docs/commands/quota/inspect.html
[quotalist]: /docs/commands/quota/list.html
[quotastatus]: /docs/commands/quota/status.html

View File

@@ -0,0 +1,37 @@
---
layout: "docs"
page_title: "Commands: quota apply"
sidebar_current: "docs-commands-quota-apply"
description: >
The quota apply command is used to create or update quota specifications.
---
# Command: quota apply
The `quota apply` command is used to create or update quota specifications.
## Usage
```
nomad quota apply [options] <name> <path>
```
The `quota apply` command requires the path to the specification file. The
specification can be read from stdin by setting the path to "-".
## General Options
<%= partial "docs/commands/_general_options" %>
## Apply Options
* `-json`: Parse the input as a JSON quota specification.
## Examples
Create a new quota specification:
```
$ nomad quota apply my-quota.hcl
Successfully applied quota specification "my-quota"!
```

View File

@@ -0,0 +1,32 @@
---
layout: "docs"
page_title: "Commands: quota delete"
sidebar_current: "docs-commands-quota-delete"
description: >
The quota delete command is used to delete an existing quota specification.
---
# Command: quota delete
The `quota delete` command is used to delete an existing quota specification.
## Usage
```
nomad quota delete <quota_name>
```
The `quota delete` command requires the quota specification name as an argument.
## General Options
<%= partial "docs/commands/_general_options" %>
## Examples
Delete a quota specification:
```
$ nomad quota delete my-quota
Successfully deleted quota "my-quota"!
```

View File

@@ -0,0 +1,31 @@
---
layout: "docs"
page_title: "Commands: quota init"
sidebar_current: "docs-commands-quota-init"
description: >
Generate an example quota specification.
---
# Command: quota init
The `quota init` command is used to create an example quota specification file
that can be used as a starting point to customize further.
## Usage
```
nomad quota init
```
## Init Options
* `-json`: Create an example JSON quota specification.
## Examples
Create an example quota specification:
```
$ nomad quota init
Example quota specification written to spec.hcl
```

View File

@@ -0,0 +1,77 @@
---
layout: "docs"
page_title: "Commands: quota inspect"
sidebar_current: "docs-commands-quota-inspect"
description: >
The quota inspect command is used to view raw information about a particular
quota specification.
---
# Command: quota inspect
The `quota inspect` command is used to view raw information about a particular
quota.
## Usage
```
nomad quota inspect [options] <quota_name>
```
## General Options
<%= partial "docs/commands/_general_options" %>
## Inspect Options
* `-t` : Format and display the job using a Go template.
## Examples
Inspect a quota specification:
```
$ nomad quota inspect default-quota
{
"Spec": {
"CreateIndex": 8,
"Description": "Limit the shared default namespace",
"Limits": [
{
"Hash": "NLOoV2WBU8ieJIrYXXx8NRb5C2xU61pVVWRDLEIMxlU=",
"Region": "global",
"RegionLimit": {
"CPU": 2500,
"DiskMB": 0,
"IOPS": 0,
"MemoryMB": 2000,
"Networks": null
}
}
],
"ModifyIndex": 56,
"Name": "default-quota"
},
"UsageLookupErrors": {},
"Usages": {
"global": {
"CreateIndex": 8,
"ModifyIndex": 56,
"Name": "default-quota",
"Used": {
"NLOoV2WBU8ieJIrYXXx8NRb5C2xU61pVVWRDLEIMxlU=": {
"Hash": "NLOoV2WBU8ieJIrYXXx8NRb5C2xU61pVVWRDLEIMxlU=",
"Region": "global",
"RegionLimit": {
"CPU": 500,
"DiskMB": 0,
"IOPS": 0,
"MemoryMB": 256,
"Networks": null
}
}
}
}
}
}
```

View File

@@ -0,0 +1,37 @@
---
layout: "docs"
page_title: "Commands: quota list"
sidebar_current: "docs-commands-quota-list"
description: >
The quota list command is used to list available quota specifications.
---
# Command: quota list
The `quota list` command is used to list available quota specifications.
## Usage
```
nomad quota list
```
## General Options
<%= partial "docs/commands/_general_options" %>
## List Options
* `-json`: Output the quota specifications in a JSON format.
* `-t`: Format and display the quotas specifications using a Go template.
## Examples
List all quota specifications:
```
$ nomad quota list
Name Description
default Limit the shared default namespace
```

View File

@@ -0,0 +1,38 @@
---
layout: "docs"
page_title: "Commands: quota status"
sidebar_current: "docs-commands-quota-status"
description: >
The quota status command is used to view the status of a particular quota
specification.
---
# Command: quota status
The `quota status` command is used to view the status of a particular quota
specification.
## Usage
```
nomad quota status [options] <quota_name>
```
## General Options
<%= partial "docs/commands/_general_options" %>
## Examples
View the status of a quota specification:
```
$ nomad quota status default-quota
Name = default-quota
Description = Limit the shared default namespace
Limits = 1
Quota Limits
Region CPU Usage Memory Usage
global 500 / 2500 256 / 2000
```