Vagrant template for Clojure/Datomic projects

Meet clj-vagrant-new, a Leiningen template that allows you to do this

lein new vagrant myproject +datomic

I struggled for some time to find a Vagrant-powered Clojure+Datomic setup until I stumbled upon this blog post. Even though everything was very nicely explained there, I still had to apply effort to remove overly specific parts, bring configuration files up to date etc. To save the trouble for others I made a template for creating a complete development setup with just one command.

The template uses Vagrant, and Ansible for provisioning. Once vagrant up is done inside the project directory a free version of Datomic (which uses local storage only) will be already set up, as well as the headless nREPL server for your Clojure program. You can now immediately connect to it from CIDER/fireplace.vim/… and start hacking. Some extra information is available at template's Github page.

If you want to move an already existing project to Vagrant it will be easier to just copy the files from clj-vagrant-sample which is a baseline project generated by the template.

Please try it, report issues and enjoy!