azurefs
#
The backend for serving files from the Azure blob storage service.
New in version 2015.8.0.
To enable, add azurefs
to the fileserver_backend option in the
Master config file.
fileserver_backend:
- azurefs
Starting in Salt 2018.3.0, this fileserver requires the standalone Azure Storage SDK for Python. Theoretically any version >= v0.20.0 should work, but it was developed against the v0.33.0 version.
Each storage container will be mapped to an environment. By default, containers
will be mapped to the base
environment. You can override this behavior with
the saltenv
configuration option. You can have an unlimited number of
storage containers, and can have a storage container serve multiple
environments, or have multiple storage containers mapped to the same
environment. Normal first-found rules apply, and storage containers are
searched in the order they are defined.
You must have either an account_key or a sas_token defined for each container, if it is private. If you use a sas_token, it must have READ and LIST permissions.
azurefs:
- account_name: my_storage
account_key: 'YOUR_ACCOUNT_KEY'
container_name: my_container
- account_name: my_storage
sas_token: 'YOUR_SAS_TOKEN'
container_name: my_dev_container
saltenv: dev
- account_name: my_storage
container_name: my_public_container
Note
Do not include the leading ? for sas_token if generated from the web
- saltext.azurerm.fileserver.azurefs.__virtual__()[source]#
Only load if defined in fileserver_backend and azure.storage is present
- saltext.azurerm.fileserver.azurefs.find_file(path, saltenv='base', **kwargs)[source]#
Search the environment for the relative path
- saltext.azurerm.fileserver.azurefs.envs()[source]#
Each container configuration can have an environment setting, or defaults to base
- saltext.azurerm.fileserver.azurefs.serve_file(load, fnd)[source]#
Return a chunk from a file based on the data received
- saltext.azurerm.fileserver.azurefs.update()[source]#
Update caches of the storage containers.
Compares the md5 of the files on disk to the md5 of the blobs in the container, and only updates if necessary.
Also processes deletions by walking the container caches and comparing with the list of blobs in the container
- saltext.azurerm.fileserver.azurefs.file_hash(load, fnd)[source]#
Return a file hash based on the hash type set in the master config