AWS Marketplace AMI - What's inside? How to use it?

This article describes what components are in the AWS Marketplace AMI. This article contains an FAQ and links to resources for how to use the AWS Marketplace AMI, such as opening up remote connections to PostgreSQL. 

What is in the AWS Marketplace AMI?

Architecture

Database

  • The AMI has a running PostgreSQL 10 database
  • The database is locked down to only allow local connections. If you want to connect remotely to the PostgreSQL database, you must update the configurations. Follow the tutorial Open PostgreSQL on AWS to learn how to update the configurations. 
  • There are 8 existing schemas in the PostgreSQL:
Resource NameUsernamePassword
SEMARCHY_REPOSITORYsemarchy_repositorysemarchy_repository
SEMARCHY_PRODUCT_RETAIL_MDMsemarchy_product_retail_mdmsemarchy_product_retail_mdm
SEMARCHY_CUSTOMER_B2C_MDMsemarchy_customer_b2c_mdmsemarchy_customer_b2c_mdm
EMPLOYEE_TUTORIALsemarchy_emp_tutorialsemarchy_emp_tutorial
B2B_TUTORIALsemarchy_b2b_tutorialsemarchy_b2b_tutorial
DATA_LOCATION_1semarchy_dloc1semarchy_dloc1
DATA_LOCATION_2semarchy_dloc2semarchy_dloc2
SEMARCHY_STGsemarchy_stgsemarchy_stg
  • The database is postgres and the password is postgres.

Application Server

UsernamePasswordRoles

semadmin

<EC2 instance ID>

manager-gui,admin-gui,semarchyConnect,semarchyAdmin

datasteward

<EC2 instance ID>

semarchyConnect,DataSteward

businessuser

<EC2 instance ID>

semarchyConnect,BusinessUser

  • The Tomcat lib directory contains the following xDM-related jar files in addition to the standard jar files included with Tomcat 8.5 (* the asterisks stands in for different version numbers for the Jar files):
    1. PostgreSQL JDBC Driver: org.postgresql.jdbc*
    2. Oracle JDBC Driver: ojdbc*
    3. SQL Server JDBC Driver: com.microsoft.sqlserver.mssql-jdbc*
    4. JavaMail API to allow email notifications: com.sun.mail.jakarta.mail*
    5. Tomcat tools for authentication and role mapping: com.semarchy.tool.jee.tomcat*
  • In the home folder /home/ec2-user, there is the semarchy-ami-oracle.xml file and semarchy server installation file (e.g. semarchy-xdm-install-5.0.0.ga-20190208-0926.zip). The semarchy-ami-oracle.xml file is preconfigured for Oracle. You are encouraged to use this starter file to set up your environment to use Oracle. The semarchy server installation file contains all the files you would expect if you downloaded the installation files from semarchy.com. 
  • The Semarchy xDM server installation files contain additional jar files that you can copy to the tomcat8/lib folder if needed.
  • The following files have been modified from the vanilla Tomcat8 installation to work better with Semarchy xDM:
    • catalina.properties
    • server.xml

    • web.xml
    • logging.properties
    • semarchy.xml (custom connections for Tutorial schemas and increased maxActive connections from 8 to 16)
  • If you want to turn on realm logging to configure LDAP and other authentication/authorization services, follow the article LDAP and AD Integration

FAQ

How do I add new connections to the semarchy.xml file? 

You can find the JNDI snippet you need in this article. Change the Resource nameusername, and password. Restart Tomcat for the changes to the semarchy.xml to take effect.

How can I use the AWS Marketplace AMI with Oracle?

You should shut down and uninstall the PostgreSQL database. The Oracle JDBC driver is already in the tomcat8/lib folder. You must set up semarchy.xml to use your Oracle connections. There is a copy of semarchy.xml configured for Oracle in the /home/ec2-user, called semarchy-ami-oracle.xml. Once you configure the semarchy-ami-oracle.xml file, rename it to semarchy.xml and move it into the /etc/tomcat8/Catalina/localhost/ directory.

How can I use the AWS Marketplace AMI with Microsoft SQL Server?

You should shut down and uninstall the PostgreSQL database. The Microsoft SQL Server JDBC driver is already in the tomcat8/lib folder. You must set up semarchy.xml to use your SQL Server connections. There is a copy of semarchy.xml configured for SQL Server in the zipped server installation files located in the /home/ec2-user folder. Unzip semarchy-xdm-install-5.0.0.ga-20190208-0926.zip and find the semarchy-sqlserver.xml file in the samples subfolder. Once you configure the semarchy-ami-sqlserver.xml file, rename it to semarchy.xml and move it into the /etc/tomcat8/Catalina/localhost/ directory.

Can I use the AWS Marketplace AMI in production? 

No, but it's a great starting point. You will have to make changes to the EC2 instance to prepare it for production.

The PostgreSQL database is not ready for production volumes and reliability. You should set up an RDS instance as your database.

You must size the EC2 instance accurately. Assess what size your EC2 instance must be to support production needs.

You must configure Tomcat for your needs. The preconfigured Tomcat memory settings must be adjusted. The default setting is -Xms512m -Xmx1024m. Be sure to increase the memory allocation to Tomcat significantly to avoid running out of memory. 

Consider other standard production requirements like High Availability and Single Sign On. You will need to configure your instances to handle these requirements.

For detailed steps and commands, see the article How To Go To Production Using the AWS Marketplace AMI

How do I upgrade Semarchy xDM on the AWS Marketplace AMI? 

If you want to upgrade xDM, you have two options. You can follow the install in-place procedure. Or if you are using RDS, then you can take a local copy of all configuration files, terminate your current EC2 instance, launch a new instance from a more recent AWS Marketplace AMI, then replace the default configuration files with your local copies.

For additional help, follow the article Upgrade: How to Get Your Semarchy Installation Files into EC2? and Deploy Semarchy xDM Using the Tomcat Manager. 

My questions are not answered here. Where can I get help? 

Contact us.