Go to file
Sina Mahmoodi 03cc809708 config: Add log and testcase for disable_repinning
* Test case creates a bunch of clusters, assigns a pin with replica factor
of n-1 to them, and removes one of the peers randomly. It then tests
to check that the number of clusters pinning the cid is n-2.
* Add warn log to let user know that due to disable_repinning option,
the cluster won't attempt to re-assign the pin.

License: MIT
Signed-off-by: Sina Mahmoodi <itz.s1na@gmail.com>
2018-04-23 22:01:52 +02:00
.gx gx publish 0.3.5 2018-03-29 13:44:25 +02:00
.snapcraft New credentials for pushing snaps 2018-01-10 18:33:33 +01:00
allocator Fix metric expire type. Do not discard metrics in Allocate(). 2018-04-05 17:57:24 +02:00
api Fix metric expire type. Do not discard metrics in Allocate(). 2018-04-05 17:57:24 +02:00
ci Pre-create and pre-connect hosts in tests 2018-04-05 16:49:26 +02:00
config Fix #339: Reduce Sleeps in tests 2018-04-05 16:49:26 +02:00
consensus/raft Fix #339: Reduce Sleeps in tests 2018-04-05 16:49:26 +02:00
docker Dockerfile: Remove ipfs from container 2017-11-29 10:34:03 +01:00
docs Fix #167: Useful messages when consensus doesn't start 2018-03-12 22:54:59 +01:00
informer Fix tests 2018-03-13 16:30:47 +01:00
ipfs-cluster-ctl Release 0.3.5 2018-03-29 13:43:36 +02:00
ipfs-cluster-service Merge pull request #370 from ipfs/fix/svc/init/lock 2018-04-05 09:23:50 +02:00
ipfsconn/ipfshttp Config: provide utility to parse duration arguments. Use it. 2018-03-16 14:22:11 +01:00
monitor/basic Fix metric expire type. Do not discard metrics in Allocate(). 2018-04-05 17:57:24 +02:00
pintracker/maptracker Fix: Recover does not pin recursively 2018-03-27 14:11:21 +02:00
sharness rest/client: Add WaitFor utility function 2018-03-27 14:56:49 +10:00
snap Move back the docker call to travis 2017-11-16 14:36:42 +00:00
state Migration to state specifying recursive attribute 2018-03-12 11:06:42 -04:00
test Update libp2p and deps to correct versions 2018-03-13 15:32:56 +01:00
.codeclimate.yml Codeclimate: increase thresholds again. They're too low for Go. 2018-01-19 22:24:03 +01:00
.dockerignore Issue #259: Address CR comments 2017-12-04 13:59:48 +01:00
.gitignore Include a tag annotation, sign tags 2017-11-15 23:39:22 +01:00
.travis.yml Pre-create and pre-connect hosts in tests 2018-04-05 16:49:26 +02:00
allocate.go Fix metric expire type. Do not discard metrics in Allocate(). 2018-04-05 17:57:24 +02:00
architecture.md Issue #192: Update docs to the new peerset handling 2017-11-14 22:06:59 +01:00
CAPTAIN.LOG.md captains log 2018-03-28 17:42:37 +02:00
CHANGELOG.md Changelog for 0.3.5 2018-03-28 17:42:37 +02:00
cluster_config_test.go Add disable_repinning cluster option 2018-04-22 18:40:46 +02:00
cluster_config.go Add disable_repinning cluster option 2018-04-22 18:40:46 +02:00
cluster_test.go Fix #339: Reduce Sleeps in tests 2018-04-05 16:49:26 +02:00
cluster.go config: Add log and testcase for disable_repinning 2018-04-23 22:01:52 +02:00
clusterhost.go rest/libp2p-http: address @zenground0 comments 2018-03-20 19:51:57 +01:00
config_test.go Add disable_repinning cluster option 2018-04-22 18:40:46 +02:00
connect_graph.go Testing and polishing connection graph 2018-01-22 10:03:37 -05:00
contribute.md feat contribution guidelines: add guidelines 2017-12-06 15:15:50 +01:00
coverage.sh Fix #339: Reduce Sleeps in tests 2018-04-05 16:49:26 +02:00
Dockerfile Dockerfile: Remove ipfs from container 2017-11-29 10:34:03 +01:00
Dockerfile-bundle Dockerfile: Remove ipfs from container 2017-11-29 10:34:03 +01:00
Dockerfile-test Dockerfile-test: use go-ipfs:master 2017-11-29 10:34:03 +01:00
ipfscluster_test.go config: Add log and testcase for disable_repinning 2018-04-23 22:01:52 +02:00
ipfscluster.go Merge pull request #342 from ipfs/feat/recursive-pins 2018-03-12 14:14:59 -04:00
LICENSE ipfscluster-server executable 2016-12-21 19:37:25 +01:00
logging.go Fix #240: Add test flags. Remove build tags for logging control. 2018-01-16 09:28:40 +01:00
Makefile Fix #339: Reduce Sleeps in tests 2018-04-05 16:49:26 +02:00
package.json gx publish 0.3.5 2018-03-29 13:44:25 +02:00
peer_manager_test.go Fix metric expire type. Do not discard metrics in Allocate(). 2018-04-05 17:57:24 +02:00
peer_manager.go Relocate multiaddrJoin and multiaddrSplit to api/types.h 2018-03-16 13:37:32 +01:00
pnet_test.go Fix #339: Reduce Sleeps in tests 2018-04-05 16:49:26 +02:00
README.md Readme: specify that we want Go1.9+ 2018-03-21 09:33:12 +01:00
release.sh Fix release changelog when having release candidates. 2018-03-29 13:47:33 +02:00
ROADMAP.md ROADMAP.md: Q4 update. Better late than never. 2017-12-11 13:08:47 +01:00
rpc_api.go rest/libp2p-http: address lanzafame's review 2018-03-20 19:35:42 +01:00
util.go rest/libp2p-http: address lanzafame's review 2018-03-20 19:35:42 +01:00
version.go Release 0.3.5 2018-03-29 13:43:36 +02:00

ipfs-cluster

Made by Main project IRC channel standard-readme compliant GoDoc Go Report Card Build Status Coverage Status

Collective pinning and composition for IPFS.

THIS SOFTWARE IS ALPHA

ipfs-cluster allows to replicate content (by pinning) in multiple IPFS nodes:

  • Works on top of the IPFS daemon by running one cluster peer per IPFS node (ipfs-cluster-service)
  • A replication_factor controls how many times a CID is pinned in the cluster
  • Re-pins stuff in a different place when a peer goes down
  • Provides an HTTP API and a command-line wrapper (ipfs-cluster-ctl)
  • Provides an IPFS daemon API Proxy which intercepts any "pin"/"unpin" requests and does cluster pinning instead
  • The IPFS Proxy allows to build cluster composition, with a cluster peer acting as an IPFS daemon for another higher-level cluster.
  • Peers share the state using Raft-based consensus. Uses the LibP2P stack (go-libp2p-raft, go-libp2p-rpc...)

Table of Contents

Maintainers and Roadmap

This project is captained by @hsanjuan. See the captain's log for a written summary of current status and upcoming features. You can also check out the project's Roadmap for a high level overview of what's coming and the project's Waffle Board to see what issues are being worked on at the moment.

Install

Pre-compiled binaries

You can download pre-compiled binaries for your platform from the dist.ipfs.io website:

Note that since IPFS Cluster is evolving fast, these builds may not contain the latest features/bugfixes. Builds are updated monthly on a best-effort basis.

Docker

You can build or download an automated build of the ipfs-cluster docker container. This container runs ipfs-cluster-service and includes ipfs-cluster-ctl. To launch the latest published version on Docker run:

$ docker run ipfs/ipfs-cluster

To build the container manually you can:

$ docker build . -t ipfs-cluster

You can mount your local ipfs-cluster configuration and data folder by passing -v /data/ipfs-cluster your-local-ipfs-cluster-folder to Docker. Otherwise, a new configuration will be generated. In that case, you can point it to the right IPFS location by setting IPFS_API like --env IPFS_API="/ip4/1.2.3.4/tcp/5001".

Install from the snap store

In any of the supported Linux distros:

sudo snap install ipfs-cluster --edge

(Note that this is an experimental and unstable release, at the moment)

Install from sources

Installing from master is the best way to have the latest features and bugfixes. In order to install the ipfs-cluster-service the ipfs-cluster-ctl tools you will need Go1.9+ installed in your system and the run the following commands:

$ go get -u -d github.com/ipfs/ipfs-cluster
$ cd $GOPATH/src/github.com/ipfs/ipfs-cluster
$ make install

This will install ipfs-cluster-service and ipfs-cluster-ctl in your $GOPATH/bin folder. See the usage below.

Usage

ipfs-cluster-usage

Quickstart

** Remember: Start your ipfs daemon before running ipfs-cluster **

ipfs-cluster-service runs an ipfs-cluster peer:

  • Initialize with ipfs-cluster-service init
    • This will randomly generate a secret which should be shared among all peers.
  • Run with ipfs-cluster-service. Check --help for options

For more information about ipfs-cluster-service see the ipfs-cluster-service README. Also, read A guide to running IPFS Cluster for full a full overview of how cluster works.

ipfs-cluster-ctl is used to interface with the ipfs-cluster peer:

ipfs-cluster-ctl id                    # see peer information
ipfs-cluster-ctl pin add <cid>         # Pin a CID in ipfs-cluster
ipfs-cluster-ctl pin rm <cid>          # Upin a CID
ipfs-cluster-ctl ls                    # See current pins and allocations
ipfs-cluster-ctl status <cid>          # See information from every allocation for a CID.

For information on how to manage and perform operations on an IPFS Cluster peer see the ipfs-cluster-ctl README.

Go

IPFS Cluster nodes can be launched directly from Go. The Cluster object provides methods to interact with the cluster and perform actions.

Documentation and examples on how to use IPFS Cluster from Go can be found in godoc.org/github.com/ipfs/ipfs-cluster.

Additional docs

You can find more information and detailed guides:

Note: please contribute to improve and add more documentation!

API

TODO: Swagger

This is a quick summary of API endpoints offered by the Rest API component (these may change before 1.0):

Method Endpoint Comment
GET /id Cluster peer information
GET /version Cluster version
GET /peers Cluster peers
POST /peers Add new peer
DELETE /peers/{peerID} Remove a peer
GET /allocations List of pins and their allocations (consensus-shared state)
GET /allocations/{cid} Show a single pin and its allocations (from the consensus-shared state)
GET /pins Status of all tracked CIDs
POST /pins/sync Sync all
GET /pins/{cid} Status of single CID
POST /pins/{cid} Pin CID
DELETE /pins/{cid} Unpin CID
POST /pins/{cid}/sync Sync CID
POST /pins/{cid}/recover Recover CID

Architecture

The best place to get an overview of how cluster works, what components exist etc. is the architecture.md doc.

Contribute

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © Protocol Labs, Inc.