Ask HN: how to push to a live site?
1–10 of 16 posts
Re: Ask HN: how to push to a live site?
#2SVN also has some documentation on their site, and I imagine git would have something similar.
Re: Ask HN: how to push to a live site?
#3Re: Ask HN: how to push to a live site?
#4I imagine there are similar solutions for other languages.
Worst case scenario, you can roll your own. A very basic trick is to use symbolic links on your server - deploy the site to a new folder, and simply point the symbolic link to the new folder when you're done.
Re: Ask HN: how to push to a live site?
#5If you happen to be using Ruby, then Capistrano ( http://www.capify.org/ ) is awesome. I imagine there are similar solutions for other languages. Worst case scenario, you can roll your own. A very basic trick is to use symbolic links on your server - deploy the site to a new folder, and simply point the symbolic link to the new folder when you're done.
Re: Ask HN: how to push to a live site?
#6Re: Ask HN: how to push to a live site?
#7A long time ago I worked (in a very small testing capacity) at a very large video/streaming media serving company.
As I recall, the scripted procedure was to tag a release in CVS, and a script would pull that down into a new directory and swing the symlink.
This site had a very mature and infrequently changing billing system code path, which I believe was not modified in this process. If this doesn't describe your workload you would probably have to change this to support concurrent execution of multiple versions for people who have a session established
Approach 2)
Using any mainstream hardware load balancer (or presumably a similarly featureful free/open software LB), configure it to point at N+1 machines in a cluster. Administratively remove machines from the new session pool one at a time (virtual machines can make this flexible and easy to roll back). Once the established sessions have expired or been forced out, upgrade the software and roll them back in.
One neat aspect of this approach is if you have an "oh shit" hockey stick scaling issue, you can watch it happen on one machine before deploying it to every machine in your cluster. Also good for A/B testing, as mentioned in recent articles here.
Re: Ask HN: how to push to a live site?
#8Using lisp if you have a network based REPL you can modify the running code live without taking the site down.
Re: Ask HN: how to push to a live site?
#9If you happen to be using Ruby, then Capistrano ( http://www.capify.org/ ) is awesome. I imagine there are similar solutions for other languages. Worst case scenario, you can roll your own. A very basic trick is to use symbolic links on your server - deploy the site to a new folder, and simply point the symbolic link to the new folder when you're done.
Capistrano works great for non-Ruby sites too! Our site is in PHP and it was easy to get cap working for us. We also use github.com so the site essentially pulls from there, which means we can also rollback in case we ever need to.
Capistrano is great. I've used it to great success deploying Django(Python) apps to complex environments.
Re: Ask HN: how to push to a live site?
#10If you're smart you can orchestrate db changes non-destructively. If less smart use capistrano.