From a11bb713d681cf532ec5a5e8a729c59d1b5da83f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Wed, 20 Sep 2017 15:11:14 +0200 Subject: [PATCH 1/2] docs: Add some docs on plugins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit License: MIT Signed-off-by: Ɓukasz Magiera --- CHANGELOG.md | 1 + docs/experimental-features.md | 13 ++++++++++ docs/plugins.md | 49 +++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 docs/plugins.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dc54570b..6e54d2aa5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -76,6 +76,7 @@ plugin](https://github.com/ipfs/go-ipld-eth) that lets ipfs ingest and operate on all ethereum blockchain data. Soon to come are plugins for the bitcoin and zcash data formats. In the future, we will be adding plugins for other things like datastore backends and specialized libp2p network transports. +You can read more on this topic in [Plugin docs](docs/plugins.md) In order to simplify its integration with fs-repo-migrations, we've switched the ipfs/go-ipfs docker image from a musl base to a glibc base. For most users diff --git a/docs/experimental-features.md b/docs/experimental-features.md index 8ac3b2f22..71e267c33 100644 --- a/docs/experimental-features.md +++ b/docs/experimental-features.md @@ -282,3 +282,16 @@ Peers can see their (unspecific) relay address in the output of dialing. - [ ] Dialing priorities for relay addresses; arguably, relay addresses should have lower priority than direct dials. + +## Plugins + +Plugins allow to add functionality without the need to recompile the daemon. + +### Basic Usage: + +See [Plugin docs](./plugins.md) + +### Road to being a real feature + +- [ ] Better support for platforms other than Linux +- [ ] More plugins and plugin types diff --git a/docs/plugins.md b/docs/plugins.md new file mode 100644 index 000000000..91a80ec23 --- /dev/null +++ b/docs/plugins.md @@ -0,0 +1,49 @@ +# Plugins + +Since 0.4.11 go-ipfs has an experimental plugin system for various added +functionality. + +When IPFS node is created, it will load plugins from `$IPFS_PATH/plugins` +directory (by default `~/.ipfs/plugins`). + +### Plugin types + +#### IPLD +IPLD plugins add support for additional formats to `ipfs dag` and other IPLD +related commands. + +### Supported plugins + +| Name | Type | +|------|------| +| git | IPLD | + +#### Installation + +##### Linux + +1. Build included plugins: +```bash +go-ipfs$ make build_plugins +go-ipfs$ ls plugin/plugins/*.so +``` + +3. Copy desired plugins to `$IPFS_PATH/plugins` +```bash +go-ipfs$ mkdir -p ~/.ipfs/plugins/ +go-ipfs$ cp plugin/plugins/git.so ~/.ipfs/plugins/ +go-ipfs$ chmod +x ~/.ipfs/plugins/git.so # ensure plugin is executable +``` + +4. Restart daemon if it is running + +##### Other + +Go currently only supports plugins on Linux, for other platforms you will need +to compile them into IPFS binary. + +1. Uncomment plugin entries in `plugin/loader/preload_list` +2. Build ipfs +```bash +go-ipfs$ make build +``` From be6935924fc13c2b648964669f353449a39bbbe3 Mon Sep 17 00:00:00 2001 From: Jeromy Johnson Date: Thu, 5 Oct 2017 10:33:18 +0300 Subject: [PATCH 2/2] Update plugins.md License: MIT Signed-off-by: Jeromy --- docs/experimental-features.md | 4 ++++ docs/plugins.md | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/experimental-features.md b/docs/experimental-features.md index 71e267c33..9bae9ab3e 100644 --- a/docs/experimental-features.md +++ b/docs/experimental-features.md @@ -285,6 +285,9 @@ Peers can see their (unspecific) relay address in the output of ## Plugins +### In Version +0.4.11 + Plugins allow to add functionality without the need to recompile the daemon. ### Basic Usage: @@ -295,3 +298,4 @@ See [Plugin docs](./plugins.md) - [ ] Better support for platforms other than Linux - [ ] More plugins and plugin types +- [ ] Feedback on stability diff --git a/docs/plugins.md b/docs/plugins.md index 91a80ec23..bb049f0d1 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -1,9 +1,9 @@ # Plugins -Since 0.4.11 go-ipfs has an experimental plugin system for various added -functionality. +Since 0.4.11 go-ipfs has an experimental plugin system that allows augmenting +the daemons functionality without recompiling. -When IPFS node is created, it will load plugins from `$IPFS_PATH/plugins` +When an IPFS node is created, it will load plugins from the `$IPFS_PATH/plugins` directory (by default `~/.ipfs/plugins`). ### Plugin types