31 December 2014
Building clojure application
This post is harder than it should, because we need to first clarify what we mean by building :
- create a binary ready to be used,
- create an aggregate of file ready to be used,
- something else ?
All nuances are welcome of course : with test, with deployment, with...
So now that we know what we want, there's the second confusing part : so many tools, all interesting (like make, cmake, rake, lein), but all giving us their own definition of what it means to build.
Now, for a simple Clojure webapp, it's even easier :
This doesn't cover any of the other required step of course : getting ready for deployment involve database migration or update, sending properly the files, restarting services if need be... For me those step are a mix of rsync to send the files to the server, and of Ansible to handle the server side work.
One advantage of it all is that it's self documenting - no worry about being wrong, forgetting something, or any other human mistakes that can (and will) happen along the way. To be fair, one disadvantage is that it take times to put that in motion, and it's not always clear why this is needed.