With the re-introduction of the Assets Tool in
Management Center for HCL Commerce, the storage
and persistence of bulk asset files is a consideration when using the solution.
If you
are using the Assets Tool within your Docker-based deployment, it is recommended to use a
Network File System (NFS) share that can then be mounted as a directory within the HCL Commerce deployment /volumes/ directory.
This implementation is recommended to ensure that your site file
management is partitioned from your deployment and its file system. This will ensure that
capacity, persistence, and performance considerations are separate.
The following instructions
are for CentOS 7, but can be followed on other Linux distributions with similar package
management and system configuration schemes.
Procedure
-
Set up the NFS server on the file storage host machine.
-
Install the nfs-utils and rpcbind application
packages.
yum install nfs-utils rpcbind -y
-
Enable the NFS services on system boot.
systemctl enable nfs-server
systemctl enable rpcbind
systemctl enable nfs-lock
systemctl enable nfs-idmap
-
Start the NFS services.
systemctl start rpcbind
systemctl start nfs-server
systemctl start nfs-lock
systemctl start nfs-idmap
-
Check the NFS server status to ensure that it is running.
-
Create the local share directories, configure their export, and export them to make
them available remotely.
-
Create the local share directories.
mkdir -p /nfs_shares/assets/auth
mkdir -p /nfs_shares/assets/live
-
Define the NFS export.
- Open the /etc/exports NFS configuration file for
editing.
- Add the NFS export
definition.
/nfs_shares/assets *(rw,no_root_squash)
- Save and close the file.
-
Export the directories in NFS.
-
Restart the NFS server.
systemctl restart nfs-server
-
Mount the assets NFS share within your deployment environments.
-
On your deployment machine or machines, mount the remote NFS share.
mount localhost:/nfs_shares/assets docker_compose_directory/volumes/assets
Where
docker_compose_directory is the local directory where your
deployment is made, and your /volumes/ directory is contained.
-
Verify the mounted file system.
Results
Your remote NFS file system is now mounted and able to be used
within your Docker-based HCL Commerce deployment. You can now access, store, and
persist assets from the Assets Tool.