Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 1.15 KB

README.md

File metadata and controls

23 lines (19 loc) · 1.15 KB

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.