Simplicité on AWS elastic Beanstalk®

Simplicité® instances can easily be deployed on the AWS Elastic Beanstalk® platform.

This document consider you are using a standard **Simplicité® cloud instance template*** cloned from Git.

Provision a database

It is required that you provision an external database as a service such as a AWS RDS® database instance.

Once provisionned, load the appropriate template database dump into the database.

Then use the configuration items (host, port, database name, username, password) of the database instance to configure the datasource descriptor META-INF/context.xml file.

Make sure to use the org.apache.tomcat.jdbc.pool connection pool implementation for your datasource by adding this explicit attribute:

factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"

This is required because default Apache DBCP2 connection pool implementation is not deployed by default on AWS Elastic Beanstalk® Tomcat environments.

Note you can't use an ephemeral instance using an embedded HSQLDB database because it is not compliant with org.apache.tomcat.jdbc.pool connection pool implementation.

Provision a Elastic Beanstalk® environment

Using the web console or the eb CLI, create a Tomcat environment with a minimum of 512Mb max memory.

Deploy the instance

The JDBC driver suitable for your database must be copied in the WEB-INF/lib folder.

Then package the WAR file and, using the web console or the eb CLI, upload it to your Elastic Beanstalk® environment.

Use BLOBs for documents

The document need to be stored into the database as BLOBs. To do so configure the DOC_DIR system parameter as BLOB and clear the cache.

Once reconnected force a document synchronize to load all initial documents as BLOBs.