githubEdit

BF Enterprise Documentation

Overview

FM BetterForms Enterprise is an extension of the FM BetterForms Cloud service allowing fully autonomous standalone operation.

Features

  • Fully standalone serving of BF apps

  • Apps are built with BF Cloud in the same manner as regular apps

  • Apps can live both in the cloud and on-premise

  • Choose which apps to host

Overview Diagram

Requirements

BF Enterprise runs out of a docker image and new BF Enterprise Helper file, therefore the requirements are:

  • Docker Instance (Min 1);

  • BF Enterprise Helper FileMaker File (will be provided);

  • BF App migrated to the latest BF Editor (Environments version)

  • FileMaker 19+.

Optional / environment-dependent (not included with the BF Enterprise docker image):

  • Redis cache settings can be supplied for cache-backed services.

  • Messaging/shared Redis should be configured when you need cross-pod messaging or multi-pod synchronization.

  • The current server runtime also uses the shared messaging Redis client for OAuth session storage.

Creating Redis server from Docker images

After installing Docker, as described below, a Redis database could be installed on the server as well.

Link to Redis’ official docs on how to run Redis Stack on Docker: https://redis.io/docs/stack/get-started/install/docker/arrow-up-right

circle-info

As a development environment, this Redis Stack instance can be deployed on localhost, and the env var REDIS_HOST can be host.docker.internal with no password when your setup allows that.

Env File

Default environment variables to be declared in the file:

Key
Info
Required

FMS_CONNECTION_DB

FileMaker database name (Enterprise File)

Yes

FMS_CONNECTION_HOST

FileMaker host address

Yes

FMS_CONNECTION_USER

FileMaker username

Yes

FMS_CONNECTION_PASS

FileMaker password

Yes

AUTHENTICATION_SECRET

Salt used in authentication service

Yes

ENCRYPTION_KEY

Sal used to generate vaults

Yes

ISENTERPRISE

Set to enterprise mode (must be set as ISENTERPRISE=true)

Yes

FMS_CONNECTION_DEFAULT_GATEWAY

XML or DAPI - default gateway used to communicate with the BF Enterprise Helper file

No

NOW_DC

used to identify which server app is running from

No

REDIS_HOST

Redis host address for caching

No

REDIS_PASSWORD

Redis password for caching

No

REDIS_PORT

Redis port for caching

No

REDIS_HOST_MESSAGING

Redis host address for messaging

No

REDIS_PASSWORD_MESSAGING

Redis password for messaging

No

REDIS_PORT_MESSAGING

Redis port for messaging

No

REDIS_URI_MESSAGING

Full Redis URI used directly by some messaging services

No

REDIS_SECRET_MESSAGING

Redis secret for messaging

No

REDIS_HOST_OAUTH

Redis host address for OAuth

No

REDIS_PASSWORD_OAUTH

Redis password for OAuth

No

REDIS_SECRET_OAUTH

Redis secret for OAuth

No

circle-info

Current runtime note: the active server wiring uses REDIS_HOST_MESSAGING, REDIS_PASSWORD_MESSAGING, and REDIS_PORT_MESSAGING for cross-pod sync and the shared Redis client used by OAuth session handling. Some messaging services also read REDIS_URI_MESSAGING directly. The separate REDIS_*_OAUTH keys still appear in config defaults, but they are not the primary Redis settings used by the current server path shown above.

Here is a sample file (where values for the right hand side will be changed to your own info):

env_.development_sample.developmentarrow-up-right

Setting up the Server

Installation

Find the links to Docker’s official docs on how to install Docker on each OS.

circle-info

Windows and MacOS only available for the Desktop version, whereas Linux has the option to use Engine (server) or Desktop.

Loading image to a local repository

As of Jun 1st, 2022, the docker image is distributed via .tar file. In order to load this file to your local docker repository and be able to start the BF server, run the following docker command.

Starting Server

Once server is setup and Docker installed in it, the following command can be used to start the service.

  • Where:

    • yourEnvFile: env file created according to previous section;

    • ourPublicRepo: repository where our docker image will be hosted.

Restarting Policies

When starting pods, different restart policies can be set for them:

  • no - default option;

  • on-failure;

  • always;

  • unless-stopped;

More information can be found on this linkarrow-up-right.

An example of how to start a new pod using a restart policy would be:

Scaling up

Using the command above will start one pod, equivalent to one BF server. In order to increase availability and performance, more pods can be deployed in single or multiple servers. If multiple servers are being used, it will be necessary to use a load balancer in front of those servers to distribute load between multiple pods.

Hardware Recommendations

Minimum requirements for each pod are:

Resource
Value

Memory

200 MB

CPU

0.425 CPU

FM Credentials - Helper file

In order to enter the credentials that will be used to connect to your Helper file, you need to login into the enterprise file and use the UI to download the data from the cloud to your local enterprise file.

Once you have all records saved locally, you should have a connection record for each environment that was downloaded. Find the record that needs to be set the credentials in the Connections layout. The credentials will be added in the serverJSON field under the key vault, now make sure it’s under vault and not oauth.vault.

As shown in the image below, you should have a vault key with an empty object.

Untitled

Add your credentials as an object as follows.

If that still returns an error saying that “FileMaker Helper Credentials missing database name or user or password”, then add username and password to root path. In this case, the serverJSON object would look like

How it works

Development

All development is done in the cloud, in other words, we recommend that you have a development environment as part of your app that still has a domain pointing to it using BetterForm’s infrastructure (a .fmbetterforms.com domain could be used for this, for example). This will allow you to develop your app the same way as other apps. Once development is done and ready to deploy, then it can be deployed to the environment that will be downloaded to your on-premise enterprise file.

Downloading environment data

In order to download the environment to your local enterprise file:

  1. Open your enterprise file and log into the enterprise app using your BetterForms credentials;

  2. Select the organization that has the Enterprise subscription;

  3. Choose the app;

  4. Find the desired environment and click on Download.

Once the download is complete, Environments, Connections, SiteModel and Forms layouts should have new records added to them, and ready to serve your app from your on-premise enterprise file.

Last updated

Was this helpful?