Files
ostrich/utils/build_node_list.sh
2018-01-20 13:55:01 -06:00

24 lines
469 B
Bash
Executable File

#!/bin/bash
NODE_COUNT=
echo 'Generating node list...'
if [ ! -d ./exe/ ]; then
mkdir ./exe/
mkdir ./exe/linux
fi
read -p "How many nodes are in this cluster? " NODE_COUNT
echo "[TaskManager]" > ./exe/linux/nodes.cfg
# For each node, prompt for an ip.
for i in $(seq 0 $(expr $NODE_COUNT - 1))
do
read -p "node$i ip: (Try using what is specified for your hostname in /etc/hosts " CURRENT_NODE_IP
echo "node$i=$CURRENT_NODE_IP" >> ./exe/linux/nodes.cfg
done