VMware Tanzu Application Service for VMs

 View Only

 Hi Team, We are facing an issue with service registry while doing the Blue Green deployment. We bind the service registry in PCF.

Harshini Bollineni's profile image
Harshini Bollineni posted Feb 28, 2019 10:57 PM

Hi Team,

We are facing an issue with service registry while doing the Blue Green deployment. When we first deploy an app named myapp, in service registry its route is getting registered as myapp-new, This url is changing when we re deploy to the actual/intended one (myapp). Due to this reason, any new app we deploy in PCF we are deploying it twice. I am looking for a solution where the 'new ' is not appended to the url and we dont have to deploy twice. We have not faced this issue in PCF 1, now we migrated to PCF 2 and we get this issue.

Daniel Lynch's profile image
Broadcom Employee Daniel Lynch

service discovery will register the name of the app as specified in the manifest by default unless the app property "spring.application.name" is specified.

 

see docs for some more information

https://docs.pivotal.io/spring-cloud-services/2-0/common/service-registry/writing-client-applications.html#register-a-service

Harshini Bollineni's profile image
Harshini Bollineni

We have added this property in yml already. But still facing the issue. spring.application.name -> this property is set to our desired app name

Daniel Lynch's profile image
Broadcom Employee Daniel Lynch

spring.application.name would need to be set in the "application.properties" file.

Harshini Bollineni's profile image
Harshini Bollineni

I have it already. The problem is in re staging the application. It worked in PCF 1 and we recently migrated to PCF 2 and now we see this issue with service registry route.

Daniel Lynch's profile image
Broadcom Employee Daniel Lynch

what you are describing does not sound like the expected behavior. I would recommend opening a support ticket so we can perform deeper investigation.

Harshini Bollineni's profile image
Harshini Bollineni

This issue is resolved, I have set the API_NAME in jenkins pipeline before the restage

cf set-env ${API_NAME}-dev VARIABLE_NAME VARIABLE_VALUE.

This helped me with getting the correct route registered in Servie Registry