> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Automated Installation - Docker Image (Production Use)

> The FlexDeploy™ Linux Installer Guide provides system requirements, required downloads and instructions for installing or upgrading FlexDeploy and its

The FlexDeploy™ Linux Installer Guide provides system requirements, required downloads and instructions for installing or upgrading FlexDeploy and its components.

You must have Docker Engine installed. See [https://docs.docker.com/get-docker/](https://docs.docker.com/get-docker/) for information on how to do that.

* [About the automated Install/Migration tool](https://flexagon.atlassian.net/wiki/spaces/SHAR/pages/10125805231#About-the-automated-Install/Migration-tool)

  * [Installer arguments](https://flexagon.atlassian.net/wiki/spaces/SHAR/pages/10125805231#Installer-arguments)

* [Step by Step Guide to Using the installer](https://flexagon.atlassian.net/wiki/spaces/SHAR/pages/10125805231#Step-by-Step-Guide-to-Using-the-installer)

  * [Step 0: System Requirements](https://flexagon.atlassian.net/wiki/spaces/SHAR/pages/10125805231#Step-0:-System-Requirements)

  * [Step 1: Database Preparation](https://flexagon.atlassian.net/wiki/spaces/SHAR/pages/10125805231#Step-1:-Database-Preparation)

  * [Step 2: Get the Installer](https://flexagon.atlassian.net/wiki/spaces/SHAR/pages/10125805231#Step-2:-Get-the-Installer)

  * [Step 3: Setup the Configuration File](https://flexagon.atlassian.net/wiki/spaces/SHAR/pages/10125805231#Step-3:-Setup-the-Configuration-File)

  * [Step 4: Download any Additional Software](https://flexagon.atlassian.net/wiki/spaces/SHAR/pages/10125805231#Step-4:-Download-any-Additional-Software)

  * [Step 5: Check the Prerequisites](https://flexagon.atlassian.net/wiki/spaces/SHAR/pages/10125805231#Step-5:-Check-the-Prerequisites)

  * [Step 6: Complete the Installation/Upgrade](https://flexagon.atlassian.net/wiki/spaces/SHAR/pages/10125805231#Step-6:-Complete-the-Installation/Upgrade)

# About the automated Install/Migration tool

The ***flexdeployerinstaller.sh*** script is an automated process that reduces efforts for installing or upgrading FlexDeploy. There is a configuration file which will need to be configured for your installation, and then the installer can take over.  There are three basic modes to the installer: 1) prerequisite checking with no installation or upgrade, 2) first time installation of FlexDeploy and 3) upgrading a current installation of FlexDeploy. You choose prereqs mode with the -p argument. Upgrade or install is selected by the presence of the FlexDeploy war in the webapps folder. If you are upgrading Weblogic, use the -w argument.

The apache-tomcat-flexdeploy folder will be cleaned up with each upgrade, so it is important not to place any supporting files in the apache-tomcat-flexdeploy folder. Place them in the FLEXDEPLOY\_HOME folder or another subfolder instead. Example of such files may include the SSO configuration file, Keystore and/or Wallet files.

### Versions / Release Notes

You should always download the latest version before running another install or upgrade, see [https://support.flexagon.com](https://support.flexagon.com/) for the installer download link. See the [Installer Release Notes](https://flexagon.atlassian.net/wiki/spaces/SHAR/pages/10178494469/FlexDeploy+Installer+Release+Notes) for more information and to find the latest release.

### This automated installer will handle

* executing prerequisite checks to ensure the installation/upgrade will be successful

* downloads of FlexDeploy software and influx database software if the server has access to the Internet

* **installation** of FlexDeploy **5.7.0.12+**

* **upgrading from** version **5.1.0.0+**

* **upgrading to** FlexDeploy **5.7.0.12+**

  * **NOTE that upgrading to FlexDeploy 10.0 requires you to first upgrade to 9.0 >= 9.0.0.3.**

* backing up the current FlexDeploy installation, plugins, and optionally artifacts before upgrading

* backing up the database before upgrading (optional)

* creating or migrating the FlexDeploy database schemas

* installation or configuration of the influx database which is used for reporting and dashboard data for FlexDeploy version 6.0 and higher.

### This automated installer will not handle

* downloads of software if the server has no access to the Internet. In this case, the files need to be placed on the FlexDeploy server in locations specified by the installer

* download of security wallets

* upgrading a Kubernetes installation

* install or upgrade on Windows

## Installer arguments

### The following arguments are available to be used:

* ***-p*** run the installer in the prerequisite checking mode. There will be no installation/upgrade performed when using this flag, so it can be run anytime.  If the installer detects any issue(s), those will be reported to the logs and displayed on the screen.  The prerequisites will also be run during the installation or upgrade process and may stop the process, which is why it is recommended to run this mode until there are no issues being reported.  Each issue that is reported will have a possible resolution to the issue to assist you in resolving it.  Some of the checks are: verify file system sizes to make sure all required directories have at least the minimum amount, flexdeployinstaller\_config.txt file properties are set, java is at the right level, etc. Removing this argument will execute the install/upgrade.

* -***v version*** Tells the installer what version to install. You can specify ***versions as 4 numbers separated by periods***, or the word ***latest***. **(Required argument)**

  * See [http://support.flexagon.com](http://support.flexagon.com) or [http://wiki.flexagon.com](http://wiki.flexagon.com) to find details on latest or specific version. Few examples of specific versions are 8.0.0.1, 8.0.0.4 etc.

  * If you are planning to upgrade or install more than one FlexDeploy instances, then make sure to use specific version instead of word latest as meaning of latest will change over time.

* ***-c \<path to>/flexdeployinstaller\_config.txt*** points the installer to the flexdeployinstaller\_config.txt file that contains the user configurations. **(Required argument)**

* ***-s*** there are several passwords in the flexdeployinstaller\_config.txt file and if a password field is left blank, in this scenario, a prompt for the password will happen (nothing will be stored) and the password is not shown on the screen, similar to other Linux password prompts.  The ***-s*** option will show the password on the screen as you type.

* ***-i*** skip the database backup. This can be done if you have an existing database backup.

* ***-a*** skip the artifacts backup. This can be done if you have an existing backup of the artifacts folder or a snapshot of the VM.

* ***-d*** Install as a docker container.

* ***-w*** Specify that you are upgrading from a WebLogic install to a Tomcat install. Not compatible with the ***-d*** option.

# Step by Step Guide to Using the installer

## Step 0: System Requirements

See [FlexDeploy System Requirements](https://flexagon.atlassian.net/wiki/spaces/FD80/pages/10561717689/FlexDeploy+System+Requirements) for details on software and hardware requirements. See [FlexDeploy Architecture](https://flexagon.atlassian.net/wiki/spaces/FD80/pages/10561717839/FlexDeploy+Architecture) for architecture details.

## Step 1: Database Preparation

Prepare either a Postgres or Oracle database.

### Postgres

Install the Postgres binaries, and create a flexdeploy database. The automated installer will create FD, FF, and FD\_ADMIN schemas.

You can use a docker image such as [postgres:14](https://hub.docker.com/_/postgres) if you pass in the `PGDATA` parameter.

***Either*** from the commandline with psql

```
createdb flexdeploy
```

**or** if you have sql access to the postgres database, and don’t have access to run createdb, you can connect to the postgres database and using sql

```
create database flexdeploy
```

### Oracle

Install the Oracle Database binaries and find your jdbc connection string. The automated installer will create FD, FF, and FD\_ADMIN schemas in the USERS tablespace.

You can use a docker install of Oracle Database. See the [Oracle Docker Images](https://github.com/oracle/docker-images/tree/main/OracleDatabase) for more information.

## Step 2: Get the Installer

You should always download the latest version before running another install or upgrade, see [https://support.flexagon.com](https://support.flexagon.com/) for the installer download link. Download flexdeployinstaller.zip and get it to the FlexDeploy server. You can **wget** it there directly if you have Internet access, or transfer the file from another machine. FLEXDEPLOY\_INSTALLER\_HOME is folder where installer will be used for installer binaries and configuration files.

```
# select folder location where installer will be downloaded and executed from
export FLEXDEPLOY_INSTALLER_HOME=/u01/fdinstaller
mkdir -p $FLEXDEPLOY_INSTALLER_HOME
cd $FLEXDEPLOY_INSTALLER_HOME
# delete older version of installer folders - for example, flexdeployinstaller_1.0.4 (rm -r flexdeployinstaller_1*)
wget -O flexdeployinstaller.zip <cssinstaller download url>
```

If you don’t have wget, and must use curl, use the -L argument like:

```
curl -L --max-redirs 5 <cssinstaller download url> --output flexdeployinstaller.zip
```

Once downloaded, unzip the flexdeployinstaller.zip download in FLEXDEPLOY\_INSTALLER\_HOME.

```
cd $FLEXDEPLOY_INSTALLER_HOME
unzip flexdeployinstaller.zip
```

## Step 3: Setup the Configuration File

### Step 3.1: Save flexdeployinstaller\_config.txt

This step is extremely important to preserve your configuration file from any potential installer upgrades. This step should only be done once: on a new installation or on a first time upgrade with this new process.

There is a configuration file (flexdeployinstaller\_config.txt) that controls the actions of the installer.  It is the most important file for the installer and needs to be saved to avoid being overlaid with any new flexdeployinstaller downloads as this would remove all of your entered configurations.  There is a template file located in FLEXDEPLOY\_INSTALLER\_HOME/flexdeployinstaller.  This template file must be copied to any other location, it could be placed in the FLEXDEPLOY\_HOME and it would be safe from overlay and easier to find for the next upgrade.

```
cd <FLEXDEPLOY_INSTALLER_HOME>/flexdeployinstaller_X.X.X
cp flexdeployinstaller_config.txt <FLEXDEPLOY_HOME>/  # this is one option to save but this can be saved to any other location.  Just must be out of FLEXDEPLOY_INSTALLER_HOME/fledeployinstaller directory due to installer upgrades.
```

### Step 3.2: Updating flexdeployinstaller\_config.txt

> [!NOTE]
>
> Do not use spaces in any directory and/or password values.

> [!NOTE]
>
> This step should only need to be done once, on a new installation or on a first time upgrade with this new process. Unless there is a change to any of the configuration properties.

Once copied, the file needs to be adjusted for your installation requirements (there are many default values in the file and they can stay defaulted).  There are comments in the template file for each property but this guide will cover the properties that need to be updated.

> [!NOTE]
>
> FLEXDEPLOY\_HOME is a key property as the flexdeployinstaller will determine based on this property if a current installation is running, make sure the directory location is correct (e.g. the FLEXDEPLOY\_HOME would be the path up to, but not including, the apache-tomcat-flexdeploy directory. /u01/flexdeploy/apache-tomcat-flexdeploy would have a FLEXDEPLOY\_HOME of /u01/flexdeploy.

FLEXDEPLOY\_HOME - this is the directory location where FlexDeploy will be installed or is already installed, the default is /u01/flexdeploy.

FLEXDEPLOY\_JAVA\_HOME - this would be the path to Java JDK 11 or 17, the path up to but not including bin.

WORKING\_DIRECTORY - this will be the directory location that FlexDeploy uses for temporary files to be transferred between the server and its endpoints.  The default location is under FLEXDEPLOY\_HOME and is named application.

ARTIFACT\_REPOSITORY\_DIRECTORY- this will be the directory location that FlexDeploy uses to store all build artifacts and retrieve deployment artifacts. The default location is under FLEXDEPLOY\_HOME and is named artifacts.

BACKUP\_DATABASE\_DIRECTORY - this will be the directory where the backups are stored. If Postgres, this will be on the FlexDeploy server, otherwise it would be on the database server.

SCM\_TYPE - specify the primary SCM type that will be utilized. This isn’t part of the installation but there is a prerequisite check to make sure any necessary SCM clients are present. This check won’t stop the install, it is just informational. Not all SCM Types require clients.

SYSTEM\_DB\_PASSWORD - this password is required to either create the schema definitions or upgrade the schema definitions. If left blank, a prompt will come up when the password is needed.

INFLUX\_DB\_TOKEN - this token is required for FlexDeploy to communicate with the influx database. Enter in any arbitrary string that will be saved in FlexDeploy . This value should be set on initial execution and then left unchanged.

DATABASE\_URL- adjust the appropriate connection string for the FlexDeploy database, Oracle or Postgres. Verify that the selected DATABASE\_URL line isn’t commented out (# at the beginning of the line) and that any other DATABASE\_URL lines for other connect strings are commented (add the # at the beginning of the line) out.

CONTAINER\_NAME- this will be used to create and upgrade the FlexDeploy docker container. This value will default to ‘flexdeploy’ if not provided.

CONTAINER\_TIMEZONE- this will be used when creating a container to set the time zone of the container. This value will default to ‘America/Chicago’. You can find a list of all the available time zones here: [https://en.wikipedia.org/wiki/List\_of\_tz\_database\_time\_zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).

At the completion of updating and saving the flexdeployinstaller\_config.txt file, run the following command at any time, to source in the properties from the flexdeployinstaller\_config.txt file and make them available to be used for navigation.

```
cd <FLEXDEPLOY_INSTALLER_HOME>/flexdeployinstaller_X.X.X
source ./setEnv.sh <path to saved flexdeployinstaller_config.txt>
```

## Step 4: Check the Prerequisites

### Step 4.1: Execution

After the flexdeployinstaller\_config.txt file is updated, the prerequisite checks should be executed outside of the install/upgrade process. The prerequisite checking process is designed to be run multiple times until all reported issues are resolved. Any issue that is found will be displayed on the screen in the form of the issue and the potential resolution.

Run the installer as the user that has access to the docker commands.

```
cd ${FLEXDEPLOY_INSTALLER_HOME}/flexdeployinstaller_X.X.X
./flexdeployinstaller.sh -pdc <path to saved config file>/config.txt
```

### Step 4.2: Resolution

With the list of issues on the screen, and in the logs (FLEXDEPLOY\_HOME/upgrade/logs), each issue must be resolved before continuing. Each issue will provide some level of resolution that can assist in clearing up the given issue.

> [!NOTE]
>
> If there are any issues that are not resolved, the next step will fail as it will call the prerequisites also. The prerequisites need to be run on every execution but could stop the process, thus running the prerequisites independently will ensure a clean install/upgrade.

## Step 5: Complete the Installation/Upgrade

Now that we have everything validated from a prerequisite check, we can start the installer process. As stated earlier, the same process will handle the installation and any upgrade. The installer will use the flexdeployinstaller\_config.txt properties to detect if there is a current installation. Start the installer process by running the below command.

```
cd ${FLEXDEPLOY_INSTALLER_HOME}/flexdeployinstaller_X.X.X
./flexdeployinstaller.sh -dc <path to saved config file>/config.txt
```

The process will take a few minutes.

***
