Giter Club home page Giter Club logo

vaas-registration-hook's Introduction

VaaS Registration Hook

Build Status Go Report Card Codecov GoDoc

VaaS integration based on a hook mechanic. An app is usually registered with VaaS once it becomes healthy and deregistered before termination.

Usage

CLI

Task’s desired address (--addr) and port (--port, -p) will be (de)registered under a director provided by --director. A VaaS API url needs to be provided (--vaas-url or VAAS_URL) along with an API user (--user, -u) and secret key (--key, -k). If task needs a defined weight it can be provided with --weight at registration. Registered backend can be tagged as a canary using --canary.

Examples:

export VAAS_URL="http://vaas.example.com/api"
export VAAS_USER="admin"
export VAAS_KEY="secret-key"
vaas-hook --debug --addr=192.168.0.10 --port 80 --director=hook-test register cli --weight 1 --dc dc1
vaas-hook --debug --addr=192.168.0.10 --port 80 --director=hook-test deregister cli

Kubernetes

This hook can also read a Kubernetes environment and access annotations via it's Pod API. All the available annotations can be viewed in k8s/pod.go. Action names and debug flag still needs to be provided via command line. A working example can be found in examples/service-with-lifecycle.yaml

Examples:

vaas-hook --debug register k8s
vaas-hook --debug deregister k8s

Requirements

To run executor tests locally you need following tools installed:

Debug mode

vaas-registration hook offers a debug mode that provide extended logging and capabilities during runtime. To enable debug mode add --debug flag to the command or set VAAS_HOOK_DEBUG environment variable to true.

Development

To build this project, just execute the following command in project root folder:

$ make

It will run tests and create a binary and a ZIP package for release purposes.

Contributing

See CONTRIBUTING for more details and code of conduct.

License

Mesos Executor is distributed under the Apache 2.0 License.

vaas-registration-hook's People

Contributors

alfredbroda avatar adamdubiel avatar szu0 avatar

Watchers

James Cloos 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.