Skip to content

Instantly share code, notes, and snippets.

@sgonyea
Created July 5, 2010 20:21
Show Gist options
  • Save sgonyea/464652 to your computer and use it in GitHub Desktop.
Save sgonyea/464652 to your computer and use it in GitHub Desktop.
%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 et
[
%% Riak Core config
{riak_core, [
%% Default location of ringstate
{ring_state_dir, "data/ring"},
%% riak_web_ip is the IP address that the Riak HTTP interface will
%% bind to. If this is undefined, the HTTP interface will not run.
{web_ip, "127.0.0.1"},
%% riak_web_port is the TCP port that the Riak HTTP interface will
%% bind to.
{web_port, 8091}
]},
%% Riak KV config
{riak_kv, [
%% Storage_backend specifies the Erlang module defining the storage
%% mechanism that will be used on this node.
{storage_backend, riak_kv_bitcask_backend},
%% Different storage backends can use other configuration variables.
%% For instance, riak_dets_backend_root determines the directory
%% under which dets files will be placed.
{riak_kv_dets_backend_root, "data/dets"},
%% riak_handoff_port is the TCP port that Riak uses for
%% intra-cluster data handoff.
{handoff_port, 8071},
%% pb_ip is the IP address that the Riak Protocol Buffers interface
%% will bid to. If this is undefined, the interface will not run.
{pb_ip, "127.0.0.1"},
%% pb_port is the TCP port that the Riak Protocol Buffers interface
%% will bind to
{pb_port, 8081},
%% raw_name is the first part of all URLS used by the Riak raw HTTP
%% interface. See riak_web.erl and raw_http_resource.erl for
%% details.
%{raw_name, "riak"},
%% mapred_name is URL used to submit map/reduce requests to Riak.
{mapred_name, "mapred"},
%% js_vm_count is the number of Javascript VMs to start per Riak
%% node. 8 is a good default for smaller installations. A larger
%% number like 12 or 16 is appropriate for installations handling
%% lots of map/reduce processing.
{js_vm_count, 16},
%% js_max_vm_mem is the maximum amount of memory, in megabytes,
%% allocated to the Javascript VMs. If unset, the default is
%% 8MB.
{js_max_vm_mem, 16},
%% js_source_dir should point to a directory containing Javascript
%% source files which will be loaded by Riak when it initializes
%% Javascript VMs.
%{js_source_dir, "/tmp/js_source"}
%% riak_stat enables the use of the "riak-admin status" command to
%% retrieve information the Riak node for performance and debugging needs
{riak_kv_stat, true}
]},
%% Bitcask Config
{bitcask, [
{data_root, "data/bitcask"}
]},
%% SASL config
{sasl, [
{sasl_error_logger, {file, "log/sasl-error.log"}},
{errlog_type, error},
{error_logger_mf_dir, "log/sasl"}, % Log directory
{error_logger_mf_maxbytes, 10485760}, % 10 MB max file size
{error_logger_mf_maxfiles, 5} % 5 files max
]}
].
~/Sites/riak/1-riak/bin/riak start
~/Sites/riak/2-riak/bin/riak start
~/Sites/riak/3-riak/bin/riak start
# ~/Sites/riak/4-riak/bin/riak start
# ~/Sites/riak/5-riak/bin/riak start
# ~/Sites/riak/6-riak/bin/riak start
~/Sites/riak/2-riak/bin/riak-admin join riak1@127.0.0.1
~/Sites/riak/3-riak/bin/riak-admin join riak1@127.0.0.1
# ~/Sites/riak/4-riak/bin/riak-admin join riak1@127.0.0.1
# ~/Sites/riak/5-riak/bin/riak-admin join riak1@127.0.0.1
# ~/Sites/riak/6-riak/bin/riak-admin join riak1@127.0.0.1
PID1=~/Sites/pen/pen.pid-8087
CON1=localhost:8088
LOG1=~/Sites/pen/pen.log
PEN1="-x 500 -p $PID1 -l $LOG1 -C $CON1 8087 127.0.0.1:8081 127.0.0.1:8082 127.0.0.1:8083" # 127.0.0.1:8084 127.0.0.1:8085 127.0.0.1:8086"
~/Sites/pen/pen $PEN1
PID1=~/Sites/pen/pen.pid-8097
CON1=localhost:8097
LOG1=~/Sites/pen/pen.log
PEN1="-x 500 -p $PID1 -l $LOG1 -C $CON1 8097 127.0.0.1:8091 127.0.0.1:8092 127.0.0.1:8093" # 127.0.0.1:8094 127.0.0.1:8095 127.0.0.1:8096"
~/Sites/pen/pen $PEN1
~/Sites/riak/2-riak/bin/riak stop
~/Sites/riak/3-riak/bin/riak stop
# ~/Sites/riak/4-riak/bin/riak stop
# ~/Sites/riak/5-riak/bin/riak stop
# ~/Sites/riak/6-riak/bin/riak stop
~/Sites/riak/1-riak/bin/riak stop
kill `cat ~/Sites/pen/pen.pid-8087`
kill `cat ~/Sites/pen/pen.pid-8097`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment