Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/milestone3 #36

Merged
merged 33 commits into from
Dec 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b144287
feat: implement hash slots
qianhh Nov 15, 2022
d9f9782
feat: implement cluster rpc server(partial)
qianhh Nov 16, 2022
d5f5598
feat: implement cluster client and subcommands
qianhh Nov 17, 2022
b64d2aa
feat: implement cluster rpc server
qianhh Nov 21, 2022
de0b12b
test: tweak test case
qianhh Nov 21, 2022
25c6c05
feat: persist the migration state
qianhh Nov 22, 2022
0ed5295
feat: optimize data node configuration
qianhh Nov 23, 2022
402879e
feat: optimize subcommands of cluster manager
qianhh Nov 23, 2022
4235cda
feat: check heartbeat at first
qianhh Nov 23, 2022
6cf4677
feat: optimize slots allocation of cluster manager
qianhh Nov 23, 2022
cbec065
feat: fix a bug for slots allocation of cluster manager
qianhh Nov 23, 2022
6bdefc6
feat: tweak subcommands information of cluster manager
qianhh Nov 24, 2022
bc4af95
feat: fix a bug for BalanceSlots method
qianhh Nov 24, 2022
fd117a2
feat: fix a bug for RunHeartbeatCheck method
qianhh Nov 24, 2022
5fafd59
refactor: rename variable
qianhh Nov 25, 2022
928fb7c
feat: optimize error return message
qianhh Nov 25, 2022
026ccfe
feat: add dockerfile
qianhh Nov 25, 2022
b2f28fc
test: add test shell scripts of cluser and two dagnode configs
qianhh Nov 28, 2022
e0bcb8d
feat: fix a bug for adding dagnode
qianhh Nov 28, 2022
ef332a2
merge branch develop into feat/milestone3
qianhh Nov 29, 2022
5c26668
refactor: extract datanode.Client and State variables into the Storag…
qianhh Nov 29, 2022
5272b5e
feat: improve erasure code error handling
qianhh Dec 1, 2022
1f543ba
test: update mock datanode client
qianhh Dec 1, 2022
9af1d94
feat: tweak log format
qianhh Dec 1, 2022
337e8cc
feat: fix the panic "send on closed channel"
qianhh Dec 1, 2022
eb4205c
feat: fix a bug for merging block data
qianhh Dec 1, 2022
d638072
test: update dagnode test
qianhh Dec 1, 2022
d4c1e8e
refactor: refactor field of datanode.Client
qianhh Dec 5, 2022
1ff94c6
feat: add repair subcommand for repairing datanode
qianhh Dec 6, 2022
b5ece10
feat: fix a bug for repairing datanode
qianhh Dec 12, 2022
e5e65a3
feat: automatically repairs block shards
qianhh Dec 13, 2022
9366973
feat: optimize the logic of auto-repair block shards
qianhh Dec 15, 2022
13b5bea
docs: update documents
qianhh Dec 28, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.git
.github
docs
default.etcd
*.gz
*.tar.gz
*.bzip2
*.zip
/dn-data
/dp-data
/store-data
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/dagpool
/datanode
/objectstore
/dp-data
/dn-data
/store-data
/dp-data
/store-data
/iam-tools
27 changes: 27 additions & 0 deletions Dockerfile.dagpool
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM golang:1.19.3-alpine AS builder

LABEL stage=gobuilder

ENV CGO_ENABLED 0
ENV GOOS linux
ENV GOPROXY https://goproxy.cn,direct

WORKDIR /build
COPY . .
RUN go mod download

# Builds your app with optional configuration
RUN go build -ldflags "-s -w" -o dagpool ./cmd/dagpool

FROM scratch

WORKDIR /app
COPY --from=builder /build/dagpool /app/dagpool

# Tells Docker which network port your container listens on
EXPOSE 50001

ENTRYPOINT ["/app/dagpool"]

# Specifies the executable command that runs when the container starts
CMD ["daemon", "--datadir=/data"]
27 changes: 27 additions & 0 deletions Dockerfile.datanode
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM golang:1.19.3-alpine AS builder

LABEL stage=gobuilder

ENV CGO_ENABLED 0
ENV GOOS linux
ENV GOPROXY https://goproxy.cn,direct

WORKDIR /build
COPY . .
RUN go mod download

# Builds your app with optional configuration
RUN go build -ldflags "-s -w" -o datanode ./cmd/datanode

FROM scratch

WORKDIR /app
COPY --from=builder /build/datanode /app/datanode

# Tells Docker which network port your container listens on
EXPOSE 9010

ENTRYPOINT ["/app/datanode"]

# Specifies the executable command that runs when the container starts
CMD ["daemon", "--datadir=/data"]
27 changes: 27 additions & 0 deletions Dockerfile.objectstore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM golang:1.19.3-alpine AS builder

LABEL stage=gobuilder

ENV CGO_ENABLED 0
ENV GOOS linux
ENV GOPROXY https://goproxy.cn,direct

WORKDIR /build
COPY . .
RUN go mod download

# Builds your app with optional configuration
RUN go build -ldflags "-s -w" -o objectstore ./cmd/objectstore

FROM scratch

WORKDIR /app
COPY --from=builder /build/objectstore /app/objectstore

# Tells Docker which network port your container listens on
EXPOSE 9985

ENTRYPOINT ["/app/objectstore"]

# Specifies the executable command that runs when the container starts
CMD ["daemon", "--datadir=/data"]
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ DATANODE_TARGET=./datanode
OBJECTSTORE_TARGET=./objectstore
IAMTOOLS_TARGET=./iam-tools

#VERSION ?= $(shell git describe --tags)
#TAG_DATANODE ?= "filedag/datanode:$(VERSION)"
TAG_DATANODE ?= "filedag/datanode:latest"
TAG_DAGPOOL ?= "filedag/dagpool:latest"
TAG_OBJECTSTORE ?= "filedag/objectstore:latest"

build: clean dagpool datanode objectstore iamtools

dagpool:
Expand All @@ -19,6 +25,18 @@ objectstore:
iamtools:
go build -ldflags "-s -w" -o ${IAMTOOLS_TARGET} ./cmd/tools/iam-tools

docker-datanode:
docker build -q --no-cache -t $(TAG_DATANODE) . -f Dockerfile.datanode

docker-dagpool:
docker build -q --no-cache -t $(TAG_DAGPOOL) . -f Dockerfile.dagpool

docker-objectstore:
docker build -q --no-cache -t $(TAG_OBJECTSTORE) . -f Dockerfile.objectstore

docker: docker-datanode docker-dagpool docker-objectstore
docker buildx prune -f

.PHONY: clean
clean:
-rm -f ${DAGPOOL_TARGET}
Expand Down
19 changes: 12 additions & 7 deletions README-cn.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# FileDAG Storage

[![LICENSE](https://img.shields.io/github/license/filedag-project/filedag-storage)](./LICENSE "LICENSE")
[![Build Status](https://img.shields.io/github/workflow/status/filedag-project/filedag-storage/Go)]()
[![Build Status](https://img.shields.io/github/actions/workflow/status/filedag-project/filedag-storage/go.yml)]()

Language: [English](./README.md)

Expand Down Expand Up @@ -78,12 +78,12 @@ FileDAG Storage 的开发将为上述问题提供一种解决方案
#### Description:

- DAG Node:
- 基于Reed-Solomon Erasure Code开发数据容错技术
- [x] 基于Reed-Solomon Erasure Code开发数据容错技术
- DAG Pool:
- 基于libp2p和Redis Hash Slots,组织多个DAG Node构建存储集群
- 提供存储节点的运行状况报告和全局一致性状态
- 支持存储节点动态扩容
- 支持存储节点动态扩展
- [x] 基于Redis Hash Slots,组织多个DAG Node构建存储集群
- [x] 提供存储节点的运行状况报告和全局一致性状态
- [x] 支持存储节点动态扩容
- [x] 支持存储节点动态扩展

### Milestone 4

Expand Down Expand Up @@ -127,7 +127,12 @@ make

./datanode daemon --listen=127.0.0.1:9013 --datadir=/tmp/dn-data3

./dagpool daemon --datadir=/tmp/dagpool-db --config=conf/node_config.json
./dagpool daemon --datadir=/tmp/dagpool-db

# add a dagnode
./dagpool cluster add conf/node_config.json
# allocate slots
./dagpool cluster balance

./objectstore daemon --pool-addr=127.0.0.1:50001 --pool-user=dagpool --pool-password=dagpool
```
Expand Down
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# FileDAG Storage

[![LICENSE](https://img.shields.io/github/license/filedag-project/filedag-storage)](./LICENSE "LICENSE")
[![Build Status](https://img.shields.io/github/workflow/status/filedag-project/filedag-storage/Go)]()
[![Build Status](https://img.shields.io/github/actions/workflow/status/filedag-project/filedag-storage/go.yml)]()

Language: [Chinese](./README-cn.md)

Expand Down Expand Up @@ -77,12 +77,12 @@ Realize clustered DAG Node and development of data fault tolerance.
#### Description:

- DAG Node:
- develops data fault tolerance based on Reed-Solomon Erasure Code
- [x] develops data fault tolerance based on Reed-Solomon Erasure Code
- DAG Pool:
- organizes multiple DAG Nodes to build a storage cluster based on libp2p and Redis Hash Slots
- provides health report of storage nodes and status of global consistency
- supports dynamic expansion of storage nodes
- supports dynamic scaling of storage nodes
- [x] organizes multiple DAG Nodes to build a storage cluster based on Redis Hash Slots
- [x] provides health report of storage nodes and status of global consistency
- [x] supports dynamic expansion of storage nodes
- [x] supports dynamic scaling of storage nodes

### Milestone 4

Expand Down Expand Up @@ -126,7 +126,12 @@ Start 3 datanodes, dagpool and objectstore:

./datanode daemon --listen=127.0.0.1:9013 --datadir=/tmp/dn-data3

./dagpool daemon --datadir=/tmp/dagpool-db --config=conf/node_config.json
./dagpool daemon --datadir=/tmp/dagpool-db

# add a dagnode
./dagpool cluster add conf/node_config.json
# allocate slots
./dagpool cluster balance

./objectstore daemon --pool-addr=127.0.0.1:50001 --pool-user=dagpool --pool-password=dagpool
```
Expand Down
Loading