Commits

dizzyd committed 9bd5dd2

Complete breakout of variables for scripts and config files

  • Participants
  • Parent commits 458e8b6

Comments (0)

Files changed (5)

rel/files/app.config

 
               %% 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, {{web_ip}} },
+              {web_ip, "{{web_ip}}" },
 
               %% riak_web_port is the TCP port that the Riak HTTP interface will
               %% bind to.
 
             %% riak_handoff_port is the TCP port that Riak uses for
             %% intra-cluster data handoff.
-            {handoff_port, 8099},
+            {handoff_port, {{handoff_port}} },
 
             %% 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_ip,   "{{pb_ip}}" },
 
             %% pb_port is the TCP port that the Riak Protocol Buffers interface
             %% will bind to
-            {pb_port, 8087},
+            {pb_port, {{pb_port}} },
 
             %% 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
 #!/bin/bash
 
-RUNNER_SCRIPT_DIR=$(cd ${0%/*} && pwd)
+RUNNER_SCRIPT_DIR={{runner_script_dir}}
 RUNNER_SCRIPT=${0##*/}
 
-RUNNER_BASE_DIR=${RUNNER_SCRIPT_DIR%/*}
-RUNNER_ETC_DIR=$RUNNER_BASE_DIR/etc
-RUNNER_LOG_DIR=$RUNNER_BASE_DIR/log
-PIPE_DIR=/tmp/$RUNNER_BASE_DIR/
-RUNNER_USER=
+RUNNER_BASE_DIR={{runner_base_dir}}
+RUNNER_ETC_DIR={{runner_etc_dir}}
+RUNNER_LOG_DIR={{runner_log_dir}}
+PIPE_DIR={{pipe_dir}}
+RUNNER_USER={{runner_user}}
 
 # Make sure this script is running as the appropriate user
 if [ "$RUNNER_USER" -a "x$LOGNAME" != "x$RUNNER_USER" ]; then

rel/files/riak-admin

 #!/bin/bash
 
-RUNNER_SCRIPT_DIR=$(cd ${0%/*} && pwd)
+RUNNER_SCRIPT_DIR={{runner_script_dir}}
 RUNNER_SCRIPT=${0##*/}
 
-RUNNER_BASE_DIR=${RUNNER_SCRIPT_DIR%/*}
-RUNNER_ETC_DIR=$RUNNER_BASE_DIR/etc
-RUNNER_LOG_DIR=$RUNNER_BASE_DIR/log
-RUNNER_USER=
+RUNNER_BASE_DIR={{runner_base_dir}}
+RUNNER_ETC_DIR={{runner_etc_dir}}
+RUNNER_LOG_DIR={{runner_log_dir}}
+RUNNER_USER={{runner_user}}
 
 # Make sure this script is running as the appropriate user
 if [ "$RUNNER_USER" -a "x$LOGNAME" != "x$RUNNER_USER" ]; then

rel/files/vm.args

 
 ## Name of the riak node
--name riak@127.0.0.1
+-name {{node}}
 
 ## Cookie for distributed erlang
 -setcookie riak
 %% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
 %% ex: ts=4 sw=4 et
 
-{web_ip, "\"127.0.0.1\""}.
-{web_port, 8098}.
+%%
+%% etc/app.config
+%%
+{web_ip,       "127.0.0.1"}.
+{web_port,     8098}.
+{handoff_port, 8099}.
+{pb_ip,        "127.0.0.1"}.
+{pb_port,      8087}.
+
+%%
+%% etc/vm.args
+%%
+{node,         "riak@127.0.0.1"}.
+
+%%
+%% bin/riak
+%%
+{runner_script_dir,  "$(cd ${0%/*} && pwd)"}.
+{runner_base_dir,    "${RUNNER_SCRIPT_DIR%/*}"}.
+{runner_etc_dir,     "$RUNNER_BASE_DIR/etc"}.
+{runner_log_dir,     "$RUNNER_BASE_DIR/log"}.
+{pipe_dir,           "/tmp/$RUNNER_BASE_DIR/"}.
+{runner_user,        ""}.