Being able to package Clojure web applications into standard .war files gives us a lot of deployment flexibility: all of the deployment practices and facilities available for deploying Java web applications are therefore available for use with Clojure web apps. In general, the act of deployment requires the following:
Setting up and configuring an app server
Copying the .war file your build process is producing to your server
Restarting the app server if necessary
If necessary, reverting your application’s .war file to a prior version (in case the last deployed version contained a regression, for example)
You can certainly do these things manually or in a custom way—programmers and system administrators have been doing “hands-on” application deployments for a long time. And, if your organization already deploys Java web applications, you can almost surely drop your shiny new Clojure web apps into that same process.
However, if you’re game, there are some specific Clojure-friendly toolchains that can make application deployment a lot simpler, easier, and more automated than most other options. We’ll take a look at one, Amazon’s Elastic Beanstalk service, that is broadly applicable to Clojure web applications, automating the provisioning and configuration of servers and deployment of applications to those servers.
Amazon’s Elastic Beanstalk (EB) is a platform as a service that provides a thin layer of automation ...