Skip to content

Releases: seatgeek/nomad-helper

3.2.0

18 Feb 16:30
5588052
Compare
Choose a tag to compare

Drain with benefits

3.1.0

13 Mar 15:04
5795351
Compare
Choose a tag to compare

Ability to list nodes that are "empty" (no batch or service)

3.0.1

21 Nov 09:52
5c7ca4c
Compare
Choose a tag to compare

Fix node command filtering (#28)

3.0.0

02 Oct 07:30
2236acb
Compare
Choose a tag to compare

Changes

See #25 for code changes

  • Rename nomad-helper stats into nomad-helper node breakdown
  • Replace --dimension flag with regular CLI arguments
  • nomad node filtering is now done in parallel (2*CPU Cores) and is thus much faster
  • Add nomad-helper node list that take the same CLI arguments as breakdown
  • Add nomad-helper node discover to see a list of all meta/attribute you can use for nomad-helper node filtering
  • Bump Nomad SDK to 0.8.7
  • Use go mod instead of dep for package management
  • We now require Go 1.13.1 or newer
  • Fetching Nomad node details during filtering is now done in parallel
  • Add HTTP server command that exposes a bunch of the node commands + help over HTTP
  • Improve help output for a lot of commands

node discover

NAME:
   nomad-helper node discover - Output the Nomad client Meta and Attribute fields present in your cluster

USAGE:
   nomad-helper node [filters...] discover [command options]

OPTIONS:
   --output-format value  Either "table", "json" or "json-pretty" (default: "table")

node list

NAME:
   nomad-helper node list - Output list of key properties for a Nomad client

USAGE:
   nomad-helper node [filters...] list [command options] [keys...]

DESCRIPTION:

  ** Arguments **

    * attribute.key will look up key in the "Attributes" Nomad client property
    * hostname is an alias for attribute.unique.hostname
    * ip / address / ip-address is alias for attribute.unique.network.ip-address
    * meta.key will look up key in the "Meta" Nomad client configuration
    * class / nodeclass for the Nomad client "NodeClass" property
    * id for the Nomad client "ID" property
    * datacenter / dc for the Nomad client "Datacenter" property
    * drain for the Nomad client "Drain" property
    * status for the Nomad client "Status" property
    * eligibility / schedulingeligibility for the Nomad client "SchedulingEligibility" property

  ** Filters **

    --filter-prefix ef30d57c                                   Filter nodes by their ID with prefix matching ef30d57c
    --filter-class batch-jobs                                  Filter nodes by their node class batch-jobs
    --filter-version 0.8.4                                     Filter nodes by their Nomad version 0.8.4
    --filter-eligibility eligible/ineligible                   Filter nodes by their eligibility status eligible/ineligible
    --filter-meta 'aws.instance.availability-zone=us-east-1e'  Filter nodes by their meta key/value like 'aws.instance.availability-zone=us-east-1e'. Flag can be repeated.
    --filter-attribute 'driver.docker.version=17.09.0-ce'      Filter nodes by their attribute key/value like 'driver.docker.version=17.09.0-ce'. Flag can be repeated.

  ** Examples **

    * nomad-helper node list class status
    * nomad-helper node list attribute.nomad.version attribute.driver.docker
    * nomad-helper node list meta.aws.instance.region attribute.nomad.version


OPTIONS:
   --output-format table, json or json-pretty  Either table, json or json-pretty (default: "table")

node breakdown

NAME:
   nomad-helper node breakdown - Break down (count) how many Nomad clients that match a list of key properties

USAGE:
   nomad-helper node [filters...] breakdown [command options] [keys...]

DESCRIPTION:

  ** Arguments **

    * attribute.key will look up key in the "Attributes" Nomad client property
    * hostname is an alias for attribute.unique.hostname
    * ip / address / ip-address is alias for attribute.unique.network.ip-address
    * meta.key will look up key in the "Meta" Nomad client configuration
    * class / nodeclass for the Nomad client "NodeClass" property
    * id for the Nomad client "ID" property
    * datacenter / dc for the Nomad client "Datacenter" property
    * drain for the Nomad client "Drain" property
    * status for the Nomad client "Status" property
    * eligibility / schedulingeligibility for the Nomad client "SchedulingEligibility" property

  ** Filters **

    --filter-prefix ef30d57c                                   Filter nodes by their ID with prefix matching ef30d57c
    --filter-class batch-jobs                                  Filter nodes by their node class batch-jobs
    --filter-version 0.8.4                                     Filter nodes by their Nomad version 0.8.4
    --filter-eligibility eligible/ineligible                   Filter nodes by their eligibility status eligible/ineligible
    --filter-meta 'aws.instance.availability-zone=us-east-1e'  Filter nodes by their meta key/value like 'aws.instance.availability-zone=us-east-1e'. Flag can be repeated.
    --filter-attribute 'driver.docker.version=17.09.0-ce'      Filter nodes by their attribute key/value like 'driver.docker.version=17.09.0-ce'. Flag can be repeated.

  ** Examples **

    * nomad-helper node breakdown class status
    * nomad-helper node breakdown attribute.nomad.version attribute.driver.docker
    * nomad-helper node breakdown meta.aws.instance.region attribute.nomad.version


OPTIONS:
   --output-format value  Either "table", "json" or "json-pretty" (default: "table")

server

NAME:
   nomad-helper server - Run a webserver exposing various endpoints

USAGE:
   nomad-helper server [command options] [arguments...]

DESCRIPTION:

  ** Arguments **

    * attribute.key will look up key in the "Attributes" Nomad client property
    * class / nodeclass for the Nomad client "NodeClass" property
    * datacenter / dc for the Nomad client "Datacenter" property
    * drain for the Nomad client "Drain" property
    * eligibility / schedulingeligibility for the Nomad client "SchedulingEligibility" property
    * hostname is an alias for attribute.unique.hostname
    * id for the Nomad client "ID" property
    * ip / address / ip-address is alias for attribute.unique.network.ip-address
    * meta.key will look up key in the "Meta" Nomad client configuration
    * name for the Nomad client "Name" property
    * status for the Nomad client "Status" property

  ** Filters **

  Filters are always passed as HTTP query arguments, order doesn't matter

    /?filter-attribute=driver.docker.version=17.09.0-ce        Filter nodes by their attribute key/value like 'driver.docker.version=17.09.0-ce'.
    /?filter-class=batch-jobs                                  Filter nodes by their node class batch-jobs
    /?filter-eligibility=eligible/ineligible                   Filter nodes by their eligibility status eligible/ineligible
    /?filter-meta=aws.instance.availability-zone=us-east-1e    Filter nodes by their meta key/value like 'aws.instance.availability-zone=us-east-1e'.
    /?filter-prefix=ef30d57c                                   Filter nodes by their ID with prefix matching ef30d57c
    /?filter-version=0.8.4                                     Filter nodes by their Nomad version 0.8.4

  ** Examples **

  Fields are always passed as HTTP path, and processed in order

    * /help
    * /help/node/breakdown
    * /help/node/list
    * /help/node/discover
    * /help/[command]/[subcommand]
    * /node/[breakdown|list]/class/status
    * /node/[breakdown|list]/meta.aws.instance.region/attribute.nomad.version
    * /node/[breakdown|list]/attribute.nomad.version/attribute.driver.docker


OPTIONS:
   --listen value  (default: "0.0.0.0:8000") [$LISTEN]

-version now output real git tag on build

23 Aug 19:38
cbf063a
Compare
Choose a tag to compare
publish version release

Signed-off-by: Christian Winther <jippignu@gmail.com>

2.2.0

18 Jul 13:53
6fe5746
Compare
Choose a tag to compare
Merge pull request #10 from seatgeek/add-json-output

Add json/json-pretty output option to "stats" command

Change attach sudo command

06 Feb 13:40
599610e
Compare
Choose a tag to compare

From sudo su root -c 'docker exec -it to sudo docker exec -it

Improve filtering for node commands

06 Feb 13:32
3cdb2fd
Compare
Choose a tag to compare
Merge pull request #7 from burdandrei/eligibility-percent

Eligibility filter + percentage of nodes

2.1.1

19 Nov 11:32
c917134
Compare
Choose a tag to compare

tail: allow changing color theme when highlighting JSON

2.1.0

19 Nov 11:19
Compare
Choose a tag to compare

Fix tail not outputting logs "as-is" - also allow to disable color highlighting for JSON files