These are chat archives for spring-cloud/spring-cloud

19th
Oct 2015
Aleksandr Tarasov
@aatarasoff
Oct 19 2015 13:07
@spencergibb Hi! After closing issue #93 ConsulLifecycle always register service itself. But I use external registration utility - gliderlabs/registator and dont want to register service with Consul Lifecycle. There is no possibility to turnoff lifecycle cause it depends on general flag spring.cloud.consul.discovery.enabled. I think that other flag is needed for this. For example spring.cloud.consul.discovery.lifecycle.enabled or other. What do you think?
Spencer Gibb
@spencergibb
Oct 19 2015 16:54
@aatarasoff sounds reasonable.
Spencer Gibb
@spencergibb
Oct 19 2015 18:17
@aatarasoff will you create an issue? Pull requests are welcome as well.
Aleksandr Tarasov
@aatarasoff
Oct 19 2015 20:30
@spencergibb yep, do it tomorrow with pr
checketts
@checketts
Oct 19 2015 21:13
@spencergibb Is Spring Cloud (particularly the config server) compatible with Spring Boot 1.3?
I'm getting Wrapped by: java.lang.NoClassDefFoundError: org/springframework/boot/context/config/ConfigFileApplicationListener
checketts
@checketts
Oct 19 2015 21:20
Hmm, looks like it was replaced with org.springframework.boot.context.config.ConfigFileEnvironmentPostProcessor,
I see that Master is referencing the new file. Is there a build I could leverage? Or should I build my own against master? (Yeah I realize that Boot1.3 is still in milestone status)
checketts
@checketts
Oct 19 2015 21:29
To answer my conversation with myself: Use version 1.1.0.M1
Spencer Gibb
@spencergibb
Oct 19 2015 21:30
@checketts you found the correct answer, Brixton.M1 uses boot 1.3.x.
checketts
@checketts
Oct 19 2015 21:31
What is Brixton?
Spencer Gibb
@spencergibb
Oct 19 2015 21:32
Angel was the first (though we didn’t start using names until well into it).
so to use the starters BOM, you would reference Brixton.M1.
checketts
@checketts
Oct 19 2015 21:33
Ah I recall seeing that post. I guess it is time I visited the London Tube
Wise to make it a names since all the projects are on different versions
Spencer Gibb
@spencergibb
Oct 19 2015 21:34
yeah, me too. @dsyer probably visits it frequently.
@checketts that’s why we did it.
turick
@turick
Oct 19 2015 21:35
@spencergibb could that have been my issue Spencer, with the noclassdeffounderror on EurekaServerConfig? I was using Brixton.BUILD-SNAPSHOT, no Brixton.M1
checketts
@checketts
Oct 19 2015 21:35
Thanks! @spencergibb
Spencer Gibb
@spencergibb
Oct 19 2015 21:35
@turick not sure. I think we wanted you to use snapshot for a fix that wasn’t released yet.
@checketts np
turick
@turick
Oct 19 2015 21:38
ok -- i have everything stable with eureka and zuul running 1.1.0.M1, but my microservices running Brixton.BUILD-SNAPSHOT. i'll just leave it as it is for now.
Spencer Gibb
@spencergibb
Oct 19 2015 21:39
should be ok, M2 should be soon
turick
@turick
Oct 19 2015 21:39
sounds good, thank you
checketts
@checketts
Oct 19 2015 21:48
@spencergibb You might be interested in a bit of hack I'm doing with config server. Are you familiar with how cloud foundry manages 'services'?
Spencer Gibb
@spencergibb
Oct 19 2015 21:49
A bit.
I’m interested to hear what you’re doing.
checketts
@checketts
Oct 19 2015 21:50
In addition to service configuration, I'm making calls on behalf of other services (a poor man's version of the CF services stuff)
In a past life you might recall 'devices'
Similar thing. However to make it work with the config client I'm having to do some wonky things like create an empty Environment
Spencer Gibb
@spencergibb
Oct 19 2015 21:53
maybe I’m not as familiar as I thought :-(
checketts
@checketts
Oct 19 2015 21:54
With CF you would create a database service which would have your connection info and so you would assign that to your application (call it MyDB)
Spencer Gibb
@spencergibb
Oct 19 2015 21:55
ok
checketts
@checketts
Oct 19 2015 21:55
Then if you multiple apps that used that same DB then they would all be assigned MyDB
Spencer Gibb
@spencergibb
Oct 19 2015 21:55
right
checketts
@checketts
Oct 19 2015 21:56
I'm trying to do a similar thing with config server. mydb-dev.yml would have the connection info for mydb in dev and mydb-prod.yml would be the prod equivalent
I got that working (but as I said, I had to do crazy things with the config client)
A better approach would be to put all the config for dev in application-dev.yml
Spencer Gibb
@spencergibb
Oct 19 2015 21:58
that crossed my mind :-)
checketts
@checketts
Oct 19 2015 21:58
then all all the services in the dev profile would just get it, but then I'm now sending connection info for all my services to all my applications
Is there an easy way to hook in a filter to config server?
Spencer Gibb
@spencergibb
Oct 19 2015 21:59
right, it’s almost like you want the mydb profile ANDed with the prod profile.
checketts
@checketts
Oct 19 2015 22:00
not a java http Filter, just a way to post process the returned json
Spencer Gibb
@spencergibb
Oct 19 2015 22:00
not currently
checketts
@checketts
Oct 19 2015 22:04
What are some creative approaches in the meantime? Would subclassing EnvironmentController be acceptable? That allows me to remove values from the returned Environment
Spencer Gibb
@spencergibb
Oct 19 2015 22:04
yeah, I guess there are MVC interceptors as well, haven’t used those much.
checketts
@checketts
Oct 19 2015 22:05
I'll try the sub-classing approach and let you know how it goes.