facebookarchive / rocks-strata

Other
133 stars 24 forks source link

Add ability to backup to Azure blob storage #30

Closed AdallomRoy closed 7 years ago

AdallomRoy commented 7 years ago

This PR adds the ability to backup to blob storage. It also contains tests that are very similar to the S3 ones -

Couple of issues:

  1. There are no good mocking libraries for Azure blob storage for Go lang. So currently, in order to run the tests you will need the Azure Storage Emulator (https://docs.microsoft.com/en-us/azure/storage/storage-use-emulator) - meaning that tests (but only tests) will only run on Windows. I'm also working on making this work with azurite (https://github.com/arafato/azurite) so that the tests could run on any platform.

  2. Azure go SDK supports only go 1.7 & up (Updated travis file) - not sure if backwards compatibility with go 1.6 and down is important for you.

In any case - it's tested and working properly, tested with smaller and larger replica sets.

AGFeldman commented 7 years ago

Thanks! I'll take a look this week

Consider using an environment variable to disable CI tests that are not applicable. We use this to turn off some tests that require a MongoRocks environment: https://github.com/facebookgo/rocks-strata/commit/8e954ee2b5822c7923c18239343c536114fdf9f5

AdallomRoy commented 7 years ago

Sounds good, I can do that.

AdallomRoy commented 7 years ago

Hi Aaron, I did what you suggested. For some reason the tests failed on the tip version of go, however, it doesn't seem to be related to any of the changes I made. Might be worth to check...

AdallomRoy commented 7 years ago

Done!