Giter VIP home page Giter VIP logo

go-discover's Introduction

Go Discover Nodes for Cloud Providers Build Status

go-discover is a Go (golang) library and command line tool to discover ip addresses of nodes in cloud environments based on meta information like tags provided by the environment.

The configuration for the providers is provided as a list of key=val key=val ... tuples where the values can be URL encoded. The provider is determined through the provider key. Effectively, only spaces have to be encoded with a + and on the command line you have to observe quoting rules with your shell.

Example

# Amazon AWS
provider=aws region=eu-west-1 tag_key=consul tag_value=... access_key_id=... secret_access_key=...

# Google Cloud
provider=gce project_name=... zone_pattern=eu-west-* tag_value=consul credentials_file=...

# Microsoft Azure
provider=azure tag_name=consul tag_value=... tenant_id=... client_id=... subscription_id=... secret_access_key=...

Supported Providers

The following cloud providers are supported but additional providers can be added to the discover.Disoverers map.

Command Line Tool Usage

Install the command line tool with:

go get -u github.com/hashicorp/go-discover/cmd/discover

Then run it with:

$ discover provider=aws region=eu-west-1 ...

Library Usage

Install the library with:

go get -u github.com/hashicorp/go-discover

Then call the discover.Discover function with the arguments for the provider you want to use:

# use ioutil.Discard for no log output
l := log.New(os.Stderr, "", log.LstdFlags)
args := "provider=aws region=eu-west-1 ..."
addrs, err := discover.Discover(args, l)

For complete API documentation, see GoDoc and the supported providers.

go-discover's People

Contributors

magiconair avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.