Installing FlexDeploy with included Tomcat
FlexDeploy provides a file distribution for Tomcat which simplifies the installation process. This distribution contains Tomcat, the FlexDeploy WAR, and the base configurations, leaving only a few simple steps to complete the install. The distribution contains the following components.
- A tomcat 8.5.11 server with required libraries, and base configurations
- The FlexDeploy WAR
- The FlexDeploy database installation scripts
- The FlexDeploy database migration scripts (for upgrading an existing FlexDeploy Tomcat installation)
- The FlexDeploy plugins
If you wish to use an existing Tomcat server, or to use a different version of Tomcat other than 8.5.11, please see Installing FlexDeploy on existing Tomcat.
Requirements
- 8GB of RAM
- 1 CPU
- At least 20GB of available space, may need additional space based on purge criteria and usage.
- 64 bit Java 8 JDK.
There are several JDK options available when installing FlexDeploy. The main requirement is that the version of Java used is version 8. if your Linux distribution includes a build of OpenJDK 8 you can use that version.
- Amazon Corretto - Amazon's build of OpenJDK with security updates https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/downloads-list.html
- OpenJDK - https://adoptopenjdk.net/releases.html
- Oracle JDK - Oracle's build for those who are licensed http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- If you have not created FlexDeploy Working Directory and Artifact Repository folders, we will create in steps below. (See Create Folders for FlexDeploy Server)
- See Installation Instructions - Database Tier for requirements on Database tier.
- Optional - consider Java Cryptography Extension (JCE) unlimited strength policy files to avoid SSH issues when using strong ciphers.
Installation Instructions
Adjust for Windows path if you are installing on Windows platform.
Step 1. Ensure Java 8 is installed on the server.
In this example, JAVA_HOME is /u01/java/jdk1.8.0_171 but it can be anything you want. If default java is not version 8, then we will need to adjust for it during Step 7 later.
Step 2. Extract the zip file in the desired location (referred to as "FlexDeploy Home" in this document). See example below, where zip was extracted in /u01/flexdeploy folder.
We recommend use of folder structure without any space in name.
Here is how it will look like after unzip.
Step 3. Setup the database for FlexDeploy, if you not already done so.
Step 4. Modify Tomcat configuration file (context.xml) for database connectivity depending on your database type. Replace URL and Password with the actual values.
File - <FlexDeploy Home>/apache-tomcat-flexdeploy/conf/context.xml
Example JDBC URL (CONNECT_STRING)
- 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
- PostgreSQL
- Syntax - jdbc:postgresql://hostname:port/flexdeploy
- Example - jdbc:postgresql://dkrlp01:5432/flexdeploy
- If you are using database name other than flexdeploy, then update URL accordingly.
- MySQL
- jdbc:mysql://hostname:port/FD_ADMIN
- Example - jdbc:mysql://dkrlp01:3307/FD_ADMIN
<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=300, AbandonedConnectionTimeout=300, 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"/>
Step 5. (Optional) Modify Tomcat server.xml for port if necessary.
File - <FlexDeploy Home>/apache-tomcat-flexdeploy/conf/server.xml
- By default, the Tomcat server is configured to run on port 8000. If this port is in use, change to some other unused port. Search for <Connector port="8000" protocol="HTTP/1.1" if you want to change it.
- There are other ports referenced in the server.xml file as well. If the logs contain a port in use error, you can find the open ports on your machine and then search this file for ports that you find are in use and change them.
Step 6. (Optional) Modify Tomcat Environment script (setenv.sh or setenv.bat) for FlexDeploy server side directories.
If you are setting up FlexDeploy for Trial purposes, it is good idea to leave directories as default, but
if you are setting up FlexDeploy for production use, then we recommend to modify to use directory structure outside of FlexDeploy installation.
File - <FlexDeploy Home>/apache-tomcat-flexdeploy/bin/setenv.sh (setenv.bat on windows)
- Configure -Dflexagon.fd.install.root with directory to use as the FlexDeploy working directory (See Create Folders for FlexDeploy Server - FlexDeploy Working Directory)
- Configure -Dflexagon.fd.repository.root with the directory to host the FlexDeploy artifact repository (See Create Folders for FlexDeploy Server - FlexDeploy Artifact Repository)
Below are default artifact and working directories created under FlexDeploy Home when you extracted zip file. If you want to use different directories then modify setenv.sh or setenv.bat file, otherwise skip this step.
Default setenv.sh is shown below.
Here is example of setenv.sh which is modified to use non-default folders.
Step 7. (Optional) Modify Tomcat Environment script (setenv.sh or setenv.bat) for JAVA_HOME.
File - <FlexDeploy Home>/apache-tomcat-flexdeploy/bin/setenv.sh (setenv.bat on windows)
If JAVA_HOME is already set in your environment, you can skip this step.
Unix Example - export JAVA_HOME=/u01/java/jdk1.8.0_121
Windows Example - set JAVA_HOME=c:/installs/Java/jdk1.8.0_121
If you were also setting JAVA_HOME, this file would look like this.
Step 8. (Only if using Oracle Database) ADF Essentials comes with the JDBC driver for Oracle 11g database (ojdbc6dms.jar). If you are using Oracle 12c database, you can download the driver (ojdbc7.jar) from the Oracle Technology Network site at Oracle 12c drivers. Delete ojdbc6dms.jar from <FlexDeploy Home>/apache-tomcat-flexdeploy/lib and place ojdbc7.jar in that same folder.
If using different Oracle driver
If you use different Oracle JDBC driver (ojdbc7.jar, ojdbc8.jar etc.), then remove ojdbc6dms.jar from lib folder. If you leave multiple Oracle JDBC drivers in the lib folder, you could encounter the following exception on startup:
java.lang.SecurityException: sealing violation: package oracle.jdbc is sealed
at java.net.URLClassLoader.getAndVerifyPackage(Unknown Source)
at java.net.URLClassLoader.definePackageInternal(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
If you want to implement UCP for Oracle Database connections then see Implementing UCP connections with Tomcat and Oracle.
Step 9. (Linux only) - set the shell scripts executable with this command.
chmod +x <FlexDeploy Home>/apache-tomcat-flexdeploy/bin/*.sh chmod +x <FlexDeploy Home>/*.sh
Step 10. Skip this step if you did not modify setenv.sh or setenv.bat to use non-default server side directories in Step 6.
If you are using non-default server side directories, then move all the jar files from <FlexDeploy Home>/application/plugins to FLEXDEPLOY_WORKING_DIR/plugins. At startup, FlexDeploy will load all the plugins.
Step 11. (Optional) Only if running FlexDeploy on a MySQL database.
- Due to licensing restrictions, the mysql jdbc driver is not included in the FlexDeploy zip file. Please download it from
- https://dev.mysql.com/downloads/connector/j/
- Download a version 8.0 jar.
- Place it in <FlexDeploy Home>/apache-tomcat-flexdeploy/lib folder.
Step 12. Start tomcat by running the following script.
File - <FlexDeploy Home>/StartFlexDeploy.sh(you can also use startup.sh or startup.bat scripts)
Note for Oracle XE Database
After starting your server, check the <FlexDeploy Home>/apache-tomcat-flexdeploy/logs/flexdeploy.0.log file for the following error message:
- ORA-12519, TNS:no appropriate service handler found
If present, increase the number of processes for the database
- Using SQLPlus update processes setting.
- alter system set processes=200 scope=spfile;
- Stop Tomcat
- Restart the XE Database
- Start Tomcat
Step 13. Launch FlexDeploy in your browser.
- http://hostname:8000/flexdeploy
- Update hostname in URL to indicate host where FlexDeploy is installed.
- Update port if you had modified server.xml for different port number.
- You will need to complete Initial Registration process, where you will create admin user for login.
Step 14. Go to Administration - Plugins on FlexDeploy. Verify that Plugins are loaded. You should not see any files remaining in FLEXDEPLOY_WORKING_DIR/plugins folder after few minutes.
Step 15. Now that you have installed FlexDeploy, let's get start with configuration. You can do this in matter of minutes by using Blueprints concept, which is very simple configuration wizard for most common usecases.
- style