Nomad Autoscaler brings autoscaling to your Nomad workloads.
100K+
The Nomad Autoscaler is an autoscaling daemon for Nomad, architectured around plug-ins to allow for easy extensibility in terms of supported metrics sources, scaling targets and scaling algorithms.
This project is in the early stages of development and is supplied without guarantees and subject to change without warning
For more information see the documentation at https://github.com/hashicorp/nomad-autoscaler.
The Autoscaler can be deployed as a Nomad job, inside the cluster being monitored or externally. There are several advantages with this approach, such as the ability to use artifacts to automatically fetch additional material, such as plugins or configuration files, and templates to render configuration templates with secrets from Vault or dynamic values from Consul.
You can use the Docker driver to run the Autoscaler as a Nomad job:
job "autoscaler" {
datacenters = ["dc1"]
group "autoscaler" {
count = 1
task "autoscaler" {
driver = "docker"
config {
image = "hashicorp/nomad-autoscaler:0.3.5"
command = "nomad-autoscaler"
args = ["agent", "-config", "${NOMAD_TASK_DIR}/config.hcl"]
}
template {
data = <<EOF
plugin_dir = "/plugins"
nomad {
address = "http://{{env "attr.unique.network.ip-address" }}:4646"
}
apm "nomad" {
driver = "nomad-apm"
config = {
address = "http://{{env "attr.unique.network.ip-address" }}:4646"
}
}
apm "prometheus" {
driver = "prometheus"
config = {
address = "http://{{ env "attr.unique.network.ip-address" }}:9090"
}
}
strategy "target-value" {
driver = "target-value"
}
EOF
destination = "${NOMAD_TASK_DIR}/config.hcl"
}
}
}
}
Alternatively, you can run the Autoscaler as a stand-alone Docker container:
$ docker run \
--volume /usr/bin/nomad-autoscaler/plugins:/plugins \
--volume /opt/nomad-autoscaler/config:/config \
hashicorp/nomad-autoscaler nomad-autoscaler agent -config /config
You can build custom Docker images to add extra plugins and configuration directly into the image:
FROM hashicorp/nomad-autoscaler:v0.3.5
# add custom plugin
ADD http://my-ci/build-num/my-plugin /plugin-dir/my-plugin
# add custom configuration that will be merged with the default
# configuration present in the base image
ADD http://my-ci/build-num/my-plugin-conf.hcl \
/config-dir/my-plugin.hcl
...
Content type
Image
Digest
sha256:f89ec785c…
Size
35.4 MB
Last updated
about 2 months ago
docker pull hashicorp/nomad-autoscaler:0.5Pulls:
1,282
Last week