How To Go To Production Using the AWS Marketplace AMI

If you are using Semarchy xDM from AWS Marketplace, follow this guide to prepare your application server for production. Semarchy built this AWS Marketplace offering for trial evaluations and following tutorials. It is not ready for production. Follow the easy steps below to go to production using the AWS Marketplace AMI.

Shut Down & Delete PostgreSQL database

There is a PostgreSQL database turned on by default when launching the AMI. It contains schemas for completing the Semarchy tutorials. Run the following commands to stop and delete PostgreSQL:

  1. sudo service postgresql96 stop

  2. sudo yum remove postgresql96 postgresql96-server postgresql96-devel postgresql96-contrib postgresql96-docs

Allocate more Memory to Tomcat

Tomcat is preconfigured to use the bare minimum Memory because the AMI is optimized for running on a t2.small instance class. If you run a bigger instance class, be sure to increase the memory allocated to Tomcat. 

  1. Edit the JAVA_OPTS definition in the tomcat8.conf file, found in /etc/tomcat8/tomcat8.conf
  2. Change this default values to increase the allocated memory: -Xmx1024m
    Semarchy recommends a minimum of 4 Gigabyte (-Xmx4g). Your requirements may vary and should be tested.

Configure semarchy.xml to use RDS 

The default semarchy.xml is configured to use the internal PostgreSQL database. Update semarchy.xml to use your data sources and connect to RDS. Double check you have the correct drivers for the database technology you are using (either Oracle or PostgreSQL drivers)  

  1. Edit the semarchy.xml in /etc/tomcat/Catalina/localhost/semarchy.xml
  2. Check the drivers in /usr/share/tomcat8/lib

Edit system timezone (optional)

The default timezone set at OS level is UTC, if you want to edit it follow these steps

  1. Edit the /etc/sysconfig/clock file to set the ZONE attribute to the correct value (i.e. ZONE="Europe/Paris" where the value is a file path under the root folder /usr/share/zoneinfo)
  2. Create a symbolic link with this command ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime
  3. Reboot the server

If clustering, configure your passive servers 

The AWS Marketplace AMI uses an active semarchy instance. You will need to switch to the semarchy-passive.war file to successfully cluster. Using more than 1 active server in your deployment will cause problems, including having more than 1 batch poller actively running and submitting jobs, disrupting your data processing order.

  1. Read the Installation guide for details on high availability configuration.
  2. Switch out the existing semarchy.war file for the semarchy-passive.war file. There is a copy of the semarchy server installation files in the home directory in the EC2 machine. Unzip it to find the semarchy-passive.war file.

Configuring LDAP integration (or other authentication/authorization)

Turn on realm logging. Follow the guidelines in the LDAP and AD Integration article.


If you have doubts, contact support@semarchy.com for advice before going to production. Or find more helper resources at the Semarchy support portal.