sinkhole
CLI tool for quickly creating webhooks for Hashicorp Nomad
UPDATE / Postmortem 💀
Due to recent changes in Nomad API, I have decided to abandon this project. I had planned to migrate it to a Typescript CLI tool and flesh it out some more but I didn't end up getting to far with that unfortunately.
The basic idea of this project was to have a CLI sinkhole
command that let sysadmins and devops engineers link their Nomad clusters to other services. Using the tool, commands such as the sinkhole create
command could be used to register event sinks on job fails, deployments or other cluster events. The tool would manage these sinks with your Nomad cluster and let you easily get webhooks for them so they can be linked to other apps such as Slack.
Under the hood this mainly worked by sending api requests to the Nomad agent's API, however the updates to the Nomad API have removed the event sinks entirely. I still learned a fair bit from this project though and am happy I got a chance to play around with it while I could.
I may try and create something similar in the future since I really like the name sinkhole though.
Usage
$ npm install -g sinkhole
$ sinkhole COMMAND
running command...
$ sinkhole (-v|--version|version)
sinkhole/0.1.0 linux-x64 node-v16.5.0
$ sinkhole --help [COMMAND]
USAGE
$ sinkhole COMMAND
...
Commands
sinkhole hello [FILE]
describe the command here
USAGE
$ sinkhole hello [FILE]
OPTIONS
-f, --force
-h, --help show CLI help
-n, --name=name name to print
EXAMPLE
$ sinkhole hello
hello world from ./src/hello.ts!
See code: src/commands/hello.ts
sinkhole help [COMMAND]
display help for sinkhole
USAGE
$ sinkhole help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help