Cloud Foundry support for Canary Deploys

2.1k Views Asked by At

I've evaluating Cloud Foundry to determine whether it supports Canary Releases for my apps.

So far I've found references to BOSH supporting canaries. But this appears to be an internal mechanism that cloud foundry uses when re-deploying its own servers.

I've also had a look at cf_canaries but it appears to be for testing the infrastructure / overall system. e.g. Canaries to warn about memory/cpu/disk/network etc usage.

Are there any common approaches to supporting Canary Deploys with Cloud Foundry? I imagine it would need to relate to the GoRouter somehow.

The closest I've come to finding a solution is the documentation from Cloud Foundry on Blue-Green Deployments.

But this technic would not let me control the percentage of, nor which, traffic is routed to the Canary.

2

There are 2 best solutions below

1
On BEST ANSWER

Currently (May 2017), the closest thing is indeed a blue-green deployment, which does not allow you to control the percentage that is routed to the new app.
There has been discussion about supporting this kind of feature as part of the V3 API work, as an extension to native blue-green deployment (i.e., where the route switching is all done by Cloud Foundry and not by an API client like the CLI or plugin) but I don't believe anything has been scoped out or implemented yet.

1
On

You could use a route service to divert a configurable percentage of your traffic to your new version of the app.

See this example: https://github.com/1123/route-service-example