Live data from Hacker News

Ask HN: how do you stage/push your code?

news.ycombinator.com

11–16 of 16 posts

Re: Ask HN: how do you stage/push your code?

#12

We've been using Beanstalk ( http://www.beanstalkapp.com ) for a few months now to collaborate more effectively, and thus far pretty impressed. Great system, and they've consistently added new features often.

While I'm no longer a member of the wonderful team at Beanstalk, I can tell you for certain that this comment is appreciated.

Happy to answer any questions about Beanstalk Deployments which is my personal favorite part of the system: http://beanstalkapp.com/features/deployments

Re: Ask HN: how do you stage/push your code?

#13
We use capifony, a Symfony-tailored version of Capistrano.

Because our workflow utilized git flow, we do the majority of our work in feature branches, submit PRs, and then merge those to develop when TravisCI says it passes.

Once on develop, we "cap staging deploy" and run any final tests using Testacular, Selenium, or just by hand.

Most of the time, though, all we do is eyeball the code changes on develop, confirm tests pass in TravisCI, and do a release on master and then "cap production deploy".

Database migrations are handled automatically via Doctrine with each deployment with rollback support.

Sessions are pooled, and there haven't been any issues between releases. NewRelic is our primary indicator for a successful release.

Using this method, we deploy 6+ times a day, and haven't had the the time to automate it all yet :)

Re: Ask HN: how do you stage/push your code?

#14
post #6
post #3

After 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 ;-)

Have you had to deal with users with sessions across multiple versions?

All the time! We use PHP, so each request is a blank slate -- persistent state is all in mysql, redis and memcached. DB schemas are pushed/applied before the code that uses them. Also if it wasn't clear: all those steps are automated, other than running the "I want trunk on prod now" script. We really should make that a post-test hook. Any year now ;-)

Re: Ask HN: how do you stage/push your code?

#15
At work, we have different workflows from rsync and ssh into the machine, running a build script to git pull. For my pet project, I work with git push to the production server. Works pretty well with git post-recieve hook and phing (ant for php) targets to update dependencies (through composer) and doing some health checks.
Post reply on HN