Created
January 27, 2009 02:23
-
-
Save jashmenn/53129 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An easy way to test run a cluster of erlang nodes. An idea for skelerl, does | |
# not currently function. | |
# The following code would evaluate to running: | |
# | |
# erl -pa ./ebin -kernel inet_dist_listen_min 7000 inet_dist_listen_max 7050 \ | |
# -setcookie chordjerl -s chordjerl_srv start -s chordjerl_srv create_ring \ | |
# -sname node0 | |
# | |
# erl -pa ./ebin -kernel inet_dist_listen_min 7000 inet_dist_listen_max 7050 \ | |
# -setcookie chordjerl -s chordjerl_srv start -s chordjerl_srv state \ | |
# -chordjerl_srv join node0 -s init stop -sname node1 | |
# | |
# I would probably add an 'iterm' directive to run nodes in consistent tabs. | |
## Suggestions? | |
erlang_cluster do | |
options do | |
path "ebin" | |
kernel "inet_dist_listen_min 7000 inet_dist_listen_max 7050" | |
cookie "chordjerl" | |
end | |
with_node(:node0, :stop => false) do | |
start | |
chordjerl_srv::create_ring | |
end | |
with_node(:node1) do | |
namespace :chordjerl_srv do | |
start | |
state | |
join(:node0) | |
# will 'init stop' here | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment