This page provides instructions for upgrading a FlexDeploy installation from version 5.3.0.5 or lower to 5.4. This instructions will upgrade Tomcat from version 8.5.11 to 9.0.34.
Make sure you have downloaded new version of FlexDeploy and unzipped it, so it can be accessed during upgrade process.
Upgrade Instructions
Step 1. Stop the Tomcat server. Use shutdown.sh on Linux and shutdown.bat on Windows.
Step 2. Backup the FlexDeploy schemas and Artifact Repository. In case you need to back out FlexDeploy, you can use these backup data.
For back-out purposes, it is highly recommended that a database backup of the database be taken using standard tools like RMAN for Oracle. Another option would be to export the FD, FD_ADMIN, and FF schemas using data pump. The schemas can be exported using the following data pump command for Oracle as shown below. Follow standard procedures for PostgreSQL and MySQL for database backup.
Tip |
---|
title | Recommendation for Oracle database backup |
---|
|
You will need to setup environment variables before running expdp. For example,
export ORACLE_HOME=/u01/app/oracle/product/
12.1 . 0 /dbhome_1
export ORACLE_SID=fd01
export statements above are for example only as values will be different for your installation.
expdp system directory=DATA_PUMP_DIR dumpfile=fd_bkup.dmp schemas=FD,FF,FD_ADMIN
If this database is exclusively used for just FlexDeploy application, you can rely on Database backup and recovery processes (RMAN) instead of export data procedure. |
It is recommended that a backup of the artifact repository file system be taken in case a back-out is required. The location of the artifact repository can be identified by looking at value of -Dflexagon.fd.repository.root in setenv.sh or setenv.bat file. This file will be in <FlexDeploy Home>/apache-tomcat-flexdeploy/bin/. Standard file backup procedures can be followed. Optionally, the following command (unix only) can be used to create a tar file backup of the entire directory.
Tip |
---|
title | Backup Artifact Repository |
---|
|
cd <artifact repository location> tar –cvzf artifact.tar.gz <artifact repository location> |
Step 3. Upgrade the FlexDeploy schemas
Include Page |
---|
| FlexDeploy Schema Upgrade |
---|
| FlexDeploy Schema Upgrade |
---|
|
Step 4. Take a backup of the entire apache-tomcat-flexdeploy folder. It will be required since the old configuration files will need to be referenced. See example below for Linux.
Code Block |
---|
|
# Assuming FLEXDEPLOY_HOME environment variable is set, it should be parent folder of apache-tomcat-flexdeploy
cd $FLEXDEPLOY_HOME
mv apache-tomcat-flexdeploy/ apache-tomcat-flexdeploy-53/ |
Step 5. Copy apache-tomcat-flexdeploy folder from distribution zip.
Code Block |
---|
language | bash |
---|
theme | RDark |
---|
title | Linux Example |
---|
|
cd $FLEXDEPLOY_HOME
mkdir apache-tomcat-flexdeploy
# assuming download zip has been unzipped in UNZIPPED_FLEXDEPLOY folder.
cd $UNZIPPED_FLEXDEPLOY/apache-tomcat-flexdeploy
cp -R * $FLEXDEPLOY_HOME/apache-tomcat-flexdeploy/
cd $FLEXDEPLOY_HOME/apache-tomcat-flexdeploy/
chmod +x ./bin/*.sh |
Step 6. Copy the context.xml file from the backup folder (step 4) into <FlexDeploy Home>/apache-tomcat-flexdeploy/conf
Code Block |
---|
language | bash |
---|
theme | RDark |
---|
title | Linux Example |
---|
|
cd $FLEXDEPLOY_HOME/apache-tomcat-flexdeploy-53/conf/
cp context.xml ../../apache-tomcat-flexdeploy/conf/ |
If using Oracle database, it is recommended to use UCP connection pool (see details below), otherwise go to Step 7.
- Download the latest Oracle JDBC driver from https://www.oracle.com/database/technologies/appdev/jdbc-ucp-19c-downloads.html. For example, ojdbc8-full.tar.gz.
- Remove ojdbc jar files like ojdbc*.jar or ojdbc*dms.jar from <FlexDeploy Home>/apache-tomcat-flexdeploy/lib.
- Copy ojdbc8.jar, ons.jar anducp.jar from downloaded jdbc driver to <FlexDeploy Home>/apache-tomcat-flexdeploy/lib.
- Update <FlexDeploy Home>/apache-tomcat-flexdeploy/conf/context.xml as shown below.
Code Block |
---|
language | xml |
---|
theme | RDark |
---|
title | 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"
url="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=**HOSTNAME**)(PORT=**PORT**)))(CONNECT_DATA=(SERVICE_NAME=**SERVICE_NAME**)))"
user="fd_admin"
password="**FD_ADMIN_PASSWORD**"
fastConnectionFailoverEnabled="true"
validationQuery="select 1 from dual"
testOnBorrow="true"
useLocalSessionState="true"
defaultAutoCommit="false"/> |
- URL must be in the format listed in the example, the JDBC short format of host:sid:port should not be used.
- 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.
- 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.
Code Block |
---|
theme | RDark |
---|
title | Sample RAC URL |
---|
|
url="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)))" |
Step 7. Edit the server.xml and modify the HTTP/HTTPS ports to match that of the original file which was backed up in step 4. This file is located in the<FlexDeploy Home>/apache-tomcat-flexdeploy/conf folder. DO NOT simply copy over the backup file as there are other changes which must be preserved.
Step 8. Copy setenv.sh and setenv.bat from the backup folder (step 4) into<FlexDeploy Home>/apache-tomcat-flexdeploy/bin
Code Block |
---|
language | bash |
---|
theme | RDark |
---|
title | Linux Example |
---|
|
cd $FLEXDEPLOY_HOME/apache-tomcat-flexdeploy/bin
cp ../../apache-tomcat-flexdeploy-53/bin/setenv* .
chmod 775 setenv* |
Step 9. Copy plugins from download zip for auto upload.
Include Page |
---|
| Copy Plugins for Auto Upload - Migration Guide |
---|
| Copy Plugins for Auto Upload - Migration Guide |
---|
|
Step 10 . Start tomcat by running the following script
<FlexDeploy Home>/apache-tomcat-flexdeploy/bin/startup.sh (startup.bat on Windows)
Step 11. Launch FlexDeploy in your browser - http://<hostname>:<port>/flexdeploy
Step 12. There is no need to activate plugins manually. FlexDeploy will automatically upload and activate new versions of plugins once they are copied to plugins folder. You will notice that plugins that you copied in Step 8 will eventually be uploaded automatically and folder will not have any jar files left. You can also look at Administration - Plugins in UI and see newer versions of plugins.