Request A Demo
Back to All Blog Articles

Simplified FlexDeploy Installation and Upgrades

Who wants a software installation or upgrade to be difficult and time consuming? Not me. With the release of FlexDeploy 6.0, a new flexdeployinstaller process has been developed that automates the entire process, including:

  • the initial install
  • upgrades from most versions
  • database schema creation and upgrade
  • the coordination of tasks across multiple teams

With the new, simplified process you can save time and speed adoption and time to value. Let’s review what this looks like.

Configuration Driven

The flexdeployinstaller utilizes a configuration file (flexdeploy_config.txt) containing properties that are set once and then utilized for each install or upgrade. The configuration file contains properties for installation directory, java home, username and passwords.  Many of the properties are defaulted but can be modified, if desired.

Preparation

Let’s get started and assume that all the required software is downloaded to the VM where FlexDeploy will be installed. For this blog, I have downloaded the following:

  • flexdeployinstaller.zip
  • FlexDeploy (Tomcat) 6.0 distribution
  • Influxdb2-2.2.0-linuz-amd64.tar.gz (influx database software)
  • Influxdb2-client-2.2.1-linux-amd64.tar.gz (influx database client software)

Note: If the VM has access to the internet, all zip files with the exception of the flexdeployinstaller can be automatically downloaded by the flexdeployinstaller.

Select a directory to unzip the flexdeployinstaller and make sure that it isn’t the same directory that FlexDeploy/Tomcat will be installed.  I will create the installer in /u01 and FlexDeploy/Tomcat will be installed in /u01/flexdeploy for this blog.

cd /u01

unzip <directory to the flexdeployinstaller.zip>/flexdeployinstaller.zip

This will create /u01/flexdeployinstaller_1.0.0.

At this point, we have downloaded files that need to be moved to the appropriate directory for the installer since these were manually downloaded.

cd /u01/flexdeployinstaller_1.0.0/downloads

cp <directory to the FlexDeploy distribution zip>/Tomcat_Complete-6.0.0.0.zip software

cp <directory to the Influx database zips>/Influxdb2*.gz influxdb

There is a template configuration file (flexdeployinstaller_config.txt) located in this directory and a copy must be made of this file to any location outside of this directory.  If it remains here, any flexdeployinstaller updates will overwrite the contents.  I will save it to my flexdeploy installation folder.

cd /u01/flexdeployinstaller_1.0.0

cp flexdeployinstaller_config.txt /u01/dan/flexdeploy

Now the copied configuration file can be modified.  I have indicated the properties that were changed, all other properties will use the defaulted values.

FLEXDEPLOY_HOME=/u01/dan/flexdeploy

FLEXDEPLOY_JAVA_HOME=/u01/java/jdk1.8.0_331

SCM_TYPE=Git

FLEXDEPLOY_DB_PASSWORD=xxxxxxxx (this would be clear text so not showing my password, can leave blank and you will be prompted)

SYSTEM_DB_PASSWORD=xxxxxxxx (this would be clear text so not showing my password, can leave blank and you will be prompted)

INFLUX_DB_TOKEN=xxxxxxxx (select an arbitrary value, this will be updated in FlexDeploy to allow communication to Influx database)

DATABASE_URL="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=hostName)(PORT=hostPort)))(CONNECT_DATA=(SERVICE_NAME=hostServiceName)))"

Now that we have updated the configuration file, we can continue with the prerequisite step.

Prerequisite checking

The flexdeployinstaller has a prerequisite mode that will verify the properties defined in the configuration file and VM settings to make sure any issues are resolved prior to executing the install or upgrade.  This step will ensure successful execution and can be run multiple times until any issues are resolved.  The prerequisite checks will validate:

  • internet access and whether the installer can automatically download the necessary software
  • that the correct software downloads are available
  • that the correct java version is available
  • that the file system sizes match system minimums
  • the database connection
  • other system requirements

Time to run the prerequisites.

cd /u01/flexdeployinstaller_1.0.0

chmod +x *.sh

./flexdeployinstallater -npc /u01/dan/flexdeploy/flexdeployinstaller_config.txt

# flexdeployinstaller arguments
#   -n indicates not to automatically download if internet access is available and just use the file that are already downloaded
#   -p run the installer in the prerequisite mode
#   -c path to the saved flexdeployinstaller_config.txt file

If there are any issues, each issue will be displayed along with a resolution to the given issue.  The prerequisite check must be re-run until there are no issues.

09/28/2022 08:50:15 AM Initializing the start of the prerequisite validation

....

Check the installation logs at /u01/dan/flexdeploy/upgrade/logs/log.txt for error.

Error occurred

############################### ISSUE 106 ##########################################################

ISSUE: The FLEXDEPLOY_JAVA_HOME configuration property is set to a version 1.7 that doesn't match the requirements

of the minimum Java version of 1.8 or maximum Java version of 1.8.

RESOLUTION:  Please install a version of Java greater than or equal to 1.8 and less than or equal to 1.8 and modify

the saved flexdeployinstaller_config.txt property.

####################################################################################################

If everything is good, the following message will appear on the screen.

Prerequisites have been successfully checked, continue installation without the -p option

Install/Upgrade

The flexdeployinstaller manages the initial install of FlexDeploy or the upgrading of an existing installation to a newer version.  The flexdeployinstaller process will manage the following:

  • setting up the software (this time overriding the version to install an older FlexDeploy, version 5.7.0.3)
  • installing or migrating the required database schemas
  • starting the FlexDeploy servers

A sample install would look like the following:

09/28/2022 08:56:25 AM Initializing the start of the installation
09/28/2022 08:56:26 AM Removing current unpacked FlexDeploy software
09/28/2022 08:56:26 AM Unpackaging FlexDeploy software to /u02/dan/flexdeployinstaller_1.0.0/temp/software
09/28/2022 08:57:00 AM Stopping FlexDeploy server
09/28/2022 08:57:00 AM Preparing the new oracle database driver

.....

09/28/2022 08:58:49 AM Updating script permissions
09/28/2022 08:58:49 AM Completed the installation
09/28/2022 08:58:49 AM Starting FlexDeploy server, may take a few minutes
09/28/2022 09:01:50 AM FlexDeploy server running

URL for FlexDeploy: http://<your host name>:8000/flexdeploy

Now that FlexDeploy 5.7.0.3 has been installed, we will upgrade to FlexDeploy 6.0.0.0.  The flexdeployinstaller will detect an existing installation (FlexDeploy 5.7.0.3 installed above).  The flexdeployinstaller will manage the execution as an upgrade.  The upgrade process  will manage

  • stopping the existing server
  • backing up the current software
  • backing up the database schemas
  • setting up the new software
  • restoring several user controlled files from backup
  • migrating the database schemas
  • starting influxDB and FlexDeploy server

A sample upgrade would look like the following:

09/28/2022 09:12:07 AM Initializing the start of the upgrade
09/28/2022 09:12:08 AM Removing current unpacked FlexDeploy software
09/28/2022 09:12:08 AM Unpackaging FlexDeploy software to /u02/dan/flexdeployinstaller_1.0.0/temp/software
09/28/2022 09:12:58 AM Stopping FlexDeploy server
09/28/2022 09:13:20 AM FlexDeploy server stopped
09/28/2022 09:13:20 AM Backing up Tomcat installation from /u01/dan/flexdeploy/apache-tomcat-flexdeploy to /u01/dan/flexdeploy/upgrade/upgrade_backups/09282022/tomcat
09/28/2022 09:13:43 AM Backing up the artifacts directory from /u01/dan/flexdeploy/artifacts to /u01/dan/flexdeploy/upgrade/upgrade_backups/09282022/artifacts, may take some time
09/28/2022 09:13:43 AM Backing up the plugins directory from /u01/dan/flexdeploy/application/plugins to /u01/dan/flexdeploy/upgrade/upgrade_backups/09282022/plugins, may take some time
09/28/2022 09:13:43 AM Backing up the database schemas, this may take some time

.......

09/28/2022 09:17:25 AM Copying influx database to /u01/dan/flexdeploy/influxdb
09/28/2022 09:17:29 AM Removing old jdbc driver files
09/28/2022 09:17:29 AM Updating the context.xml file for Tomcat
09/28/2022 09:17:29 AM Updating the server.xml file for Tomcat
09/28/2022 09:17:29 AM Managing setenvoverride
09/28/2022 09:17:29 AM Updating script permissions
09/28/2022 09:17:29 AM Completed the installation
09/28/2022 09:17:29 AM Starting FlexDeploy server, may take a few minutes
09/28/2022 09:20:25 AM FlexDeploy server running
09/28/2022 09:20:35 AM Removing the default influx config directory, will be re-created
User       Organization  Bucket
flexuser flexdeploy       flexbucket

URL for FlexDeploy: http://<your host name>:8000/flexdeploy

Conclusion

In this blog, I showed how you can use the new flexdeployinstaller process to simplify installing and upgrading FlexDeploy.  The new installer eliminates the need to coordinate tasks across multiple teams which greatly reduces the install/upgrade time and frees up resources to work on other tasks.  In addition, customers can stay up to date on modifications and enhancements within FlexDeploy to ensure they are getting every benefit possible in their implementation.

Take advantage of the simplified process with your next FlexDeploy upgrade.

What Makes FlexDeploy Different?

This paper compares FlexDeploy to other commercial and open-source DevOps and Application Release Automation solutions.

Read Paper

DevOps and CI/CD Done Right

Out of the Box DevOps Platform for your Business and Open Systems

Related Resources

Revolutionize Your Oracle, Salesforce, or SAP Environment with Flexagon’s DevOps Assessment

In the fast-paced world of Enterprise IT, staying ahead means constantly evolving. For organizations utilizing Oracle, Salesforce, or SAP, the ...

New In FlexDeploy 9.0 – Credential Support For SSH Keys

Incorporating SSH keys are an easy way to add a layer of security to your development and delivery processes. Once ...

DevOps for Azure Power BI

Power BI is a unified self-service and enterprise analytics solution that allows you to visualize your data, and share insights ...

Join DevOps leaders across the globe who receive analysis, tips, and trends in their inbox