Changing the FME Server Backend Database in a Distributed Deployment in the Cloud

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

  • FME 2022.0

Introduction

By default, FME Server is deployed with a PostgreSQL FME Server backend database. When deploying FME Server in a distributed way, it is possible to use a different backend database. In this article, we describe how to change the default FME Server backend DB in a distributed deployment on Windows in Azure to an Azure SQL database with terraform.


Using a newly created Azure SQL database

In the FME Server (Distributed Deployment, Windows) an Azure managed PostgreSQL database is created and used as FME Server backend database. This database is configured by a script that is running during the launch of a new FME Server Core VM. The configuration script running on FME Server Engine VMs also requires connection information for the database to make sure the FME Engine can communicate with the database. The parameters used for the configuration are:
  • Database hostname
  • FME Database username
  • FME Database password
  • Admin database user
  • Admin database password

The database hostname is an output of the Azure SQL terraform module, which can be used instead of the default PostgreSQL database. Here is the module for Azure SQL to be used with FME Server:
In the terraform example using an Azure SQL database the FME and admin database usernames & passwords are chosen by the user. The admin credentials are used in the Azure SQL terraform module to create the database. Both credential sets and the database hostname are then passed into the configuration scripts for FME Server Core and Engine. It is recommended to manage all credentials used in a deployment in Azure Key Vault. Here are examples of the configuration scripts for Azure SQL:
These scripts need to replace the existing scripts on the Windows VM images. With terraform this is done by using Azure SQL-specific Azure virtual machine scale set (VMSS) modules utilizing the “custom_data” attribute in the VMSS modules: 
This allows FME Server to use an Azure SQL database without having to modify the Windows VM images.

The main.tf file in the terraform example indicates in commented sections which variables and modules need to be used to use an Azure SQL database.
 

Using an existing Azure SQL database

The most important prerequisite to using an existing database with the distributed FME Server deployment is network connectivity between the database and the backend VNet that is created for the FME Server deployment. There are different ways to accomplish this. In the default configuration, a network rule is added to the database server that is used. To use an existing Azure SQL or PostgreSQL database, the existing resources can be imported into the terraform configuration. This way the existing resources and any changes to them can also be managed by terraform. Another option is to only provide the necessary variables in the variables.tf to make sure the FME core and engines can connect to the database.


Additional Resources

Please consider posting to the FME Community Q&A if you have further questions or issues that are not addressed in this article. There are also different support channels available.

The FME Server documentation has some guidance on setting up different FME Server databases.
You may also find it useful to browse other resources or forum questions regarding load balancers in case this addresses our concerns.


 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.