cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How does blue green deploy work for an MTA with managed approuter?

laal8293
Explorer
0 Kudos
405

Hi,

We ran in to an unexpected behavior when doing a blue-green deploy of  our MTA. In the mta.yaml file a destination for the application is defined, making use of ${default-url}, meaning that the url for the destination is defined at deploy time. With a normal cf deploy we would now have MyApp with the route MyRoute and a destination MyDest pointing to MyRoute.

The problem arises with the blue-green deploy since this deploys a new app (with route) with the "-idle" suffix e.g. MyApp-idle. This means that ${default-url} also gets the "-idle" suffix. So now we have the app MyApp-idle, with the route MyRoute-idle and MyDest pointing to MyRoute-idle. When continuing the deploy and the live app is removed, MyApp-idle is renamed to MyApp and the MyRoute-idle is removed and only the live route MyRoute remains (all according to cf deploy --strategy blue-green) the destination is however not updated and still pointing to MyRoute-idle. So now there is a mismatch between the destination and the route and the application fails. 

I can see a few workarounds, none which is very appealing.

  1. Hardcode the destination url in the mta.yaml.
  2. Exclude the destination from the mtal.yaml and manually create idle and live destinations in BTP cockpit.
  3. Not use blue-green deploy at all.

Is there a good approach to solve this issue? 

Best regards

Lars

 

Accepted Solutions (0)

Answers (1)

Answers (1)

laal8293
Explorer
0 Kudos

Thanks you! That seems to be exactly what I was looking for.

Regards

Lars

wozjac
Active Participant
0 Kudos
You're welcome. We currently are in test phase for blue-green with ..live.. parameters from CLI (witjh --skip-testing-phase), from SAP CICD and from SAP Transport and Managements System service, seems to work ok.