kubeless/cluster-update

14 lines
410 B
Plaintext
Raw Normal View History

2019-04-02 22:26:12 +02:00
#!/bin/bash
2019-04-02 22:28:15 +02:00
WORKER_LIST="worker.list"
apt update
apt upgrade -y
for LINE in $(cat $WORKER_LIST | grep -vE "^#"); do
WORKERNAME=`echo $LINE | awk -F"/" '{print $NF}'`
echo "[worker:$WORKERNAME] Updating..."
ssh $WORKERNAME -o "StrictHostKeyChecking no" "bash -s" < apt update
ssh $WORKERNAME -o "StrictHostKeyChecking no" "bash -s" < apt upgrade -y
echo "[worker:$WORKERNAME] Update is completed."
done