Skip to content

Full stack SaltStack configuration for Django with the help of Vagrant.

License

Notifications You must be signed in to change notification settings

roverdotcom/zero-downtime-deployments

 
 

Repository files navigation

Zero Downtime Deployments

This is an exmaple project to show how zero downtime deployments can be done using Django, uWSGI, and nginx using the uWSGI Zerg pool functionality.

This is based off https://github.com/wunki/django-salted. For more information, please check that project's readme.

To use:

  1. Setup the vm
  2. Install all the requirements for django-salted as listed here: https://github.com/wunki/django-salted
  3. clone this repo to your local box
  4. Issue a vagrant up, wait a while
  5. run curl localhost:8080 to see if everything is working as it should. It should return "This is version 1!"
  6. Start the load test
  7. ssh into the box with vagrant ssh
  8. cd to /vagrant
  9. run 'curl localhost' to see if everything is working. It should return 'This is version 1!'
  10. run /vagrant/load-test.sh
  11. Deploy Version 2
  12. open a second ssh session in another terminal tab via vagrant ssh
  13. run cd /vagrant && sudo ./deploy.sh v2
  14. Watch it deploy, you can watch the load test tab to see that all the requests are happily processed.
  15. When deployment is done, do a curl localhost to confirm that you are now running Version 2.

About

Full stack SaltStack configuration for Django with the help of Vagrant.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 59.4%
  • CSS 30.7%
  • Python 6.6%
  • SaltStack 2.9%
  • Other 0.4%