Skip to content

ConsulOnContainers is a concept library around Consul, and it shows how to use Consul as a service registration orchestrator.

License

Notifications You must be signed in to change notification settings

hansehe/ConsulOnContainers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ConsulOnContainers

Introduction

ConsulOnContainers is a concept library around Consul, and it shows how to use Consul as a service registration orchestrator.
In summary, each service registers with Consul during bootup with information on which IP address to locate the service, and how to do health checks on the respective service.

The solution includes an API service which registers itself with Consul, and a client service which locates the API service using Consul.

Get Started

  1. Install Docker:

Build & Run

# Build dotnet core api and client service
docker-compose -f src/docker-compose.yml build

# Deploy consul cluster and dotnet core services
docker-compose -f src/docker-compose.consul.cluster.yml -f src/docker-compose.yml up

# Open browser and login to consul to see results!
# - Consul: http://localhost:8500

Nice To Know

Consul is deployed in a cluster of Consul services, and there should only be one Consul service on each node in the cluster, thus it is not possible to run this concept in Swarm mode. Each Consul service will be in conflict if they are running on a single node if the cluster is running in Swarm mode. The concept is therefore deployed with bridge networks running on a single node.

About

ConsulOnContainers is a concept library around Consul, and it shows how to use Consul as a service registration orchestrator.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published