commit
daf9672311
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,7 +2,6 @@ tag_annotation
|
|||
coverage.out
|
||||
cmd/ipfs-cluster-service/ipfs-cluster-service
|
||||
cmd/ipfs-cluster-ctl/ipfs-cluster-ctl
|
||||
deptools/gx*
|
||||
sharness/lib/sharness
|
||||
sharness/test-results
|
||||
sharness/trash*
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
0.10.0: QmNRAkcKW6HzZnZpKKQdUC4CGQB1cjQWwyaCso5wbMJQ6A
|
|
@ -11,7 +11,6 @@ sudo: required
|
|||
|
||||
cache:
|
||||
directories:
|
||||
- $GOPATH/src/gx
|
||||
- $GOPATH/pkg/mod
|
||||
- $HOME/.cache/go-build
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ ENV GO111MODULE on
|
|||
|
||||
COPY . $SRC_PATH
|
||||
WORKDIR $SRC_PATH
|
||||
RUN make docker_install
|
||||
RUN make install
|
||||
|
||||
ENV SUEXEC_VERSION v0.2
|
||||
ENV TINI_VERSION v0.16.1
|
||||
|
|
69
Makefile
69
Makefile
|
@ -1,13 +1,6 @@
|
|||
deptools=deptools
|
||||
sharness = sharness/lib/sharness
|
||||
GXENABLED=no # Set to yes for Gx builds.
|
||||
gx=$(deptools)/gx
|
||||
gx-go=$(deptools)/gx-go
|
||||
|
||||
# For debugging
|
||||
problematic_test = TestClustersReplicationRealloc
|
||||
|
||||
export PATH := $(deptools):$(PATH)
|
||||
export GO111MODULE := on
|
||||
|
||||
all: build
|
||||
clean: rwundo clean_sharness
|
||||
|
@ -16,62 +9,32 @@ clean: rwundo clean_sharness
|
|||
@rm -rf ./test/testingData
|
||||
@rm -rf ./compose
|
||||
|
||||
install: gx-deps
|
||||
install:
|
||||
$(MAKE) -C cmd/ipfs-cluster-service install
|
||||
$(MAKE) -C cmd/ipfs-cluster-ctl install
|
||||
|
||||
docker_install: docker_gx-deps
|
||||
$(MAKE) -C cmd/ipfs-cluster-service install
|
||||
$(MAKE) -C cmd/ipfs-cluster-ctl install
|
||||
|
||||
build: gx-deps
|
||||
build:
|
||||
go build -ldflags "-X ipfscluster.Commit=$(shell git rev-parse HEAD)"
|
||||
$(MAKE) -C cmd/ipfs-cluster-service build
|
||||
$(MAKE) -C cmd/ipfs-cluster-ctl build
|
||||
|
||||
service: gx-deps
|
||||
service:
|
||||
$(MAKE) -C cmd/ipfs-cluster-service ipfs-cluster-service
|
||||
ctl: gx-deps
|
||||
ctl:
|
||||
$(MAKE) -C cmd/ipfs-cluster-ctl ipfs-cluster-ctl
|
||||
|
||||
gx-clean: clean
|
||||
ifeq ($(GXENABLED),yes)
|
||||
$(MAKE) -C $(deptools) gx-clean
|
||||
endif
|
||||
|
||||
gx:
|
||||
ifeq ($(GXENABLED),yes)
|
||||
$(MAKE) -C $(deptools) gx
|
||||
endif
|
||||
|
||||
|
||||
gx-deps: gx
|
||||
ifeq ($(GXENABLED),yes)
|
||||
$(gx) install --global
|
||||
$(gx-go) rewrite
|
||||
endif
|
||||
|
||||
# Run this target before building the docker image
|
||||
# and then gx won't attempt to pull all deps
|
||||
# from the network each time
|
||||
docker_gx-deps: gx
|
||||
ifeq ($(GXENABLED),yes)
|
||||
$(gx) install --local
|
||||
$(gx-go) rewrite
|
||||
endif
|
||||
|
||||
check:
|
||||
go vet ./...
|
||||
golint -set_exit_status -min_confidence 0.3 ./...
|
||||
|
||||
test: gx-deps
|
||||
test:
|
||||
go test -v ./...
|
||||
|
||||
test_sharness: $(sharness)
|
||||
@sh sharness/run-sharness-tests.sh
|
||||
|
||||
test_problem: gx-deps
|
||||
go test -loglevel "DEBUG" -v -run $(problematic_test)
|
||||
test_problem:
|
||||
go test -timeout 20m -loglevel "DEBUG" -v -run $(problematic_test)
|
||||
|
||||
$(sharness):
|
||||
@echo "Downloading sharness"
|
||||
|
@ -85,18 +48,6 @@ clean_sharness:
|
|||
@rm -rf ./sharness/lib/sharness
|
||||
@rm -rf sharness/trash\ directory*
|
||||
|
||||
rw: gx
|
||||
ifeq ($(GXENABLED),yes)
|
||||
$(gx-go) rewrite
|
||||
endif
|
||||
|
||||
rwundo: gx
|
||||
ifeq ($(GXENABLED),yes)
|
||||
$(gx-go) rewrite --undo
|
||||
endif
|
||||
publish: rwundo
|
||||
$(gx) publish
|
||||
|
||||
docker:
|
||||
docker build -t cluster-image -f Dockerfile .
|
||||
docker run --name tmp-make-cluster -d --rm cluster-image && sleep 4
|
||||
|
@ -119,6 +70,6 @@ docker-compose:
|
|||
docker exec cluster1 ipfs-cluster-ctl peers ls | grep -o "Sees 1 other peers" | uniq -c | grep 2
|
||||
docker-compose down
|
||||
|
||||
prcheck: gx-deps check service ctl test
|
||||
prcheck: check service ctl test
|
||||
|
||||
.PHONY: all gx gx-deps test test_sharness clean_sharness rw rwundo publish service ctl install clean gx-clean docker
|
||||
.PHONY: all test test_sharness clean_sharness rw rwundo publish service ctl install clean docker
|
||||
|
|
|
@ -25,11 +25,7 @@ This is a Go client library to use the ipfs-cluster REST HTTP API.
|
|||
|
||||
## Install
|
||||
|
||||
You can import `github.com/ipfs/ipfs-cluster/api/rest/client` in your code. If you wish to use [`gx`](https://github.com/whyrusleeping/gx-go) for dependency management, it can be imported with:
|
||||
|
||||
```
|
||||
$ gx import github.com/ipfs/ipfs-cluster/
|
||||
```
|
||||
You can import `github.com/ipfs/ipfs-cluster/api/rest/client` in your code.
|
||||
|
||||
The code can be downloaded and tested with:
|
||||
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
gx_version=v0.14.1
|
||||
gx-go_version=v1.9.0
|
||||
gateway=https://ipfs.io
|
||||
local_gateway=http://127.0.0.1:8080
|
||||
dist=dist.ipfs.io
|
||||
dl_cmd=wget -nc
|
||||
|
||||
gx=gx_$(gx_version)
|
||||
gx-go=gx-go_$(gx-go_version)
|
||||
bin_env=$(shell go env GOHOSTOS)-$(shell go env GOHOSTARCH)
|
||||
|
||||
gx_tar=$(gx)_$(bin_env).tar.gz
|
||||
gx-go_tar=$(gx-go)_$(bin_env).tar.gz
|
||||
|
||||
gx_dist_path=/ipns/$(dist)/gx/$(gx_version)/$(gx_tar)
|
||||
gx-go_dist_path=/ipns/$(dist)/gx-go/$(gx-go_version)/$(gx-go_tar)
|
||||
|
||||
gx_download_local=$(dl_cmd) $(local_gateway)$(gx_dist_path)
|
||||
gx_download=$(dl_cmd) $(gateway)$(gx_dist_path)
|
||||
|
||||
gx-go_download_local=$(dl_cmd) $(local_gateway)$(gx-go_dist_path)
|
||||
gx-go_download=$(dl_cmd) $(gateway)$(gx-go_dist_path)
|
||||
|
||||
$(gx):
|
||||
@echo "Downloading gx"
|
||||
rm -f gx
|
||||
$(gx_download_local) || $(gx_download)
|
||||
tar -zxf $(gx_tar) --strip-components=1 gx/gx
|
||||
mv gx $(gx)
|
||||
ln -s $(gx) gx
|
||||
rm $(gx_tar)
|
||||
|
||||
$(gx-go):
|
||||
@echo "Downloading gx-go"
|
||||
rm -f gx-go
|
||||
$(gx-go_download_local) || $(gx-go_download)
|
||||
tar -zxf $(gx-go_tar) --strip-components=1 gx-go/gx-go
|
||||
mv gx-go $(gx-go)
|
||||
ln -s $(gx-go) gx-go
|
||||
rm $(gx-go_tar)
|
||||
|
||||
gx: $(gx) $(gx-go)
|
||||
|
||||
gx-clean:
|
||||
@rm -f gx*
|
185
package.json
185
package.json
|
@ -1,185 +0,0 @@
|
|||
{
|
||||
"author": "hsanjuan",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ipfs/ipfs-cluster"
|
||||
},
|
||||
"gx": {
|
||||
"dvcsimport": "github.com/ipfs/ipfs-cluster"
|
||||
},
|
||||
"gxDependencies": [
|
||||
{
|
||||
"author": "hsanjuan",
|
||||
"hash": "QmZ88KbrvZMJpXaNwAGffswcYKz8EbeafzAFGMCA6MEZKt",
|
||||
"name": "go-libp2p-consensus",
|
||||
"version": "0.0.3"
|
||||
},
|
||||
{
|
||||
"author": "whyrusleeping",
|
||||
"hash": "QmWRUZmLb9qEpwuHTtrzbdE5LQxm64qftncw5o8tBVPobL",
|
||||
"name": "go-libp2p",
|
||||
"version": "6.0.38"
|
||||
},
|
||||
{
|
||||
"author": "hsanjuan",
|
||||
"hash": "QmX73JLtJ92tDcZajRrYtQDVSLQ5LPnADHwwQLXkTzNRhE",
|
||||
"name": "go-libp2p-raft",
|
||||
"version": "1.2.20"
|
||||
},
|
||||
{
|
||||
"author": "urfave",
|
||||
"hash": "Qmc1AtgBdoUHP8oYSqU81NRYdzohmF45t5XNwVMvhCxsBA",
|
||||
"name": "cli",
|
||||
"version": "1.19.1"
|
||||
},
|
||||
{
|
||||
"author": "hashicorp",
|
||||
"hash": "QmZa48BnsaEMVNf1hT2HYP2ak97fqyTnadXu6xSu2Y8xui",
|
||||
"name": "raft-boltdb",
|
||||
"version": "2017.10.24"
|
||||
},
|
||||
{
|
||||
"author": "gorilla",
|
||||
"hash": "QmXEPZmhs4r1rab3e2LqnrLvTFKCMEwC5SyEa3xTFJDqtU",
|
||||
"name": "mux",
|
||||
"version": "1.6.2"
|
||||
},
|
||||
{
|
||||
"author": "hsanjuan",
|
||||
"hash": "QmcJCApoEsCJJap2iS1os9GFX5EuRrfuPeZdjCopz2SyPm",
|
||||
"name": "go-libp2p-gorpc",
|
||||
"version": "1.1.4"
|
||||
},
|
||||
{
|
||||
"author": "libp2p",
|
||||
"hash": "QmTwDsJUPioMKoiuXkAmiPxL1i4tjuG5vkxJgNpiHpXb3Y",
|
||||
"name": "go-libp2p-pnet",
|
||||
"version": "3.0.5"
|
||||
},
|
||||
{
|
||||
"author": "dignifiedquire",
|
||||
"hash": "QmdDpQpe8RHu9qBiFWPaBvSAUr2kRLWipEjzDqAMfWqwFQ",
|
||||
"name": "go-fs-lock",
|
||||
"version": "0.1.11"
|
||||
},
|
||||
{
|
||||
"author": "hsanjuan",
|
||||
"hash": "QmUgYx5qgavtQFAUtgcfFJZdXZfYY7hAN3EUF4yrPhjJnb",
|
||||
"name": "go-libp2p-http",
|
||||
"version": "1.1.16"
|
||||
},
|
||||
{
|
||||
"author": "ipfs",
|
||||
"hash": "QmSM3chHm3ZggBZsY2BuJbvpD9VF2mzdgR5JBQ78KnsbDw",
|
||||
"name": "go-ipfs-api",
|
||||
"version": "1.4.8"
|
||||
},
|
||||
{
|
||||
"author": "whyrusleeping",
|
||||
"hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN",
|
||||
"name": "go-cid",
|
||||
"version": "0.9.3"
|
||||
},
|
||||
{
|
||||
"author": "hsanjuan",
|
||||
"hash": "QmYmZ81dU5nnmBFy5MmktXLZpt8QCWhRJd6M1uxVF6vke8",
|
||||
"name": "go-ipfs-chunker",
|
||||
"version": "0.1.6"
|
||||
},
|
||||
{
|
||||
"author": "hector",
|
||||
"hash": "QmdiZuFuiFD1Gbuu8PdqmsfrCR3z4QKSR2bN1NAvnJgTY7",
|
||||
"name": "go-ipfs-posinfo",
|
||||
"version": "0.1.5"
|
||||
},
|
||||
{
|
||||
"author": "why",
|
||||
"hash": "QmSbCXEwpsog4vBf53YntmGk9uHsgZNuU5oBKv3o2kkTSe",
|
||||
"name": "go-unixfs",
|
||||
"version": "1.3.11"
|
||||
},
|
||||
{
|
||||
"author": "why",
|
||||
"hash": "QmP9i4G9nRcfKBnpk1A7CwU7ppLkSn2j6vJeWn2AJ8rfcN",
|
||||
"name": "go-merkledag",
|
||||
"version": "1.1.36"
|
||||
},
|
||||
{
|
||||
"hash": "QmUTc27ifFbaTWZBCKFxuMfWfB1jy88MtYtB37vZ9saaXo",
|
||||
"name": "go-libp2p-kad-dht",
|
||||
"version": "4.4.30"
|
||||
},
|
||||
{
|
||||
"author": "hsanjuan",
|
||||
"hash": "QmZuXacgXW4YkAveAQWvFUyLW9vzPtWKADjeoqtk22GcEK",
|
||||
"name": "go-mfs",
|
||||
"version": "0.1.48"
|
||||
},
|
||||
{
|
||||
"author": "blang",
|
||||
"hash": "QmYRGECuvQnRX73fcvPnGbYijBcGN2HbKZQ7jh26qmLiHG",
|
||||
"name": "semver",
|
||||
"version": "3.5.1"
|
||||
},
|
||||
{
|
||||
"author": "magik6k",
|
||||
"hash": "QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb",
|
||||
"name": "go-ipfs-files",
|
||||
"version": "2.0.6"
|
||||
},
|
||||
{
|
||||
"author": "lanzafame",
|
||||
"hash": "QmYgGtLm9WJRgh6iuaZap8qVC1gqixFbZCNfhjLNBhWMCm",
|
||||
"name": "envconfig",
|
||||
"version": "1.3.1"
|
||||
},
|
||||
{
|
||||
"author": "whyrusleeping",
|
||||
"hash": "Qmdmn9FrkJbz6SdmxceJs4nXFRzbM9iAefyQwveGSBejXT",
|
||||
"name": "go-libp2p-pubsub",
|
||||
"version": "0.11.14"
|
||||
},
|
||||
{
|
||||
"author": "hsanjuan",
|
||||
"hash": "QmNNk4iczWp8Q4R1mXQ2mrrjQvWisYqMqbW1an8qGbJZsM",
|
||||
"name": "cors",
|
||||
"version": "1.6.0"
|
||||
},
|
||||
{
|
||||
"author": "ZenGround0",
|
||||
"hash": "QmPuuqyMyoadGDkefg7L11kAwmvQykrHiRkuLjQRpa1bqF",
|
||||
"name": "go-dot",
|
||||
"version": "0.0.1"
|
||||
},
|
||||
{
|
||||
"author": "hsanjuan",
|
||||
"hash": "QmNVpHFt7QmabuVQyguf8AbkLDZoFh7ifBYztqijYT1Sd2",
|
||||
"name": "go.opencensus.io",
|
||||
"version": "0.19.0"
|
||||
},
|
||||
{
|
||||
"author": "lanzafame",
|
||||
"hash": "QmYe4hq5UmoR4LNYHtxNuhHtTYzjgU1FdFoKL8fWj1uMf4",
|
||||
"name": "go-libp2p-ocgorpc",
|
||||
"version": "0.1.8"
|
||||
},
|
||||
{
|
||||
"author": "google",
|
||||
"hash": "QmSSeQqc5QeuefkaM6JFV5tSF9knLUkXKVhW1eYRiqe72W",
|
||||
"name": "uuid",
|
||||
"version": "0.1.0"
|
||||
},
|
||||
{
|
||||
"author": "hsanjuan",
|
||||
"hash": "QmWqSMkd9LSYahr9NQvrxoZ4sCzkGctQstqfAYKepzukS6",
|
||||
"name": "go-ds-crdt",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
],
|
||||
"gxVersion": "0.11.0",
|
||||
"language": "go",
|
||||
"license": "MIT",
|
||||
"name": "ipfs-cluster",
|
||||
"releaseCmd": "git commit -S -a -m \"gx publish $VERSION\"",
|
||||
"version": "0.10.0"
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Updates the Version variables, commits, tags, signs and "gx release" the package
|
||||
# Updates the Version variables, commits, tags and signs
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
@ -21,5 +21,4 @@ echo "Tag for Release ${version}" > tag_annotation
|
|||
echo >> tag_annotation
|
||||
git log --pretty=oneline ${lastver}..HEAD >> tag_annotation
|
||||
git tag -a -s -F tag_annotation v$version
|
||||
rm tag_annotation
|
||||
# gx release $version
|
||||
rm tag_annotation
|
Loading…
Reference in New Issue
Block a user