Commit bb28684f authored by Jian Huang's avatar Jian Huang

Update util.sh

When we deploy the kubernetes using Ubuntu's script. 1. First we set the roles "ai i i" and NUM_MINIONS=3, it runs as expected. 2. Then we change the roles to "a i i" and NUM_MINIONS=2, we found it will not run successfully. It's because there are history files left on the previous deployment. This commit will delete the files when stop the cluster.
parent a101aa17
...@@ -437,6 +437,8 @@ function kube-down { ...@@ -437,6 +437,8 @@ function kube-down {
{ {
echo "Cleaning on node ${i#*@}" echo "Cleaning on node ${i#*@}"
ssh -t $i 'pgrep etcd && sudo -p "[sudo] password for cleaning etcd data: " service etcd stop && sudo rm -rf /infra*' ssh -t $i 'pgrep etcd && sudo -p "[sudo] password for cleaning etcd data: " service etcd stop && sudo rm -rf /infra*'
# Delete the files in order to generate a clean environment, so you can change each node's role at next deployment.
ssh -t $i 'rm -f /opt/bin/kube* /etc/init/kube* /etc/init.d/kube* /etc/default/kube*; rm -rf ~/kube'
} }
done done
wait wait
......
Markdown is supported
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