Mount Azure file share on Azure container app

45 Views Asked by At

I have an Azure file share and i want to use it as a mount for my Neo4j database that is running inside an Azure container app. Everytime i create a provision of the container it fails with error "VolumeMountFailure" and no additional info to know what is going wrong. Below some screenshots of the situation:

Mount settings for container:

https://i.stack.imgur.com/qkS9Y.png

What the error looks like in the System logs:

https://i.stack.imgur.com/RZNEu.png

JSON view of the container app:

https://i.stack.imgur.com/HCQbV.png

I have tried using scripts and commands Aswell but most of the time it just said okay and then did not save the settings?? When it saves the settings is crashes.

1

There are 1 best solutions below

0
Suresh Chikkam On

Everytime i create a provision of the container it fails with error "VolumeMountFailure" and no additional info to know what is going wrong.

There is an alternative approach just consider using Azure Blob storage as the persistent storage for your Neo4j database.

Prepare Neo4j Container:

FROM neo4j:latest

# Set environment variables
ENV NEO4J_AUTH=neo4j/password
ENV NEO4J_dbms_directories_data=/data

# Expose Neo4j ports
EXPOSE 7474 7687
  • Create Azure container app with the below script with specific configurations, including mounting Azure Blob storage as a volume for thee containerized application.
az container create \
    --resource-group <resource_group_name> \
    --name <container_name> \
    --image skillseekercontainerregistry.azurecr.io/neo4j:latest \
    --azure-blob-volume-account-name <storage_account_name> \
    --azure-blob-volume-container-name <blob_container_name> \
    --azure-blob-volume-account-key <storage_account_key> \
    --azure-blob-volume-mount-path /data \
    --cpu 1 \
    --memory 2Gi \
    --registry-login-server skillseekercontainerregistry.azurecr.io \
    --registry-username <registry_username> \
    --registry-password <registry_password>
  • Logs indicating that the Azure Blob storage volume has been successfully mounted into the container.

enter image description here