Wednesday, October 03, 2012

clojure: lein tar

A co-worker recently asked how I package and deploy my clojure code. There's nothing special about the code, but I'm making it available here for anyone who wants to cut and paste. Deploy is the easy part - scp a tar to the prod box. Building the tar is very easy as well. I've run this on a few different linux distros without issue, but YMMV. Without further ado.


I'm sure there are easier ways, and I know I could do it programically - but this works and is easy to maintain. That's good enough for me.

4 comments:

  1. Hi Jay,
    I just can't help commenting on your posts :)

    It doesn't take too much to go the extra mile and put a git remote on the prod box (just need a dedicated user on the prod box with a gitshell). Add a few symbolic links and you can just:

    git push prod master

    Nonetheless, thanks for the code contribution and blog post!

    Paul

    ReplyDelete
  2. Anonymous10:39 AM

    how about combining it with the ssh java stuff (forgot the name for the moment) and pushing it out directly?

    ReplyDelete
  3. Anonymous12:36 PM

    Any reason you're not using the existing lein-tar?

    https://github.com/technomancy/lein-tar/blob/master/src/leiningen/tar.clj

    ReplyDelete
  4. Phil, it wasn't around when I originally wrote that code. I should probably ditch what I have and use yours though, thanks for the pointer.

    ReplyDelete

Note: Only a member of this blog may post a comment.