Yabe in the Cloud: Deployment Guide
Since the Play! framework is one of the most popular frameworks among our developers, we thought we should publish another how-to showing how to deploy Play! apps to the Jelastic cloud. It’s pretty easy. We will use the yabe. blog engine as an example.
Create an environment
1. Go to Jelastic.com and sign up if you haven’t done it yet or log in with your Jelastic credentials by clicking the Sign In link on the page.
2. While in Jelastic dashboard, click the Create environment button:
3. In the Environment Topology dialog, pick your application server (for example, Tomcat 6) and the database you want to use. Then specify your environment name, for example, yabetest.
It will take just a minute for your environment to be created.
1. Click the Open in browser button for MySQL.
2. When you created your environment, Jelastic sent you an email with credentials to the database. Create a user account and the database using these credentials.
3. Upload MySQL connector to the lib folder.
Upload a Java package
1. Go to the playframework.org and download play-1.2.4.zip version.
2. Unzip the package you have just downloaded.
3. Run Play framework using command line (C:play on Windows,~/play on Linux):
4. Create yabe war file.
…play war yabe -o yabe.war –zip
5. Go back to the Jelastic dashboard and upload war file you have just created to the Deployment manager.
6. Once the package is in Jelastic
, deploy it to the environment you created earlier.
1. Click the config button for Tomcat and open the application.conf file (webapps/ROOT/WEB-INF/application/conf/application.conf). Uncomment the part of file which is responsible for full JDBC configuration and change the database URL, driver, user and password according to your database:
2. Increase db.pool.timeout to 10000 ms in connections pool configuration of application.conf file:
Don’t forget to save your changes and restart Tomcat!
Now you can open yabe. blog engine in a web browser!