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

Conversation

yichengq
Copy link
Contributor

This displays the way to run multiple cfs fast in docker. And this helps
for further development on reconstruct and copy.

for the first part of #82

vagrant@ubuntu-14:~/gopath/src/github.com/c-fs/cfs/hack/docker-cluster$ sudo /home/vagrant/gopath/bin/goreman start
05:41:02 cfs0 | Starting cfs0 on port 5000
05:41:02 cfs1 | Starting cfs1 on port 5001
05:41:02 cfs2 | Starting cfs2 on port 5002
05:41:03 cfs2 | E0724 05:41:03.003147       1 manager.go:220] Failed to start OOM watcher, will not get OOM events: exec: "journalctl": executable file not found in $PATH
05:41:03 cfs0 | E0724 05:41:03.146837       1 manager.go:220] Failed to start OOM watcher, will not get OOM events: exec: "journalctl": executable file not found in $PATH
05:41:03 cfs1 | E0724 05:41:03.175936       1 manager.go:220] Failed to start OOM watcher, will not get OOM events: exec: "journalctl": executable file not found in $PATH
05:41:03 cfs2 | 2015/07/24 05:41:03 [INFO][github.com/c-fs/cfs/server] main.go:36: server: detect docker container "/docker/86b3cdfa68a9600e9142fb157a476bc7a57ae52dd30b9a0a671a2ef3ae335ef6"
05:41:03 cfs2 | 2015/07/24 05:41:03 [INFO][github.com/c-fs/cfs/server] main.go:39: server: starting server...
05:41:03 cfs2 | 2015/07/24 05:41:03 [INFO][github.com/c-fs/cfs/server] main.go:46: server: listening on :15524
05:41:03 cfs2 | 2015/07/24 05:41:03 [INFO][github.com/c-fs/cfs/server] disk_manage.go:27: server: created disk[cfs2_0] at root path[/cfs2_0]
05:41:03 cfs2 | 2015/07/24 05:41:03 [INFO][github.com/c-fs/cfs/server] disk_manage.go:27: server: created disk[cfs2_1] at root path[/cfs2_1]
05:41:03 cfs2 | 2015/07/24 05:41:03 [INFO][github.com/c-fs/cfs/server] main.go:60: server: ready to serve clients
05:41:03 cfs1 | 2015/07/24 05:41:03 [INFO][github.com/c-fs/cfs/server] main.go:36: server: detect docker container "/docker/89958b8f806c27d614ff5cd9eb6a5db08726f190f4c3544151c9aba462bee653"
05:41:03 cfs1 | 2015/07/24 05:41:03 [INFO][github.com/c-fs/cfs/server] main.go:39: server: starting server...
05:41:03 cfs1 | 2015/07/24 05:41:03 [INFO][github.com/c-fs/cfs/server] main.go:46: server: listening on :15524
05:41:03 cfs1 | 2015/07/24 05:41:03 [INFO][github.com/c-fs/cfs/server] disk_manage.go:27: server: created disk[cfs1_0] at root path[/cfs1_0]
05:41:03 cfs1 | 2015/07/24 05:41:03 [INFO][github.com/c-fs/cfs/server] disk_manage.go:27: server: created disk[cfs1_1] at root path[/cfs1_1]
05:41:03 cfs1 | 2015/07/24 05:41:03 [INFO][github.com/c-fs/cfs/server] main.go:60: server: ready to serve clients
05:41:03 cfs0 | 2015/07/24 05:41:03 [INFO][github.com/c-fs/cfs/server] main.go:36: server: detect docker container "/docker/3d4fbab824c373543fe2e6e50006c649469fb2201e55e70971170377440b5974"
05:41:03 cfs0 | 2015/07/24 05:41:03 [INFO][github.com/c-fs/cfs/server] main.go:39: server: starting server...
05:41:03 cfs0 | 2015/07/24 05:41:03 [INFO][github.com/c-fs/cfs/server] main.go:46: server: listening on :15524
05:41:03 cfs0 | 2015/07/24 05:41:03 [INFO][github.com/c-fs/cfs/server] disk_manage.go:27: server: created disk[cfs0_0] at root path[/cfs0_0]
05:41:03 cfs0 | 2015/07/24 05:41:03 [INFO][github.com/c-fs/cfs/server] disk_manage.go:27: server: created disk[cfs0_1] at root path[/cfs0_1]
05:41:03 cfs0 | 2015/07/24 05:41:03 [INFO][github.com/c-fs/cfs/server] main.go:60: server: ready to serve clients
^Cvagrant@ubuntu-14:~/gopath/src/github.com/c-fs/cfs/hack/docker-cluster$ sudo ./cleanup.sh
89958b8f806c
86b3cdfa68a9
3d4fbab824c3
89958b8f806c
86b3cdfa68a9
3d4fbab824c3

@@ -13,8 +14,10 @@ import (
)

func main() {
configfn := "default.conf"
data, err := ioutil.ReadFile(configfn)
configfn := flag.String("config", "default.conf", "location of configuration file")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we use pkg
github.com/spf13/cobra
for flag parsing here also well for consistent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we use cobra framework because it faciliates the way to write subcommand. Considering we don't use subcommand in server side, it is fine to use standard flag lib here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed with @yichengq

yichengq added 2 commits July 25, 2015 11:04
This displays the way to run multiple cfs fast in docker. And this helps
for further development on reconstruct and copy.
@xiang90
Copy link
Contributor

xiang90 commented Aug 10, 2015

LGTM

yichengq added a commit that referenced this pull request Aug 23, 2015
ack/docker-cluster: add fast way to start local docker cluster
@yichengq yichengq merged commit 896ec02 into c-fs:master Aug 23, 2015
@yichengq yichengq deleted the docker-cluster branch August 23, 2015 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants