From 8246e3a5dd792de886838d32ddf2644f4f5f3c30 Mon Sep 17 00:00:00 2001 From: Min-Su Shin Date: Wed, 9 Aug 2023 16:46:41 +0900 Subject: [PATCH] NAS for input. --- lice/tool_setup_nasfs_client_all_nodes.sh | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 lice/tool_setup_nasfs_client_all_nodes.sh 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 0000000..917c4df --- /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 -- GitLab