Using Azure Blob Storage

Using Azure Blob Storage with MinIO Azure Gateway

The Tools

Creating Azure Blob Storage

The Script

create_blob.sh
export MY_RESOURCE_GROUP=my-superfun-resources
export MY_LOCATION=eastus2
export MY_STORAGE_ACCT=my0new0unique0storage
export MY_CONTAINER_NAME=storage-blob-test
bash create_blob.sh

Upload a File

touch helloworldaz storage blob upload \
--account-name ${MY_STORAGE_ACCT} \
--container-name ${MY_CONTAINER_NAME} \
--name helloworld \
--file helloworld \
--auth-mode login

Check the Results

az storage blob list \
--account-name ${MY_STORAGE_ACCT} \
--container-name ${MY_CONTAINER_NAME} \
--auth-mode login | jq '.[].name'

Launching MinIO Azure Gateway

Step 1: Build Compose Environment with Storage Credentials

create_env.sh
export MY_RESOURCE_GROUP=my-superfun-resources
export MY_STORAGE_ACCT=my0new0unique0storage
bash create_env.sh

Step 1: Create Docker Compose Configuration

docker-compose.yml

Step 2: Create the Client Dockerfile

Dockerfile

Step 3: Create Entrypoint Script

entrypoint.sh

Step 4: Build and Run

.
├── create_blob.sh
├── create_env.sh
├── docker-compose.yml
├── Dockerfile
└── entrypoint.sh
docker-compose build
docker-compose up --detach

Step 5: Test with MinIO Client and s3cmd

export MY_CONTAINER_NAME=storage-blob-test
docker exec --tty azure-client mc ls myazure/$MY_CONTAINER_NAME
export MY_CONTAINER_NAME=storage-blob-test
docker exec --tty azure-client s3cmd ls s3://$MY_CONTAINER_NAME

Cleaning Up

Docker Environment

docker-compose stop && docker-compose rm

Azure Cloud Resources

export MY_RESOURCE_GROUP=my-superfun-resources
export MY_STORAGE_ACCT=my0new0unique0storage
export MY_CONTAINER_NAME=storage-blob-test
bash delete_blob.sh

Resources

Source Code

Azure Docs

MinIO Server

Client Tools

Docker Stuff

Articles

Conclusion

Linux NinjaPants Automation Engineering Mutant — exploring DevOps, Kubernetes, CNI, IAC

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store