Last active
August 1, 2018 04:31
-
-
Save aryulianto/8db2c4e7afae1143394af1d88d6863de to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Warning! Dangerous step! Destroys VMs | |
for x in $(virsh list --all | grep instance- | awk '{print $2}') ; do | |
virsh destroy $x ; | |
virsh undefine $x ; | |
done ; | |
# Warning! Dangerous step! Removes lots of packages | |
yum remove -y nrpe "*nagios*" puppet "*ntp*" "*openstack*" \ | |
"*nova*" "*keystone*" "*glance*" "*cinder*" "*swift*" \ | |
"*mariadb*" mysql mysql-server httpd "*memcache*" scsi-target-utils \ | |
iscsi-initiator-utils perl-DBI perl-DBD-MySQL ; | |
# Warning! Dangerous step! Deletes local application data | |
rm -rf rm -rf /var/lib/mysql | |
rm -rf /root/.my.cnf | |
rm -rf /etc/my.cnf* /etc/nagios /etc/yum.repos.d/packstack_* /root/.my.cnf \ | |
/var/lib/mysql/ /var/lib/glance /var/lib/nova /etc/nova /etc/swift \ | |
/srv/node/device*/* /var/lib/cinder/ /etc/rsync.d/frag* \ | |
/var/cache/swift /var/log/keystone /var/log/cinder/ /var/log/nova/ \ | |
/var/log/httpd /var/log/glance/ /var/log/nagios/ /var/log/quantum/ ; | |
umount /srv/node/device* ; | |
killall -9 dnsmasq tgtd httpd ; | |
ovs-vsctl del-br br-tun | |
ovs-vsctl del-br br-int | |
ovs-vsctl del-br br-ex | |
systemctl stop openvswitch.service | |
systemctl stop openvswitch-nonetwork.service | |
rm -rf /etc/openvswitch/* /etc/openvswitch/.* | |
rmmod openvswitch | |
vgremove -f cinder-volumes ; | |
losetup -a | sed -e 's/:.*//g' | xargs losetup -d ; | |
find /etc/pki/tls -name "ssl_ps*" | xargs rm -rf ; | |
for x in $(df | grep "/lib/" | sed -e 's/.* //g') ; do | |
umount $x ; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment