lagom / lagom-recipes

Other
62 stars 35 forks source link

Update configuration for Cluster Bootstrap Discovery Method #47

Open TimMoore opened 6 years ago

TimMoore commented 6 years ago

This is the current configuration for the Cluster Bootstrap Discovery Method:

https://github.com/lagom/lagom-recipes/blob/2203a64a52af2405c69b3351688ef30fcd610d5f/kubernetes-deployment/hello-kubernetes-java-mvn/hello-impl/src/main/resources/prod-application.conf#L10-L16

https://github.com/lagom/lagom-recipes/blob/2203a64a52af2405c69b3351688ef30fcd610d5f/kubernetes-deployment/hello-kubernetes-java-mvn/stream-impl/src/main/resources/prod-application.conf#L10-L16

This globally sets the default discovery method to kubernetes-api, which is only appropriate to use for Cluster Bootstrap and not for inter-service discovery.

While this recipe does not currently use Akka Discovery for anything else, users are likely to copy it as it is. Anyone using the Akka gRPC integration will need another global default discovery method, and in the future, Lagom will have a ServiceLocator implementation based on Akka Discovery.

The recipe should be updated to set akka.management.cluster.bootstrap.contact-point-discovery.discovery-method instead of akka.discovery.method, as described in https://github.com/akka/akka-management/issues/316.

TimMoore commented 6 years ago

See also https://github.com/lightbend/reactive-cli/issues/173