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

8th
Mar 2018
Joshua White
@joshuawhite929
Mar 08 2018 01:28
For those that have a lot of cloud/Boot 1.5 service, is the migration to boot 2.0 all or nothing? Can you have a heterogeneous env?
Marcin Grzejszczak
@marcingrzejszczak
Mar 08 2018 01:35
what do you mean by all or nothing?
Spencer Gibb
@spencergibb
Mar 08 2018 02:43
@joshuawhite929 server client interactions should be ok in eureka, config server. Zipkin not sure
Abhishek Dujari
@abshkd
Mar 08 2018 02:44
@spencergibb what is the recommended way to do integration tests in spring-cloud. I am building docker containers to add to maven as a startup for tests. still though it seems like it might be overkill
Joshua White
@joshuawhite929
Mar 08 2018 02:44
Imagine an environment with 100+ Microservices. What’s the migration path?
Spencer Gibb
@spencergibb
Mar 08 2018 02:46
@joshuawhite929 I imaging trying one first
Joshua White
@joshuawhite929
Mar 08 2018 02:49
Was there a planned migration path for those that had a significant investment in 1.x?
Spencer Gibb
@spencergibb
Mar 08 2018 02:50
I guess I don't know what you're asking for exactly
Abhishek Dujari
@abshkd
Mar 08 2018 02:59
I am not getting any straight answers or examples of how people are testing x-service in microservices
i have seen spring-cloud-contract as the closest but it requires a private maven repo?
also if ia m using resttemplate with load balanced wouldn't i need discovery service?
Abhishek Dujari
@abshkd
Mar 08 2018 03:09
no one?
Abhishek Dujari
@abshkd
Mar 08 2018 03:16
ok i found an example of using Docker Execution listener. so I am thinking there must be a way we can create a testconfig with all the docker images of all the services we need for a given microservice
then we use it in our tests
reading up on this tst listener now, any resources are welcome with thanks
Joshua White
@joshuawhite929
Mar 08 2018 03:20
Is there a planned migration path towards boot 2.0 where a heterogeneous environment is supported?
Trying to figure out what the migration path is for those that have an investment in 1.x services. It’s not clear if both versions can coexist at the same time or not
Tommy Ludwig
@shakuzen
Mar 08 2018 03:23
Which Spring Cloud things are you using that you’re worried about? I think most things should “just work”.
Joshua White
@joshuawhite929
Mar 08 2018 03:23
Or if everything needs to be migrated at the same time to new versions of boot/cloud
Tommy Ludwig
@shakuzen
Mar 08 2018 03:24
No, I’m pretty sure it’s been designed to not need a hard cut-over.
Spencer Gibb
@spencergibb
Mar 08 2018 03:28

:+1:

server client interactions should be ok in eureka, config server. Zipkin not sure

between versions
Abhishek Dujari
@abshkd
Mar 08 2018 03:53
am i like muted/blacklisted. i just keep getting ignored
:(
Spencer Gibb
@spencergibb
Mar 08 2018 03:56
@abshkd I have little knowledge of docker
Abhishek Dujari
@abshkd
Mar 08 2018 03:57
i am just trying to find a way to do integration tests in the spring-cloud enabled services
i dont know a way and no one in my teams knows it either
Abhishek Dujari
@abshkd
Mar 08 2018 04:10
for e.g. I need the zuul gateway to call receive a request and forward to another service then check if the response is authorized
there may be anotehr way nad i dont know if its possible
  1. create a mock server to run on a posrt say service-a
  1. add this service as name: serviceA to the ribbonclient as hostname:port
  1. run the test from service-b which calls "serviceA" and receives a response
its not perfect reflection of production but it would do well enough for the single use cases
Abhishek Dujari
@abshkd
Mar 08 2018 04:34
I found a ribbon integration test but i cant understand since there is no notes on this http://presos.dsyer.com/decks/spring-cloud-dev-experience.html
what is being tested here? is this the local app or a remote app
Abhishek Dujari
@abshkd
Mar 08 2018 04:45
i think i an use psring cloud contracts with wiremock
reading docs and examples but please share exampel of cros servcie if you haev any
onces that typically rely on service discovery
Marcin Grzejszczak
@marcingrzejszczak
Mar 08 2018 05:09
There are discussions and solutions afair to both proxy and cors with sc contract in the closed issues of the project
Abhishek Dujari
@abshkd
Mar 08 2018 07:43
so i am trying the wiremock stub and i am not sure why its failing. Discovery client does compain that it cant find any instances of the remote service
i cant find the xample but there was a way to tell ribbon client to add an instance. can we add the wiremock ambient server directly without downloading stubs?
i have sample code i'd like to share. let me upload
i am thinking we can use wiremock simply to mock the other microservice
but i get errors from discovery client which is expected
and this is what I am trying to do https://cloud.spring.io/spring-cloud-static/spring-cloud-contract/1.1.2.RELEASE/#_spring_cloud_contract_wiremock i made the sample project so someone can understand my use case and how to solve it
Abhishek Dujari
@abshkd
Mar 08 2018 08:22
@marcingrzejszczak you are the best person to answer this :)
i keep digging your blog
Abhishek Dujari
@abshkd
Mar 08 2018 08:39
https://cloud.spring.io/spring-cloud-static/spring-cloud-contract/1.1.2.RELEASE/#_stubbing_service_discovery according to docs DisoveryClient should be stubbed by default but thats not whats happening
Abhishek Dujari
@abshkd
Mar 08 2018 08:50
@marcingrzejszczak int his example https://github.com/spring-cloud-samples/spring-cloud-contract-samples/tree/master/consumer_with_discovery how are you getting the beer-producer-api as a server?
Abhishek Dujari
@abshkd
Mar 08 2018 10:03
ok i got it. its in the parent project and I need to create a contract + local stub. simply using wiremock will not make it work. so I am moving to this step and hopefully that will work with discoveryclient
Abhishek Dujari
@abshkd
Mar 08 2018 10:46
is there any step by step tutorial on how to use the spring-cloud-contracts
i am totally lost
Abhishek Dujari
@abshkd
Mar 08 2018 11:07
i disabled discovery client and configured a restetemplate without ribbon load balancing for my tests
now i just get Unknown Host exception
    @Test
    public void testGetGamesListFromMicroservice(){
        stubFor(get(urlEqualTo("http://library-service/gameslist"))
        .willReturn(aResponse().withHeader("Content-Type", "text/plain").withBody("game 1,game 2,game 3, etc")));

        assertThat(this.gamesController.list()).isEqualTo("game 1,game 2,game 3, etc");
    }
Mark Corkery
@KramKroc
Mar 08 2018 11:08
Hi, trying to find the ticket that changed the default client for zuul. Anyone know which one it is? We used ribbon and have config for that so want to understand what new client is and how to configure it
Abhishek Dujari
@abshkd
Mar 08 2018 11:17
nvm wiremock cant do that. and getting to do producer /consumer stuff is beyond me. Going to do null routing
Marcin Grzejszczak
@marcingrzejszczak
Mar 08 2018 15:05
You have a link to workshops at the main project page
Read the docs ftom the beginning till the end
Then you'll understand the whole picture