0
votes

I am new to consul configuration. My objective is to move the properties from application.properties to a consul server.

I have tried multiple methods, but cannot seem to get it right. Is there a particular folder structure that I need to follow?

Below is my bootstrap.yml:

spring:
  application:
    name: my-service
  cloud:
    consul:
      config:
        host: xxxx
        port: xxxx
      discovery:
        instance-id: ${spring.application.name}:${spring.application.instance_id:${random.value}}

Can Consul make use of the same properties file if I place it on the server? If so, what location, with reference to consul.conf, should I place it in?

1
Please see my answer here. - Indra Basak

1 Answers

0
votes

When do you use a client library of Consul like the spring boot, normaly this configuration file is for comunicate the micro service with the Consul Server instance and if do you like make a registration of a service.

I think that do you want make autoregistration of microservices actually Consul only support this for a dockerizate services, may this link is usefull for you:

https://github.com/gliderlabs/registrator

I hope that it help you