Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ability to keep old version #34

Open
flash-singh opened this issue Sep 19, 2017 · 3 comments
Open

add ability to keep old version #34

flash-singh opened this issue Sep 19, 2017 · 3 comments

Comments

@flash-singh
Copy link

Not sure if this feature exists but not documented. If I use zero-downtime deployment, the process deploys the new version and deletes the old. Is it possible to add a feature which will always keep the old version and just rename it and remove the route? This allows us to rollback without much downtime in case the new app comes online and crashes later. Has this come up before?

@jtarchie
Copy link
Contributor

@ps0296, this sounds like a help use case. Would you be willing to provide a pull request with tests?

@cah-andrew-fitzgerald
Copy link

This would be useful for us as well, but does not appear to be possible using the current blue-green mechanism.
https://github.com/concourse/cf-resource/blob/0a0ad7c2396b5622f892316b27356dc79ed70e1d/out/cloud_foundry.go#L38-L45
zero-downtime-push is provided by https://github.com/contraband/autopilot, which does not support leaving the old version in a stopped (but not deleted) state.

There are also no plans for autopilot to support that use case, see contraband/autopilot#27.

@cappyzawa
Copy link
Contributor

cappyzawa commented Dec 17, 2017

Hi.

I agree with @ps0296 as well.
This resource use contraband/autopilot plugin which does not correspond to keeping old versions.

How about using sakkuru/rollback-push corresponding to rollback?

If we continue to use contraband/autopilot,
it may be good to add a pram to out(e.g. blue-green-deployment).
Feature sample is bellow.

put: resource-deploy-web-app
    params:
      manifest: build-output/manifest.yml
      blue-green-deployment: my-app-name

If blue-green-deployment param exists, cf push behavior is bellow(I referenced by sakkuru/rollback-push).

1. cf rename my-app-name my-app-name-blue
2. cf push -f build-output/manifest.yml -n my-app-name-green
3. cf map-route my-app-name-green xxxx.io (domain name) -n my-app-name
4. cf unmap-route my-app-name-blue xxxx.io (domain name) -n my-app-name
5. cf stop my-app-name-blue

What do you think of this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants