Updated 08.18.2012
I am using Play 2.0.2 and I want to deploy my app to Amazon Webservices. I think the easiest way to do this is via Elasticbeanstalk.
I used Play2war to package my app
https://github.com/dlecan/play2-war-plugin/
I was able to package it with
play war
According to the usage guide of play2war, I renamed my file to ROOT.war because i used Linux 32bit Tomcat7.
I also used the servlet 3.0 as described in the tutorial on play2war. (tomcat 7 -> servlet 3.0).
The file size is 31mb.
Every time I use Elasticbeanstalk, I get the same log.
2012-08-18 00:25 GMT+0200
WARN
Environment health has been set to RED
2012-08-18 00:25 GMT+0200
INFO
Launched environment: elosource. However, there were issues during launch. See event log for details.
2012-08-18 00:25 GMT+0200
INFO
Your health check URL may be misconfigured. If your application does not respond to requests at http://elosource.elasticbeanstalk.com:80/, modify the health check URL to a valid path.
I tested it with Linux 32/64 bit , Tomcat7(servlet 3) and Tomcat6(servlet2.5). I always get the same result.
I also tried adding an extra html file for the health checker.
-
What would you recommend me to do?
-
What alternatives do I have to get my app running on ec2?
-
Is there a guide that explains how I manually deploy my app to ec2 with all the needed dependcies, like mongodb, play etc?
-
Also WAR files are relatively huge ~30mb, with my dsl 1k it is a real pain to upload such a lage file. Is there a way to only upload the changes with Elasticbeanstalk?
Ok, I know this is not the straight answer to your question as I am not using beanstalk, but as you asked for it in one of the comments:
Here is how I run my play2 app on a linux EC2 instance with a jvm installed:
play distdist/yourapp-1.0-SNAPSHOT.zipfile (or whatever dist name you haveconfigured) to the EC2 instance
cdtherechmod +x startnohup ./start &you now have your play2 application running natively on EC2, with websocket and all the cool stuff. I didn’t have to configure anything special in play for that to work. I am using an RDS database configured as any other DB in play.
Clearly, it’s a bit more hassle than beanstalk as you have to configure the server on your own and set up the autoscaling manually. But this is the best way that I have found to run play2 with all the features on AWS for now.
I hope this helps.