Skip to content
Permalink
Browse files

Pre release hive alpha v0.1.2 (#1)

* rename repo name.
* add README.md
Signed-off-by: Yi Wang <wangyi@storswift.com>
  • Loading branch information...
yeewang authored and stiartsly committed Jan 17, 2019
1 parent 0d6023a commit 875ef3032694ed0227a5565e3af1a8148b17c9e4
Showing with 349 additions and 286 deletions.
  1. +2 −2 Dockerfile
  2. +2 −2 Dockerfile-bundle
  3. +2 −2 Dockerfile-test
  4. +73 −0 README.ipfs-cluster.md
  5. +35 −45 README.md
  6. +2 −2 add_test.go
  7. +2 −2 adder/adder.go
  8. +2 −2 adder/adder_test.go
  9. +4 −4 adder/adderutils/adderutils.go
  10. +1 −1 adder/ipfsadd/add.go
  11. +2 −2 adder/local/dag_service.go
  12. +3 −3 adder/local/dag_service_test.go
  13. +2 −2 adder/sharding/dag.go
  14. +2 −2 adder/sharding/dag_service.go
  15. +3 −3 adder/sharding/dag_service_test.go
  16. +2 −2 adder/sharding/shard.go
  17. +1 −1 adder/sharding/verify.go
  18. +2 −2 adder/util.go
  19. +1 −1 allocate.go
  20. +2 −2 allocator/ascendalloc/ascendalloc.go
  21. +1 −1 allocator/ascendalloc/ascendalloc_test.go
  22. +2 −2 allocator/descendalloc/descendalloc.go
  23. +1 −1 allocator/descendalloc/descendalloc_test.go
  24. +1 −1 allocator/util/metricsorter.go
  25. +1 −1 api/ipfsproxy/config.go
  26. +5 −5 api/ipfsproxy/ipfsproxy.go
  27. +2 −2 api/ipfsproxy/ipfsproxy_test.go
  28. +1 −1 api/rest/client/client.go
  29. +2 −2 api/rest/client/client_test.go
  30. +1 −1 api/rest/client/methods.go
  31. +4 −4 api/rest/client/methods_test.go
  32. +1 −1 api/rest/client/request.go
  33. +1 −1 api/rest/client/transports.go
  34. +1 −1 api/rest/config.go
  35. +3 −3 api/rest/restapi.go
  36. +2 −2 api/rest/restapi_test.go
  37. +8 −8 cluster.go
  38. +1 −1 cluster_config.go
  39. +9 −9 cluster_test.go
  40. +1 −1 cmd/ipfs-cluster-ctl/formatters.go
  41. +1 −1 cmd/ipfs-cluster-ctl/graph.go
  42. +1 −1 cmd/ipfs-cluster-ctl/graph_test.go
  43. +3 −3 cmd/ipfs-cluster-ctl/main.go
  44. +12 −12 cmd/ipfs-cluster-service/configs.go
  45. +15 −15 cmd/ipfs-cluster-service/daemon.go
  46. +4 −4 cmd/ipfs-cluster-service/main.go
  47. +5 −5 cmd/ipfs-cluster-service/state.go
  48. +9 −9 config_test.go
  49. +2 −2 connect_graph.go
  50. +2 −2 consensus/raft/config.go
  51. +3 −3 consensus/raft/consensus.go
  52. +3 −3 consensus/raft/consensus_test.go
  53. +2 −2 consensus/raft/log_op.go
  54. +3 −3 consensus/raft/log_op_test.go
  55. +1 −1 consensus/raft/raft.go
  56. +1 −1 informer/disk/config.go
  57. +1 −1 informer/disk/disk.go
  58. +2 −2 informer/disk/disk_test.go
  59. +1 −1 informer/numpin/config.go
  60. +1 −1 informer/numpin/numpin.go
  61. +1 −1 informer/numpin/numpin_test.go
  62. +2 −2 ipfscluster.go
  63. +14 −14 ipfscluster_test.go
  64. +1 −1 ipfsconn/ipfshttp/config.go
  65. +1 −1 ipfsconn/ipfshttp/ipfshttp.go
  66. +2 −2 ipfsconn/ipfshttp/ipfshttp_test.go
  67. +1 −1 monitor/basic/config.go
  68. +3 −3 monitor/basic/peer_monitor.go
  69. +2 −2 monitor/basic/peer_monitor_test.go
  70. +1 −1 monitor/metrics/checker.go
  71. +2 −2 monitor/metrics/checker_test.go
  72. +1 −1 monitor/metrics/store.go
  73. +2 −2 monitor/metrics/store_test.go
  74. +1 −1 monitor/metrics/util.go
  75. +1 −1 monitor/metrics/window.go
  76. +1 −1 monitor/metrics/window_test.go
  77. +1 −1 monitor/pubsubmon/config.go
  78. +2 −2 monitor/pubsubmon/pubsubmon.go
  79. +2 −2 monitor/pubsubmon/pubsubmon_test.go
  80. +2 −2 package.json
  81. +2 −2 peer_manager_test.go
  82. +1 −1 pintracker/maptracker/config.go
  83. +3 −3 pintracker/maptracker/maptracker.go
  84. +2 −2 pintracker/maptracker/maptracker_test.go
  85. +1 −1 pintracker/optracker/operation.go
  86. +2 −2 pintracker/optracker/operation_test.go
  87. +1 −1 pintracker/optracker/operationtracker.go
  88. +2 −2 pintracker/optracker/operationtracker_test.go
  89. +5 −5 pintracker/pintracker_test.go
  90. +1 −1 pintracker/stateless/config.go
  91. +2 −2 pintracker/stateless/stateless.go
  92. +2 −2 pintracker/stateless/stateless_test.go
  93. +1 −1 pintracker/util/pin.go
  94. +1 −1 pstoremgr/pstoremgr.go
  95. +1 −1 pstoremgr/pstoremgr_test.go
  96. +1 −1 rpc_api.go
  97. +1 −1 rpcutil/rpcutil.go
  98. +3 −3 snap/snapcraft.yaml
  99. +1 −1 state/interface.go
  100. +1 −1 state/mapstate/map_state.go
  101. +1 −1 state/mapstate/map_state_test.go
  102. +1 −1 state/mapstate/migrate.go
  103. +2 −2 test/ipfs_mock.go
  104. +1 −1 test/rpc_api_mock.go
  105. +1 −1 test/test_test.go
  106. +1 −1 util.go
@@ -4,7 +4,7 @@ MAINTAINER Hector Sanjuan <hector@protocol.ai>
# This dockerfile builds and runs ipfs-cluster-service.

ENV GOPATH /go
ENV SRC_PATH $GOPATH/src/github.com/ipfs/ipfs-cluster
ENV SRC_PATH $GOPATH/src/github.com/elastos/Elastos.NET.Hive.Cluster

COPY . $SRC_PATH
WORKDIR $SRC_PATH
@@ -30,7 +30,7 @@ MAINTAINER Hector Sanjuan <hector@protocol.ai>
# built binaries on the go-ipfs-container.

ENV GOPATH /go
ENV SRC_PATH /go/src/github.com/ipfs/ipfs-cluster
ENV SRC_PATH /go/src/github.com/elastos/Elastos.NET.Hive.Cluster
ENV IPFS_CLUSTER_PATH /data/ipfs-cluster

EXPOSE 9094
@@ -6,7 +6,7 @@ MAINTAINER Hector Sanjuan <hector@protocol.ai>

# This builder just builds the cluster binaries
ENV GOPATH /go
ENV SRC_PATH $GOPATH/src/github.com/ipfs/ipfs-cluster
ENV SRC_PATH $GOPATH/src/github.com/elastos/Elastos.NET.Hive.Cluster

COPY . $SRC_PATH
WORKDIR $SRC_PATH
@@ -20,7 +20,7 @@ MAINTAINER Hector Sanjuan <hector@protocol.ai>
# built binaries on the go-ipfs-container.

ENV GOPATH /go
ENV SRC_PATH /go/src/github.com/ipfs/ipfs-cluster
ENV SRC_PATH /go/src/github.com/elastos/Elastos.NET.Hive.Cluster
ENV IPFS_CLUSTER_PATH /data/ipfs-cluster

EXPOSE 9094
@@ -4,7 +4,7 @@ MAINTAINER Hector Sanjuan <hector@protocol.ai>
# This build state just builds the cluster binaries

ENV GOPATH /go
ENV SRC_PATH $GOPATH/src/github.com/ipfs/ipfs-cluster
ENV SRC_PATH $GOPATH/src/github.com/elastos/Elastos.NET.Hive.Cluster

COPY . $SRC_PATH
WORKDIR $SRC_PATH
@@ -23,7 +23,7 @@ MAINTAINER Hector Sanjuan <hector@protocol.ai>
# built binaries on the go-ipfs-container.

ENV GOPATH /go
ENV SRC_PATH /go/src/github.com/ipfs/ipfs-cluster
ENV SRC_PATH /go/src/github.com/elastos/Elastos.NET.Hive.Cluster
ENV IPFS_CLUSTER_PATH /data/ipfs-cluster

EXPOSE 9094
@@ -0,0 +1,73 @@
# IPFS Cluster


[![Made by](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai)
[![Main project](https://img.shields.io/badge/project-ipfs-blue.svg?style=flat-square)](http://github.com/ipfs/ipfs)
[![IRC channel](https://img.shields.io/badge/freenode-%23ipfs--cluster-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs-cluster)
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
[![GoDoc](https://godoc.org/github.com/ipfs/ipfs-cluster?status.svg)](https://godoc.org/github.com/ipfs/ipfs-cluster)
[![Go Report Card](https://goreportcard.com/badge/github.com/ipfs/ipfs-cluster)](https://goreportcard.com/report/github.com/ipfs/ipfs-cluster)
[![Build Status](https://travis-ci.org/ipfs/ipfs-cluster.svg?branch=master)](https://travis-ci.org/ipfs/ipfs-cluster)
[![Coverage Status](https://coveralls.io/repos/github/ipfs/ipfs-cluster/badge.svg?branch=master)](https://coveralls.io/github/ipfs/ipfs-cluster?branch=master)

> Pinset orchestration for IPFS.
<p align="center">
<img src="https://cluster.ipfs.io/cluster/png/IPFS_Cluster_color_no_text.png" alt="logo" width="300" height="300" />
</p>

IPFS Cluster is a stand-alone application and a CLI client that allocates, replicates, and tracks pins across a cluster of IPFS daemons.

It provides:

* A cluster peer application: `ipfs-cluster-service`, to be run along with `go-ipfs`.
* A client CLI application: `ipfs-cluster-ctl`, which allows easily interacting with the peer's HTTP API.

---

### Are you using IPFS Cluster?

Please participate in the [IPFS Cluster user registry](https://docs.google.com/forms/d/e/1FAIpQLSdWF5aXNXrAK_sCyu1eVv2obTaKVO3Ac5dfgl2r5_IWcizGRg/viewform).

---

## Table of Contents

- [Documentation](#documentation)
- [News & Roadmap](#news--roadmap)
- [Install](#install)
- [Usage](#usage)
- [Contribute](#contribute)
- [License](#license)


## Documentation

Please visit https://cluster.ipfs.io/documentation/ to access user documentation, guides and any other resources, including detailed **download** and **usage** instructions.

## News & Roadmap

We regularly post project updates to https://cluster.ipfs.io/news/ .

The most up-to-date *Roadmap* is available at https://cluster.ipfs.io/roadmap/ .

## Install

Instructions for different installation methods (including from source) are available at https://cluster.ipfs.io/documentation/download .

## Usage

Extensive usage information is provided at https://cluster.ipfs.io/documentation/ , including:

* [Docs for `ipfs-cluster-service`](https://cluster.ipfs.io/documentation/ipfs-cluster-service/)
* [Docs for `ipfs-cluster-ctl`](https://cluster.ipfs.io/documentation/ipfs-cluster-ctl/)

## Contribute

PRs accepted. As part of the IPFS project, we have some [contribution guidelines](https://cluster.ipfs.io/developer/contribute).

Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.

## License

MIT © Protocol Labs, Inc.
@@ -1,73 +1,63 @@
# IPFS Cluster
Elastos Hive Cluster
==========================

## Introduction

[![Made by](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai)
[![Main project](https://img.shields.io/badge/project-ipfs-blue.svg?style=flat-square)](http://github.com/ipfs/ipfs)
[![IRC channel](https://img.shields.io/badge/freenode-%23ipfs--cluster-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs-cluster)
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
[![GoDoc](https://godoc.org/github.com/ipfs/ipfs-cluster?status.svg)](https://godoc.org/github.com/ipfs/ipfs-cluster)
[![Go Report Card](https://goreportcard.com/badge/github.com/ipfs/ipfs-cluster)](https://goreportcard.com/report/github.com/ipfs/ipfs-cluster)
[![Build Status](https://travis-ci.org/ipfs/ipfs-cluster.svg?branch=master)](https://travis-ci.org/ipfs/ipfs-cluster)
[![Coverage Status](https://coveralls.io/repos/github/ipfs/ipfs-cluster/badge.svg?branch=master)](https://coveralls.io/github/ipfs/ipfs-cluster?branch=master)
Elastos Hive Cluster is a decentralized File Storage Service that based on IPFS cluster. Hive Cluster use IPFS and IPFS-cluster as the base infrastructure to save Elastos data. Hive Cluster is also a stand-alone application as same as IPFS Cluster.

> Pinset orchestration for IPFS.
The typical IPFS peer is a resource hunger program. If you install IPFS daemon to your mobile device, it will take up resources and slow down your device. We are creating Hive project, which uses IPFS cluster as the Elastos App storage backend, and can be used in a low resources consumption scenario.

<p align="center">
<img src="https://cluster.ipfs.io/cluster/png/IPFS_Cluster_color_no_text.png" alt="logo" width="300" height="300" />
</p>
The project distils from the IPFS Cluster, but it will have many differences with the IPFS Cluster.

IPFS Cluster is a stand-alone application and a CLI client that allocates, replicates, and tracks pins across a cluster of IPFS daemons.
Elastos Hive Cluster maintains a big IPFS pinset for sharing. It can serve numerous virtual IPFS peers with only one running a real IPFS peer.

It provides:

* A cluster peer application: `ipfs-cluster-service`, to be run along with `go-ipfs`.
* A client CLI application: `ipfs-cluster-ctl`, which allows easily interacting with the peer's HTTP API.

---

### Are you using IPFS Cluster?

Please participate in the [IPFS Cluster user registry](https://docs.google.com/forms/d/e/1FAIpQLSdWF5aXNXrAK_sCyu1eVv2obTaKVO3Ac5dfgl2r5_IWcizGRg/viewform).

---
Hive Cluster is not only a pinset manager but also a backend for multiple IPFS clients.

## Table of Contents

- [Documentation](#documentation)
- [News & Roadmap](#news--roadmap)
- [Introduction](#introduction)
- [Install](#install)
- [Usage](#usage)
- [Contribute](#contribute)
- [Contribution](#contribution)
- [Acknowledgments](#acknowledgments)
- [License](#license)

## Install

## Documentation

Please visit https://cluster.ipfs.io/documentation/ to access user documentation, guides and any other resources, including detailed **download** and **usage** instructions.
The following requirements apply to the installation from source:

## News & Roadmap
- Go 1.11+
- Git
- IPFS or internet connectivity (to download depedencies).

We regularly post project updates to https://cluster.ipfs.io/news/ .
In order to build and install IPFS Cluster in Unix systems follow the steps:

The most up-to-date *Roadmap* is available at https://cluster.ipfs.io/roadmap/ .
```shell
$ git clone https://github.com/elastos/Elastos.NET.Hive.Cluster.git $GOPATH/src/github.com/elastos/Elastos.NET.Hive.Cluster
$ cd $GOPATH/src/github.com/elastos/Elastos.NET.Hive.Cluster
$ make install
```
After the dependencies have been downloaded, ipfs-cluster-service and ipfs-cluster-ctl will be installed to your $GOPATH/bin (it uses go install).

## Install
If you would rather have them built locally, use make build instead. You can run make clean to remove any generated artifacts and rewrite the import paths to their original form.

Instructions for different installation methods (including from source) are available at https://cluster.ipfs.io/documentation/download .
Note that when the ipfs daemon is running locally on its default ports, the build process will use it to fetch gx, gx-go and all the needed dependencies directly from IPFS.

## Usage

Extensive usage information is provided at https://cluster.ipfs.io/documentation/ , including:

ipfs-cluster-service is a command line program, please refer to the docs from https://cluster.ipfs.io.
* [Docs for `ipfs-cluster-service`](https://cluster.ipfs.io/documentation/ipfs-cluster-service/)
* [Docs for `ipfs-cluster-ctl`](https://cluster.ipfs.io/documentation/ipfs-cluster-ctl/)

## Contribute
Hive Cluster uses HTTP interface to serve numerous clients. About HTTP API, please refer to
* [HTTP API] TODO

PRs accepted. As part of the IPFS project, we have some [contribution guidelines](https://cluster.ipfs.io/developer/contribute).
## Contribution

Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
We welcome contributions to the Elastos Hive Project.

## License
## Acknowledgments

A sincere thank you to all teams and projects that we rely on directly or indirectly.

MIT © Protocol Labs, Inc.
## License
This project is licensed under the terms of the [MIT license](https://github.com/elastos/Elastos.Hive.Cluster/blob/master/LICENSE).
@@ -6,8 +6,8 @@ import (
"mime/multipart"
"testing"

"github.com/ipfs/ipfs-cluster/api"
"github.com/ipfs/ipfs-cluster/test"
"github.com/elastos/Elastos.NET.Hive.Cluster/api"
"github.com/elastos/Elastos.NET.Hive.Cluster/test"
)

func TestAdd(t *testing.T) {
@@ -8,8 +8,8 @@ import (
"mime/multipart"
"strings"

"github.com/ipfs/ipfs-cluster/adder/ipfsadd"
"github.com/ipfs/ipfs-cluster/api"
"github.com/elastos/Elastos.NET.Hive.Cluster/adder/ipfsadd"
"github.com/elastos/Elastos.NET.Hive.Cluster/api"

cid "github.com/ipfs/go-cid"
files "github.com/ipfs/go-ipfs-files"
@@ -7,8 +7,8 @@ import (
"testing"
"time"

"github.com/ipfs/ipfs-cluster/api"
"github.com/ipfs/ipfs-cluster/test"
"github.com/elastos/Elastos.NET.Hive.Cluster/api"
"github.com/elastos/Elastos.NET.Hive.Cluster/test"

cid "github.com/ipfs/go-cid"
files "github.com/ipfs/go-ipfs-files"
@@ -8,10 +8,10 @@ import (
"net/http"
"sync"

"github.com/ipfs/ipfs-cluster/adder"
"github.com/ipfs/ipfs-cluster/adder/local"
"github.com/ipfs/ipfs-cluster/adder/sharding"
"github.com/ipfs/ipfs-cluster/api"
"github.com/elastos/Elastos.NET.Hive.Cluster/adder"
"github.com/elastos/Elastos.NET.Hive.Cluster/adder/local"
"github.com/elastos/Elastos.NET.Hive.Cluster/adder/sharding"
"github.com/elastos/Elastos.NET.Hive.Cluster/api"

cid "github.com/ipfs/go-cid"
logging "github.com/ipfs/go-log"
@@ -8,7 +8,7 @@ import (
"io"
gopath "path"

"github.com/ipfs/ipfs-cluster/api"
"github.com/elastos/Elastos.NET.Hive.Cluster/api"

cid "github.com/ipfs/go-cid"
chunker "github.com/ipfs/go-ipfs-chunker"
@@ -6,8 +6,8 @@ import (
"context"
"errors"

adder "github.com/ipfs/ipfs-cluster/adder"
"github.com/ipfs/ipfs-cluster/api"
adder "github.com/elastos/Elastos.NET.Hive.Cluster/adder"
"github.com/elastos/Elastos.NET.Hive.Cluster/api"

cid "github.com/ipfs/go-cid"
ipld "github.com/ipfs/go-ipld-format"
@@ -7,9 +7,9 @@ import (
"sync"
"testing"

adder "github.com/ipfs/ipfs-cluster/adder"
"github.com/ipfs/ipfs-cluster/api"
"github.com/ipfs/ipfs-cluster/test"
adder "github.com/elastos/Elastos.NET.Hive.Cluster/adder"
"github.com/elastos/Elastos.NET.Hive.Cluster/api"
"github.com/elastos/Elastos.NET.Hive.Cluster/test"

rpc "github.com/libp2p/go-libp2p-gorpc"
)
@@ -20,8 +20,8 @@ import (
"context"
"fmt"

"github.com/ipfs/ipfs-cluster/api"
"github.com/ipfs/ipfs-cluster/rpcutil"
"github.com/elastos/Elastos.NET.Hive.Cluster/api"
"github.com/elastos/Elastos.NET.Hive.Cluster/rpcutil"

blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
@@ -10,8 +10,8 @@ import (

"time"

"github.com/ipfs/ipfs-cluster/adder"
"github.com/ipfs/ipfs-cluster/api"
"github.com/elastos/Elastos.NET.Hive.Cluster/adder"
"github.com/elastos/Elastos.NET.Hive.Cluster/api"

humanize "github.com/dustin/go-humanize"
cid "github.com/ipfs/go-cid"
@@ -7,9 +7,9 @@ import (
"sync"
"testing"

adder "github.com/ipfs/ipfs-cluster/adder"
"github.com/ipfs/ipfs-cluster/api"
"github.com/ipfs/ipfs-cluster/test"
adder "github.com/elastos/Elastos.NET.Hive.Cluster/adder"
"github.com/elastos/Elastos.NET.Hive.Cluster/api"
"github.com/elastos/Elastos.NET.Hive.Cluster/test"

cid "github.com/ipfs/go-cid"
logging "github.com/ipfs/go-log"
@@ -4,8 +4,8 @@ import (
"context"
"fmt"

"github.com/ipfs/ipfs-cluster/adder"
"github.com/ipfs/ipfs-cluster/api"
"github.com/elastos/Elastos.NET.Hive.Cluster/adder"
"github.com/elastos/Elastos.NET.Hive.Cluster/api"

humanize "github.com/dustin/go-humanize"
cid "github.com/ipfs/go-cid"
@@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/ipfs/ipfs-cluster/api"
"github.com/elastos/Elastos.NET.Hive.Cluster/api"

cid "github.com/ipfs/go-cid"
)
@@ -5,8 +5,8 @@ import (
"errors"
"fmt"

"github.com/ipfs/ipfs-cluster/api"
"github.com/ipfs/ipfs-cluster/rpcutil"
"github.com/elastos/Elastos.NET.Hive.Cluster/api"
"github.com/elastos/Elastos.NET.Hive.Cluster/rpcutil"

cid "github.com/ipfs/go-cid"
ipld "github.com/ipfs/go-ipld-format"
@@ -7,7 +7,7 @@ import (
cid "github.com/ipfs/go-cid"
peer "github.com/libp2p/go-libp2p-peer"

"github.com/ipfs/ipfs-cluster/api"
"github.com/elastos/Elastos.NET.Hive.Cluster/api"
)

// This file gathers allocation logic used when pinning or re-pinning

0 comments on commit 875ef30

Please sign in to comment.
You can’t perform that action at this time.