1

We have a small team of two developers (PC) and two designers (Mac). As we're an ad agency rather than a code shop we don't get to spend lots on software tools. We used to use Visual Studio years ago but now we use Visual Web Developer to create ASP.NET sites (.NET4 support - can't afford new VS licences). We create the sites as Web Site projects (rather than Web Apps, or MVC) and we run on a dedicated dev box (Win 2008 rc2 server).

TortoiseHg is the latest I've been playing with and the difference between Hg and Git are negligibility considering our needs. So we can run with either.

What I'm trying to do is find a relatively simple way of deploying sites/commits using freely available tools/services that works well with the tech/software that we use.

I don't mind lots of faffing to set up the solution if it can be setup up once on say one of our server but could deploy to multiple locations. I've been looking and CI server (Jenkins/Hudson) but they seem to be overkill for what we require. Do we need a build server for a 50 off web pages and associated assets?

I tried the Mercurial HgWebDir setup thing - too many potential problems with Hg/Python versions and the setup time is too long per production server - I had to download the source, make a change and rebuild it... OTT. Git seems to work best with SSH, again, more 3rd party stuff.

Is there any Windows based software that we can install on the production server or on a central server that will aid with simple deployment (ie copy latest changes to website directory and rollback) that doesn't cost the earth (preferably free) and doesn't rely on getting the right versions of this and that to work properly.

Jag
  • 723
  • 8
  • 21
  • 1
    `.NET4 support - can't afford new VS licences` check [**Microsoft WebSpark**](http://www.microsoft.com/web/websitespark/) maybe you are eligible to their program and you will have full licenses for a minimum of 3 years without any payment... – balexandre Feb 29 '12 at 10:00
  • Thanks for that @balexandre, sounds like the new "action pack". Unfortunately it looks like we're ineligible - too many employees overall :( – Jag Feb 29 '12 at 11:29
  • you said you only have 2 (that will use Visual Studio). Designers should not count... send them an email, and you can always have one person working as a "freelancer" ;) – balexandre Feb 29 '12 at 11:42
  • The smallprint said "no more than 10 members including owners and employees " and plus, web dev isn't our "primary" business (although that could be wrangled). May be worth dropping them an email though. – Jag Feb 29 '12 at 12:05

3 Answers3

4

Let's imagine that you have choosen AppHarbor for your .NET hosting.

They give you a GIT repository where you can have your source code and upon each push to appharbor they will automatically build your solution and make it available online.

With this in mind, you can have a branch to be your production and everything else to help and to be used to host the source code and help files for example.

If you choose a hosting company that only provide you with an FTP upload feature, either you use a automatic script to publish the data from your commit (using webhooks you can easily fire a web script that will pick up the changes (or the entire repo) and publish on the web).

Either way is good, it's always up to you, what are you guys willing to try, and keep trying alternatives until all of you are happy with the result.

With this, you can simply use Visual Studio and Tortoise GIT or even install GIT Extension in Visual Studio and use no more software...

Using Git with Visual Studio

Community
  • 1
  • 1
balexandre
  • 73,608
  • 45
  • 233
  • 342
  • I've looked at AppHarbor as it keeps coming up. However, according to their words "If the code builds and all tests execute successfully, the application is deployed to the AppHarbor application servers". For new clients we may be able to sell them into this but all existing ones have their own hosts/servers. Also, with AppHarbor you're paying for all the other functionality which we wouldn't (although possibly should) use. Paying for building, unit testing, hosting that we don't "need" makes it harder to sell to my boss. – Jag Feb 29 '12 at 11:42
  • it's a cloud hosting, you will have so many advantages, unless it's really simple websites... even then I would host there. You do realize that if you only have one server instance, **it it's free** right? -> https://appharbor.com/pricing - if you don't know them, see [my own answer](http://stackoverflow.com/questions/7244038/real-alternatives-to-windows-azure-paas-web-role/7245874#7245874) about it. – balexandre Feb 29 '12 at 11:50
  • I liked Gits ability to have a working directory outside the repo but had issues with post commit hooks (my issues with it: http://stackoverflow.com/questions/9414942/git-post-receive-hook-not-working-on-remote-windows-server) It seems on Windows the only options are to pay cash to MS (for VS to use MSDeploy & exentions) or a CI server. Or spend endless hours hacking open source solutions to make them work. – Jag Feb 29 '12 at 11:52
  • I never liked to have repos from my localmachine, I use [BitBucket](http://bitbucket.org) free service for GIT and my company uses [Kiln](http://www.fogcreek.com/kiln) (Hg from FogCreek). BitBucket works fine with AppHarbor through WebHooks – balexandre Feb 29 '12 at 11:54
  • 1
    Personally the more I read into AppHarbor the more I like the sound of it (even more after reading your link). As we and our clients are in the UK though we may have trouble convincing them of the advantages. I'll definitely bear them in mind for the future though. – Jag Feb 29 '12 at 12:11
0

If deploying sites for you is "copy files from A to B" (no related build-process), you can try at least two methods, both assume the presence of working http-server on the "other" side

  1. Export from repository to unversioned tree, full clean-up of webspace, copy new files into site
    • light-version of this solution: export only affected by changeset-range files and copy over old versions
  2. Site-space is part of working copy (I prefer to see repo outside the web-root), update of working copy (pull from somerepo) updates files on site

Only VCS + FTP|SCP|? clients used

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
  • Essentially at the moment we back up files to be replaced and FTP the new ones. This process is simply fiddly and error prone. I was thinking of exporting a changeset and manually uploading them. Less fiddly but still relying on a human to replace live files :) Your second point is what I liked about Git (see my comment above) but I had trouble getting post-receive hooks to work (else I was almost there). – Jag Feb 29 '12 at 11:57
  • @Jag "This process is simply fiddly and error prone" - I don't think so and don't see it. And do **all actions** automatically, without user intervention – Lazy Badger Feb 29 '12 at 12:15
  • Sorry, I wasn't being clear. Our current process involves manually FTPing - that is the fiddly error prone bit - not what you were suggesting. – Jag Feb 29 '12 at 12:30
  • @Jag - In hook you have only ssh to server + run update. Because you are on Windows-side, you can use Plink in batch mode (read 7.2.2 and 7.3 of Putty help-file) for this task. FTP can be also (easy) automated (or replaced by scp|rsync) – Lazy Badger Feb 29 '12 at 12:31
  • Presumably then when we commit to the release branch we have a hook that invokes Plink and runs the ssh commands? (Not too au fait with ssh and Putty). – Jag Feb 29 '12 at 13:43
  • AFAIK, hook performed always (TBT!) - you have to add some logic inside hook in order to define, when do and when - don't – Lazy Badger Feb 29 '12 at 13:52
0

Have you considered using WebMatrix for development? It helps streamline the process for small web sites like you describe.

CI is still useful for small projects, especially if you use unit tests. Using Hudson in small Teams

You should be able to use git to deploy to your server and rollback quite easily. You could create a bare git repository on your server and then use the post-receive git hook to automatically deploy the changes. So when you push changes to origin from your local repository, the website will be updated.

Robbie
  • 18,750
  • 4
  • 41
  • 45
  • When I read about the post-receive hook it made me happy then I lost more hair trying to get it working on Windows (see the the link to my previous SO question). – Jag Feb 29 '12 at 12:02
  • I see, i've done it in the past with a non-windows VM, but didn't realise there were issues with msysgit. I do however agree with balexandre in the previous reply about appharbor. I have recently tried appharbor and its a breeze to use and as mentioned below, its free for 1 server instance. If your clients sites are not likely to need more than that, then "free hosting" is a great argument to use if they are hesitant. How could they resist, especially when you back it up by saying that they will easily be able to scale up if their sites start getting more traffic. – Robbie Mar 01 '12 at 23:40
  • We're in the process of revamping our own website. I may try to convince my boss to give AppHarbor a whirl - even if they can't spell "harbour" properly. :) – Jag Mar 02 '12 at 16:40