📜 ⬆️ ⬇️

Play! in the Cloud

image For a long period of time, we give our users the opportunity to participate in the improvement of the Jelastic platform by voting for new features. According to the voting results, we implemented in Jelastic support for one of the most popular frameworks - Play! .

Let's look at a small example of how to play a Play! -Application into the Jelastic environment.
  1. Create an environment on Jelastic, it only takes a few minutes (for example, use the application server Tomcat 6, MySQL database, the name of the environment playframework ).

    image

  2. Go to the MySQL admin page and create a new user and database with all privileges (when creating the environment, you received a message with a login and password to enter the MySQL admin page).
    ')
    image

  3. Do not forget to download the MySQL connector to the lib (Tomcat) folder.
  4. Use the command line to start Play! framework and install the Jelastic module:
    …\play-1.2.4>play
    …\play-1.2.4>play install jelastic
  5. After installing the module, create a new application with Jelastic support:
    …\play-1.2.4>play new jelasticapp – -with=jelastic
  6. Next, you need to make changes to your project's application.conf file:
    • Uncomment the part of the file that is responsible for the configuration of the Jelastic account and make any necessary changes:

      jelastic.api.login=yourmail@domain.com
      jelastic.api.password = yourpassword
      jelastic.api.context = ROOT
      jelastic.api.environment = playframework
      jelastic.api.apihoster = api.jelastic.com

    • Uncomment the full JDBC database configuration and make changes according to your database:

      db.url = jdbc: mysql: //mysql-playframework.jelastic.com/jelasticapp
      db.driver = com.mysql.jdbc.Driver
      db.user = jelasticapp
      db.pass = jelasticapp

    • Increase db.pool.timeout to 10000ms, because the default value is too low:

      db.pool.timeout = 10000

  7. Now you can work on the application itself.
  8. To shut down the application you created, write the following on the command line:
    …\play-1.2.4>play jelastic:deploy jelasticapp

Well that's all! You can open the application in the browser.

image

We remind you to offer a new feature for Jelastic or vote for the features of other users here . Feel yourself a part of our team!

Source: https://habr.com/ru/post/139104/


All Articles