Skip to content

r3boot/rkt-registrator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wth is rkt-registrator?

Rkt-registrator is a bridge between rkt containers and Consul. It reads metadata from pods running on a host, and pushes these to consul. Pod metadata is read from the local filesystem, and converted into a json object which is posted to the consul api. Consul checks can be configured on a per-pod basis using annotations added to the ACI (see below).

rkt-registrator configuration options

rkt-registrator is fully configured from the commandline. See the options below for an overview:

  -consul-endpoint string
    	Uri of consul master endpoint (default "http://localhost:8500")
  -consul-worker string
    	Consul node on which we register services
  -d	Enable debug output
  -net string
    	Publish ip addresses from this network (default "default-restricted")
  -rkt-cni-dir string
    	Path to rkt cni directory (default "/var/lib/cni")
  -rkt-data-dir string
    	Path to rkt data directory (default "/var/lib/rkt")

Furthermore, it's possible to define the above options as environment variables. Note that the options specified above take presedence over the environment variables.

Option Environment
-consul-endpoint CONSUL_ENDPOINT
-consul-worker CONSUL_WORKER
-d REGISTRATOR_DEBUG
-net RKT_NET
-rkt-cni-dir RKT_CNI_DIR
-rkt-data-dir RKT_DATA_DIR

ACI annotations for consul checks

You can add the annotations below to your ACI's to influence the way consul handles the service. Note that for now your ACI must atleast have consul-port to be usable with rkt-registrator.

Name Description
consul-port Port on which the service is listening
consul-dns Override DNS hostname
consul-check-type Check type (See Consul Service Definition docs)
consul-check-target Target of the check
consul-check-name Name for the check
consul-check-interval Interval of check (defaults to 10s)
consul-check-timeout Timeout of check (defaults to 1s)

Roadmap

The current code is not even alpha quality code. Further work include more documentation and building proper releases.

About

Service Discovery for rkt using consul

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages