SlideShare a Scribd company logo
“grifork”
- fast task runner via ssh -
@key_amb
at the 40th Ginza.rb #ginzarb
Who am I ?
❏ @key_amb
❏ Software Engineer
❏ Serverside, Web
❏ https://github.com/key-amb
❏ https://rubygems.org/profiles/key-amb
Before “grifork” - “fireap”
❏ https://github.com/key-amb/fireap
❏ Consul クラスタ上で動作する S3 非依存の pull 型デプロイ
ツール "fireap" を作った
“fireap” in a nutshell
❏ O(log N) … N = node number
❏ Propagative task runner on Consul Cluster
Then, what about “grifork”
❏ O(log N) … N = node number
❏ Propagative task runner via ssh
❏ https://github.com/key-amb/grifork
❏ Blog:
❏ ssh と rsync だけで Tree Deploy を実現する
"grifork" を作った
How “grifork” works?
Concept of “Tree Deploy”
Two modes to run “grifork”
1. “Standalone mode”
○ Require grifork only on the task-running host
2. “Grifork mode”
○ Require grifork on every node
Standalone mode 1/3
Standalone mode 2/3
Standalone mode 3/3
Grifork mode 1/3
Grifork mode 2/3
Grifork mode 3/3
Quickstart
% gem install grifork
% edit Griforkfile
% grifork
Configure by “Griforkfile”
branches 4
#mode :standalone
log file: 'grifork.log'
hosts ['web1.internal', 'web2.internal', 'db1.internal',
'db2.internal', ...]
local do
rsync '/path/to/myapp/'
end
remote do
rsync_remote '/path/to/myapp/'
end
See examples for more info
Changes in v0.2 ~ v0.5
❏ Released as a RubyGems
❏ https://rubygems.org/gems/grifork
❏ Enable to configure Parallel, ssh and rsync
options by Griforkfile
❏ Enable to configure tasks which runs at first
in the job or at last
Summary
❏ “grifork” is an easy way to speed up
deployment
❏ Enjoy!
Thank you!
Appendix
fireap Resource:
❏ http://www.slideshare.net/YasutakeKiyoshi/fi
reap-fast-task-runner-on-consul
Products for O(1) deployment:
❏ https://github.com/fujiwara/stretcher
❏ https://github.com/sorah/mamiya

More Related Content

grifork - fast propagative task runner -