Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
docs: add documentation for metadata params on scaling activites.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrasell committed Nov 4, 2019
1 parent 9e9971f commit 3c85c1b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
27 changes: 27 additions & 0 deletions docs/api/scale.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ This endpoint can be used to scale a Nomad job group out, therefore increasing i
* `:group` (string: required) - Specifies the group name within the job and is specified as part of the path.
* `count` (int: 0) - Specifies the count which to scale the job group by. If this is not passed, Sherpa will attempt to use the value within the scaling policy.

#### Sample Payload
```json
{
"Meta": {
"foo": "bar"
}
}
```

### Sample Request

```
Expand Down Expand Up @@ -46,6 +55,15 @@ This endpoint can be used to scale a Nomad job group in, therefore decreasing it
* `:group` (string: required) - Specifies the group name within the job and is specified as part of the path.
* `count` (int: 0) - Specifies the count which to scale the job group by. If this is not passed, Sherpa will attempt to use the value detailed within the scaling policy.

#### Sample Payload
```json
{
"Meta": {
"foo": "bar"
}
}
```

### Sample Request

```
Expand Down Expand Up @@ -93,6 +111,9 @@ $ curl \
"Details": {
"Count": 1,
"Direction": "in"
},
"Meta": {
"foo": "bar"
}
}
},
Expand All @@ -105,6 +126,9 @@ $ curl \
"Details": {
"Count": 1,
"Direction": "in"
},
"Meta": {
"foo": "bar"
}
}
}
Expand Down Expand Up @@ -138,6 +162,9 @@ $ curl \
"Details": {
"Count": 1,
"Direction": "in"
},
"Meta": {
"foo": "bar"
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions docs/commands/scale.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ The scale command groups subcommands for actioning and detailing scaling request

## Examples

Scale out job `example` and group `cache` by a count of `2`:
Scale out job `example` and group `cache` by a count of `2` setting some meta params:
```bash
$ sherpa scale out --group-name=cache --count=2 example
$ sherpa scale out --group-name=cache --count=2 -meta=reason=jrasell-manual example
```

Scale in job `example` and group `cache` using the count configured in the scaling policy:
```bash
$ sherpa scale in --group-name=cache example
$ sherpa scale in --group-name=cache example -meta=reason=jrasell-manual
```

List all the scaling events currently held with the Sherpa storage backend:
Expand Down

0 comments on commit 3c85c1b

Please sign in to comment.