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

ack/docker-cluster: add fast way to start local docker cluster #88

Merged
merged 2 commits into from
Aug 23, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
hack/docker-cluster: add fast way to start local docker cluster
This displays the way to run multiple cfs fast in docker. And this helps
for further development on reconstruct and copy.
  • Loading branch information
yichengq committed Jul 25, 2015
commit e1479c20701511c3c1421be847d8e7f25e998275
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ _testmain.go
/server/server
/server/cfs0000
/cfsctl/cfsctl
/hack/docker-cluster/cfs*

# temporary build path
/proto/gopath
5 changes: 5 additions & 0 deletions hack/docker-cluster/Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Use goreman to run:
# `go get github.com/mattn/goreman`
cfs0: docker run --volume=/:/rootfs:ro --volume=/var/run:/var/run:rw --volume=/sys:/sys:ro --volume=/var/lib/docker/:/var/lib/docker:ro --volume=/tmp:/tmp:rw --volume=${PWD}/cfs0_0:/cfs0_0 --volume=${PWD}/cfs0_1:/cfs0_1 --volume=${PWD}/config:/config --publish=5000:15524 -i --name=cfs0 c-fs/cfs --config=/config/cfs0.conf
cfs1: docker run --volume=/:/rootfs:ro --volume=/var/run:/var/run:rw --volume=/sys:/sys:ro --volume=/var/lib/docker/:/var/lib/docker:ro --volume=/tmp:/tmp:rw --volume=${PWD}/cfs1_0:/cfs1_0 --volume=${PWD}/cfs1_1:/cfs1_1 --volume=${PWD}/config:/config --publish=5001:15524 -i --name=cfs1 c-fs/cfs --config=/config/cfs1.conf
cfs2: docker run --volume=/:/rootfs:ro --volume=/var/run:/var/run:rw --volume=/sys:/sys:ro --volume=/var/lib/docker/:/var/lib/docker:ro --volume=/tmp:/tmp:rw --volume=${PWD}/cfs2_0:/cfs2_0 --volume=${PWD}/cfs2_1:/cfs2_1 --volume=${PWD}/config:/config --publish=5002:15524 -i --name=cfs2 c-fs/cfs --config=/config/cfs2.conf
4 changes: 4 additions & 0 deletions hack/docker-cluster/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
24 changes: 24 additions & 0 deletions hack/docker-cluster/config/cfs0.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Default Configuration in TOML

################################ GENERAL #####################################

# Accept connections on the specified port, default is 15524.
port = "15524"

# By default cfs listens for connections from all the network interfaces
# available on the server.
#
# Examples:
#
# bind = "127.0.0.1"


################################ DISKS #######################################

[[Disks]]
name = "cfs0_0"
root = "cfs0_0"

[[Disks]]
name = "cfs0_1"
root = "cfs0_1"
24 changes: 24 additions & 0 deletions hack/docker-cluster/config/cfs1.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Default Configuration in TOML

################################ GENERAL #####################################

# Accept connections on the specified port, default is 15524.
port = "15524"

# By default cfs listens for connections from all the network interfaces
# available on the server.
#
# Examples:
#
# bind = "127.0.0.1"


################################ DISKS #######################################

[[Disks]]
name = "cfs1_0"
root = "cfs1_0"

[[Disks]]
name = "cfs1_1"
root = "cfs1_1"
24 changes: 24 additions & 0 deletions hack/docker-cluster/config/cfs2.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Default Configuration in TOML

################################ GENERAL #####################################

# Accept connections on the specified port, default is 15524.
port = "15524"

# By default cfs listens for connections from all the network interfaces
# available on the server.
#
# Examples:
#
# bind = "127.0.0.1"


################################ DISKS #######################################

[[Disks]]
name = "cfs2_0"
root = "cfs2_0"

[[Disks]]
name = "cfs2_1"
root = "cfs2_1"