Ask HN: how do you stage/push your code?
1–10 of 16 posts
Re: Ask HN: how do you stage/push your code?
#2Fabric pull the code from github, puts it in the server and restarts the services (mongo, nginx) if needed.
I took some inspiration from newblur's fabfile.py: https://github.com/samuelclay/NewsBlur/blob/master/fabfile.p...
Re: Ask HN: how do you stage/push your code?
#3Re: Ask HN: how do you stage/push your code?
#4I have a simple setup for my pet projects: 1. Push code in github 2. Run fab deploy (fabric) Fabric pull the code from github, puts it in the server and restarts the services (mongo, nginx) if needed. I took some inspiration from newblur's fabfile.py: https://github.com/samuelclay/NewsBlur/blob/master/fabfile.p...
Re: Ask HN: how do you stage/push your code?
#5If the push involves db schema changes, we'll take the production offline for the duration of the push, showing a "Be back shortly" page.
Re: Ask HN: how do you stage/push your code?
#6After all 40,000 unit tests have passed, sync that version to prod with ssh tunnel. Rsync to new directory on all target machines in a rsync tree. Switch to new version by moving a symlink. Verify new version by looking at metrics -- if something is off, automatically switch back. Repeat up to 50 times a day ;-)