Commit 3f35c02a authored by Koehorst, Jasper's avatar Koehorst, Jasper
Browse files

Initial commit

# sync
Project to sync all binaries and databases with the kubernetes nodes
\ No newline at end of file
#title :Synchronisation of binaries and databases to compute nodes
#description :Script to sync all needed resources from iRODS
#author :Jasper Koehorst & Bart Nijsse
#date :2020
#version :0.0.1
# Pull from iRODS
# irsync -r i:/tempZone/Infrastructure /unlock/
# Clean up finished sync pods
kubectl get pods --namespace='unlock' | grep munlock-sync | grep Completed | awk '{print "kubectl -n unlock delete pod "$1}' | sh
# Get all possible nodes
kubectl get nodes | awk '{print $1}' | grep -v NAME > nodes.txt
# For each node perform the sync
while read node; do
echo "$node"
sed "s/HOSTNAME/$node/g" template_sync_cwl.yaml > $node\_cwl.yaml
sed "s/HOSTNAME/$node/g" template_sync_infrastructure.yaml > $node\_infrastructure.yaml
sed "s/HOSTNAME/$node/g" template_sync_references.yaml > $node\_references.yaml
kubectl apply -f $node\_cwl.yaml
kubectl apply -f $node\_infrastructure.yaml
kubectl apply -f $node\_references.yaml
done < nodes.txt
Supports Markdown
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