Using Git for web app deployment
senko.net
senko.net
Set up pre-commit and post-commit hooks, integrate with your run-of-the-mill CI suite or testing framework, hook up with deployment scripts - that's pretty much it.
Making Git also control my deploys would mean either tagging release commits or rebasing onto a production branch, which both (for me, at least) impede releasing as often as I can.
fab release pull update touch
The above will work on release version, will pull in changes from repo (hg in my case), will update to tip (or any tag I want), remove any *.pyc files and recompile and finally touch wsgi file. All these (release, pull, update, touch) are custom written python functions using fabric library.
If I want to restart apache, I use this (could have combined it with previous example and it would work)
fab apache_restart
Fabric is joy to use, very easy to write powerful deployment scripts and has good documentation: highly recommended.
If someone has a link to a good article / book / video about best practices with this, please post it?
There's a lot of talk about how someone did massively scallable systems or deployments (and it's really interesting, lots of cool engineering problems & solutions there), but a real world "here's what we figured works really well for us for a smaller-scale distributed operation" would be really useful, too.
I imagine to set it up yourself would be a bit of work, but it sounds like you have continuous integration built in? That's cool.
$ git remote add heroku git@heroku.com:myapp.git
$ git push heroku
Just beautiful.I don't even want to make webapps that aren't ruby with heroku around.
Well, it's not specifically continuous; I do manually run the script when I want to make a deployment. But I make it a point for my (main) master to be the same code as is in the production. So I work in smallest possible changes (one feature, or one bugfix), push to main repo, and run the deployment script.
This really is the way to go for developing software, deployment should be painless. I would like to see some sort of drop-in tool you could put on your own server without having to configure all the post-commit hooks. Although, that's probably a pipe dream.
http://danielmiessler.com/blog/using-git-to-maintain-your-we...
If they want to come off as jackasses, that is fine. But it seems unprofessional to me. Their reputation is hard to ignore.
We also setup pre-commit git hooks, that run PhpUnit and QUnit. So our branches are always stable. We also included CodeSniffer in the pre-commit hook to adhere to the strict html specification.