Questions tagged [consul]

Consul is a tool for discovering and configuring services in the infrastructure.

Consul is a tool for discovering and configuring services in your infrastructure.

Questions that are about:

can have this tag.

A distinguishing feature is the usage of gossip protocol for propagating the data between cluster nodes which makes it decentralized and scalable. Do notice that provides additional features like the support for multiple datacenters. Unless those questions have a programming related edge, those question are better fitted for ServerFault.

Adapted from the Introduction page of the Consul website.

1162 questions
12
votes
2 answers

Get Docker container IP within a .net core application

What is the best way to get the current docker container IP address within the container itself using .net core? I try to register my container to a Consul server which is hosted on the Docker host (not as a container) and I need to get the…
Alex
  • 1,857
  • 3
  • 36
  • 51
12
votes
3 answers

How to run Consul on docker with initial key-value pair data?

I am trying to spin a Consul server on docker container and use it as config server for my SpringBoot cloud application. For that I want to have some pre-configured data(Key-Value pairs) in Consul. My current config in docker-compose.yml is: …
K. Siva Prasad Reddy
  • 11,786
  • 12
  • 68
  • 95
11
votes
1 answer

Docker, Registrator and Consul by example

I am new to both Docker and Consul, and am trying to get a feel for how containerized apps could use Consul for both service registry and KV pair config management ("configuration"). My understanding was that I could: Create an image that runs…
smeeb
  • 27,777
  • 57
  • 250
  • 447
11
votes
2 answers

How to Handle Runtime Configuration of Symfony2 Using Consul Service Discovery

Our team is presently exploring the idea of service discovery for a Symfony2 application using Consul. Being in the relative frontier, there's very little out there in the way of discussion. So far we've discovered: Runtime configuration has…
10
votes
1 answer

Why is the SSL connection between a Spring Boot app and Consul failing after a few minutes?

I'm in the process of upgrading an environment with new versions of Ubuntu, Consul and Spring Boot. At first glance, everything seems to be working just fine. The app connects to Consul, requests its configuration and boots up. After a few minutes…
jhkuperus
  • 1,439
  • 11
  • 15
10
votes
1 answer

Resolve containers using consul DNS on host

Aim: Get a docker container to use the DNS provided by the host machine, which is a consul agent running in another container, to access services available via traefik reverse proxy. Setup Host machine: Ubuntu 16.04.2 LTS Registrator registers new…
NiffyDroid
  • 231
  • 2
  • 10
10
votes
1 answer

Get list of containers/services of docker-compose from inside a container

There is a smart way to get the list of services (or containers) of docker-compose files from inside of a container. I would prefer not to using volumes, or passing statically the compose-file to container and parse it or pass a list with these…
10
votes
1 answer

Remove dead services from Consul

We have a number of Spring Boot applications that register themselves with Consul (via Spring Cloud Consul). If I stop those applications via docker-compose stop myservice then they de-register themselves correctly and disappear from Consul. If I…
nickcodefresh
  • 887
  • 2
  • 10
  • 25
10
votes
2 answers

How to self register a service with Consul

I'm trying to self register my ASP.NET Core application to Consul registry on startup and deregister it on shutdown. From here I can gather that calling the http api [put /v1/agent/service/register] might be the way to go (or maybe not!). From my…
rethabile
  • 3,029
  • 6
  • 34
  • 68
10
votes
5 answers

How does a Consul agent know it is the leader of a cluster?

In Consul you can have many agents as servers or clients. Amongst all servers one is chosen as the leader. From the agent's point of view, how does it know it is the leader?
Alexandre Santos
  • 8,170
  • 10
  • 42
  • 64
10
votes
2 answers

How to use Consul in leader election?

How do I use Consul to make sure only one service is performing a task? I've followed the examples in http://www.consul.io/ but I am not 100% sure which way to go. Should I use KV? Should I use services? Or should I use a register a service as a…
Alexandre Santos
  • 8,170
  • 10
  • 42
  • 64
9
votes
1 answer

Nomad and port mapping

Nomad has three different ways to map ports: Network stanza under group level Network stanza under config -> resources level port_map stanza under config level What is the difference and when I should use which?
Alan Sereb
  • 2,358
  • 2
  • 17
  • 31
9
votes
5 answers

How to reset or "un-initialize" vault?

I'm trying to automate vault v0.8.0 deployment (vaultproject from Hashicorp) with a consul v0.9.1 backend. Because it is a trial and error process I need to run "vault init" a couple of times (until I get it right) and get the keys. Unfortunately I…
ady8531
  • 689
  • 5
  • 13
  • 24
9
votes
2 answers

Consul and Spring Boot services in Docker - not deregistering

So we have Java microservices written with Spring-Boot, using Consul for service discovery and config management and running in Docker containers. All of it is working, but when a container dies or a service restarts the old service-id never goes…
Gandalf
  • 9,648
  • 8
  • 53
  • 88
9
votes
1 answer

Difference between Consul Service definition Address and Service Address

Consul service definition json is as follows { "Address": "192.168.10.10", "TaggedAddresses": { "lan": "192.168.10.10", "wan": "10.0.10.10" }, "CreateIndex": 51, "ModifyIndex": 51, "Node": "foobar", …
Swapnil17
  • 666
  • 1
  • 10
  • 22
1
2
3
77 78