mmds
allows you to get some information which are currently missing from the AWS meta-data service
TL:DR
# Figure out the pricing model of the instance
~$ mmds pricing-model
spot
Usage
~$ mmds --help
NAME:
mmds - Missed (AWS) Meta-Data (service)
USAGE:
mmds [global options] command [command options] [arguments...]
COMMANDS:
pricing-model get instance pricing-model
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--log-level level log level (debug,info,warn,fatal,panic) (default: "info") [$MMDS_LOG_LEVEL]
--log-format format log format (json,text) (default: "text") [$MMDS_LOG_FORMAT]
--help, -h show help (default: false)
Install
Have a look onto the latest release page and pick your flavor.
Go
~$ go install github.com/mvisonneau/mmds/cmd/mmds@latest
Homebrew (linux only)
~$ brew install mvisonneau/tap/mmds
Scoop
~$ scoop bucket add https://github.com/mvisonneau/scoops
~$ scoop install mmds
Binaries, DEB and RPM packages
For the following ones, you need to know which version you want to install, to fetch the latest available :
~$ export MMDS_VERSION=$(curl -s "https://api.github.com/repos/mvisonneau/mmds/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
# Binary (eg: freebsd/amd64)
~$ wget https://github.com/mvisonneau/mmds/releases/download/${MMDS_VERSION}/mmds_${MMDS_VERSION}_freebsd_amd64.tar.gz
~$ tar zxvf mmds_${MMDS_VERSION}_freebsd_amd64.tar.gz -C /usr/local/bin
# DEB package (eg: linux/386)
~$ wget https://github.com/mvisonneau/mmds/releases/download/${MMDS_VERSION}/mmds_${MMDS_VERSION}_linux_386.deb
~$ dpkg -i mmds_${MMDS_VERSION}_linux_386.deb
# RPM package (eg: linux/arm64)
~$ wget https://github.com/mvisonneau/mmds/releases/download/${MMDS_VERSION}/mmds_${MMDS_VERSION}_linux_arm64.rpm
~$ rpm -ivh mmds_${MMDS_VERSION}_linux_arm64.rpm
Develop / Test
~$ make
all Test, builds and ship package for all supported platforms
build Build the binaries using local GOOS
clean Remove binary if it exists
coverage Prints coverage report
fmt Format source code
help Displays this help
install Build and install locally the binary (dev purpose)
lint Run all lint related tests upon the codebase
prerelease Build & prerelease the binaries (edge)
release Build & release the binaries (stable)
test Run the tests against the codebase
Contribute
Contributions are very welcome! Feel free to submit a PR.