Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The FlexDeploy distribution contains the following components:

  • A tomcat 9 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

Unless you are running on Windows or have been advised by Flexagon Support, consider using the Automated Linux installer instead.

Requirements 

See FlexDeploy System Requirements for details on software and hardware requirements

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_281 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. Prepare software

FlexDeploy can be downloaded from the Flexagon Support Site. You will download specific version of FlexDeploy, download file is named Tomcat_Complete-X.X.X.X.zip, where X.X.X.X represents four digit version number.

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.

cd /u01
mkdir -p flexdeploy
cd flexdeploy
unzip <location of distribution zip>/Tomcat_Complete-X.X.X.X.zip

Here is how it will look like after unzip.


Step 3. Setup database and schemas

Setup the appropriate database, if you not already done so.

Manual Installation Instructions - Database Tier - Oracle

Manual Installation Instructions - Database Tier - PostgreSQL


Step 4. Update Tomcat context.xml

Modify Tomcat configuration file (context.xml) for database connectivity depending on your database type.

  • Replace the contents of context.xml with the contents the context-<type>.xml if using PostgreSQL.

  • Replace URL and Password with the actual values.

File - <FLEXDEPLOY_HOME>/apache-tomcat-flexdeploy/conf/context.xml

Example JDBC URL (CONNECT_STRING)

  • Oracle

    • The JDBC short format of host:sid:port should not be used. URL must be in the format listed below as we are requiring use of UCP based connection pooling.

      • Example - jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=**HOSTNAME**)(PORT=**PORT**)))(CONNECT_DATA=(SERVICE_NAME=**SERVICE_NAME**)))

      • If RAC is used for the database, multiple nodes can be listed in the address list of the URL or it can point to the scan listener for the cluster. See below sample URL for a RAC implementation that has a primary and secondary scan listener connecting to to a service name GOLD-CLOUD. This includes connection timeout, retry, and retry delay settings.

      • Example - jdbc:oracle:thin:@(DESCRIPTION = CONNECT_TIMEOUT=120) (RETRY_COUNT=20) (RETRY_DELAY=3) (TRANSPORT_CONNECT_TIMEOUT=3) (ADDRESS_LIST =(LOAD_BALANCE=on) (ADDRESS = (PROTOCOL = TCP) (HOST=primary-scan) (PORT=1521))) (ADDRESS_LIST =(LOAD_BALANCE=on) (ADDRESS = (PROTOCOL = TCP) (HOST=secondary-scan) (PORT=1521))) (CONNECT_DATA=(SERVICE_NAME = gold-cloud)))

  • PostgreSQL

Follow the instructions provided here to connect to Oracle Autonomous databases.

Oracle

<Resource name="jdbc/flexdbDS" auth="Container"
    type="oracle.ucp.jdbc.PoolDataSource"
    factory="oracle.ucp.jdbc.PoolDataSourceImpl"
 
    connectionFactoryClassName="oracle.jdbc.pool.OracleDataSource"
    minPoolSize="0"
    maxPoolSize="100"
    initialPoolSize="0"
    autoCommit="false"
    inactiveConnectionTimeout="300"
 
    url="**CONNECT_STRING**"
    user="fd_admin"
    password="**FD_ADMIN_PASSWORD**"
 
    fastConnectionFailoverEnabled="true"
 
    validationQuery="select 1 from dual"
    testOnBorrow="true"
 
    useLocalSessionState="true"
    defaultAutoCommit="false"/>

PostgreSQL

<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"/>

Step 5. (Optional) Update Tomcat server.xml

Modify Tomcat server.xml if necessary. If you want to use different port or setup https, the you would need to update server.xml.

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) Update setenvoverride

Modify Tomcat Environment script (setenvoverride.sh or setenvoverride.bat) for FlexDeploy server side directories, memory specifications or JAVA_HOME.

File - <FLEXDEPLOY_HOME>/apache-tomcat-flexdeploy/bin/setenvoverride.sh (setenvoverride.bat on windows). Main reason to modify this file is to configure specific JAVA_HOME. Other variables can be left as is for default configurations.

  • Configure variable JAVA_HOME to use specific version of Java for FlexDeploy tomcat process.

Following other variables are recommended to be left unchanged from default.

  • Configure variable FD_APPLICATION_DIRECTORY with directory to use as the FlexDeploy application directory (See System Requirements for more information about how much space is needed.)

  • Configure variable FD_REPOSITORY_DIRECTORY with the directory to host the FlexDeploy artifact repository (See System Requirements for more information about how much space is needed.)

Below are default artifact and working directories created under FLEXDEPLOY_HOME when you extracted zip file.

Default setenvoverride.sh is shown below.


Modify Tomcat Environment script (setenvoverride.sh or setenvoverride.bat) for JAVA_HOME.

File - <FLEXDEPLOY_HOME>/apache-tomcat-flexdeploy/bin/setenvoverride.sh (setenvoverride.bat on windows)

If JAVA_HOME is already set in your environment, you can skip this step.

Unix Example - JAVA_HOME=/u01/java/jdk1.8.0_382

Windows Example - set JAVA_HOME=c:/installs/Java/jdk1.8.0_382

 If you were also setting JAVA_HOME, this file would look like this.


Step 7. Update database driver (Only if using Oracle Database)

Be sure to download the JDBC driver matching your Oracle Database version and one which is compiled and compatible with JDK8.  If you download the driver which is compiled with a newer JDK you will get errors on server startup similar to the following:

Caused by: java.lang.UnsupportedClassVersionError: oracle/jdbc/OracleClob has been compiled by a more recent version of the Java Runtime 
       (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
  • Clean up old ojdbc jars from <FLEXDEPLOY_HOME>\apache-tomcat-flexdeploy\lib.

  • Save new driver jars from downloaded jdbc driver to <FLEXDEPLOY_HOME>\apache-tomcat-flexdeploy\libext. You may have done this already as part of Step 4. Make sure that if you copied the jars for libext of your backup to your new libext, you don’t end up with multiple versions of the Oracle JDBC jars. If migrating from an old version of FlexDeploy, you may want to clean your libext folder and start with a new Oracle Database driver download.

  • UCP is now required for Oracle Database connections.

Linux

unzip <ojdbc8 download locaton>/ojdbc8-full.zip

cd $FLEXDEPLOY_HOME/apache-tomcat-flexdeploy/lib
rm ojdbc*.jar
cd ..
mkdir -p libext
cd libext
cp <jdbc driver extract location>/ojdbc-full/*.jar .

Windows

unzip <ojdbc8 download locaton>\ojdbc8-full.zip

cd %FLEXDEPLOY_HOME%\apache-tomcat-flexdeploy\lib
del /f ojdbc*.jar
cd ..
mkdir libext
cd ..\libext
copy <jdbc driver extract location>\ojdbc-full\*.jar .

Please put any extra libraries required inside of <FLEXDEPLOY_HOME>/apache-tomcat-flexdeploy/libext not <FLEXDEPLOY_HOME>/apache-tomcat-flexdeploy/lib. You may need to create this directory.


Step 8. Set execute permission (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 9. Adjust for non-default server side directories

Skip this step if you did not modify setenvoverride for FD_APPLICATION_DIRECTORY in Step 6.

If you are using non-default server side directories, then move all the jar files from <FLEXDEPLOY_HOME>/application/plugins to FD_APPLICATION_DIRECTORY/plugins. At startup, FlexDeploy will load all the plugins.


Step 10. Configure Influx database

This is a required step that must be executed.

Download links for the influx database software and client, if not already downloaded.

Influx database software (Linux) - Influx database software (Windows)

Influx database client (Linux) - Influx database client (Windows)

Untar the influx database software and client to the desired location.

tar xf <tar file directory>/influxdb2-2.2.0-linux-amd64.tar.gz  --strip-components 1 -C $FLEXDEPLOY_HOME/influxdb
tar xf <tar file directory>/influxdb2-client-2.2.1-linux-amd64.tar.gz  --strip-components 1 -C $FLEXDEPLOY_HOME/influxdb

Adjust the influx database configuration file. <FLEXDEPLOY_HOME>/influxdb/config/config.yaml

Linux

cd $FLEXDEPLOY_HOME
mkdir -p application/vsm
cd influxdb/config
vi config.yaml

Check your open file limits. Influx opens a large number of files to complete its work.

ulimit -Hn

will show the open file limit for the current user. Make sure you run it as the user who will be executing FlexDeploy and Influx.

If it is less that 65536, we recommend raising it.

sudo vi /etc/security/limits.conf

where oracle is the user logged into the box to run FlexDeploy:

oracle soft nofile 16384

oracle hard nofile 65536

Windows

cd %FLEXDEPLOY_HOME%
mkdir application\vsm
cd influxdb\config
edit config.yaml

Change the following locations: You must put absolute path as no environment variables are allowed in this file.

Linux

  • bolt-path: from <FLEXDEPLOY_HOME>/influxdb/data/influxd.bolt to <FLEXDEPLOY_HOME>/application/vsm/data/influxd.bolt

  • engine-path: from <FLEXDEPLOY_HOME>/influxdb/data/engine to <FLEXDEPLOY_HOME>/application/vsm/data/engine

  • sqlite-path: <FLEXDEPLOY_HOME>/influxdb/data/influxd.sqlite to <FLEXDEPLOY_HOME>/application/vsm/data/influxd.sqlite

Windows

  • bolt-path: from <FLEXDEPLOY_HOME>\influxdb\data\influxd.bolt to <FLEXDEPLOY_HOME>\application\vsm\data\influxd.bolt

  • engine-path: from <FLEXDEPLOY_HOME>\influxdb\data\engine to <FLEXDEPLOY_HOME>\application\vsm\data\engine

  • sqlite-path: <FLEXDEPLOY_HOME>\influxdb\data\influxd.sqlite to <FLEXDEPLOY_HOME>\application\vsm\data\influxd.sqlite

Setup the config file for FlexDeploy to connect to influxdb.

Create the file <FLEXDEPLOY_HOME>/influxdb/config/fdinflux.config with the following contents, modifed appropriately for your install.

INFLUXDB_URL=http://localhost:8086
INFLUXDB_BUCKET=flexbucket
INFLUXDB_ORG=flexdeploy

Step 11. Start tomcat

If running FlexDeploy 6.0 or higher, do not use startup.sh as this will not start the influx database.

Linux

cd $FLEXDEPLOY_HOME
# this will be automatically updated within a FlexDeploy credential (FD_INFLUXDB_ADMIN_TOKEN) on startup so FlexDeploy can connect with the influx database. 
# This will be used in the next setup step.
export INFLUX_DB_TOKEN=<arbitrary value>  
echo ${INFLUX_DB_TOKEN} > application/vsm/.token
./StartFlexDeploy.sh

Windows

cd %FLEXDEPLOY_HOME%
# this will be automatically updated within a FlexDeploy credential (FD_INFLUXDB_ADMIN_TOKEN) on startup so FlexDeploy can connect with the influx database.  
# This will be used in the next setup step.
set INFLUX_DB_TOKEN=<arbitrary value>  
echo %INFLUX_DB_TOKEN% > application\vsm\.token
StartFlexDeploy.bat

Once influx and tomcat servers are up, we need to run setup on the influx database.

Linux

cd $FLEXDEPLOY_HOME/influxdb
INFLUX_DB_PASSWORD=<arbitrary value>
rm -rf ~/.influxdbv2
./influx setup --bucket flexbucket --token ${INFLUX_DB_TOKEN} --org flexdeploy --username=flexuser --password=${INFLUX_DB_PASSWORD} --host=http://localhost:8086 --force

./influx bucket list
ID                      Name            Retention       Shard group duration    Organization ID Schema Type
8eec65b90f79c55e        _monitoring     168h0m0s        24h0m0s                 9050d0dddc192df9implicit
4d6413cbaad04850        _tasks          72h0m0s         24h0m0s                 9050d0dddc192df9implicit
a3521682726cd901        flexbucket      infinite        168h0m0s                9050d0dddc192df9implicit

# take the ID value for the flexbucket (Name) so we can update the retention policy to 104 weeks or 2 years
./influx bucket update --id a3521682726cd901 --retention 104w

Windows

cd %FLEXDEPLOY_HOME%\influxdb
set INFLUX_DB_PASSWORD=<arbitrary value>
rmdir /s <user directory>\.influxdbv2
influx setup --bucket flexbucket --token %INFLUX_DB_TOKEN% --org flexdeploy --username=flexuser --password=%INFLUX_DB_PASSWORD% --host=http://localhost:8086 --force

influx bucket list
ID                      Name            Retention       Shard group duration    Organization ID Schema Type
8eec65b90f79c55e        _monitoring     168h0m0s        24h0m0s                 9050d0dddc192df9implicit
4d6413cbaad04850        _tasks          72h0m0s         24h0m0s                 9050d0dddc192df9implicit
a3521682726cd901        flexbucket      infinite        168h0m0s                9050d0dddc192df9implicit

# take the ID value for the flexbucket (Name) so we can update the retention policy to 104 weeks or 2 years
influx bucket update --id a3521682726cd901 --retention 104w

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 12. 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 13. Verification

Go to Administration - Plugins on FlexDeploy. Verify that Plugins are loaded. You should not see any files remaining in FD_APPLICATION_DIRECTORY/plugins folder after a few minutes.


Step 14. FlexDeploy configuration

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 use cases.

Related Topics

  • No labels