> ## 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.

# Customer Managed FlexDeploy Architecture

> Overview FlexDeploy is a Java web application which requires an Application server (Tomcat) and an Oracle or PostgreSQL database. FlexDeploy is access

# Overview

FlexDeploy is a Java web application which requires an Application server (Tomcat) and an Oracle or PostgreSQL database. FlexDeploy is accessed by Browser and can be integrated with various Directory Servers and SSO providers for Authentication and Authorization, an internal local security realm is also provided by FlexDeploy.

FlexDeploy uses a built-in File-System-based Artifact Repository to store build artifacts like jar, ear, war, zip etc. Build artifacts are versioned and used during deployment.

FlexDeploy connects to target servers using the REST, HTTPS or SSH protocol and only requires a Temporary Working Directory and Java for execution on target servers. SSH connectivity to Windows servers is established using native SSH server found in Windows 20gb19 and higher or Cygwin for older endpoints.

FlexDeploy can be installed On-Premise or in the Cloud (AWS, Azure, Oracle, etc) and can be used to perform Build / Deploy / Test / Utility executions on targets which are On-Premise or in the Cloud as only SSH connectivity is required. You can also use the FlexDeploy Docker container from docker hub for installation.

FlexDeploy has a plugin architecture which allows for integration with various technologies. FlexDeploy comes with many out-of-the-box plugins and customers can to developer their own plugins using the [Plugin SDK](https://docs.flexagon.com/flexdeploy-11-0-documentation/flexdeploy-plugin-sdk.md).

FlexDeploy Architecture

# Database Tier

## Supported Platforms

* Unix/Linux (and its variants, such as OEL, RedHat, Solaris, AIX, etc.)

* Microsoft Windows

## Supported Databases

FlexDeploy requires one of the following databases to be installed and running.

* PostgreSQL

  * Versions 14, 15, 16, 17, and 18 are supported.

  * Requires a user with CreateDB privileges or superuser privileges.

* Oracle

  * OJDBC8 and 17 version 19, 21, or 23 drivers are supported.

  * Oracle XE versions 18, 19, 21

  * Oracle Standard or Enterprise, version 12.1, 12.2, 18, 19, 21, 23

  * Oracle Free 23

# Application Tier

## Supported Platforms

* Unix/Linux (and its variants, such as OEL, RedHat, Solaris, AIX, HP-UX etc.) - Preferred Option

* Microsoft Windows

## Supported Application Servers and Requirements

FlexDeploy is a Java web-based application which runs on Tomcat 9.

* Tomcat 9 is included with FlexDeploy download media. You do not have to separately install Tomcat because it is included in all downloads.

* 8GB of RAM

* 1+ CPU

* At least 16384 available file descriptors (ulimit).

* JDK 21 or 17 installed

* The recommended approach is to install FlexDeploy and Configuration Management on separate servers or VMs. If you choose to run both on the same server, ensure it is sized to support the combined workload. Add the resource requirements (CPU, memory, and disk space) from both applications accordingly.

There are several JDK options available when installing FlexDeploy.  The main requirement is that the version of Java used is version 21 or 17. if your Linux distribution includes a build of OpenJDK 21 or 17, you can use that version.

* [Amazon Corretto](https://aws.amazon.com/corretto/) - Amazon's build of OpenJDK with security updates 

* OpenJDK - [Adoptium - OpenJDK](https://adoptium.net/)

* Oracle JDK - Oracle's build for those who meet their license restrictions - [https://www.oracle.com/java/technologies/downloads/#java21](https://www.oracle.com/java/technologies/downloads/#java21)

* You can allocate 4GB space for install of Tomcat with FlexDeploy. This includes space for logs that will be generated during execution of application. See additional disk requirements below.

* Time series database InfluxDB is installed as part of installation process for Metrics and Insights.

# Target Endpoints

* Java is required on all Endpoints. The specific Java version required depends on the plugins in use. See [Plugin Java Requirements](https://flexagon.atlassian.net/wiki/spaces/SHAR/pages/10176823301/Plugin+Java+Requirements) for details version information.

* Typically FlexDeploy references the actual JAVA\_HOME folder, or the java version that is used by the technology that is being deployed (if any)

  * The JDK Home can be a symlink if desired to make Java upgrades easier. A symlink is not required or preferred by FlexDeploy, but works.

    * On Windows, a symlink can be created with the *mklink /D \<target> \<source>* command where *\<target>* is set as JDK Home in the endpoint settings of FlexDeploy, and *\<source>* is the actual Java install location.

      * If the Java install path is changed, then use *rmdir \<target>* to delete the symlink. Then recreate the symlink with the new *\<source>* folder.

    * On Unix, a symlink can be created with the *ln -sT \<source> \<target>* command where *\<target>* is set as JDK Home in the endpoint settings of FlexDeploy, and *\<source>* is the actual Java install location.

      * If the Java install path is changed, then use *rm \<target>* to delete the symlink. Then recreate the symlink with the new *\<source>* folder.

* CPU and memory usage may vary based on the specific plugins being executed. If used, the HTTPS agent is lightweight and does not introduce any significant additional overhead. You can start with system requirements of underlying application being managed and expand as necessary.

* Disk space on each endpoint of **4GB** to be used as temporary working directory. You can start with 1GB space and expand as necessary.

  * There is no need to monitor this file system as FlexDeploy will automatically perform cleanup.

  * Local disk storage is preferable, but a shared file system can be used.

  * As this file system contains only temporary files, there is no reason to backup this directory.

  * Files in the working directory are transient in nature and will be purged by FlexDeploy after one day. The actual size of the directory will depend on the number of projects and deployments, but 1GB is a good starting point.

  * Make sure that there is no scheduled purge job setup on endpoint working directory. FlexDeploy will automatically manage this folder

* Optionally, [rsync](https://rsync.samba.org/) can be installed on **BOTH**, the endpoint and the FlexDeploy host and [expect](https://core.tcl-lang.org/expect/index?name=Expect) can be installed on the FlexDeploy host if you wish to use the rsync protocol to transfer files instead of using scp. SCP is the default transfer method.

* HTTPS or SSH connectivity from FlexDeploy application tier using one of the following options

  * HTTPS

    * User & Password

  * SSH

    * User & Password

    * User & Password with Privilege Escalation (sudo, pbrun etc.)

    * SSH key

    * SSH key with passphrase

    * See [Supported algorithms for SSH](https://flexagon.atlassian.net/wiki/spaces/FD11/pages/12394922157/Supported+Algorithms+for+SSH) for SSH connections. FlexDeploy will automatically negotiate this with the SSH server on the endpoint.

# High Availability Considerations

Here are some guidelines on Active Passive configuration for FlexDeploy, as running more than one server process for FlexDeploy is not yet supported. You can choose to setup Cluster for Application or Database or Both.

* Install FlexDeploy application on two separate Physical Server or Virtual Machines.

  * Tomcat

    * Install two separate Tomcat as per Installation instructions.

    * Both installation will have configuration for JDBC connection to RAC database.

* Setup Database cluster for FlexDeploy. This would be RAC cluster for Oracle database. Follow guidelines setup by database vendor for clustering.

* Make sure to use JDBC connect string for database cluster nodes when defining Data Source definitions.

* Use shared file systems for the Artifact Repository directory, and the application directory, so that active node and passive node will have access to the files.

  * The Artifact Repository location is specified in the **flexagon.fd.repository.root** Java system property of the server.

  * The Working Directory location is specified in  the **flexagon.fd.install.root** Java system property of the server. Technically, only the **plugins** and **vsm** subdirectories need to be on the shared file system.

* Configure Load Balancer to route all FlexDeploy users to Active Application Server. You can automate the process of fail over to Passive node if necessary.

* Make sure that only one of the Application Server processes is running. This is absolutely necessary even when Load Balancer is routing traffic to only one of the server.

FlexDeploy Architecture HA
