Guest Post: One-click, Native Play 2 Deployment on CloudBees
- October 2, 2012
(Post written by CloudBees)
Since version 1, the Play framework has won fans at CloudBees. Our group of secret Scala admirers enjoyed the rise of Scala support in Play, then delighted in the use of Scala to implement Play version 2. Even the Scala haters had to admit that it was pretty cool. Most of all, the Play framework has made Java web development fun again (again? If we are honest, it was never that fun to start with!).
We were most interested in how Play applications were deployed. At CloudBees, we offer managed app server stacks which allow us to hook in services automatically, providing a smooth "PaaS" experience. But it's hard to miss the shift towards other deployment models. Play version 1 came with a "war"-generating plugin — which opened up Play to deployment scenarios on more traditional application servers — however, in its heart Play wanted to be free of the Servlet container model (a fine model, which was ahead of its time in many ways, but not the Play Way).
Play 2 takes this a bit further. So at CloudBees we decided that for popular frameworks we wanted to support the "native" experience of deployment — i.e. what the framework authors consider the "ideal" deployment. Play, via its use of SBT, produces a "distribution" which is a self contained zip ready to run on a target platform.
On CloudBees, now we can run a Play distribution "natively" using the Play 2 "container" — no need to generate a war, change the packaging, or adjust how you build your Play 2 applications. When an application is deployed to CloudBees, we look for existing artifacts from the zip archive we already have (and we probably already have them!) to save time on deploy (a great feature for those of us with terrible uplink speed).
To get started with this, one of the easiest ways is to launch what we call a "ClickStart" which will set up an app, clone it into a private repository and set up a continuous deployment job. It gets you going fast, but you can lie to your friends and say you did all the work if you want. Try it: launch a sample Play application right now!