-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add ceph rados plugin #5744
Add ceph rados plugin #5744
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
We require the whole dependency tree to be under gx, so you'll need to gx import
go-ceph in the datastore implementation and release the package once again. I published go-ceph to gx under QmbdFveSZQFqLNB9VXwaj4WFEX424h1tU2gqcTCZxN5oDT
, so you can just do:
[in go-ds-rados]
$ gx import QmbdFveSZQFqLNB9VXwaj4WFEX424h1tU2gqcTCZxN5oDT
$ gx release patch
[pin/copy hash]
[cd to go-ipfs]
$ gx update [new go-ds-rados hash]
[commit/push]
Datastore implementation looks good, I still need to test it, but I'm definitely interested in running this for some of my nodes
plugin/loader/preload_list
Outdated
@@ -8,3 +8,4 @@ ipldgit github.com/ipfs/go-ipfs/plugin/plugins/git 0 | |||
badgerds github.com/ipfs/go-ipfs/plugin/plugins/badgerds 0 | |||
flatfs github.com/ipfs/go-ipfs/plugin/plugins/flatfs 0 | |||
levelds github.com/ipfs/go-ipfs/plugin/plugins/levelds 0 | |||
rados github.com/ipfs/go-ipfs/plugin/plugins/rados 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be commented out for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONE
Hi, @magik6k thanks for importing go-ceph for me. Meanwhile go-ceph/rados require librados-dev in ubuntu. I saw that ubuntu 14.04 is used in circleci of go-ipfs, while I use ubuntu 18.04 in my environment. I am not very familiar with circleci. It seems that I should a "- run: sudo apt install librados-dev" in "go test" jobs? It is a little bit late for me(UTC+8), I will try to make circleci work tomorrow. |
Another off-topic question: I encounter 'ERROR: publishing: ' when I try to 'gx publish' rados of go-ceph and its library and headers. The code is here. I know @magik6k already import the whole go-ceph. But I could not understand why I am failed. Could you please give me some hint? Sorry I am not familiar with gx. |
Currently gx can't deal with subpackages, so you should be importing whole repo - https://github.com/ipbit/go-ceph/blob/gx-rados-publish/rados/package.json#L7 |
d1edc2e
to
8c64688
Compare
Hi, here is the v2 of my pr. Changes:
I am a little bit confused by the plugin of datastore. I do not know why make test_go_expensive of go-ipfs will fail.
In my understanding, it is responsibility of datastore plugin(such as go-ds-rados) to make sure all the test passed. It should be decoupled with go-ipfs. Thanks. |
The errors you get are cgo errors, but I have no idea why it even tries to compile the plugin for tests here. cc @Kubuxu for help. Optimally we wouldn't have to build this plugin on CI as the cgo dependency is rather painful, I'm not sure what are the better options here |
.travis.yml
Outdated
@@ -16,6 +16,9 @@ env: | |||
- TEST_NO_FUSE=1 TEST_VERBOSE=1 TEST_SUITE=test_go_expensive | |||
- TEST_NO_FUSE=1 TEST_VERBOSE=1 TEST_SUITE=test_sharness_expensive | |||
|
|||
before_install: | |||
- sudo apt-get install -y librados-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't work on osx - https://travis-ci.org/ipfs/go-ipfs/jobs/451847996
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix it in today's pr
License: MIT Signed-off-by: Shaoxiong Li <[email protected]>
So we can get go-ds-rados v0.0.3 License: MIT Signed-off-by: Bamvor Zhang <[email protected]>
License: MIT Signed-off-by: Bamvor Zhang <[email protected]>
So we can get go-ds-rados v0.0.4 License: MIT Signed-off-by: Bamvor Zhang <[email protected]>
License: MIT Signed-off-by: Bamvor Zhang <[email protected]>
8c64688
to
1ab91e2
Compare
After check the environment of travis ci, I found that there are some changes of librados-dev after ubuntu 1404 in which travis build the package. I could build successful in ubuntu 1804.
Agree. How about create new xxx-plugin project, such radosds-plugin. And build them in supported environment. Then load them( |
This should probably just exist in its own repo, with nice instructions for users to build and install the plugin. The whole point of these plugins is so that they can live in places other than the main go-ipfs repo. We can even link to it from the readme here, but adding it to the codebase feels a bit too heavy |
That said though, this is super cool. I love seeing people extend ipfs in different ways like this :) |
Hi, Thanks. When you are talking about "too heavy", do you mean cgo or the entire go ceph rados datastore?
BTW, I upload the rados profile in our go-ipfs-config/profile.go yesterday. I will write a README. |
Hi, @whyrusleeping I notice that go-ipfs could load the plugins in ~/.ipfs/plugins. I could provide rados-plugin as separate repo and provide document about how to use it. Is it make sense to you? |
@bjzhang Yeah, i’m talking about the whole thing. Most users of go-ipfs won’t need this, and so to the average user, this is just ‘extra bloaty features’. But that’s exactly why we made the plugins load able through the plugins directory. Making this a separate package with nice build instructions is the right way to move things forward. Plus, once we do that, we can feature your plugin in the readme (and probably announce it in our newsletter so other interested people can hear about it). |
Cool. What could I do for this part? Is there some detailed requirement of it? |
Sorry for the delay, I've created an example plugin here: https://github.com/ipfs/go-ipfs-example-plugin. That should be a good starting point for your datastore plugin. |
Thanks @Stebalien . I will follow your document and create a pr to available-plugins |
Thanks! I'm going to close this PR in the mean time. |
In ipfs/go-datastore#101, @magik6k agree that we could contribute a new ceph rados datastore for go-ipfs datastore(public repo: https://github.com/ipbit/go-ds-rados).
As you know, RADOS(Reliable Autonomic Distributed Object Store) provides an extremely scalable storage service for variably sized objects. Basically, it is a distributed key-value store which is suitable for storing files.
These series patches implement the datastore plugin for ceph rados. Such plugin is based on our public repo: https://github.com/ipbit/go-ds-rados . Test passed in our environment. In our work, We read carefully and follow the guideline in https://github.com/ipfs/community/blob/master/CONTRIBUTING_GO.md .
Any feedback is welcome. Thanks in advance.