BLAM Docker Storage Configuration

< All Topics

Configuring Storage in Docker

To access local or network storage locations, these first must be configured within the Docker Compose files which define the BLAM Docker Containers before they can be configured within the BLAM Storage Panel.

Configure the Host Server

Local Storage

To use a storage location on the same server where a Docker Container runs, ensure the location exists (create the directory if required) and identify the full path of the location.

e.g. /home/ec2-user/local_storage

Network Storage

To use network storage accessible from the server running a Docker Container, you must mount the remote storage to a local directory.

Create a local directory where you want to mount the remote location:

e.g. /mnt/remote_storage

Mount the remote location to the local directory using a method appropriate for your particular Linux operating system, including handling any credentials necessary to access the remote location (see Tutorial to Mount Samba on CentOS for one example).

e.g. In /etc/fstab add
//REMOTE_SERVER/Files/Video /mnt/remote_storage cifs credentials=/root/.stored_credentials 0 0

Run mount -a to apply the new mount changes from /etc/fstab without rebooting the local server.

Configure Docker Environment

Edit Docker Compose

For each location you need to configure in the BLAM, it must be added to each BLAM Container defined in the BLAM Docker Compose files. A BLAM Deployment will have 1 or more Docker Compose files, depending on your individual deployment. Changes will need to be made to 1 or more of these.

Open the Docker Compose file in a suitable text editor.

Find a Docker Container definition, e.g. ‘api’, and locate the ‘volumes’ list. Add a new line for each new location being mounted. Use the local path for the location (the locally created directory for mounted remote locations) and set a unique ‘BLAM’ root path for this location.
e.g. - /home/ec2-user/local_storage:/local_storage
- /mnt/remote_storage:/remote_storage

Restart Changed Docker Containers

For any BLAM Docker Containers you have added new ‘volumes’ to, you must restart these so the locations will be accessible by the BLAM. You will need to do this on each machine running any BLAM Docker Containers which have been changed.

Restart a Single Container by Name:
docker-compose up -d --no-deps --force-recreate api

Restart all Containers
docker-compose down && docker-compose up -d

Configure the New Storage in BLAM

Log into BLAM and navigate to the Configuration -> Storage panel.

Click Add Storage and set a suitable Name, Description and Icon.

In Root Path, set the unique ‘BLAM’ root path from your Docker Compose file:
e.g. /local_storage

In Real Path, set the server’s local path for the location:
e.g. /home/ec2-user/local_storage

The new File Stores in the BLAM can now be used, referenced by their Name and using their Root Paths, by the different components of the system.