Skip to content
Snippets Groups Projects
Commit a5306383 authored by Min-Su Shin's avatar Min-Su Shin
Browse files

Replacing with more general scripts.

parent 8246e3a5
Branches
No related merge requests found
#!/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
#!/bin/bash
# Name of the cluster which defines the clients' names
CLUSTERNAME="lice"
# Last integer index of the minions in the cluster
MINIONLASTIND="14"
# Directory name which is a mount point on clients
TARGETDIR="/mnt/gluster-input"
# Rest of tasks
RUNCMD="umount ${TARGETDIR}"
# ... Master
echo "... unmounting on ${CLUSTERNAME}-master"
echo $RUNCMD | bash
# ... Minion
for ind in $(seq 0 ${MINIONLASTIND})
do
echo "... unmounting on ${CLUSTERNAME}-minion-${ind}"
ssh ${CLUSTERNAME}-minion-${ind} "${RUNCMD}"
done
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment