0

We have a small development team that have recently moved to using github to host our projects.

The team consists of three developers, 2 on Windows and 1 on Mac.

I am currently researching the best way to deploy applications to our Linux servers (dev and production).

Capistrano running locally would be ideal but from what I read this won't work for Windows machines.

It looks like the best way is to use a post-receive hook in github, I can see how this would work for auto deploying to dev, but I don't see how we could then deploy to live.

I have found paid projects like http://www.deployhq.com/ but it feels like something that a quick bit of code should be able to do for free, I just can't seem to get myself pointed in the right direction!

I was wondering what would be considered best practice for small team deployment involving multiple local OS's and github.

Toby
  • 630
  • 2
  • 7
  • 17

2 Answers2

1

At the risk of blowing my own horn, I'd recommend giddyup. This reduces deployment to a git push to a special repo you setup, with all remaining deployment operation done on the destination server with hook scripts you write to suit your application.

womble
  • 96,255
  • 29
  • 175
  • 230
  • This solution seems to favour deploying locally to the servers, if that is the case will it work for Windows machines? – Toby Jun 26 '12 at 11:00
  • It's only "deploying locally to the servers" if the servers are local. Otherwise, *everything* with giddyup runs on the production server, so it is entirely client OS independent, as long as the client can do a `git push`, it can deploy. Giddyup is designed to work with a Unix-like OS as the server, and so if you're deploying onto Windows servers, then yeah, giddyup won't work, but I can't imagine someone trying to develop ASP.Net code on a Mac... – womble Jun 26 '12 at 11:19
  • Haha, no no the servers are most certainly Linux based. I think I must have misread where giddyup gets installed and assumed it was on the machine doing the deployment. I think this could work, cheers. – Toby Jun 26 '12 at 11:25
1

We use Webistrano, which is a web frontend to Capistrano. It supports various VCSs, such as SVN, Git and Mercurial. It supports deploying to multiple servers simultaneously, transactions, and rollbacks.

Due to its Capistrano roots, it's easy to script things like flushing caches after deploys, etc.

We're quite happy with it. It requires few resources and simply runs as a Rails app under Passenger. Our fork, with some bugfixes, can be found at https://bitbucket.org/insiders/webistrano/.

Martijn Heemels
  • 7,728
  • 7
  • 40
  • 64
  • So am I correct in thinking that you push to github, which has a hook that also updates a deployment server with Webistrano installed on it, then a dev can log into the front end of Webistrano and deploy from there? – Toby Jun 26 '12 at 10:57
  • No, you simply specify the repo URL in each project in Webistrano. Webistrano simply logs into your target server via SSH, and checks out code straight from Git. GitHub's deploy keys can be used for authenticating to GitHub. – Martijn Heemels Jun 26 '12 at 11:52
  • So, you commit and push your code to GitHub, then start a deploy in Webistrano. No hooks are involved. – Martijn Heemels Jun 26 '12 at 11:53
  • This seems very promising - I want to make it as seamless to set up a new project as possible and don't particularly like the idea of new devs need to muck around with local git configurations of where they push to. – Toby Jun 26 '12 at 12:33