Skip to content
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

Support Google Cloud Storage as Index Store #18

Open
mosuka opened this issue Dec 20, 2021 · 4 comments
Open

Support Google Cloud Storage as Index Store #18

mosuka opened this issue Dec 20, 2021 · 4 comments

Comments

@mosuka
Copy link
Owner

mosuka commented Dec 20, 2021

No description provided.

@petergeorgas
Copy link

I am a bit new with Golang, but find a task like this interesting. @mosuka in your opinion, how big of an undertaking is this ticket? I have little experience with GCP but this feels like a great opportunity to get more comfortable with Go and GCP...

@mosuka mosuka changed the title Support Google Cloud Storage Support Google Cloud Storage as Index Store Jan 17, 2022
@mosuka
Copy link
Owner Author

mosuka commented Jan 17, 2022

@petergeorgas
Thank you for your interest.
I think it is not so difficult. You can see the S3 implementation for details.

https://github.com/mosuka/phalanx/blob/main/clients/s3.go
https://github.com/mosuka/phalanx/blob/main/directory/directory_s3.go

I'm planning to implement and integration test it first using fake-gcs-server.
https://github.com/fsouza/fake-gcs-server

I am looking forward to your pull request.

@petergeorgas
Copy link

Thank you for your interest. I think it is not so difficult. You can see the S3 implementation for details.

https://github.com/mosuka/phalanx/blob/main/clients/s3.go https://github.com/mosuka/phalanx/blob/main/directory/directory_s3.go

I'm planning to implement and integration test it first using fake-gcs-server. https://github.com/fsouza/fake-gcs-server

I am looking forward to your pull request.

How do you want to deal with credentials?

https://pkg.go.dev/cloud.google.com/go?utm_source=godoc#hdr-Authentication_and_Authorization

@mosuka
Copy link
Owner Author

mosuka commented Jan 18, 2022

At first, I think we can use Google Application Default Credentials (ADC).
I want to read the specified credential file if the environment variable GOOGLE_APPLICATION_CREDENTIALS is set.

In Phalanx, each resource is expressed by a URI.
I want GCS to be the following URI.

gs://<BUCKET_NAME>/<PATH_TO_INDEX_DIR>/<INDEX_NAME>

I want to be able to specify credentials in the URI parameter as well as in other storage.

gs://<BUCKET_NAME>/<PATH_TO_INDEX_DIR>/<INDEX_NAME>?application_credentials=<PATH_TO_APPLICATION_CREDENTIALS>

You can refer to the S3 documentation here.

https://github.com/mosuka/phalanx/blob/main/docs_md/index_store.md#amazon-s3

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

No branches or pull requests

2 participants