https://github.com/tobilg/mesosdns-resolver
A bash script to resolve Mesos DNS SRV records to actual host:port endpoints
https://github.com/tobilg/mesosdns-resolver
Last synced: 10 months ago
JSON representation
A bash script to resolve Mesos DNS SRV records to actual host:port endpoints
- Host: GitHub
- URL: https://github.com/tobilg/mesosdns-resolver
- Owner: tobilg
- License: mit
- Archived: true
- Created: 2015-11-12T10:49:27.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-11-24T15:23:46.000Z (over 9 years ago)
- Last Synced: 2025-04-13T11:59:58.940Z (over 1 year ago)
- Language: Shell
- Homepage:
- Size: 6.84 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mesosdns-resolver.sh
A bash script to resolve Mesos DNS SRV record to actual host:port endpoints
## Prerequisites
`dig` has to be available on the system.
## Installation
Run `curl -cL https://raw.githubusercontent.com/tobilg/mesosdns-resolver/master/mesosdns-resolver.sh > /usr/bin/mesosdns-resolver.sh && chmod +x /usr/bin/mesosdns-resolver.sh` to install the script locally.
## Usage
`mesosdns-resolver.sh [options]`
A service name has to be supplied, all other options are non-mandatory.
Options:
--------
- `-sn ` or `--serviceName ` : (MANDATORY) The Mesos DNS service name (such as web.marathon.mesos).
- `-s ` or `--server ` : Can be use to query a specify DNS server. Uses local server by default.
- `-d` or `--drill` : Use drill instead of dig for name resolution, as dig is not available in Alpine Linux (and it has a smaller footprint).
- `-m` or `--mesosSuffix` : To resolve service groups the name suffix is needed (defaults to marathon.mesos in mesos DNS), keep in mind that the script does NOT set a default for backwards compatibility reasons.
- `-a` or `--all` : If specified, all endpoints of a service will be returned, with standard separator "comma".
- `-pi ` or `--portIndex ` : By default, the first port (index 0) will be returned. If another port index shall be used, specify the index.
- `-se ` or `--separator ` : The separator to be used then concatenating multiple endpoint results (only usable together with the --all parameter).