<commit_before>#! /bin/bash

set -e
set -x

if sudo docker ps | grep "hectcastro/riak" >/dev/null; then
  echo ""
  echo "It looks like you already have some containers running."
  echo "Please take them down before attempting to bring up another"
  echo "cluster with the following command:"
  echo ""
  echo "  make stop-cluster"
  echo ""

  exit 1
fi

for index in `seq 5`;
do
  CONTAINER_ID=$(sudo docker run -d -i \
    -h "riak${index}" \
    -e "RIAK_NODE_NAME=33.33.33.${index}0" \
    -t "hectcastro/riak")

  sleep 1

  sudo ./bin/pipework br1 ${CONTAINER_ID} "33.33.33.${index}0"

  if [ "$index" -eq "1" ] ; then
    sudo ifconfig br1 33.33.33.254

    sleep 1
  fi

  until curl -s "http://33.33.33.${index}0:8098/ping" | grep "OK" >/dev/null;
  do
    sleep 1
  done

  if [ "$index" -gt "1" ] ; then
    sshpass -p "basho" \
      ssh -o "StrictHostKeyChecking no" root@33.33.33.${index}0 \
        riak-admin cluster join riak@33.33.33.10
  fi
done

sleep 1

sshpass -p "basho" \
  ssh -o "StrictHostKeyChecking no" root@33.33.33.10 \
    riak-admin cluster plan

read -p "Commit these cluster changes? " RESP
if [[ $RESP =~ ^[Yy]$ ]] ; then
  sshpass -p "basho" \
    ssh -o "StrictHostKeyChecking no" root@33.33.33.10 \
      riak-admin cluster commit
else
  sshpass -p "basho" \
    ssh -o "StrictHostKeyChecking no" root@33.33.33.10 \
      riak-admin cluster clear
fi<commit_msg>Made input for the cluster commit prompt more explicit.<commit_after>#! /bin/bash

set -e
set -x

if sudo docker ps | grep "hectcastro/riak" >/dev/null; then
  echo ""
  echo "It looks like you already have some containers running."
  echo "Please take them down before attempting to bring up another"
  echo "cluster with the following command:"
  echo ""
  echo "  make stop-cluster"
  echo ""

  exit 1
fi

for index in `seq 5`;
do
  CONTAINER_ID=$(sudo docker run -d -i \
    -h "riak${index}" \
    -e "RIAK_NODE_NAME=33.33.33.${index}0" \
    -t "hectcastro/riak")

  sleep 1

  sudo ./bin/pipework br1 ${CONTAINER_ID} "33.33.33.${index}0"

  if [ "$index" -eq "1" ] ; then
    sudo ifconfig br1 33.33.33.254

    sleep 1
  fi

  until curl -s "http://33.33.33.${index}0:8098/ping" | grep "OK" >/dev/null;
  do
    sleep 1
  done

  if [ "$index" -gt "1" ] ; then
    sshpass -p "basho" \
      ssh -o "StrictHostKeyChecking no" root@33.33.33.${index}0 \
        riak-admin cluster join riak@33.33.33.10
  fi
done

sleep 1

sshpass -p "basho" \
  ssh -o "StrictHostKeyChecking no" root@33.33.33.10 \
    riak-admin cluster plan

read -p "Commit these cluster changes? (y/n): " RESP
if [[ $RESP =~ ^[Yy]$ ]] ; then
  sshpass -p "basho" \
    ssh -o "StrictHostKeyChecking no" root@33.33.33.10 \
      riak-admin cluster commit
else
  sshpass -p "<PASSWORD>" \
    ssh -o "StrictHostKeyChecking no" root@33.33.33.10 \
      riak-admin cluster clear
fi
{'fraction_non_alphanumeric': 0.140406162464986, 'fraction_numerical': 0.05812324929971989, 'mean_word_length': 2.6073232323232323, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 10, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '726800', 'n_tokens_mistral': 1258, 'n_tokens_neox': 1113, 'n_words': 336}