FME Version
Introduction
Deploying software and migrating workflows can be a time-consuming task. FME Flow introduces the Command Line Interface (CLI) to help automate the tasks. The command line interface can be a central tool in a continuous integration and continuous delivery/continuous deployment (CICD) workflow and can help with both the deployment of FME Flow and workflow migration between environments.
Depreciation of the FME Server Console
As of 2024.0, FME has deprecated the FME Server Console in favor of the CLI. While the CLI is primarily used as an automation tool, you can still access some of the old console functionalities, such as running a job.
How to install and use the Command Line Interface
The CLI is a stand-alone package with details linked in the FME Flow documentation. Simply download it to binaries from the GIT Repository to a location of your choice. To Execute the program to get a high-level overview of each command type:
fmeflow
Automating the Deployment of Workflows
Deployment Parameters
The Command Line Interface (CLI) is an effective tool for automating the migration of workflows across different environments. By using deployment parameters in conjunction with the CLI, users can script and ensure consistent deployment of workflows. Understanding deployment parameters is crucial before migrating workflows, such as automations and workspaces, as they facilitate the migration process. This tool allows for the seamless transfer of workspaces between development and production environments without the need for manual adjustments to specific connections. You can create a new deployment parameter from the CLI, however, the underlying database or web connection will have to be published to FME Flow from FME Workbench or created in FME Flow before so it can be referenced by the deployment parameters.
Key CLI Commands:
Create a Deployment Parameter Example
fmeflow deploymentparameters create --name myParam --value myValue
Notes: You do not need to specify a type
Update a Deployment Parameter Example
fmeflow deploymentparameters update --name myParam --value myValue
Migrating a Workflows between Dev, Test, Prod
Once deployment parameters are complete, you can use the CLI to help migrate projects between environments. You will have to manually publish the workspace into your Dev environment from FME Form to FME Flow, but once that is complete, you can migrate between the environments automatically.
Overview of what the process may look like
Export a Project from Development for Production
This could be a large project with automations, users, and resources or it could be a single workspace that is either new or an updated workspace.
fmeflow projects download --name "Test Project" -f MyProject.fsproject
Import Project
fmeflow projects upload --file ProjectPackage.fsproject
Automate Tests
After importing a project, you can test the workspaces within the project.
fmeflow run --repository Samples --workspace austinApartments.fmw
Automating the Deployment of FME Flow
While the CLI cannot install FME Flow, it has several tools that will help enable the post-install configuration. Below is an example of a few of the more important ones.
Installation of FME Flow can be done programmatically through scripts. The silent installation documentation goes over examples and parameters. You can execute these commands from the command line, PowerShell, or through a program like Ansible.
Backup the Previous Installation
fmeflow backup -f my_local_backup.fsconfig
Install FME Flow
Install FME Flow using Silent Parameters with the FIRSTLOGINCHANGEPASSWORD to allow the CLI to sign in the first time.
Health Check FME Flow
After the installation, you can check to see if the FME Flow instance is ready to configure by using a Health Check with FME
fmeflow healthcheck
License FME Flow
You can use online request (example below) or generate licensing json for an offline installation that can be emailed to codes@safe.com to license your FME Flow
fmeflow license request --first-name "Lizard" --last-name "Iconic" --email "lizard.iconic@safe.com" --company "Example Company Inc." --serial-number "LLLL-1MMM-82NN"
Restore a Backup FME Flow
fmeflow restore --file ServerConfigPackage.fsconfig
Additional Resources
Getting started with Dev Ops
Getting Started with FME Flow Projects
Getting Started with Deployment Parameters
Comments
0 comments
Please sign in to leave a comment.