Is continuous delivery without downtime possible?

27 views
Skip to first unread message

mana

unread,
Oct 22, 2013, 8:54:57 AM10/22/13
to vcap...@cloudfoundry.org
Hey,

I wonder why this haven't come up yet. But is there a way to do continuous integration (as suggested here) without any downtime?

What happens when I do a cf push is the following:

  1. App gets uploaded and stored (Uploading foo...)
  2. Old app instance is stopped (Stopping foo...)
  3. New app instance gets deployed (Preparing to start foo...)
  4. New app instance starts (Checking status of app 'foo'... 1 of 1 instances running (1 running))
The service will not be available between point 2. and point 4., for my current play! 2.1.5 app this takes about 40 sec! Is there a work around for this? 

mana

Brian McClain

unread,
Oct 22, 2013, 9:01:51 AM10/22/13
to vcap...@cloudfoundry.org
Not sure if there's a better way, but this is the way I usually do it:

  1. v1 of application is up and running in CF
  2. Push up a second copy (v2) of the application, v1 and v2 are now both running side by side, but traffic for your "prod" URL is only mapped to v1
  3. Map your "prod" URL to v2, traffic is now flowing to both v1 and v2
  4. Unmap your "prod" url from v2, traffic is now only flowing to v2
  5. Stop/Delete v1 of the application
In practice, I generally include the version of the application in the name of the app in CF, this also helps with determining what version of my applications are running in a particular environment.

Brian
@BrianMMcClain

Matt Stine

unread,
Oct 22, 2013, 10:13:25 AM10/22/13
to vcap...@cloudfoundry.org
Blogged this awhile back: http://www.mattstine.com/2013/07/10/blue-green-deployments-on-cloudfoundry/

The web console team uses a variation on this technique to deploy http://console.run.pivotal.io.

It is also used for http://spring.io.

Matt Stine | Community Engineer, Cloud Foundry | Pivotal
901-493-5546 | Skype: mstine1978 | mst...@goPivotal.com



To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.

Matthias Naber

unread,
Oct 22, 2013, 10:37:48 AM10/22/13
to vcap...@cloudfoundry.org
Thanks guys, that is exactly what I was looking for!
Reply all
Reply to author
Forward
0 new messages