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

12th
Jun 2018
Jose Armesto
@fiunchinho
Jun 12 2018 08:36
can I use github tokens as authentication mechanism for spring cloud config server using a git backend? I only see username/password or ssh in the docs
Avinash K
@avi-kalar
Jun 12 2018 09:48
Is there a way I can avoid downtime for my underlying services while I am upgrading my spring cloud server?
Jose Armesto
@fiunchinho
Jun 12 2018 09:49
can't you have more than one instance of your app @avi-kalar ?
Avinash K
@avi-kalar
Jun 12 2018 09:51
yeah, but all of them will be connected to the same gateway, i would like to have minimal intervention for the client side.
Jose Armesto
@fiunchinho
Jun 12 2018 09:52
so the gateway sends requests to the different instances of the same app, and you don't want it to send requests to the instances that are down/restarting?
Avinash K
@avi-kalar
Jun 12 2018 09:53
yeah, i would like to avoid outages from the clients that are down/restarting when we make the switch from one gateway to another
CH4:D
@chad_d_stud_twitter
Jun 12 2018 10:54
I think that’s unavoidable
We’re exploring Consul at this point but with eureka it still routes to a downed server
There’s a noticeable lag when a service goes down and deregisters itself.
So a user might receive a timed out connection
Avinash K
@avi-kalar
Jun 12 2018 10:56
ok, but do you have any suggestion where we can overcome this with any other spring modules?
Marcos Barbero
@marcosbarbero
Jun 12 2018 10:58
it depends how the instances are being shutting down. If you are shutting it down by yourself then you should send a SIGTERM to gracefully shutdown the instance.
You most likely need to also work with the status of the instances before shut it down, put its status to OUT_OF_SERVICE, something you can achieve using Eureka REST operations
Jose Armesto
@fiunchinho
Jun 12 2018 11:12
we want to add a Spring config server to our architecture, which contains Spring boot/cloud 1.5 services
should we use 1.5 for the config server, or can we use spring boot 2 for that?
ghoddg
@ghoddg
Jun 12 2018 12:01
Hi, I am using condig-server which is used to define required properties in my micro-services. This is working as expected.
But now my scenario is, I want to configure the datasource details through config server and dont want to hardcode it in micro-service's application.yml file
but for this, the config service should be up and running before i start my micro-service application.
Marcos Barbero
@marcosbarbero
Jun 12 2018 12:03
@fiunchinho the release schedule for Spring cloud Finchley is 15th Jun, maybe it worth to wait 3 days?
ghoddg
@ghoddg
Jun 12 2018 12:06
Hi, I am using config-server which is used to define required properties in my micro-services. This is working as expected.
But now my scenario is, I want to configure the datasource details through config server.But for this, the config service should be up and running before i start my micro-service application
Now if my micro-service application started with default datasource details, it is not switching to datasource details configured in config-service if config-service started after micro-service application
Marcos Barbero
@marcosbarbero
Jun 12 2018 12:07
@ghoddg for development phase your application should be aware of every required configuration property.
But if you are talking about deployment in any other environment that either emulates production or anything like that, then, it's part of the release process to make sure you have your config server up and running prior to the config clients, you can also use a fail fast approach to make sure that the service won't start in case it can't reach the config server.
ghoddg
@ghoddg
Jun 12 2018 12:12
Thanks @marcosbarbero , So if I make spring.cloud.config.failFast=true in bootstrap.yml. then my application will start only after the details from config-server available...
rt?
Marcos Barbero
@marcosbarbero
Jun 12 2018 12:14
that's not how it works
it means your application will fail to start instead of start with the wrong credentials/configuration
you can configure a retry policy, but it's not guarantee that the config-server will be up and running
ghoddg
@ghoddg
Jun 12 2018 12:16
I am deploying my config-service and another micro-service application on weblogic
it works when i invloved manually by deploying config-server first and then micro-service application
But, when i restart my weblogic, it is trying to start micro-service application before config-server and so it is not geting datasource details which are configured in config-server
is there any way to handle this?
Marcos Barbero
@marcosbarbero
Jun 12 2018 12:36
Is it the same app server for both of them? I mean, are they deployed together?
ghoddg
@ghoddg
Jun 12 2018 12:36
yes
on same server
Jose Armesto
@fiunchinho
Jun 12 2018 12:57
@marcosbarbero sure! so no problems using Finchley for the Config Server, while the clients are using spring boot 1.5 ?
ghoddg
@ghoddg
Jun 12 2018 12:58
I am using spring boot 1.5.12 and spring cloud Edgware.SR2
ghoddg
@ghoddg
Jun 12 2018 13:15
spring:
    application:
        name: ***
    cloud:
        config:
            ...
            failFast: true
            retry:
                max-attempts: 100
                max-interval: 100000
I tried with above configuration in bootstrap.yml and adding spring-boot-starter-aop dependency in build.gradle
But it didnt worked
Marcos Barbero
@marcosbarbero
Jun 12 2018 13:40
@fiunchinho I do believe Finchley requires spring-boot 2.x as minimum version
Jose Armesto
@fiunchinho
Jun 12 2018 13:41
for the clients as well?
Marcos Barbero
@marcosbarbero
Jun 12 2018 13:42
that's the flaw @ghoddg you are deploying both in the same app server, it will not work, you can guarantee the order of the deployment.
You better have the configserver running in a different process where you can guarantee it will be deployed first
I'm not sure about the clients @fiunchinho I'm trying to find if there's some migration guide out there
Ryan Baxter
@ryanjbaxter
Jun 12 2018 13:44
@fiunchinho I dont recall any breaking API changes in the client API....i believe they should be compatible
I could be wrong though
Marcos Barbero
@marcosbarbero
Jun 12 2018 13:45
I know that Finchley is based on spring-boot 2.x, it doesn't mean the clients can't use spring-boot 1.x along with Edgware
but mixing Finchley with boot 1.x may cause some side effects
Ryan Baxter
@ryanjbaxter
Jun 12 2018 13:45
yes that is true
but if your config client is running boot 1.5.x and Edgware.y its only the rest apis that need to be compatible with the config server, so running a config server with 2.0.x and Finchley.y should work as long as the rest apis are the same
which i believe they are
Marcos Barbero
@marcosbarbero
Jun 12 2018 13:47
I'm with @ryanjbaxter
Jose Armesto
@fiunchinho
Jun 12 2018 13:47
yes, we keep spring boot 1 and finchley on the clients, but since we are starting with the config serer now, we were wondering if we should use the latest version just for the config server
Marcos Barbero
@marcosbarbero
Jun 12 2018 13:47
but I can be wrong :D
spring boot 1 and finchley on the clients
don't
finchley don't get along with boot 1.x
Jose Armesto
@fiunchinho
Jun 12 2018 13:48
sorry, Edgeware
Marcos Barbero
@marcosbarbero
Jun 12 2018 13:48
then I think you are good to go
Jose Armesto
@fiunchinho
Jun 12 2018 13:48
then I'll use spring boot 1.x and edgeware for the config server as well, since you are not so sure
Marcos Barbero
@marcosbarbero
Jun 12 2018 13:49
there might be some migration guide for spring cloud as well, as we have for boot
Ryan Baxter
@ryanjbaxter
Jun 12 2018 13:49
its probably the safest approach if you dont NEED finchley
@marcosbarbero not yet
Marcos Barbero
@marcosbarbero
Jun 12 2018 13:50
correcting: there will* be some migration guide... :smile:
Ryan Baxter
@ryanjbaxter
Jun 12 2018 13:50
that is the plan
Jose Armesto
@fiunchinho
Jun 12 2018 14:14
nice
thanks
Matt Benson
@mbenson
Jun 12 2018 16:45
can anybody speak to the likelihood of applying spring-cloud/spring-cloud-commons#379 to 1.3.x for another release on that line?
Spencer Gibb
@spencergibb
Jun 12 2018 18:49
@mbenson seems likely
Matt Benson
@mbenson
Jun 12 2018 18:52
thanks @spencergibb for looking