-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure Storage Support #101
Comments
This would be a great addition indeed. One question upfront: is it possible to spin up a Azure Blob Storage compatible tool in a Docker container so it can be used in tests (and development) for this image? I would like to avoid to a. create an Azure account just to be able to support this feature and b. run tests against remote infrastructure. Ideally, this could work like with S3 where the tests run a MinIO server or WebDAV where an instance of |
Absolutely and totally understandable! It can be done with Azurite: https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azurite See also this chapter to configure it with the SDK: https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azurite?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&tabs=visual-studio#authorization-for-tools-and-sdks For the Docker container, see: https://hub.docker.com/_/microsoft-azure-storage-azurite If you use CI/CD pipelines, here is a great example of automating all of that: https://docs.microsoft.com/en-us/azure/storage/blobs/use-azurite-to-run-automated-tests |
Sounds good. If you or someone else wants to pick this up right away, I am happy to help with getting PRs merged (it should be relatively straight forward). Otherwise I'll keep it on the roadmap so we can get this supported sooner or later. Thanks for the suggestion. |
Awesome! I must say that I'm also a part time CS grad student besides work, so I can't make any commitments. But it's high on my list to pick up when I have some spare time. Thanks! |
No need to worry here. |
In case anyone starts working on this, it'd be wise to check in on the progress of #94 which might make implementing this feature a bit easier (also completely different). |
@DevSecNinja I created a PR that adds support for Azure Blob Storage in #171 - it seems to work well when working against Azurite, but as I have zero experience in the Azure Ecosystem, I am wondering if I am doing something "wrong" here (e.g. non-standard way of passing credentials and such). If you're interested, I would be very happy if you could give this PR a quick sanity check and let me know if you think it makes sense like this. Thank you 🎩 |
Really cool, thanks so much @m90! PR looks good, but I'm not a Go expert! :) Made a small comment on the PR. With regards to authentication, I always like to use my managed identities. I have them on my Azure VMs and on my lab VMs via Azure Arc. A managed identity basically allows you to authenticate to resources without a password (and is therefore often times safer). With an RBAC role, you can just give read/write access to the managed identity of the VM and the application can easily authenticate via If you're interested in implementing this, you could think of running |
This sounds great and is exactly why I was asking. I'll implement it like this. |
Awesome, thanks! If you could push out a prerelease Docker image, I’m happy to give it a spin in my lab before releasing it? |
There now is If you find the time to give this a test drive, it'd be much appreciated. Updated documentation is here: https://github.com/offen/docker-volume-backup/blob/azure-storage/README.md |
That's awesome, thanks for the Christmas present! 😄 I'll test the following soon:
Let me know if I'm missing a test case! Storage Account via private endpoint (via
|
Hmm, this is kind of mysterious. If something fails, there should be an error and a non-zero exit. No errors are swallowed in the code and I've seen it fail a lot in development, too. I need to dig into the code of the SDK to see if there are any conditions that could cause a failing upload while still not returning an error. When I deliberately break the test case by passing a bad account name, I will get the following log output:
so I am not sure why you are seeing a successful exit right now.
Auto-appending a slash if needed probably makes sense.
The endpoint needs to include a protocol, e.g. |
Apologies for my late reply, wanted to dive into it before replying. Hmm strange, I'm not seeing those logs. Could it be that for
Yeah, I set it like this: I'm getting an interesting error now that I'm using the
|
Yes, for the version you are testing against,
The double quoted string in the error message makes me wonder if you're running into the bane of this issue tracker: docker/compose#2854 Assuming you are using Docker compose, could you try defining your environment variables in object notation instead, i.e. In case this is not causing the error: do you set a value for |
@DevSecNinja Do you think you'll find the time to give this another test soon? In case you're too busy, that's no problem (it really is no problem, please do not feel obliged to do anything), I'd just like to wrap up that PR at some point. Considering the test setup against Azurite works, I'd be fine with merging this and seeing if people encounter issues in the wild, but if you still would like to test it, it'd be much appreciated as well. |
Thanks @m90, understood! I think it's best to merge it and I'll test it afterwards as well. A new semester for my study program just started and I'll try to find some time for it! |
I'm submitting a ...
What is the expected behavior?
Enabling docker-volume-backup to backup to Azure Storage.
Azure Storage is a great solution (especially with cold storage) to backup Docker volumes to. I don't have any experience with Go but based on the AWS format I might be able to implement support for Azure Storage. Additionally, lots of professionals working with Microsoft technology have a subscription from work that they would like to use. (e.g. via a Visual Studio subscription)
SDK Docs: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob#pkg-overview
Thanks for this awesome tool!
The text was updated successfully, but these errors were encountered: