Skip to content

Commit e158e17

Browse files
committed
Update cluster descriptions and IP addresses
1 parent b252dd2 commit e158e17

File tree

1 file changed

+53
-72
lines changed

1 file changed

+53
-72
lines changed

README.md

Lines changed: 53 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,28 @@
11
# MooseFS Docker Cluster
22

3-
This is a sample configuration of a multiple node MooseFS cluster on Docker using Debian Stretch. It consists of a master server with a CGI, 4 chunkservers and one client machine. After a successful installation you have a fully working MooseFS cluster to play with its amazing features.
3+
This is a basic configuration of a multiple nodes MooseFS cluster based on the Debian Buster Docker image. It consists of a master server, a CGI server, 4 chunk servers, and one client. After a successful installation, you will have a fully working MooseFS cluster to play with its amazing features.
44

55
# Updates
66

7-
New features:
8-
- specify storage size per chunkserver (env: **SIZE**, default: 10)
9-
- specify label per chunkserver (env: **LABEL**, default: *empty*)
10-
- switched to *debian:stretch* as base image
11-
- example with 4 chunkservers (labels: M, MB, MB, B)
12-
- MooseFS disks are now mounted as volumes
7+
- All moosefs processes are now correctly handling signals.
8+
- Metadata and data are now persistent and mounted as volumes.
9+
- TEST and PROD moosefs master metadata behavior defined by MFS_ENV variable.
10+
- Specify storage size per chunk server (env: **SIZE**) default not defined. Depends on your local storage free space.
11+
- Specify label per chunk server (env: **LABEL**, default: *empty*).
12+
- Switched to *debian:buster* as a base image.
13+
- Example with 4 chunk servers (labels: M, MB, MB, B).
1314

1415
# Cluster configurations
1516

16-
In this repository you will find 2 sample configurations which you can run to try MooseFS.
17-
18-
## 4 Chunkservers + Client
19-
20-
Build and run in background:
21-
22-
```
23-
docker-compose build
24-
docker-compose up -d
25-
```
26-
2717
**File docker-compose.yml**
2818

29-
- master with CGI [http://172.20.0.2:9425](http://172.20.0.2:9425)
30-
- chunkserver1 **172.20.0.11**, **10 GiB** storage, label: **M**
31-
- chunkserver2 **172.20.0.12**, **10 GiB** storage, label: **M**,**B**
32-
- chunkserver3 **172.20.0.13**, **10 GiB** storage, label: **M**,**B**
33-
- chunkserver4 **172.20.0.14**, **10 GiB** storage, label: **B**
34-
- client **172.168.20.0.5**
35-
36-
## 4 Chunkservers + 4 Clients
37-
38-
Build and run in background:
39-
40-
```
41-
docker-compose -f docker-compose-chunkserver-client.yml build
42-
docker-compose -f docker-compose-chunkserver-client.yml up -d
43-
```
44-
45-
**File docker-compose-chunkserver-client.yml**
46-
47-
- master with CGI [http://172.20.0.2:9425](http://172.20.0.2:9425)
48-
- chunkserver1 **172.20.0.11**, **10 GiB** storage, label: **M** (mount point: `/mnt/moosefs`)
49-
- chunkserver2 **172.20.0.12**, **10 GiB** storage, label: **M,B** (mount point: `/mnt/moosefs`)
50-
- chunkserver3 **172.20.0.13**, **10 GiB** storage, label: **M,B** (mount point: `/mnt/moosefs`)
51-
- chunkserver4 **172.20.0.14**, **10 GiB** storage, label: **B** (mount point: `/mnt/moosefs`)
19+
- master **172.20.0.2**
20+
- CGI [http://localhost:9425](http://localhost:9425) on Linux also [http://172.20.0.3:9425](http://172.20.0.3:9425)
21+
- chunkserver1 **172.20.0.11**, label: **M**
22+
- chunkserver2 **172.20.0.12**, label: **M**,**B**
23+
- chunkserver3 **172.20.0.13**, label: **M**,**B**
24+
- chunkserver4 **172.20.0.14**, label: **B**
25+
- client **172.168.20.0.100**
5226

5327
# Setup
5428

@@ -61,72 +35,79 @@ git clone https://github.com/moosefs/moosefs-docker-cluster
6135
cd moosefs-docker-cluster
6236
```
6337

64-
Build and run in background:
65-
38+
Build and run:
6639
```
6740
docker-compose build
68-
docker-compose up -d
41+
docker-compose up
6942
```
7043

71-
or
72-
44+
On Linux OS run docker-compose as root:
7345
```
74-
docker-compose -f docker-compose-chunkserver-client.yml build
75-
docker-compose -f docker-compose-chunkserver-client.yml up -d
46+
sudo -E docker-compose build
47+
sudo -E docker-compose up
7648
```
7749

78-
"-d" is detached - running Docker nodes in background, so Docker console output is invisible.
50+
You can also run docker-compose in detached mode. All running Docker nodes will run in the background, so Docker console output will be invisible.
51+
```
52+
sudo -E docker-compose build
53+
sudo -E docker-compose up -d
54+
```
7955

8056
You can check if instances are running:
81-
8257
```
8358
docker ps
8459
```
8560

86-
You should have 1 master, 4 chunkservers and 1 client running (first configuration). Expected output should be similar to:
61+
You should have 1 master, 4 chunk servers and 1 client running (first configuration). The expected output should be similar to this:
8762

8863
```
89-
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
90-
2fe620447b37 dockermoosefscluster_client "/home/start-clien..." 5 minutes ago Up 5 minutes client
91-
204c115cd8ad dockermoosefscluster_chunkserver2 "/home/start-chunk..." 5 minutes ago Up 5 minutes 9419-9420/tcp, 9422/tcp chunkserver2
92-
48343721de4f dockermoosefscluster_chunkserver4 "/home/start-chunk..." 5 minutes ago Up 5 minutes 9419-9420/tcp, 9422/tcp chunkserver4
93-
30ca217fa862 dockermoosefscluster_master "/home/start.sh -d" 5 minutes ago Up 5 minutes 9420-9425/tcp master
94-
28e2a64d0fb9 dockermoosefscluster_chunkserver1 "/home/start-chunk..." 5 minutes ago Up 5 minutes 9419-9420/tcp, 9422/tcp chunkserver1
95-
c83c70580795 dockermoosefscluster_chunkserver3 "/home/start-chunk..." 5 minutes ago Up 5 minutes 9419-9420/tcp, 9422/tcp chunkserver3
64+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
65+
76193581d1c4 moosefs-docker-cluster_mfsclient "mfsmount -f /mnt/mo…" 36 minutes ago Up 5 seconds 9419-9422/tcp mfsclient
66+
f69a21cf972c moosefs-docker-cluster_mfschunkserver2 "chunkserver.sh" 36 minutes ago Up 6 seconds 9419-9420/tcp, 9422/tcp mfschunkserver2
67+
5b437ceef0b2 moosefs-docker-cluster_mfschunkserver3 "chunkserver.sh" 36 minutes ago Up 6 seconds 9419-9420/tcp, 9422/tcp mfschunkserver3
68+
dede808d4d82 moosefs-docker-cluster_mfschunkserver4 "chunkserver.sh" 38 minutes ago Up 6 seconds 9419-9420/tcp, 9422/tcp mfschunkserver4
69+
b4be063af597 moosefs-docker-cluster_mfschunkserver1 "chunkserver.sh" 40 minutes ago Up 6 seconds 9419-9420/tcp, 9422/tcp mfschunkserver1
70+
659c3f1fba33 moosefs-docker-cluster_mfscgi "mfscgiserv -f" 40 minutes ago Up 6 seconds 0.0.0.0:9425->9425/tcp mfscgi
71+
b9017fddbd85 moosefs-docker-cluster_mfsmaster "master.sh" 40 minutes ago Up 7 seconds 9419-9421/tcp mfsmaster
9672
```
9773

9874
# Attach/detach to/from container
9975

100-
You can **attach** to the client node (press "Enter" twice):
76+
For example, if you like to **attach** to the client node execute this command:
10177

10278
```
103-
docker container attach mfsclient
79+
docer exec -it mfslient bash
10480
```
10581

106-
To **detach** from container use the escape sequence `Ctrl + p`, `Ctrl + q`.
82+
To **detach** from container just press `Ctrl + d` keys.
10783

108-
Now MooseFS filesystem is mounted as `/mnt/moosefs`. If everything is ok you should see our welcome message with:
109-
```
110-
cd /mnt/moosefs
84+
# MooseFS client
11185

112-
cat welcome_to_moosefs.txt
86+
MooseFS filesystem is mounted at `/mnt/moosefs`. If everything is ok you should see this ASCII art:
87+
```
88+
cat /mnt/moosefs/.mooseart
89+
\_\ /_/
90+
\_\_ _/_/
91+
\--/
92+
/OO\_--____
93+
(__) )
94+
``\ __ |
95+
||-' `||
96+
|| ||
97+
"" ""
11398
```
11499

115100
# CGI
116101

117-
The CGI is available here: [http://172.20.0.2:9425](http://172.20.0.2:9425) (be aware of a local 172.20.0.* network).
102+
The CGI is available here: [http://localhost:9425](http://localhost:9425)
103+
Also on Linux OS CGI container is available at IP address [http://172.20.0.3:9425](http://172.20.0.3:9425) (be aware of a local 172.20.0.* network).
118104

119105
![MooseFS CGI](https://github.com/moosefs/moosefs-docker-cluster/raw/master/images/cgi.png)
120106

121107
# Persistence
122108

123109
Your MooseFS Docker cluster is persistent. It means all files you created in the /mnt/moosefs folder will remain there even after turning containers off.
124-
MooseFS disks are now mounted in host `./data` directory.
125-
126-
# Warning
127-
128-
Chunkservers are paired with Master server, so if you destroy the machine with master server you will not be able to access your data. Data will still be there in volumes (`./data` directory) but chunkservers will not want to connect to the new Master server.
129-
110+
All data and metadata files are stored in the host `./data` directory.
130111
# Docker Hub
131112

132113
| Image name | Pulls | Stars | Build |

0 commit comments

Comments
 (0)