Improve purge configuration

This commit is contained in:
Joshua Boniface 2021-12-15 09:47:52 -05:00
parent a9d636dcf5
commit b7b6e6762b
1 changed files with 8 additions and 0 deletions

View File

@ -14,6 +14,7 @@ for host in $@; do
echo -n "Purging host ${host}... " echo -n "Purging host ${host}... "
ssh deploy@${host} ' ssh deploy@${host} '
sudo systemctl stop pvcnoded; sudo systemctl stop pvcnoded;
sudo systemctl stop pvcapid;
sudo systemctl stop ceph-mon@$(hostname -s); sudo systemctl stop ceph-mon@$(hostname -s);
sudo systemctl stop ceph-mgr@$(hostname -s); sudo systemctl stop ceph-mgr@$(hostname -s);
sudo systemctl stop patroni; sudo systemctl stop patroni;
@ -26,6 +27,7 @@ for host in $@; do
suod rm -rf /var/log/postgresql /var/log/zookeeper /var/log/libvirt; suod rm -rf /var/log/postgresql /var/log/zookeeper /var/log/libvirt;
sudo rm -rf /run/ceph; sudo rm -rf /run/ceph;
sudo rm -rf /etc/systemd/system/ceph-*.target.wants; sudo rm -rf /etc/systemd/system/ceph-*.target.wants;
sudo apt purge -y *pvc*;
sudo apt purge -y *ceph* *rbd* *rados*; sudo apt purge -y *ceph* *rbd* *rados*;
sudo apt purge -y patroni* postgres* zookeeper* libvirt* sudo apt purge -y patroni* postgres* zookeeper* libvirt*
sudo apt purge -y ca-certificates-java fontconfig-config libjemalloc2 libpq5 python-psycopg2 python3-eventlet python3-greenlet python3-jinja2 python3-kazoo python3-markupsafe python3-pkg-resources python3-pygments python3-six uuid-runtime sudo apt purge -y ca-certificates-java fontconfig-config libjemalloc2 libpq5 python-psycopg2 python3-eventlet python3-greenlet python3-jinja2 python3-kazoo python3-markupsafe python3-pkg-resources python3-pygments python3-six uuid-runtime
@ -36,6 +38,12 @@ for host in $@; do
sudo umount /var/lib/ceph; sudo umount /var/lib/ceph;
sudo mkfs.ext4 /dev/vgx/ceph; sudo mkfs.ext4 /dev/vgx/ceph;
sudo mount /var/lib/ceph; sudo mount /var/lib/ceph;
' &>/dev/null
echo "done."
done
for host in $@; do
echo -n "Rebooting host ${host}... "
ssh deploy@${host} '
sudo reboot; sudo reboot;
' &>/dev/null ' &>/dev/null
echo "done." echo "done."