A jar file is just a kind of tar file that doesn't need to be  
unpacked.  One benefit is that it's easier to generate from the  
development environment, another is that it is agnostic to where the  
files are in the filesystem.

It should be possible to write a reasonably general 'deploy' script  
that:

- Snapshots the development source tree (via tar/gz excluding fasls)
- Unpacks this on the server in a versioned directory
- Optionally runs a script to generate a new image (if you're running  
that way)
- Optionally copies the DB, starts a test instance and runs a  
verification test

And a 'switch version' script that:

- Stops the live server
- Archives the current image and swaps in the new one
- Starts the server and runs a special 'update' script which you can
   populate with an update function

Given that you keep the state of the prior system around, you can  
simply downgrade if you find that your upgrade failed.  I find that  
testing major upgrades on a staging server rules out a number of  
failure modes and validates any database upgrades / schema changes  
that are needed.

That's basically what I do by hand.  It would be nice to have an  
example of how to do this sort of things on linux boxes that people  
can derive their scripts from.  Anyone have a reasonably structured  
procedure that they'd be willing to share as an example?

Ian

On Mar 16, 2009, at 9:15 AM, Vyacheslav Akhmechet wrote:

>
> On Mon, Mar 16, 2009 at 6:02 AM, Jan Rychter <[email protected]> wrote:
>> Well, I've been toying with Clojure lately and I can tell you  
>> deploying
>> an app is *way* easier than in CL. You basically stick a bunch  
>> of .jar
>> files (your code and your dependencies) in a directory and fire off a
>> Clojure script that runs your code.
> That's basically what I'm doing with CL (except unzipping the archive
> on the server is a part of my script). It shouldn't be too difficult
> to write a CL loader that understands jars either, if you really like
> this way of doing things.
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to