Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 559 Bytes

14-cleanup.md

File metadata and controls

27 lines (21 loc) · 559 Bytes

Cleaning Up

In this lab you will delete the compute resources created during this tutorial.

Compute Instances

Delete the controller and worker compute instances:

{
  for x in $(ls); do if [ "${x}" == "a-file-to-keep" ] || [ "${x}" == "another-one" ]; then
    echo keeping artifact "${x}"; else rm -rf "${x}";fi;
    done
  for x in $(vm.list | jq -r .[].name);do vm.rm $x;done
  rm -f ~/.ssh/known_hosts
}

Network resources

{
  for x in $(virsh net-list | awk 'NR > 2 {print $1}'); do
    virsh net-destroy $x
  done
}