views:

75

answers:

3

I am purely a windows programmer and spend all my time hacking VC++.

Recently I have been heading several web based applications and myself built applications with python (/pylons framework) and doing projects on rails. All the web projects are hosted on ubuntu linux.

The RELEASE procedures and check list we followed for building and releasing VC++ windows application are merely no more useful when it comes to script based language.

So we don't built any binaries now. I copied asp/php files into IIS folder through ftp server when using open source cms applications.

So FTP is the one of the way to host the files to the web server. Now we feel lazy or not so passionate to copy files via ftp instead we use the SVN checkout and we simply do svn update to get the latest copy.

Is SVN checkout and svn update are the right methods to update the latest build files into the server? Are there any downside in using svn update? Any better method to release the script/web based scripts into the production server?

PS: I have used ssh server at some extension on linux platform.

+4  A: 

I would create a branch in SVN for every release of web application and when the release is ready there, I would check it out on the server and set to be run or move it into the place of the old version.

gruszczy
this is one good advise. I always did the trunk update and causes little problems
Gopalakrishnan Subramani
An additional way to augment this strategy would be to keep the keep older versions of the app on the server for disaster recovery and update a link from the new version of the code to a 'current' directory that actually serves the application.
Adam Crossland
Adam, you got my another mistake. it has happened in my application.
Gopalakrishnan Subramani
+3  A: 

Is SVN checkout and svn update are the right methods to update the latest build files into the server?

Very, very good methods. You know what you got. You can go backwards at any time.

Are there any downside in using svn update? None.

Any better method to release the script/web based scripts into the production server?

What we do.

We do not run out of the SVN checkout directories. The SVN checkout directory is "raw" source sitting on the server.

We use Python's setup.py install to create the application in /opt/app/app-x.y directory tree. Each tagged SVN branch is also a branch in the final installation.

Ruby has gems and other installation tools that are probably similar to Python's.

Our web site's Apache and mod_wsgi configurations refer to a specific /opt/app/app-x.y version. We can then stage a version, do testing, do things like migrate data from production to the next release, and generally get ready.

Then we adjust our Apache and mod_wsgi configuration to use the next version.

Previous versions are all in place. And left in place. We'll delete them some day when they confuse us.

S.Lott
+1  A: 

The one downside of doing an svn update on your web root is that the .svn directories can potentially be made public, so be careful about permissions on the web server.

That said, there are far better ways to deploy an app built with dynamic languages. In the Rails world Capistrano is a mature deployment tool, as well as Vlad the Deployer. Capistrano can easily be used for non-rails deployments

There are many deployment strategies based on version control. You could go through the tutorials and get some ideas.

I'd also like to add that even though we do not "build" (compile) the project in dynamic languages, we do "build" (test/integration) them. A serious project would use a continuous integration server to validate the integrated "build" of project on every commit or integration, well before it gets to production.

hgimenez