Closed pascalgrimaud closed 2 years ago
Instead of '/microservice, it can be
spring-boot/spring-cloud/config-client` and in addition following approach:-
spring-cloud/config-client
contextjhipster-registry.yml
in src/main/docker
Look good to me, excepting there are 2 possibilities:
For consul as config provider (with 'spring-cloud-starter-consul-config'), it has pre-requisite that consul is in place already as using only config KV without registry capabilities is unusual. Can add the config as an option in Consul context. WDYT?
Mhhh it's related to another ticket. Let's start with your 1st idea + jhipster registry, we'll see later for spring cloud consul
@swarajsaaj : so I had a look and indeed you're right - see https://github.com/jhipster/generator-jhipster/blob/main/generators/server/templates/src/main/resources/config/application-dev.yml.ejs#L93-L114
There are 2 configs:
So this ticket should be related only to spring cloud config (not consul) I wonder if we should implement this ticket in the same context than Eureka ?
It means this ticket https://github.com/jhipster/jhipster-lite/issues/280 can only be done after this one. What do you think?
@pascalgrimaud :
So this ticket should be related only to spring cloud config (not consul)
Yes agreed, as I have seen projects using only config-server for dynamic configuration without need of eureka at all (like in kubernetes based deployments, where you may not need additional registry but dynamic configuration is required instead of configmaps)
The fact that jhipster-registry
is a combination of both eureka and config-server, doesn't mean project would require both always, so I think to have two separate APIs for more flexibility:-
thanks @swarajsaaj ! agree with you
thanks. will submit a PR today/tomorrow.
In generator-jhipster, the Jhipster registry (https://github.com/jhipster/jhipster-registry) was shipped together. I think we can use the same (not just for config server, also for the eureka registry part). Any opinions for not using that and using https://hub.docker.com/r/springcloud/configserver instead?
As registry/consul and config-client usually are used with microservices, shall we group them under
spring-boot/microservice
umbrella? (e.g.spring-boot/microservice/config-client
,spring-boot/microservice/registry/consul-client
andspring-boot/microservice/registry/eureka-client
?