An open API service indexing awesome lists of open source software.

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

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).