This repository has been archived by the owner on Apr 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 100
/
uninstall.sh
executable file
·58 lines (44 loc) · 2.51 KB
/
uninstall.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
# Copyright 2014 Intel Corporation, All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the"License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#!/bin/bash
TOPDIR=$(cd $(dirname "$0") && pwd)
USER=`whoami`
source $TOPDIR/installrc
#for ip in $CONTROLLER_ADDRESS; do
# ssh -t $ip "sudo service vsm-api stop; sudo service vsm-scheduler stop; sudo service vsm-conductor stop; clean-data -f; yum -y erase ceph httpd MariaDB-client MariaDB-server memcached rabbitmq-server rbd-fuse vsm vsm-dashboard python-vsmclient vsm-deploy"
#done
#killall beam
#for ip in $AGENT_ADDRESS_LIST; do
# ssh -t $ip "sudo service vsm-agent stop; sudo service vsm-physical stop; clean-data -f; yum -y erase ceph httpd librbd MariaDB-client MariaDB-devel MariaDB-server memcached openstack-keystone openstack-utils python-devel rabbitmq-server rbd-fuse vsm vsm-dashboard python-vsmclient vsm-deploy"
#done
for ip in $CONTROLLER_ADDRESS; do
ssh -t $ip "sudo service vsm-api stop"
ssh -t $ip "sudo service vsm-scheduler stop"
ssh -t $ip "sudo service vsm-conductor stop"
ssh -t $ip "sudo service mysql restart"
ssh -t $ip "sudo apt-get purge --yes -m vsm vsm-dashboard python-vsmclient vsm-deploy"
ssh -t $ip "sudo apt-get purge --yes -m rabbitmq-server librabbitmq1 diamond"
ssh -t $ip "sudo apt-get purge --yes -m keystone python-keystone python-keystoneclient python-keystonemiddleware"
ssh -t $ip "sudo apt-get autoremove --yes"
ssh -t $ip "sudo killall rabbitmq-server beam beam.smp"
ssh -t $ip "sudo rm -rf /var/lib/keystone /etc/keystone /etc/vsm /etc/vsm-dashboard /etc/vsmdeploy /var/lib/vsm /var/log/vsm"
done
for ip in $AGENT_ADDRESS_LIST; do
ssh -t $ip "sudo service vsm-agent stop"
ssh -t $ip "sudo service vsm-physical stop"
ssh -t $ip "sudo apt-get purge --yes -m vsm vsm-dashboard python-vsmclient vsm-deploy"
ssh -t $ip "sudo apt-get purge --yes -m diamond"
ssh -t $ip "sudo apt-get purge --yes -m python-keystoneclient"
ssh -t $ip "sudo apt-get autoremove --yes"
ssh -t $ip "sudo rm -rf /var/lib/vsm /var/log/vsm /etc/vsm"
done