Skip to content

jamarat/moosefs-docker-cluster

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

moosefs-docker-cluster

This is a sample configuration of a multiple node MooseFS cluster on Docker using Ubuntu 14.04 LTS. It consists of a master server with a management GUI, 5 chunkservers and one client machine. After a successful installation you have a fully working MooseFS cluster to play with its amazing features.

Cluster configuration

  • master with management GUI http://172.20.0.2:9425
  • chunkserver1 172.20.0.11 with 10 GiB of storage
  • chunkserver2 172.20.0.12 with 10 GiB of storage
  • chunkserver3 172.20.0.13 with 10 GiB of storage
  • chunkserver4 172.20.0.14 with 10 GiB of storage
  • chunkserver5 172.20.0.15 with 10 GiB of storage
  • client 172.168.20.0.5

MooseFS CGI

Setup

Install Docker with composer from https://docs.docker.com/compose/install/

Clone MooseFS docker config files:

git clone https://github.com/moosefs/moosefs-docker-cluster

Start MooseFS servers:

cd moosefs-docker-cluster

docker-compose up -d

"-d" is for running Docker nodes in background, so Docker console output is invisible.

Check if instances are running with:

docker ps

You should have 1 master, 5 chunkservers and 1 client running. Expected output should be similar to:

CONTAINER ID        IMAGE                               COMMAND                  CREATED             STATUS              PORTS                     NAMES
2fe620447b37        dockermoosefscluster_client         "/home/start-clien..."   5 minutes ago       Up 5 minutes                                  client
1951d867c078        dockermoosefscluster_chunkserver5   "/home/start-chunk..."   5 minutes ago       Up 5 minutes        9419-9420/tcp, 9422/tcp   chunkserver5
204c115cd8ad        dockermoosefscluster_chunkserver2   "/home/start-chunk..."   5 minutes ago       Up 5 minutes        9419-9420/tcp, 9422/tcp   chunkserver2
48343721de4f        dockermoosefscluster_chunkserver4   "/home/start-chunk..."   5 minutes ago       Up 5 minutes        9419-9420/tcp, 9422/tcp   chunkserver4
30ca217fa862        dockermoosefscluster_master         "/home/start.sh -d"      5 minutes ago       Up 5 minutes        9420-9425/tcp             master
28e2a64d0fb9        dockermoosefscluster_chunkserver1   "/home/start-chunk..."   5 minutes ago       Up 5 minutes        9419-9420/tcp, 9422/tcp   chunkserver1
c83c70580795        dockermoosefscluster_chunkserver3   "/home/start-chunk..."   5 minutes ago       Up 5 minutes        9419-9420/tcp, 9422/tcp   chunkserver3

You can attach to the client node (press "Enter" twice):

docker container attach mfs_client  #press "Enter" key twice

Now MooseFS filesystem is mounted as /mnt/mfs. If everything is ok you should see our welcome message with:

cd /mnt/mfs

cat welcome_to_moosefs.txt

The management GUI is available here: http://172.20.0.2:9425 (be aware of a local 172.20.0.* network).

To stop all (all means ALL, not just MooseFS's) your Docker containers:

docker stop $(docker ps -aq)

Your MooseFS Docker cluster is persistent. It means all files you created in the /mnt/mfs folder will remain there even after turning containers off.

Change configuration

If you want to change storage size modify the chunkserver start script moosefs-chunkserver/start-chunkserver.sh

Containers configuration is stored in docker-compose.yml

Docker Hub

Image name Pulls Stars Build
moosefs/master master master
moosefs/chunkserver chunkserver chunkserver
moosefs/client client client

Scripts are based on Kai Sasaki's Lewuathe/docker-hadoop-cluster. Thank you Kai!

About

Multiple node MooseFS cluster on Docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 86.2%
  • Python 13.8%