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

Can we do deploys without downtime #92

Open
foobacca opened this issue Dec 23, 2014 · 5 comments
Open

Can we do deploys without downtime #92

foobacca opened this issue Dec 23, 2014 · 5 comments
Labels
Milestone

Comments

@foobacca
Copy link
Collaborator

Think about what the potential downsides would be:

  • if no migrations, then there may well be no problem
  • if there are migrations there might be a few server errors for some pages between updating the code and running the migrations.
  • what else?

At the least we could provide an option. Maybe we start by having the default be the current behaviour, with an option to have a no-downtime-deploy, get confident with that, then move to the default being no-downtime but leave an option for when we're a bit scared ...

@foobacca
Copy link
Collaborator Author

If we're careful, we can run migrations without causing server errors. See these guidelines - http://nduthoit.com/blog/2013/09/03/running-out-of-band-migrations/

@foobacca
Copy link
Collaborator Author

foobacca commented Feb 9, 2015

@foobacca
Copy link
Collaborator Author

foobacca commented Feb 9, 2015

Sarah raise issue about scenario:

  • user starts filling in form using old site. The site is upgraded and then the user hits the submit button and the behaviour might change

But there is no difference between zero downtime deploys and our current deploys in that there is still a difference before and after.

@foobacca
Copy link
Collaborator Author

foobacca commented Feb 9, 2015

Sarah idea:

  • nodb flag - don't run migrations, still do db dump, but can do it while server is up

@foobacca
Copy link
Collaborator Author

foobacca commented Feb 9, 2015

The current things done during downtime is basically just running tasks.py deploy which does:

  • update git submodules
  • syncdb and migrations
  • collectstatic and assets build

and anything else project specific in localtasks.py

In tasks.py we could instead have:

  • deploy_before_live - update git submodules, collectstatic, assets build - called by deploy scripts on the copy of the site, while the old copy of the site is still running
  • deploy_going_live - syncdb and migrations - called by deploy while the site is down.
  • deploy - calls both the above, used on local deploys

Then the nodb flag could skip deploy_going_live and also then skip downtime.

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

No branches or pull requests

2 participants