British Inside

An Englishman living in small town America

James Shaw

News

  • Copyright James Shaw 2004-2007

    Creative Commons License

    View James Shaw's profile on LinkedIn

Twitter - and Deploying web apps to the server with SVN

First, an aside: Just one blog post since leaving Telligent? wow. Even more surprising, how many times a day do you think I check Google Reader now?

Never.

In fact, I don't remember the last time I checked "the feeds I'm really interested in and never miss".  Long story short, I just don't read blogs any more. I also have Pidgin IM open with MSN/Yahoo/AOL all signed in and waiting for IM's. I don't get any. Well, maybe one a week.

Nowadays, it's all Twitter, all the time. It's taken over the conversation and socializing that used to happen on IM. It's taken over Google Reader's job too - if someone that I follow posts to their blog, they tweet it and I see it.

So, for now at least, this blog is reserved for longer posts that I can't distill into 140 characters (which as I've proved, isn't many).

http://www.twitter.com/JamesShaw is me, obviously.

(and just to prove my point, I'll be twittering that I posted this :)

==============

Now to the real question. In a brief lull between the hectic launches at my current gig I want to streamline the deployments to our web servers.

I'm thinking of using TortoiseSVN on the server to simply update the web sites, but I'd like your opinion on a few points:

  • Should we update to the *live* web site folders? Sound insane, but that's exactly what has been done for every deployment on a collection of very large, very busy websites (that you probably know) for years now. And the devs still swear by it - but rollback seems problematic to me.
  • Or we briefly considered updating a separate copy of the sites and then use BeyondCompare to push the changes live? Is there a point to this extra step? Is it really any safer? And rollback is non-existent.
  • Or my current favorite; keep two web sites fully configured on the server, update the non-live one with SVN and switch IIS to use it. If it fails, switch IIS back - a perfect and instant rollback. Seems an even more obvious solution now that I've written it down.
  • We don't check-in binaries today, since we always build fresh before deploying. But pushing from SVN obviously means we have to check-in the dll's too. Perhaps even pdb's too, on staging. Which brings up another question - since we share the server between live and staging sites here, is there still a problem with uploading debug assemblies on a live server, even with separate app pools? Opinions vary alot..
Comments below appreciated (or on Twiiter, lol)
Posted: Wednesday, May 27, 2009 10:49 AM by James
Filed under:

Comments

Dave Burke said:

Don't have an opinion on the SVN situation. Just wanted to check in after seeing your tweet. :-)
# May 27, 2009 8:29 AM

James said:

lol Dave, and yet you still linked to your blog, not your twitter account :)

# May 27, 2009 8:37 AM

Dave Burke said:

I thought about that! But I'm still a believer.
# May 27, 2009 8:42 AM

Joe Fiorini said:

I'll give the first, hopefully valuable comment. I like the way Capistrano for Ruby on Rails does deployment. Basically, it exports the source onto the server in a timestamped folder (like 20080405102332). Then it symlinks a folder called "current" to the just-created folder. It's similar to your 3rd option above, only a little more formalized. It also handles cleaning up old deploys (by default keeps the 5 latest at a time) and allows you to define custom tasks that need to happen (such as building your solution). I really like this method of deployment, but I'm unsure if it would work for .NET. What do you think?
# May 27, 2009 10:15 AM

James said:

Thanks Joe. Not sure I see the need for keeping 5 versions at least in my application. If the update works, then great, if not put it back how it was. Good enough. I doubt that rolling back to an earlier version would be practical in any case with the number of changes we tend to roll up into one release.

# May 27, 2009 10:48 AM

Rob Baugh said:

Hey James, whether publishing from SVN or FTP I've prefered to create a new folder drop the files into it and then point IIS to the new folder structure. This has three benefits. a) it provides instant file roll back if needed. b) it avoids the problem of trying to overwrite dlls that may be in use and not overwritable. c) it recycles the app and pulls in new config changes.
# June 9, 2009 1:07 PM

James said:

Thanks Rob! Yeah, that was my option 3 - and the one i implemented. It's working great. Although I just toggle between two folders, I dont set up a new one each time. Doing it that way seems tidier and more consistent.

# June 9, 2009 1:18 PM
New Comments to this post are disabled