54 строки
2.8 KiB
SYSTEMD
54 строки
2.8 KiB
SYSTEMD
[Unit]
|
|
Description=A virtual file system adapter for Azure Blob storage.
|
|
After=network-online.target
|
|
Requires=network-online.target
|
|
|
|
[Service]
|
|
WorkingDirectory=/home/AzureUser/azure-storage-fuse
|
|
User=AzureUser
|
|
# Configures the mountpoint.<path/to/the/mounting/point>
|
|
Environment=BlobMountingPoint=/home/AzureUser/mntblobfuse
|
|
# Configures the tmp location for the cache. Always configure the fastest disk (SSD or ramdisk) for best performance.
|
|
Environment=BlobTmp=/home/AzureUser/tmpblobfuse
|
|
# Config file path
|
|
Environment=BlobConfigFile=/home/AzureUser/azure-storage-fuse/blobfuse2.yaml
|
|
|
|
# Specifies the storage account blobfuse targets.
|
|
Environment=AZURE_STORAGE_ACCOUNT=<account.name>
|
|
|
|
# Uncomment the block below when using account key auth
|
|
Environment=AZURE_STORAGE_AUTH_TYPE=Key
|
|
# Specifies the storage account key to use for authentication.
|
|
Environment=AZURE_STORAGE_ACCESS_KEY=<account.key>
|
|
|
|
# Uncomment the block below when using SAS token auth
|
|
# Environment=AZURE_STORAGE_AUTH_TYPE=SAS
|
|
# Specifies the SAS token to use for authentication. Due to systemd file specification, SAS token should be in double quotes, start with question mark (?) and every percent sign should be doubled (% -> %%)
|
|
# Example: Environment=AZURE_STORAGE_SAS_TOKEN="?sp=rl&st=2022-10-06T11:53:25Z&se=2029-09-20T19:53:25Z&spr=https&sv=2021-06-08&sr=c&sig=AAAAAA%%2FYAAAA%%3D"
|
|
# Environment=AZURE_STORAGE_SAS_TOKEN="<sas.token>"
|
|
|
|
# Uncomment the line below and the parameter used in this block, when using Managed Identity auth
|
|
# Environment=AZURE_STORAGE_AUTH_TYPE=MSI
|
|
# If a MI endpoint is specified, this is the only parameter used, in the form of the Secret header. Only one of these three parameters are needed if multiple identities are present on the system.
|
|
# Environment=AZURE_STORAGE_IDENTITY_CLIENT_ID=<value>
|
|
# Only one of these three parameters are needed if multiple identities are present on the system.
|
|
# Environment=AZURE_STORAGE_IDENTITY_OBJECT_ID=<value>
|
|
# Only one of these three parameters are needed if multiple identities are present on the system.
|
|
# Environment=AZURE_STORAGE_IDENTITY_RESOURCE_ID=<value>
|
|
# Specifies a custom managed identity endpoint, as IMDS may not be available under some scenarios. Uses the AZURE_STORAGE_IDENTITY_CLIENT_ID parameter as the Secret header.
|
|
# Environment=AZURE_STORAGE_MANAGED_IDENTITY_ENDPOINT=<value>
|
|
|
|
# Enables logs written to syslog. Set to LOG_WARNING by default. Allowed values are LOG_OFF|LOG_CRIT|LOG_ERR|LOG_WARNING|LOG_INFO|LOG_DEBUG
|
|
Environment=BlobLogLevel=LOG_DEBUG
|
|
|
|
# Under the hood
|
|
Environment=attr_timeout=240
|
|
Environment=entry_timeout=240
|
|
Environment=negative_timeout=120
|
|
Type=simple
|
|
ExecStart=/usr/local/bin/blobfuse2 mount ${BlobMountingPoint} --tmp-path=${BlobTmp} --config-file=${BlobConfigFile} --log-level=${BlobLogLevel}
|
|
ExecStop=/usr/bin/fusermount -u ${BlobMountingPoint}
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|