Phil 7.19.16

7:00 – 5:30 VTX

  • Refining proposal
  • Working the Gateway exposes old APIs
  • gtc-services cmd: java -jar build\libs\gtc-server.war
  • ServiceRegistrar command: java -jar build\libs\eureka.war
  • Important URLs
  • Test login: user/N!r@lR1t
  • Got the annotations commented out and the services not showing up. Tomorrow I’ll pull out the
  • Here’s the thread with Balaji:[‎7/‎19/‎2016 11:00 AM]Hiya, I hope you’re doing well.

    Anyway, I’ve been tasked with stripping out services from the gtc-gateway

    [‎7/‎19/‎2016 11:00 AM] Balaji Patakula:

    yeah, i am good thanks.

    [‎7/‎19/‎2016 11:01 AM]

    I’ve got it downloaded, built and running. How do I know that it’s actually working?

    [‎7/‎19/‎2016 11:02 AM] Balaji Patakula:

    run it as java -jar build/libs/gtc-serv…war

    and whichever service u r testing….should be run too

    [‎7/‎19/‎2016 11:03 AM]

    already built. Running as java -jar gtc-service.war

    [‎7/‎19/‎2016 11:03 AM] Balaji Patakula:

    run serviceregistrar too

    [‎7/‎19/‎2016 11:03 AM]

    I don’t have that war file

    Aaron had me set the <serviceRegistry> to ‘none’.

    [‎7/‎19/‎2016 11:04 AM] Balaji Patakula:

    u should get the project ServiceRegistrar

    no, u have to turn it on

    [‎7/‎19/‎2016 11:04 AM]

    Ok. Start in which order?

    [‎7/‎19/‎2016 11:04 AM] Balaji Patakula:

    to test the intercation

    order does not matter. U understadn the interactions of the gateway architecture, correct?

    [‎7/‎19/‎2016 11:05 AM]

    No. I am totally new to this.

    [‎7/‎19/‎2016 11:06 AM] Balaji Patakula:

    mmm….let me see if i can tell u in brief.

    [‎7/‎19/‎2016 11:06 AM]

    Where is the ServiceRegistrar project?

    [‎7/‎19/‎2016 11:07 AM] Balaji Patakula:

    service registrar is the registry of all the services. http://dev1.netcentric.local/svn/CommonComponents/ServiceRegistrar/trunk

    [‎7/‎19/‎2016 11:07 AM]

    Downloading now

    [‎7/‎19/‎2016 11:08 AM] Balaji Patakula:

    so every microservice on startup registers with the service registrar. thats why u have the serviceregistry configuration on all services and that should be set to original localhost:8761….

    [‎7/‎19/‎2016 11:08 AM]


    [‎7/‎19/‎2016 11:08 AM] Balaji Patakula:

    now all server requests from proxy are routed to gateway

    [‎7/‎19/‎2016 11:09 AM]

    Here are the services that I need to remove:

    [‎7/‎19/‎2016 11:09 AM]

    • com.vistronix.gtc.service.alert
    • com.vistronix.gtc.service.routing
    • com.vistronix.gtc.service.simulator
    • com.vistronix.gtc.service.stock
    • com.vistronix.gtc.service.subscription

    how do I ping them

    [‎7/‎19/‎2016 11:09 AM] Balaji Patakula:

    gateway queries the service registar….finds the services by name and load balances the requests to appropriate service

    so thats the architecture

    [‎7/‎19/‎2016 11:10 AM]

    Got it, in general terms. Though I’ll need to know service names obviously

    [‎7/‎19/‎2016 11:11 AM] Balaji Patakula:

    so u need the service that u r testing, registrar and gateway running and make the request to the gateway and the request will be handled by microservice

    [‎7/‎19/‎2016 11:11 AM]

    So I need to download and build all of the projects that we are *not* using?
    [‎7/‎19/‎2016 11:12 AM] Balaji Patakula:

    no, i just explained how u would test a service through gateway

    the best way to remove them would be….go to com.vistronix.gtc.web

    that package and comment @Controller nnotation on the services that u mentioned above

    [‎7/‎19/‎2016 11:13 AM] Balaji Patakula:

    and u r done

    [‎7/‎19/‎2016 11:13 AM]

    So back to the basic questions that I asked at the beginning:

    [‎7/‎19/‎2016 11:13 AM] Balaji Patakula:

    so, once u comment those controllers, they are not exposed through gateway anymore

    [‎7/‎19/‎2016 11:14 AM]

    1) How do I know that the gateway service is running?

    2) How do I know that the services that I want to remove are accessable.

    3) How do I know that they are no longer accessable?

    [‎7/‎19/‎2016 11:15 AM]

    Is there a set of urls that I access?

    [‎7/‎19/‎2016 11:15 AM] Balaji Patakula:

    yes, they are in the swagger UI on the gateway

    [‎7/‎19/‎2016 11:16 AM]

    That means slightly more than nothing to me, in that I recognise the words.

    How do I compile, run and access said swagger UI?

    [‎7/‎19/‎2016 11:17 AM]

    I have been working on getting Google searches to improve. Not this.

    [‎7/‎19/‎2016 11:18 AM] Balaji Patakula:

    i am trying to find the doc in confluence

    [‎7/‎19/‎2016 11:18 AM]

    Great! Thanks.

    [‎7/‎19/‎2016 11:19 AM] Balaji Patakula:

    [‎7/‎19/‎2016 11:20 AM]

    what’s the login?

    [‎7/‎19/‎2016 11:20 AM] Balaji Patakula:

    basically thats the swagger UI on gateway

    same as other….user/N!r@lR1t

    [‎7/‎19/‎2016 11:21 AM] Balaji Patakula:

    so when u comment those controllers that i told u, above u should not see them here

    [‎7/‎19/‎2016 11:22 AM]

    So when I rebuild the gateway, I should see these pages disappear?

    [‎7/‎19/‎2016 11:23 AM] Balaji Patakula:

    the controller that u removed should disappear

    [‎7/‎19/‎2016 11:23 AM]

    Very good. I’m in the process of building the ServiceRegistrar now. I’ll ping you with questions later. Thanks!

    [‎7/‎19/‎2016 11:24 AM] Balaji Patakula:


    [‎7/‎19/‎2016 11:26 AM]

    So I should test by accessing http://localhost:8800/gtc-server/swagger-ui.html

    [‎7/‎19/‎2016 11:27 AM] Balaji Patakula:


    [‎7/‎19/‎2016 11:27 AM]

    And the ServiceRegistrar jarfile is eureka.war?

    [‎7/‎19/‎2016 11:27 AM] Balaji Patakula:


    u dont need eureka unless u want to test the calls

    [‎7/‎19/‎2016 11:28 AM]

    But if it’s not showing up in swagger then I can safely assume thatt it’s gone?

    [‎7/‎19/‎2016 11:28 AM] Balaji Patakula:


    [‎7/‎19/‎2016 11:28 AM]


    [‎7/‎19/‎2016 11:30 AM] Balaji Patakula:

    my take is just comment the @Controller. so that we can bring them back when we need them

    but check with Aaron/Matt if they want u to remove the whole code

    [‎7/‎19/‎2016 11:30 AM]

    Sounds good to me. Fireing up everything now just to see if the swagger works.

    This site can’t be reached

    localhost refused to connect.

    [‎7/‎19/‎2016 11:32 AM]

    No errors other than this on Eureka: 2016-07-19 11:29:28,785 ERROR [main] DiscoveryClient_EUREKA/PFELDMAN-NCS

    [‎7/‎19/‎2016 11:33 AM] Balaji Patakula:

    can u do localhost:8070/gtc-server/user

    [‎7/‎19/‎2016 11:34 AM]


    [‎7/‎19/‎2016 11:35 AM] Balaji Patakula:

    ok, so…problem looks like 8800 ?? on swagger?

    [‎7/‎19/‎2016 11:35 AM]

    Could be – that’s what’s in the config file. Can I change it to something less common?

    [‎7/‎19/‎2016 11:36 AM] Balaji Patakula:

    check with Matt, because he is working on disabling the swagger in QA and Prod env

    may be he changed something that takes it away from local too???

    [‎7/‎19/‎2016 11:36 AM]

    No, I mean for testing.

    On my machine

    Oh, I see – you think it may already be disabled.

    [‎7/‎19/‎2016 11:37 AM] Balaji Patakula:


    he mentioned in the standup that he disabled it

    and only enabled it on CI

    may be disabled for local too

    [‎7/‎19/‎2016 11:38 AM]

    Yeah, I heard that.

    [‎7/‎19/‎2016 11:38 AM] Balaji Patakula:

    check with him, but u can also try with one controller on CI

    and see the change

    [‎7/‎19/‎2016 11:39 AM]

    This is CI, right?

    [‎7/‎19/‎2016 11:40 AM] Balaji Patakula:


    [‎7/‎19/‎2016 11:40 AM]

    So back to my question. How do I test on my local machine?

    [‎7/‎19/‎2016 11:41 AM] Balaji Patakula:

    that swagger UI should be working locally and u can test with that

    so, ask Matt to see why it is not working locally

    [‎7/‎19/‎2016 11:42 AM]

    Alright, I’ll check with him.

  • And here’s the thread with Matt:[‎7/‎19/‎2016 11:55 AM]So I’m working on the gtc task and was going to use swagger as a proxy for detecting if the services were disabled.

    The thing is, swagger works on CI, but not on my box.  Is it still enabled?

    [‎7/‎19/‎2016 11:59 AM]

    Gotta step out for a bit.

    [‎7/‎19/‎2016 12:03 PM] Martin, Matthew:

    so T and Vinny stopped by.  Yesterday I delivered a change to the proxy and gateway that diables swagger by default.  i just updated the wiki page on how to enable it when running the microservice locally

    [‎7/‎19/‎2016 12:04 PM]

    I’ll take a look.

    [‎7/‎19/‎2016 12:04 PM] Martin, Matthew:

    its basically this: java -jar build\libs\microservice.war

    [‎7/‎19/‎2016 12:06 PM]

    I just need to do this for gtc-server.war, right?

    [‎7/‎19/‎2016 12:14 PM]

    Ok, so I’m trying http://localhost:8800/gtc-server/swagger-ui.html and getting This site can’t be reached

    localhost refused to connect.

    We saved this conversation. You’ll see it soon in the Conversations tab in Skype for Business and in the Conversation History folder in Outlook.

    [‎7/‎19/‎2016 2:04 PM] Martin, Matthew:

    here’s how I run the gateway microservice locally:


    java -jar build\libs\gtc-server.war

    here’s how i access swagger:


    [‎7/‎19/‎2016 2:04 PM]

    I think I may have had an older version of the code. downloading and rebuilding now. We’ll see how that goes.

    :8070? Where is that configured?

    [‎7/‎19/‎2016 2:06 PM] Martin, Matthew:


    also defaults are listed here:

    [‎7/‎19/‎2016 2:13 PM]

    Got it!

    [‎7/‎19/‎2016 2:14 PM] Martin, Matthew:


    We saved this conversation. You’ll see it soon in the Conversations tab in Skype for Business and in the Conversation History folder in Outlook.

    [‎7/‎19/‎2016 3:08 PM]

    Based on Balaji’s suggestion, I just commented out the @Controller annotation for the specified services. The services are no longer in the swagger UI. I’ve promoted to QA.

    Since I don’t have permissions on the Jira to adjust status…

    [‎7/‎19/‎2016 3:09 PM] Martin, Matthew:

    Now that you’ve confirmed that it works please delete the associated code/files.

    [‎7/‎19/‎2016 3:10 PM]

    Balaji suggested that it might be a good idea to keep them. So you’d prefer that I delete the files instead?

    [‎7/‎19/‎2016 3:11 PM] Martin, Matthew:

    yes.  i think it was a good idea to test with comments, but I’d like to have it deleted in the end

    [‎7/‎19/‎2016 3:11 PM]

    Ok. Will get started on that.

    [‎7/‎19/‎2016 3:12 PM] Martin, Matthew:

    ok thanks Phil.

    [‎7/‎19/‎2016 3:13 PM]

    Just to be sure, that’s the code in the web and service directories (e.g. AlertServiceController and AlertServiceClient)

    [‎7/‎19/‎2016 3:15 PM] Martin, Matthew:



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.