Releases: seatgeek/nomad-helper
Releases · seatgeek/nomad-helper
3.2.0
Drain with benefits
3.1.0
3.0.1
3.0.0
Changes
See #25 for code changes
- Rename
nomad-helper stats
intonomad-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 asbreakdown
- Add
nomad-helper node discover
to see a list of all meta/attribute you can use fornomad-helper node
filtering - Bump Nomad SDK to 0.8.7
- Use
go mod
instead ofdep
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 thenode
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
publish version release Signed-off-by: Christian Winther <jippignu@gmail.com>
2.2.0
Change attach sudo command
From sudo su root -c 'docker exec -it
to sudo docker exec -it
Improve filtering for node commands
Merge pull request #7 from burdandrei/eligibility-percent Eligibility filter + percentage of nodes