Grails on Jelastic

| January 24, 2012

As Jelastic continues to grow, we want to continue to share with you new features, how to's and updates. Today, we want to show you how Grails works within Jelastic. Grails is an innovative, high-productivity framework that follows the principle of "Convention over Configuration," making it quite popular. It provides a stand-alone development environment while maintaining a simplicity that allows the developer to focus on what really matters: creating high quality, easy to use applications that users love. Grails supplements Java application development quite easily because it is built on Spring and based on Groovy.

So, how do you get all the benefits of using Grails and the Cloud? Easy. Use Jelastic!

1. Create the Application

    1. Go to and download the lastest version of Grails.
grails tutorial
grails hosting
    1. Unzip the package you have just downloaded.
    2. Add the environment variables (this step is optional):
      • GRAILS_HOME (...grails-1.3.7) specifys to the path where you extracted the archive;
      • PATH (...grails-1.3.7bin) contains the path to the bin directory.
    3. Create your app using the command line.
With environment variables (C:grails on Windows,~/grails on Linux):
...grails-1.3.7 grails create-app {app_name}
Without environment variables:
...grails-1.3.7bingrails create-app {app_name}
NOTE: application will be created in directory C:grails-1.3.7bin{app_name}
    1. Create .war archive with just one command:
With environment variables (C:grails on Windows,~/grails on Linux):

...grails-1.3.7{app_name} grails war {app_name}.war
Without environment variables (C:grails on Windows,~/grails on Linux):
...grails-1.3.7bingrails war {app_name}.war
WAR archive will be saved at C:grails-1.3.7bin{app_name}

2. Create the Environment

    1. Go to and sign up if you haven't done so yet (you can do this on Servint or Host Europe servers), or log in with your Jelastic credentials by clicking the Sign In link on the page.
    2. Ask Jelastic to create a new environment.

grails cloud hosting

    1. In the Environment topology dialog pick your application server (e.g. Tomcat 6) and type your environment name, for example, Grails, then click on Create button.
grails hostIt will take just a minute for your environment to be created.
host grails

3. Upload the Java Package

    1. Upload your WAR file to the Deployment manager.

grails hosting in the cloud

  1. Once the package uploaded to Jelastic, deploy it to your environment.

install grails
That's it. Launch your application and enjoy!
host cloud grails