These instructions are for installing FlexDeploy on an existing Tomcat server.  If you are installing a new server, see Installing FlexDeploy with included Tomcat for a simplified installation which includes the Tomcat 8.5.11 server.  If you wish to use an existing Tomcat server, or to use a different version of Tomcat, please continue with this installation.

Requirements 

Tomcat Setup

If FlexDeploy is being installed for first time, setup Tomcat server and a Data Source as explained in following steps. If only updating new war file, skip to Installing WAR Installation.

Install library jar files to Tomcat lib

Some jars are needed to support running an ADF application on Tomcat. Please download the following and put in the lib folder inside where you downloaded Tomcat.

Configure context.xml

Open context.xml for editing. It is located in the <TOMCAT_HOME>/conf folder. Update context.xml depending on your database, see examples below. Replace URL and Password with the actual values.

  • Oracle
    • Localhost XE connection will look like this. jdbc:oracle:thin:@localhost:1521:XE
    • SID based JDBC URL Syntax - jdbc:oracle:thin:@HOSTNAME:PORT:SID
    • Service Name based JDBC URL Syntax - jdbc:oracle:thin:@//HOSTNAME:PORT/SERVICENAME


<Resource name="jdbc/flexdbDS" auth="Container"
    type="oracle.jdbc.pool.OracleDataSource"
    factory="oracle.jdbc.pool.OracleDataSourceFactory"
    
    url="**CONNECT_STRING**"
    user="fd_admin"
    password="**FD_ADMIN_PASSWORD**"
    
    connectionCachingEnabled="true"
    connectionCacheProperties="{InitialLimit=0, MinLimit=0, MaxLimit=100, ConnectionWaitTimeout=60, InactivityTimeout=60, AbandonedConnectionTimeout=60, PropertyCheckInterval=30}"
    
    validationQuery="select 1 from dual"
    testOnBorrow="true"
    
    useLocalSessionState="true"
    defaultAutoCommit="false"/>


<Resource name="jdbc/flexdbDS" auth="Container"
    type="javax.sql.DataSource"
    factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
    driverClassName="org.postgresql.Driver"
    
    url="**CONNECT_STRING**"
    username="fd_admin"
    password="**FD_ADMIN_PASSWORD**"
    
    maxTotal="100"
    maxIdle="20"
    
    validationQuery="select 1"
    testOnBorrow="true"
    
    defaultTransactionIsolation="READ_COMMITTED"
    useLocalSessionState="true"
    defaultAutoCommit="false"/>


<Resource name="jdbc/flexdbDS" auth="Container"
    type="javax.sql.DataSource"
    factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
    driverClassName="com.mysql.jdbc.Driver"
    
    url="**CONNECT_STRING**"
    username="fd_admin"
    password="**FD_ADMIN_PASSWORD**"
    
    maxTotal="100"
    maxIdle="10"
    initialSize="10"
    
    validationQuery="SELECT 1"
    testOnBorrow="true"
    
    defaultTransactionIsolation="READ_COMMITTED"
    useLocalSessionState="true"
    defaultAutoCommit="false"/>

Configure Tomcat Environment

Windows

Create file setenv.bat in the <TOMCAT_HOME>/bin folder. Edit the file to have following lines. Update location of JAVA_HOME as appropriate.

set JAVA_HOME=C:/installs/Java/jdk1.8.0_121
set CATALINA_OPTS=%CATALINA_OPTS% -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xms1024m -Xmx4096m -Xloggc:%CATALINA_BASE%/logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M -Doracle.mds.cache=simple -Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true -Dflexagon.fd.repository.root=/opt/flexdeploy/repository -Dflexagon.fd.install.root=/opt/flexdeploy/application -Djava.awt.headless=true

Unix

Create file setenv.sh in the <TOMCAT_HOME>/bin folder. Edit the file to have following line. Update location of JAVA_HOME as appropriate.

JAVA_HOME=/usr/jdk1.8.0_60
CATALINA_OPTS='-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xms1024m -Xmx4096m -Xloggc:$CATALINA_BASE/logs/gc-%t.log -Doracle.mds.cache=simple -Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true -Dflexagon.fd.repository.root=/opt/flexdeploy/repository -Dflexagon.fd.install.root=/opt/flexdeploy/application -Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'

Please make sure to modify the arguments for Server working directory (-Dflexagon.fd.install.root) and Artifacts repository (-Dflexagon.fd.repository.root) as per your installation. Be careful in copying details from browser due to potential character changes.

Setup Logger Configuration

Copy Additional Libraries

From the FlexDeploy Tomcat distribution, copy /apache-tomcat-flexdeploy/lib/FlexDeployAPI.jar into <TOMCAT_HOME>/lib.

FlexDeploy Application Setup

Install WAR

Copy Plugins

At startup, FlexDeploy will upload and activate all the plugins. Perform these steps for auto upload of plugins.

Start Tomcat

Launch Application