docs: add autoscaler plugin ACL details and SIGHUP mention.

This commit is contained in:
James Rasell 2020-07-01 15:41:16 +02:00
parent 9cc5540926
commit fdce1e43bb
No known key found for this signature in database
GPG key ID: AA7D460F5C8377AA
3 changed files with 46 additions and 4 deletions

View file

@ -30,7 +30,7 @@ the autoscaler for fetching scaling policies and scaling jobs:
```hcl
namespace "default" {
policy = "scale"
policy = "scale"
}
Other APM and target plugins may require additional ACLs; see the plugin documentation for more information.
@ -56,6 +56,15 @@ any non-empty values from the latest config file will append or replace
parameters in the current configuration. An empty value means `""` for strings,
`0` for integer or float values, and `false` for booleans.
## SIGHUP Reload
The Nomad Autoscaler agent supports handling the `SIGHUP` signal for reloading without the need for
restarting the agent. When sending a `SIGHUP` signal to the agent process, the agent will perform the
following actions.
- reload the contents of the scaling policy directory as defined by the [policy dir][autoscaler_cli_policy_dir]
parameter.
## General Parameters
- `log_level` `(string: "INFO")` - Specify the verbosity level of Nomad
@ -238,3 +247,4 @@ strategy "example-strategy-plugin" {
[nomad_namespaces]: https://learn.hashicorp.com/nomad/governance-and-policy/namespaces
[nomad_acls]: https://learn.hashicorp.com/nomad?track=acls#acls
[autoscaler_cli_config]: /docs/autoscaling/cli#config
[autoscaler_cli_policy_dir]: /docs/autoscaling/cli#policy-dir

View file

@ -59,6 +59,29 @@ target "nomad-apm" {
}
```
When using a Nomad cluster with ACLs enabled, following ACL policy will provide the appropriate
permissions for obtaining task group metrics:
```hcl
namespace "default" {
policy = "read"
capabilities = ["read-job"]
}
```
In order to obtain cluster level metrics, the following ACL policy will be required:
```hcl
node {
policy = "read"
}
namespace "default" {
policy = "read"
capabilities = ["read-job"]
}
```
### Policy Configuration Options - Task Groups
The Nomad APM allows querying Nomad to understand the current resource usage of

View file

@ -101,6 +101,15 @@ target "aws-asg" {
}
```
When using a Nomad cluster with ACLs enabled, the plugin will require an ACL token which provides
the following permissions:
```hcl
node {
policy = "write"
}
```
- `aws_region` `(string: "us-east-1")` - The [AWS region][aws_region] identifier
to connect to and where resources should be managed.
@ -119,9 +128,9 @@ target "aws-asg" {
check {
...
target "aws-asg" {
asg_name = "hashistack-client-asg"
class = "hashistack"
drain_deadline = "5m"
aws_asg_name = "hashistack-client-asg"
node_class = "hashistack"
node_drain_deadline = "5m"
}
...
```