Introduction
Resource folders are a convenient storage option for uploading and storing data that can be used when running workspaces on your Linux-hosted FME Server. Besides directly uploading data via the FME Server Web UI, an existing file-share can be added to the system resources and can be navigated through the FME Server Web UI.
There are two options for creating a Resource Connection with a file-based repository:
1.Network-based resource- This involves mounting file shares hosted on other Linux or Windows systems to the FME server host and connecting to them via a local UNC path.
2. Cloud-based resource- FME Server currently provides the option to connect an Amazon S3 Bucket.
Please be advised that these instructions were tested with FME Server 2022 hosted on Ubuntu 20.04.4 LTS
Step-by-Step Instructions
Part 1: Connecting a Network-based resource
This process includes mounting a Linux/Windows file share onto a Linux-based FME Server host and then creating a new resource connection on the FME Server Web UI using a local UNC path.
Network File System(NFS) and Common Internet File System (CIFS) are common network mounting/file-sharing protocols. CIFS can only be used in Windows systems whereas NFS is compatible with UNIX and LINUX-based systems.
- Installing NFS Kernel Server on the Linux file share host
- Connect to the Linux machine that hosts the file share via SSH
- Update all the system packages and install the nfs-kernel-server package
sudo apt install nfs-kernel-server
- Assign file share directory’s ownership to the appropriate user account and provide read, write and execute privileges to all the contents inside the directory
sudo chmod 777 <FileShareDirectoryPath>
sudo chown -R fmeserver:fmeserver /mnt/nfs_share_MG
sudo chmod 777 /mnt/nfs_share_MG
- Grant NFS Share Access to FME Server host- This can be defined in the /etc/exports file.
Add this line to the file -
<FileShareDirectoryPath> <FMEServerHostIP>(rw,sync,no_subtree_check)
/mnt/nfs_share_MG 10.1.102.48(rw,sync,no_subtree_check)
- Export the NFS Share Directory and restart the NFS kernel server to commit the changes
sudo systemctl restart nfs-kernel-server
- (OPTIONAL) Allow NFS Access through the Firewall if required
sudo ufw enable
sudo ufw status
- Installing the NFS Client on the FME Server host
- Connect to the Linux FME Server host via SSH
- Update all the system packages and install the nfs-common package
sudo apt install nfs-common
- Create an NFS mount point
For example-
sudo mkdir -p /mnt/nfs_clientshare_MG
- Mount NFS Share
For example-
sudo mount 10.1.103.94:/mnt/nfs_share_MG /mnt/nfs_clientshare_MG
- Verify the contents on the FME Server to test configuration
- Configuring the file share folder on the Windows file share host
- Right-click on the file share folder, select “Properties” and navigate to the “Sharing” tab.
- Add the required user account to share the folder with and provide them with Read/Write permissions.
- Make a note of the “Network Path” of the file share folder which will be required for configuring CIFS on the FME Server Host.
- Installing and configuring CIFS on the FME Server Host
- Connect to the Linux FME Server host via SSH
- Update all the system packages and install the cifs-utils package
sudo apt install cifs-utils
- Create a CIFS mount point
sudo mkdir /mnt/win_share_MG
- Mount Windows Share via CIFS
sudo mount -t cifs -o username=mgeorge "//10.1.102.11/FME File Share" /mnt/win_share_MG
We can also use gid [group id] and uid [user id] of the said account to mount the share. These ids can be found using these commands:
id -g <groupname>
id -u <username>
mount -v -t cifs <WindowsFileShareNetworkPath> <FMEServerMountDirectoryPath> -o gid=<gid>,uid=<uid>
- Verify the contents on the FME Server to test configuration
- Navigate to “Files & Connections” >“Resources” and click “New” on the FME Server Web UI.
- Create New Resource Connection with the appropriate Name, Display name, Description and the following settings-
Directory of a network file based resource = Complete UNC path to the local file-mount directory/folder on the FME Server Host.
Part 2: Connecting an Amazon S3 Bucket
- Navigate to “Files & Connections” >“Resources” and click “New” on the FME Server Web UI.
- Create New Resource Connection with the required Name, Display Name, Description and the following settings-
The values for the Amazon S3 bucket name, Access key and Secret Key would be available via the AWS Management Console. Please contact your IT administrator.
Comments
0 comments
Please sign in to leave a comment.