X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=scripts%2Fci_management%2Fcleanup.sh;fp=scripts%2Fci_management%2Fcleanup.sh;h=3aa86e310a367cee4761c178fbfcbff533178f11;hb=bb0efb7438d8f1d2b439757e0008cf97b90a6f95;hp=0000000000000000000000000000000000000000;hpb=5f9280af0b3e74fb69f8124984daad4ab953ed1c;p=eliot.git diff --git a/scripts/ci_management/cleanup.sh b/scripts/ci_management/cleanup.sh new file mode 100644 index 0000000..3aa86e3 --- /dev/null +++ b/scripts/ci_management/cleanup.sh @@ -0,0 +1,29 @@ +#!/bin/bash -ex +############################################################################## +# Copyright (c) 2019 Huawei Tech and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +# start + +kubeedge reset + +reset="kubeedge reset --k8sserverip ${masternodeip}:8080" + +while read line +do + nodeinfo="${line}" + nodeusr=$(echo ${nodeinfo} | cut -d"|" -f1) + nodeip=$(echo ${nodeinfo} | cut -d"|" -f2) + nodepaswd=$(echo ${nodeinfo} | cut -d"|" -f3) + masternodeip=$(echo ${nodeinfo} | cut -d"|" -f3) + + sshpass -p ${nodepaswd} \ + kubeedge reset --k8sserverip ${masternodeip}:8080 + +done < nodelist +