Skip to content

Commit

Permalink
add document to explain how setup build environment with docker
Browse files Browse the repository at this point in the history
  • Loading branch information
cocalele committed Jun 30, 2022
1 parent 8637b35 commit bc60fe3
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 10 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,40 +36,41 @@ The whole system include 3 modules (View graph with tabstop=4 and monospaced fon
| | (HA DB) |
+------------------+ | +---------------+
| +------+
| S5conductor | +---------------+
| pfconductor | +---------------+
+----> (Max 5 nodes) +-----------> |
| +--------+---------+ | Zookeeper |
| | | (3 nodes) |
| | +------^--------+
+-------------------+ | | |
| +---+ +--------v---------+ |
| S5bd S5kd | | | |
| (User and kernel +------->+ S5afs +------------------+
| pfbd tcmu | | | |
| (User and +------->+ pfs +------------------+
| space client) | | (Max 1024 nodes) |
+-------------------+ +------------------+

</pre>

## 3.1 S5afs, S5 All Flash System
## 3.1 pfs, S5 All Flash System
This module is the server daemon, provide all data service on store. include:
1) SSD disk management
2) Networ interface (RDMA and TCP protocol)
3) IO handling

There're at most 1024 S5afs nodes in a cluster. All s5afs works in acitve mode, since every s5afs need to provide data service.

## 3.2 S5conductor
## 3.2 pfconductor
This is the control module to conduct all players in storage cluster. A cluster should has at least 2 s5conductor nodes and at most 5 are supported.
S5conductor works in active-standby mode. only one conductor is active. All others in standby.
pfconductor works in active-standby mode. only one conductor is active. All others in standby.
This module is programed in Java and reside in repository: https://github.com/cocalele/pfconductor

## 3.3 Zookeeper
All conductor and afs nodes(instance) register themself to zookeeper, so the active conductor can discovery services in cluster.

## 3.4 MetaDB
MetaDB is a MariaDB cluster with HA.

## 3.5 S5bd and S5kd
S5bd is user space client. Qemu
## 3.5 pfbd
pfbd is user space client. also a virtio-block Qemu driver is provided in https://github.com/cocalele/qemu/tree/pfbd

# networks ports
49162 store node TCP port
Expand Down
34 changes: 34 additions & 0 deletions docker-based-develope-env.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
使用docker快速搭建开发环境
============================

1. pull docker image

```
# docker pull pureflash/pfs-dev:1.6
```

如果这个镜像拉取失败,可以从百度网盘下载:https://pan.baidu.com/s/1nGYIpP-WFOUXxv3vfQwPxQ?pwd=4564
然后导入:
```
# gunzip pfs-dev.tar.gz
# docker load < pfs-dev.tar
```

2. check out code
```
# mkdir ~/pf && cd ~/pf
# git clone https://gitee.com/cocalele/PureFlash.git
# set PFHOME=$(pwd)/PureFlash
# cd PureFlash
# git submodule init
# git submodule update
# cd .. #to pf again
# git https://gitee.com/cocalele/jconductor.git
```

3. run docker
```
# docker run -ti --ulimit core=-1 --privileged --hostname pfs-d --net pfnet --ip 172.1.1.2 --rm -v ~/pf:/root/pf --name pfs-d -e TZ=Asia/Shanghai pureflash/pfs-dev:1.6 /bin/bash
```
上面命令里的-v ~/pf:/root/pf 把刚才的源代码目录mount到了容器里面的/root/pf目录上。然后就可以参照build_and_run.txt文档里面的cmake, ant步骤分别编译PureFlash和jconductor

4 changes: 2 additions & 2 deletions run-from-docker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
============================

```
# docker pull pureflash/pureflash:1.0
# docker run -it --rm pureflash/pureflash:1.0
# docker pull pureflash/pureflash:latest
# docker run -it --rm pureflash/pureflash:latest
```
For first run, this may take about 60 seconds to initialize a fake disk file.

Expand Down

0 comments on commit bc60fe3

Please sign in to comment.