GithubHelp home page GithubHelp logo

sidekick's Introduction

sidekick

Build Status

If you're running services on CoreOS or using etcd as a way to keep track of different services that are running across your cluster, sidekick is a flexible presence service that was built for you.

Dependencies

Some system dependencies that are expected to run sidekick:

  • Python >= 3.4.3
  • etcd >= 2.0

Python dependencies can be installed by running the following:

pip install -r requirements.txt

Usage

sidekick is intended to be used as a Docker container, linked to the host's networking stack and Docker daemon.

Linking the host's networking stack allows sidekick to easily check the health of the service without any networking complexities. Linking to the host's Docker daemon allows us to easily check for a service's publicly binded ports and announce those to etcd.

Enough talk! Let's go through an example. Let's start up a simple NGINX service:

docker run -d --name nginx -p 80 -p 443 nginx:1.9

Notice that we don't have to explicitly say the local host port for NGINX. We'll let Docker figure out an open port and simply announce that port after inspection. Now we can run our sidekick:

python sidekick.py --name nginx --ip localhost

If you're running on OSX and using boot2docker, you'll need to add --check-ip $(boot2docker ip) to the list of arguments since sidekick expects the service to be accessible locally.

sidekick Command Line Arguments

sidekick is very flexible and takes a number of command line arguments to fit customized deployment onto clusters.

Mandatory Arguments

Argument Description
--name Name of the Docker container to inspect.
--ip The IP to use in the URI for the presence announcement.

Optional Arguments

Argument Description
--check-ip IP used to check a service's health. By default, services are expected to run locally. Default: 0.0.0.0
--docker Docker server URI. Default: unix:///var/run/docker.sock
--domain The domain/service name for this service. Default: example.com
--etcd-host ETCD cluster peer host. Default: localhost
--etcd-port ETCD cluster peer port. Default: 4001
--prefix The etcd folder in which to announce running services. Default: /services
--timeout The number of seconds to wait until the next health check. Default: 10
--ttl ETCD ttl in seconds for the service announcement. Default: 60

sidekick's People

Contributors

a5huynh avatar rwillard avatar

Watchers

 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.