If you had an existing play application and you want to put it on Jelastic, the easiest way is to use Jelastic Plugin on Play!.
- You need to have an existing Jelastic Envorinment (if you’re Play! application used a database, your environment must have database enable and also configured (means you have your database create with appropriate user assigned to it)
- Your application must use Play! version must be 1.2.x.
- On your application.conf add this jelastic configuration
jelastic.api.login and password are your credentials to log onto jelastic app controller. Jelastic.api.context specifies where the application will be deployed, in the example ROOT means it is deployed and accessible by the domain name which is aims-jam.jelastic.servint.net. If I put app on jelastic.api.context, my application will be deploy on app context and can be access on aims-jam.jelastic.servint.net/app. jelastic.api.environment which is the name of your environment defined on your apihoster.
Moreover, jelastic.api.apihoster can only have two value which are: app.jelastic.com (host on Europe), and app.jelastic.servint.net (host in North America).
- Configure your jdbc on application.conf.
You can define this on the phpMyAdmin of jelastic.
- Increase your db.pool.timeout to 10000ms of application.conf
- Deploy your application to jelastic cloud by (must be on the application directory):
This will take a while depending on your internet upload speed, this will compile your application and create a war file and then will upload it to jelastic. If it is finish, you can now access your application. In my example, I can access my application on aims-jam.jelastic.servint.net.
It seems that jelastic plugin can only work the default environment specified on application.conf, so I created a new environment that I named localhost for my localhost testing environment.
If I am testing my application locally, I will execute: play run --%localhost
Hope this can help you. :)