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

Reduce the downtime required when performing deployments #132

Closed
osg74 opened this issue Dec 10, 2012 · 3 comments
Closed

Reduce the downtime required when performing deployments #132

osg74 opened this issue Dec 10, 2012 · 3 comments

Comments

@osg74
Copy link

osg74 commented Dec 10, 2012

The current deployment process can be improved so that we have minimal downtime of the live server by implementing the following improvements:

  • the system packages, virtualenv and app code can all be deployed before taking the live site down
  • the only mandatory downtime is for the database rebuild since we need to prevent any database writes so that we don't lose data while the deployment is in progress
  • we can use versioned symlinks to switch over to the new release with minimal downtime
@ghost ghost assigned osg74 Dec 10, 2012
@ghost ghost assigned carlio Oct 7, 2013
@osg74
Copy link
Author

osg74 commented Oct 7, 2013

Reassigned to @carlio -- could you check that the new deployment process meets the above requirements where applicable please?

@carlio
Copy link
Contributor

carlio commented Oct 21, 2013

The deployment process is as follows:

In a new folder:

  1. Create a new virtualenv
  2. Check out the required commit hash
  3. Install all dependencies
  4. Shut down RSR gunicorn process(es)
  5. Run DB migrations if necessary
  6. Change "current" symlink to new version
  7. Start RSR gunicorn process

The downtime between builds should be no more than a second or so if there are no migrations to run. Additionally, Nginx continues to run, meaning we could serve a custom 502.html if we wanted to.

See https://github.com/akvo/akvo-provisioning/tree/develop/puppet/modules/rsr/templates

@carlio carlio closed this as completed Oct 21, 2013
@osg74
Copy link
Author

osg74 commented Oct 23, 2013

Perfect, thanks.

@MichaelAkvo MichaelAkvo moved this to Done in RSR Dec 8, 2022
@MichaelAkvo MichaelAkvo added this to RSR Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants