This page provides instructions for upgrading a FlexDeploy installation. These instructions upgrade Tomcat to the version included in the distribution zip depending on current version of FlexDeploy.
Warning |
---|
Unless you are running on Windows or have been advised by Flexagon Support, consider using the Automated Install/Upgrade instead. |
Requirements
See FlexDeploy System Requirements for details on software and hardware requirements.
Upgrade Instructions
Info |
---|
Make sure you have downloaded the latest version of FlexDeploy so it can be accessed during upgrade process. |
Table of Contents | ||||
---|---|---|---|---|
|
Step 1. Stop the Tomcat server
Linux
Code Block | ||
---|---|---|
| ||
cd $FLEXDEPLOY_HOME/apache-tomcat-flexdeploy/bin ./StopFlexDeploy.sh |
...
Code Block | ||
---|---|---|
| ||
cd %FLEXDEPLOY_HOME%/apache-tomcat-flexdeploy/bin StopFlexDeploy.bat |
...
Step 2. Download FlexDeploy software
Make sure that you have downloaded the latest version of FlexDeploy and unzip it into a temporary location (for example, /u01/software), so it can be accessed during the upgrade process. You can get download links from http://support.flexagon.com. Do not unzip the FlexDeploy distribution directly into the FLEXDEPLOY_HOME directory so we can prevent unwanted file(s) or folder(s) from being overwritten.
Linux
Code Block | ||
---|---|---|
| ||
mkdir /u01/software/downloaded cd /u01/software/downloaded unzip <download location path>/Tomcat_Complete-6.x.x.x.zip |
...
Code Block | ||
---|---|---|
| ||
mkdir c:\u01\software\downloaded cd c:\u01\software\downloaded unzip <download location path>\Tomcat_Complete-6.x.x.x.zip |
...
Step 3. Backup current implementation
Excerpt | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
Backup the FlexDeploy schemas, Artifact Repository, plugins folder, and apache-tomcat-flexdeploy folder. In case you need to back out this FlexDeploy upgrade, you can use this backup data. It is highly recommended that a 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. Follow standard procedures for PostgreSQL for database backup. PostgreSQL database backup
Oracle database backup
|
File System backup
It is recommended that a backup of the artifact repository, plugins, and apache-tomcat-flexdeploy 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 setenvoverride.sh/setenv.sh file. This file will be in <FLEXDEPLOY_HOME>/apache-tomcat-flexdeploy/bin. Additionally look for flexagon.fd.application.root to determine server application directory for plugins backup. Standard file backup procedures can be followed.
See the following example. Make sure to backup apache-tomcat-flexdeploy folder as that is going to be replaced during next steps.
Linux
Code Block | ||
---|---|---|
| ||
cd <artifact repository location>/ tar -cvzf ../artifacts.tar.gz * # The plugins folder may not exist yet depending which version of FlexDeploy you are upgrading from cd <server application directory> cd plugins tar -cvzf ../plugins.tar.gz * # apache-tomcat-flexdeploy (if apache-tomcat-flexdeploy-old exists then use some other folder name) cd $FLEXDEPLOY_HOME mv apache-tomcat-flexdeploy apache-tomcat-flexdeploy-old |
...
Code Block | ||
---|---|---|
| ||
cd <artifact repository location> tar cvzf ..\artifacts.tar.gz * # The plugins folder may not exist yet depending which version of FlexDeploy you are upgrading from cd <server application directory> cd plugins tar -cvzf ..\plugins.tar.gz * # apache-tomcat-flexdeploy (if apache-tomcat-flexdeploy-old exists then use some other folder name) cd %FLEXDEPLOY_HOME% move apache-tomcat-flexdeploy apache-tomcat-flexdeploy-old |
...
Step 4. Upgrade the FlexDeploy schemas
See details in Upgrading FlexDeploy Schemas.
...
Step 5. Apply new version
You must have performed backup of apache-tomcat-flexdeploy folder by now as described in Step 3. If you have not done that, please go back to Step 3 for details.
Note on additional extension jar files : If you had placed additional libraries in apache-tomcat-flexdeploy/lib
folder or in the apache-tomcat-flexdeploy/libext
folder, then you will need to copy them from backup folder into the new apache-tomcat-flexdeploy/libext
folder. Note that all extension jars should be kept in libext folder. Examples might be JDBC driver (for Oracle drivers there is additional detail in the following step), CyberArk libraries etc.
...
Code Block | ||
---|---|---|
| ||
cd %FLEXDEPLOY_HOME% copy c:\u01\software\downloaded\*.bat . mkdir apache-tomcat-flexdeploy cd apache-tomcat-flexdeploy xcopy c:/u01/software/downloaded/apache-tomcat-flexdeploy /e # restore the libext from the tomcat backup done in Step 3 cd libext xcopy %FLEXDEPLOY_HOME%\apache-tomcat-flexdeploy-old\libext /e |
Step 6. Manage Tomcat context.xml
Copy the context.xml file from the backup folder into <FLEXDEPLOY_HOME>/apache-tomcat-flexdeploy/conf.
...
Code Block |
---|
cd c:\u01\software mkdir drivers cd drivers tar xf <ojdbc8 download location>\ojdbc8-full.tar.gz cd %FLEXDEPLOY_HOME%\apache-tomcat-flexdeploy\lib del /f ojdbc*.jar cd ..\libext copy c:\u01\software\drivers\ojdbc8-full\*.jar . |
...
Step 7. Manage Tomcat server.xml
Edit the <FLEXDEPLOY_HOME>/apache-tomcat-flexdeploy/conf/server.xml
and modify the HTTP/HTTPS ports to match that of the original file which was backed up in step 3. If you had setup keystore details, copy that as well from backup file. DO NOT simply copy over the backup file as there may be other changes.
...
Step 8. Manage setenvoverride file
Info |
---|
Changes should not be made in setenv.bat or setenv.sh |
...
If your backed up setenv.bat or setenv.sh file has a line that contains JAVA_HOME, then the new setenvoverride.bat or setenvoverride.sh should look like this:
Linux
...
Windows
...
Step 9. Update Plugins
FlexDeploy download zip contains plugin jar files. You just need to copy plugin jars from download zip to plugins folder in your installation (details explained below), and all plugins will be automatically uploaded and activated on server startup.
Plugin files to copy are in /u01/software/downloaded/application/plugins in the unzipped Tomcat Complete file.
Let's determine where to copy files in your installation now. Locate flexagon.fd.install.root folder for your FlexDeploy installation, which is FlexDeploy application directory. This is specified on the Java command line. For example, -Dflexagon.fd.install.root=/u01/flexdeploy/application.
You can look for this information in setenvoverride.bat or setenvoverride.sh file depending whether using Windows or Unix.
Create plugins folder if it does not exist under flexagon.fd.install.root folder. Copy files from download zip (#1 above) to this plugins folder.
...
Step 10. Configure Influx Database
Info |
---|
This is a required step that must be executed if this is the first time you are upgrading to a FlexDeploy 6.0 or higher version. Once upgraded, this step shouldn’t be executed again. |
...
Adjust the influx database configuration file. <FLEXDEPLOY_HOME>/influxdb/config/config.yaml
Linux
Code Block | ||
---|---|---|
| ||
cd $FLEXDEPLOY_HOME mkdir -p application/vsm cd influxdb/config vi config.yaml |
...
Change the following locations: You must put absolute path as no environment variables are allowed in this file.
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.sqlit
...
Code Block | ||
---|---|---|
| ||
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 --rem force rem need to adjust the influx database retention policy 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 rem 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 |
...
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.
Code Block |
---|
INFLUXDB_URL=http://localhost:8086
INFLUXDB_BUCKET=flexbucket
INFLUXDB_ORG=flexdeploy |
Step 11. Verify Ulimit and adjust if needed (Linux only)
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, raise it or your influxdb log will likely grow very quickly and potentially run you out of disk space.
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
Step 12. Start tomcat
Info |
---|
If running FlexDeploy 6.0 or higher, do not use startup.sh as this will not start the influx database. User StartFlexDeploy.sh or StartFlexDeploy.bat. |
...