Hi. I wanted to explore this feature in a testbed against an Azurite instance to support the SNAPSHOT policy of CrateDB Toolkit’s retention and expiration subsystem.
It took me a while to figure out that I must actually use IP-style URI addressing and a few additional cycles how to map this to the right incantation of CrateDB’s CREATE REPOSITORY command, specifically its endpoint parameter.
First, create a storage container called example, for example using azure-cli[1].
export AZURE_STORAGE_CONNECTION_STRING="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite:10000/devstoreaccount1;QueueEndpoint=http://azurite:10001/devstoreaccount1;TableEndpoint=http://azurite:10002/devstoreaccount1;"
uv run --with='azure-cli==2.81' az storage container create --public-access=container --name=example
Then, create/register the repository in CrateDB, for example using crash.
CREATE REPOSITORY
testrepo
TYPE
azure
WITH (
endpoint = 'http://azurite:10000/devstoreaccount1',
account = 'devstoreaccount1',
key = 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==',
container = 'example'
);
The whole setup is wrapped up into the attached compose.yaml file, to be invoked with Docker Compose or Podman Compose.
The endpoint setting is usually the tricky part when using Azure blob storage with Azurite. While working through a similar setup, I found Microsoft Azure DP-100 Training useful for understanding Azure Storage concepts, and once the repository is created, it’s worth running a quick snapshot test to verify everything is working end-to-end.
One extra gotcha with Azurite: the account in CREATE REPOSITORY must match the account segment in the endpoint path (devstoreaccount1), not the Docker service name. Also confirm CrateDB can resolve azurite:10000; if CrateDB is not on the same Compose network, use the host/IP address in endpoint instead. Once the repository is registered, a small CREATE SNAPSHOT ... TABLE ... is a quick end-to-end check.