Mounting Microsoft Azure Blob Storage Containers to a File System

When you have integrations that don't communicate with Microsoft Azure Blob Storage containers, you can load your files to a common file system. Then, mount the file system to a Microsoft Azure Blob Storage container.

Prerequisites

  • You have a Linux or Mac machine.
  • You installed Rclone on the machine where you want to mount the Blob storage. Rclone is a command line program that synchronizes files and directories to and from storage services. To learn more, see RcloneInformation published on non-SAP site.
  • You installed Filesystem in Userspace (FUSE) on the machine where you want to mount the Blob storage. FUSE is a software interface for Unix and Unix-like operating systems.
    • For Mac: FUSE for macOSInformation published on non-SAP site
    • For Linux: FUSE comes by default on most Linux distributions.
  • You have the cloud storage account name and public key. You can find this information in the Cloud Portal from Start of the navigation pathEnvironments Next navigation step <Environment name> Next navigation step Cloud Storage Next navigation step Hot foldersEnd of the navigation path.
  • You downloaded Azure Storage Explorer and created a container inside the Blob storage that you want to connect. This tool lets you find the container ID, which you need to reference when you run the mount command. To learn more, see Azure Storage ExplorerInformation published on non-SAP site.

Context

This upload method isn’t the recommended way to load content. This solution simply allows you to maintain compatibility with third-party systems that don't support Microsoft Azure Blob Storage. This solution is also not a true network file sharing solution. Your aspects can't share the same file system and the files aren't automatically shared with Commerce Cloud.

Procedure

  1. Create a folder to use as the mount point for your Blob storage.
    sudo mkdir -p <path to the folder>
  2. Create the configuration folder for Rclone.
    sudo mkdir -p /var/root/.config/rclone/
  3. Find the location of the configuration file.
    rclone config file
  4. Edit the configuration file and add the following information.
    [BlobName]
    type = azureblob
    account = <Account name for Blob>
    key = <Public Key for Blob>
    • [BlobName] is the identifier that you want to use for the configuration.
    • type is always azureblob
    • account is the account name of the Blob storage that was created when you provisioned an environment in the Cloud Portal.
    • key is the public key for the Blob storage.
  5. If you need multiple Blob storage accounts, create a configuration file for each account.
  6. Run the mount command.
    sudo ./rclone mount -v --debug-fuse --allow-other --vfs-cache-mode full --vfs-cache-max-age 10s --dir-cache-time 10s --daemon <blob-account-name-in-config>:<containerId> </mount/path>
    • -v enables verbose mode, which is required for troubleshooting purposes.
    • --debug-fuse reports errors related to FUSE.
    • --allow-other grants access to other users. Set if the person mounting the file system is different from the person using it.
    • --vfs-cache-mode full controls how VFS caching is used. In full mode, all files opened for read and write are copied to a local cache location before being used. This attribute prevents issues caused by concurrent file access.
    • --vfs-cache-max-age 10s is the maximum time that a file remains on cache. Adjust on a case-by-case basis.
    • --dir-cache-time 10s is the maximum time that a folder remains on cache. Adjust on a case-by-case basis.
    • --daemon runs the mount in background mode.
    • <Blob-account-name-in-config> must be replaced with the name between the brackets in the configuration file.
    • <containerId> is replaced with the name of a container inside the Blob storage, which you created initially. Use Azure Storage Explorer to find the container ID.
    • </mount/path> is replaced with the path of the folder where you want to mount the Blob storage. To learn more, see rclone mountInformation published on non-SAP site.

Results

The Blob storage is ready and you can use it as a directory to move files to Commerce Cloud.