stoney cloud: Resetting your Test-Environment: Difference between revisions
| Line 63: | Line 63: | ||
rm /var/virtualization/vm-dynamic/*/*.qcow2 | rm /var/virtualization/vm-dynamic/*/*.qcow2 | ||
rm /var/virtualization/vm-persistent/*/*.qcow2 | rm /var/virtualization/vm-persistent/*/*.qcow2 | ||
</source> | |||
== Clean up the Firewall Rules == | |||
If you have configured the automatic firewall rules creation, you need to execute the following commands on the Primary-Master-Node: | |||
<source lang="bash"> | |||
svn up /usr/local/scripts/netfilter/local/chains/vms | |||
svn rm /usr/local/scripts/netfilter/local/chains/vms/* | |||
svn ci -m "Removed all test VM rules" /usr/local/scripts/netfilter/local/chains/vms/ | |||
</source> | |||
On the Secondary-Master-Node and all other VM-Nodes, you'll need to execute: | |||
<source lang="bash"> | |||
svn up /usr/local/scripts/netfilter/local/chains/vms/ | |||
</source> | |||
== Reset the LDAP Server == | |||
Now you reset the LDAP server with the the previously created backup: | |||
<source lang="bash"> | |||
</source> | </source> | ||
[[Category: Installation]] | [[Category: Installation]] | ||
[[Category: stoney cloud]] | [[Category: stoney cloud]] | ||
Revision as of 13:10, 12 February 2015
Overview
This page describes how to easily reset your stoney cloud Test-Environment.
Prerequisites
After you've installed and configured your stoney cloud Test-Environment, but before you've added any profiles, you need to make a complete Backup of your LDAP directory:
/usr/sbin/makeOpenLDAPmasterBackup.sh
The output will look something like:
Backup directory /var/backup/ldap/vm-test-01.int.stoney-cloud.org exists
###################################################################################################
Removing backups older than 15 days ...
###################################################################################################
find /var/backup/ldap/vm-test-01.int.stoney-cloud.org -type f -ctime +15 -exec rm {} \; >/dev/null
Backup Started
###################################################################################################
Executing touch /var/backup/ldap/vm-test-01.int.stoney-cloud.org/OpenLDAPmasterBackup.ldif.2015-02-12
###################################################################################################
Executing chmod 600 /var/backup/ldap/vm-test-01.int.stoney-cloud.org/OpenLDAPmasterBackup.ldif.2015-02-12
###################################################################################################
Executing /usr/sbin/slapcat -l /var/backup/ldap/vm-test-01.int.stoney-cloud.org/OpenLDAPmasterBackup.ldif.2015-02-12
###################################################################################################
Backup Finished
###################################################################################################
You can look at the backup file with:
vi /var/backup/ldap/vm-test-01.int.stoney-cloud.org/OpenLDAPmasterBackup.ldif.2015-02-12
Copy the newly created OpenLDAPmasterBackup.ldif.2015-02-12 to another location for later use:
mkdir -p /root/stoney-cloud-reset
cp /var/backup/ldap/vm-test-01.int.stoney-cloud.org/OpenLDAPmasterBackup.ldif.2015-02-12 /root/stoney-cloud-reset/.
Resetting your Test-Environment
Stop the Web Server
Stop the Web server on both Master-Nodes:
/etc/init.d/apache2 stop
Stop the LDAP Server
Stop the LDAP server on both Master-Nodes:
/etc/init.d/slapd stop
Remove all unnecessary Files
Remove all the unnecessary files on the Primary-Master-Node:
rm /var/virtualization/iso-choosable/*.iso
rm /var/virtualization/iso/*.iso
rm /var/virtualization/vm-templates/*/*.qcow2
rm /var/virtualization/vm-dynamic/*/*.qcow2
rm /var/virtualization/vm-persistent/*/*.qcow2
Clean up the Firewall Rules
If you have configured the automatic firewall rules creation, you need to execute the following commands on the Primary-Master-Node:
svn up /usr/local/scripts/netfilter/local/chains/vms
svn rm /usr/local/scripts/netfilter/local/chains/vms/*
svn ci -m "Removed all test VM rules" /usr/local/scripts/netfilter/local/chains/vms/
On the Secondary-Master-Node and all other VM-Nodes, you'll need to execute:
svn up /usr/local/scripts/netfilter/local/chains/vms/
Reset the LDAP Server
Now you reset the LDAP server with the the previously created backup: