Created
February 4, 2013 21:35
-
-
Save JCallicoat/4709916 to your computer and use it in GitHub Desktop.
Refried beans
This file contains 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
#!/bin/bash | |
# REFRIED BEANS | |
# 'soft' rekick a rcps environment | |
echo "PURGING THE BEANS" | |
apt-get -y purge `dpkg -l | awk '/mysql/ {print $2}'` | |
apt-get -y purge `dpkg -l | awk '/keystone/ {print $2}'` | |
apt-get -y purge `dpkg -l | awk '/glance/ {print $2}'` | |
rm -rf /root/.my.cnf | |
rm -rf /etc/mysql/grants.sql | |
rm -rf /var/lib/mysql | |
rm -rf /var/chef | |
rm -f /var/cache/local/preseeding/mysql-server.seed | |
rm -rf /etc/glance /var/lib/glance | |
rm -rf /etc/keystone | |
apt-get -y purge `dpkg -l | awk '/nova/ {print $2}'` | |
rm -rfv /etc/nova /var/lib/nova/ /var/log/nova/ | |
apt-get -y autoremove | |
dpkg -P -a | |
echo purge | debconf-communicate mysql-server-5.0 | |
echo purge | debconf-communicate mysql-server-5.5 | |
echo "REFRYING THE BEANS" | |
if [[ ! -d /opt/rpcs/chef-cookbooks ]] ; then | |
git clone http://github.com/rcbops/chef-cookbooks.git /opt/rpcs/chef-cookbooks | |
fi | |
knife cookbook upload -ao /opt/rpcs/chef-cookbooks/cookbooks | |
knife role from file /opt/rpcs/chef-cookbooks/roles/*.rb | |
chef-client | |
dsh -g compute chef-client | |
# might need to run `mysqladmin flush-hosts` on infra if computes are making too many connections |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment