You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a binary build of the go-ds-s3 Kubo plugin targeting Kubo version ${{ env.RELEASE }}.
116
+
117
+
To install, download the relevant asset for your platform, unpack the plugin file (`go-ds-s3-plugin`) and place it in `~/.ipfs/plugins`. MacOS users will need to compile Kubo themselves, as the official releases have no CGO support.
Copy file name to clipboardExpand all lines: README.md
+28-74Lines changed: 28 additions & 74 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,38 @@ This is an implementation of the datastore interface backed by amazon s3.
4
4
5
5
**NOTE:** Plugins only work on Linux and MacOS at the moment. You can track the progress of this issue here: https://github.com/golang/go/issues/19282
6
6
7
-
## Building and Installing
7
+
## Quickstart
8
8
9
-
You must build the plugin with the *exact* version of go used to build the kubo binary you will use it with. You can find the go version for kubo builds from dist.ipfs.io in the build-info file, e.g. https://dist.ipfs.io/kubo/v0.4.22/build-info or by running `ipfs version --all`.
9
+
1. Grab a plugin release from the [releases](https://github.com/ipfs/go-ds-s3/releases) section matching your Kubo version and install the plugin file in `~/.ipfs/plugins`.
10
+
2. Follow the instructions in the plugin's [README.md](go-ds-s3-plugin/README.md)
10
11
11
-
In addition to needing the exact version of go, you need to build the correct version of this plugin.
12
12
13
-
* To build against a released version of kubo, checkout the `release/v$VERSION` branch and build.
14
-
* To build against a custom (local) build of kubo, run `make IPFS_VERSION=/path/to/kubo/source`.
13
+
## Building and installing
15
14
16
-
You can then install it into your local IPFS repo by running `make install`.
15
+
16
+
The plugin can be manually built/installed for different versions of Kubo (starting with 0.23.0) with:
17
+
18
+
```
19
+
git checkout go-ds-s3-plugin/v<kubo-version>
20
+
make plugin
21
+
make install-plugin
22
+
```
23
+
24
+
## Updating to a new version
25
+
26
+
1.`go get` the Kubo release you want to build for. Make sure any other
27
+
dependencies are aligned to what Kubo uses.
28
+
2.`make install` and test.
29
+
30
+
31
+
If you are building against dist-released versions of Kubo, you need to build using the same version of go that was used to build the release ([here](https://github.com/ipfs/distributions/blob/master/.tool-versions)).
32
+
33
+
If you are building against your own build of Kubo you must align your plugin to use it.
34
+
35
+
If you are updating this repo to produce a new version of the plugin:
36
+
37
+
1. Submit a PR so that integration tests run
38
+
2. Make a new tag `go-ds-s3-plugin/v<kubo_version>` and push it. This will build and release the plugin prebuilt binaries.
17
39
18
40
## Bundling
19
41
@@ -46,74 +68,6 @@ As go plugins can be finicky to correctly compile and install, you may want to c
46
68
> make install
47
69
```
48
70
49
-
## Detailed Installation
50
-
51
-
For a brand new ipfs instance (no data stored yet):
52
-
53
-
1. Copy s3plugin.so $IPFS_DIR/plugins/go-ds-s3.so (or run `make install` if you are installing locally).
54
-
2. Run `ipfs init`.
55
-
3. Edit $IPFS_DIR/config to include s3 details (see Configuration below).
56
-
4. Overwrite `$IPFS_DIR/datastore_spec` as specified below (*Don't do this on an instance with existing data - it will be lost*).
57
-
58
-
### Configuration
59
-
60
-
The config file should include the following:
61
-
```json
62
-
{
63
-
"Datastore": {
64
-
...
65
-
66
-
"Spec": {
67
-
"mounts": [
68
-
{
69
-
"child": {
70
-
"type": "s3ds",
71
-
"region": "us-east-1",
72
-
"bucket": "$bucketname",
73
-
"rootDirectory": "$bucketsubdirectory",
74
-
"accessKey": "",
75
-
"secretKey": ""
76
-
},
77
-
"mountpoint": "/blocks",
78
-
"prefix": "s3.datastore",
79
-
"type": "measure"
80
-
},
81
-
```
82
-
83
-
If the access and secret key are blank they will be loaded from the usual ~/.aws/.
84
-
If you are on another S3 compatible provider, e.g. Linode, then your config should be:
85
-
86
-
```json
87
-
{
88
-
"Datastore": {
89
-
...
90
-
91
-
"Spec": {
92
-
"mounts": [
93
-
{
94
-
"child": {
95
-
"type": "s3ds",
96
-
"region": "us-east-1",
97
-
"bucket": "$bucketname",
98
-
"rootDirectory": "$bucketsubdirectory",
99
-
"regionEndpoint": "us-east-1.linodeobjects.com",
100
-
"accessKey": "",
101
-
"secretKey": ""
102
-
},
103
-
"mountpoint": "/blocks",
104
-
"prefix": "s3.datastore",
105
-
"type": "measure"
106
-
},
107
-
```
108
-
109
-
If you are configuring a brand new ipfs instance without any data, you can overwrite the datastore_spec file with:
0 commit comments