Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update bluemix application but leaving this application available?

I have Java Liberty Web Application on Bluemix. If I need to update it, the app becomes unavailable for a few minutes. Is it possible to update it without turning it off? For example deploy two applications and reroute to a second one one when first is being updated?

like image 767
Anatoly Avatar asked Feb 09 '23 14:02

Anatoly


1 Answers

Yep. There best way of doing this currently is via the following steps.

  1. deploy original application on myroute.mybluemix.net
  2. make some code changes
  3. deploy changed application on myroute2.mybluemix.net
  4. map myroute.mybluemix.net to the changed application using cf map-route APP_NAME DOMAIN [-n HOSTNAME]. Original application now has myroute.mybluemix.net and the changed application now has myroute.mybluemix.net & myroute2.mybluemix.net. At this point traffic will be routed equally between the two application versions (assuming they have the same number of instances).
  5. unmap myroute.mybluemix.net from the original application using cf unmap-route APP_NAME DOMAIN [-n HOSTNAME]. All traffic on myroute.mybluemix.net will now all be routed to the newer version.
  6. delete original application using cf delete APP_NAME
  7. (optional) remove myroute2.mybluemix.net using cf unmap-route APP_NAME DOMAIN [-n HOSTNAME]

This seems a bit long winded but it will achieve what you want.

like image 193
Ed Shee Avatar answered May 14 '23 03:05

Ed Shee