0

What is the best possible way to handle Blue/Green deployments in Pivotal Cloud Foundry with the use of Private domains. Our infrastructure is already setup with Shared domains and we want to move towards Private domains as it provides us the flexibility to use the same domain name across multiple spaces and orgs.

Now below is the scenario that works if the domain is shared but fails with private domains.

Private domain : test.private.com Space A: Blue application route : https://test.private.com/V1/test/ Green application route : https://test.private.com/V1/test/

The PCF does not allow us to create a route with the same domain + path in the same space in order to make use of the Blue/Green deployment model.

Is there a way this problem can be solved?

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437

1 Answers1

0

If you are deploying to a moderately new version of PCF (I believe 2.4+, newer is better though), you should just use the built-in rolling deployment model and call it a day.

You can use cf push --strategy=rolling and include whatever other args you normally do.

Just get yourself a copy of the v7 cf CLI. As I write this, it's in the last stages of beta and should be GA very soon. --strategy is a flag only available in the v7 cf CLI.

If you are stuck on v6 of the cf CLI, you can run cf v3-zdt-push. It will do a rolling deploy, but the preferred method going forward, especially after the GA, is to use v7.

See more here -> https://docs.cloudfoundry.org/devguide/deploy-apps/rolling-deploy.html

I know this doesn't directly answer your question around private domains, but this is really the superior way for deploying without downtime. If you can't do this and must have blue/green, post more info like the error message you get and exact commands you're running.

Daniel Mikusa
  • 13,716
  • 1
  • 22
  • 28