Sign inSign up

vicampo/consul

By vicampo

Updated over 8 years ago

Consul

Image
0

9.3K

vicampo/consul repository overview

Vicampo Service Registry

Bitbucket: https://bitbucket.org/vicampo/consul

DockerHub: https://hub.docker.com/r/vicampo/consul/

The Vicampo Service Registry is based on Consul.

This repository is the image that runs the consul process. Consul can either be in "agent mode" or "server mode". For local and development use there is a third mode 'dev' which combines both.

Docker Hub: https://hub.docker.com/r/vicampo/consul/

Consul Agent

A Consul Agent must run on each EC2 Instance that is part of the Vicampo Service Cloud. That local agent provides access to the service registry.

  • Offers a local http api at http:://localhost:8500/
  • Does other things for the local agent to be usefull (see docs)
  • Connects to all other consul servers (gossip)

Consul Server

  • The Consul Server is run on different Instances then the Agent.
  • Takes part in Leader Election.
  • Only if a Leader is elected the Service Registry is able to operate. (Unless in dev mode)

Usage

Use the docker-compose file to start you local consul service. Once started you can use the http api to query the service using curl.

curl http://localhost:8500/v1/agent/services

See https://www.consul.io/api/index.html for more endpoints.

Run Local Agent manualy

Besides Compose you can run consul yourself if you want to play around with its options. Use either the Makefile Commands or the image directly.

docker run --rm -p 8500:8500 --name=consul-server vicampo/consul:0.1 agent -dev -ui  -bind='{{ GetInterfaceIP "eth0" }}' -client='{{ GetInterfaceIP "eth0" }}'

Changelog

0.2 Updated Consul to 0.8.1

Added newer Consul Version.

0.1 Initial Release

Based on Consul 0.7.5

Tag summary

Content type

Image

Digest

Size

13.2 MB

Last updated

over 9 years ago

docker pull vicampo/consul