hashicorp/nomad-autoscaler-enterprise

Verified Publisher

By HashiCorp, an IBM Company

Updated about 2 months ago

Image
Security
Integration & delivery
Monitoring & observability
1

50K+

hashicorp/nomad-autoscaler-enterprise repository overview

Nomad Autoscaler Enterprise

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.

Running Nomad Autoscaler with Docker

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-enterprise:0.3.3"
        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

Building a custom Docker image

You can build custom Docker images to add extra plugins and configuration directly into the image:

FROM hashicorp/nomad-autoscaler-enterprise:v0.3.3

# 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
...

Tag summary

Content type

Image

Digest

sha256:611bffc88

Size

35.5 MB

Last updated

about 2 months ago

docker pull hashicorp/nomad-autoscaler-enterprise:0.5-ent

This week's pulls

Pulls:

517

Last week