Skip to content

adding azure support#79

Merged
willnorris merged 1 commit intowillnorris:masterfrom
PaulARoy:master
Sep 8, 2017
Merged

adding azure support#79
willnorris merged 1 commit intowillnorris:masterfrom
PaulARoy:master

Conversation

@PaulARoy
Copy link
Copy Markdown
Contributor

I was using this amazing proxy on prod but without cache because my Azure App Service could not handle storage well enough.
But it was clearly not optimal. I thought it would be cool to add Azure Storage Support.

For that I needed an implementation of Http Cache with Azure Storage so I built one (http://github.com/PaulARoy/azurestoragecache)

This pull request only adds support for azure cache according to my package.

Usage: « -cache azure »
Three values can be passed on to the cache:

  • Azure Account Name (empty = get env variable « AZURESTORAGE_ACCOUNT_NAME »)
  • Azure Account Key (empty = get env variable « AZURESTORAGE_ACCESS_KEY »)
  • Container Name (empty = "cache")

Feel free to modify anything. It currently runs in production for my website.

@googlebot
Copy link
Copy Markdown
Collaborator

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@googlebot
Copy link
Copy Markdown
Collaborator

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

@googlebot
Copy link
Copy Markdown
Collaborator

CLAs look good, thanks!

@PaulARoy
Copy link
Copy Markdown
Contributor Author

To be honest I am not quite sure why the CI fails…
It seems related to the azure sdk package (line 183 to 194 indicates fails on azure sdk)

I tried adding my package & azure sdk to the vendors file but it did not help so far (I am quite new to Go and the whole architecture).
Does anyone have a clue on what to change? Tests seem to pass and it works in production.

@willnorris
Copy link
Copy Markdown
Owner

Hey Paul, sorry I never got around to taking a look at this when you first sent it. Are you still interested in trying to land this? If so, it looks like the underlying azure sdk has changed a bit since you wrote your azurestorage package. I've never used Azure myself, so it might be faster for you to fix it up, otherwise I'll try taking a look at some point and send a pull request to your azurestorage project.

@PaulARoy
Copy link
Copy Markdown
Contributor Author

PaulARoy commented Sep 5, 2017

Hi Will!
No problem for the delay.
Unfortunately I rewrote my own image proxy using Asp.Net core, I had a small issue on caching: Azure Blob Storage seem to handle incorrectly the names we use for the images (http://…)

This is my first time with Go, I tried to workaround the issue but I had to fix it quickly and rewriting the whole layer using a technology I already mastered was faster.

I think it would be best to fix it with your project, as it is way more efficient than what I wrote.

I can work on this, but I am in a rush these weeks, I should be able to land something but not before october I think. If you prefer to work on this on your own that's fine by me.

@willnorris
Copy link
Copy Markdown
Owner

Sounds good, I'll try poking around with azure storage and see what I can figure out. It looks like the Azure SDK has changed in relatively small ways, so I don't think it'll be a lot of work to fix your storage layer.

@willnorris
Copy link
Copy Markdown
Owner

okay, pull request sent your way: PaulARoy/azurestoragecache#1

@willnorris willnorris merged commit f1ef8af into willnorris:master Sep 8, 2017
@willnorris
Copy link
Copy Markdown
Owner

all merged in and ready to go. If and when you switch back to using imageproxy, let me know how it works for you. And thanks for the contribution!

@PaulARoy
Copy link
Copy Markdown
Contributor Author

PaulARoy commented Sep 8, 2017

Thank you very much! This is amazing :)

As I said I am in a rush for a few weeks but I will try as soon as I can!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants