diff --git a/lice/tool_setup_nasfs_client_all_nodes.sh b/lice/tool_setup_nasfs_client_all_nodes.sh new file mode 100755 index 0000000000000000000000000000000000000000..917c4dfb2cdfc2f32ecd00375265a380639a2822 --- /dev/null +++ b/lice/tool_setup_nasfs_client_all_nodes.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Name of the cluster which defines the clients' names +CLUSTERNAME="lice" +# Last integer index of the minions in the cluster +MINIONLASTIND="14" +# IP of the Gluster server +NASIP="" +# Directory name which corresponds to the source directory in the NAS +NASDIR="" +# NAS username +NASUSER="" +# Directory name which is a mount point on clients +TARGETDIR="/mnt/nas-input" + +RUNCMD="apt -y install cifs-utils smbclient; mkdir ${TARGETDIR}; mount -t cifs //${NASIP}/${NASDIR} ${TARGETDIR} -o user={$NASUSER}; chmod -R 777 ${TARGETDIR}" + +echo "... setuping on ${CLUSTERNAME}-master" +echo $RUNCMD | bash + +for ind in $(seq 0 ${MINIONLASTIND}) +do + echo "... setuping on ${CLUSTERNAME}-minion-${ind}" + ssh ${CLUSTERNAME}-minion-${ind} "${RUNCMD}" +done