How to deploy Enonic CMS to Jelastic cloud

By July 2, 2012 HowTo 3 Comments
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

Here is a step-by-step how-to on deploying Enonic CMS, a popular content management system built on Java, to the Jelastic cloud. Enonic CMS is flexible, easy to use solution and supports all major databases and application servers. Jelastic can run and scale any Java application with no code changes required, so the steps we describe here are applicable to most Java applications.

Let’s get started!

Create the 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. Click Create environment to set up a new environment in Jelastic.

3. In the Environment topology window, select Tomcat 7 as your application server, pick PostgreSQL as a database you want to use, type your environment name, for example, enonic, and click Create.

In a minute your environment with both Tomcat 7 and PostgreSQL will be successfully created.

Upload Java package

1. Go to enonic.com and click Downloads.
2. Download the latest Enonic CMS distribution as a zip file.
3. Unzip the package, you have just downloaded.
4. Go back to Jelastic dashboard and upload cms.war (enonic-cms-4.6.0/webapp/cms.war) to the Deployment manager.
5. Once the package is in Jelastic, deploy it to your environment.

Configure database

1. Click Open in browser button for PostgreSQL.

2. While you were creating the environment, Jelastic sent you an email with credentials to the database. Create a new role using these credentials.

3. Then create the database with the application.

Configure Enonic CMS

1. Go back to Jelastic and click the Config button for Tomcat.

2. Navigate to the server directory and set the database configuration (database URL, username and password).

For example:

<Context path="/" docBase="cms" debug="5" reloadable="true">
  <Resource name="jdbc/cms"
            auth="Container"
            type="javax.sql.DataSource"
            maxActive="100"
            maxIdle="30"
            maxWait="10000"
            username="enonic"
            password="enonic"
            driverClassName="org.postgresql.Driver"
            url="jdbc:postgresql://postgres-enonic.jelastic.tsukaeru.net/enonic"/>
</Context>
Save changes!

3. Upload PostgreSQL connector to the lib folder.

4. Restart Tomcat in order to apply the new configuration parameters.

Start Enonic CMS

Now you can run your application in a web browser and enjoy!

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

3 Comments

Leave a Reply

Subscribe to get the latest updates