Skip to content

Latest commit

 

History

History
83 lines (66 loc) · 2.64 KB

cleanup.md

File metadata and controls

83 lines (66 loc) · 2.64 KB
Zero Downtime Migration Lab ℹ️ For technical support, please contact us via email.
⬅️ Back Epilogue: cleanup Next ➡️
Epilogue: cleanup

Phase 6

🎯 Goal: cleanly deleting all resources that are no longer needed now that the migration is over.

If your ZDM infrastructure was running on disposable hosts, such as cloud instances that you can delete with one click), you could do so now.

In this exercise, however, all containers (and related Docker objects) are running on the same host: for the sake of completeness, let us explicitly dispose of all resources not needed anymore.

Remove the zdm-ansible-container with:

### host
docker rm -f zdm-ansible-container

Then remove the proxy container itself:

### host
docker rm -f zdm-proxy-container

Get rid of all of the monitoring stack (including a volume that comes with the containers):

### host
docker rm -f \
  zdm-grafana-container \
  zdm-prometheus-container \
  zdm-node-exporter-container
docker volume rm zdm-prometheus-metrics-volume

Finally, destroy Origin (gulp!). In this case it is easy, it's just a single-node Cassandra cluster. Note: in an actual production setup, you probably do not want to take this step lightly (and presumably it would be a bit more than one node)!

### host
VOLUME_CASSANDRA_ORIGIN_1=`docker inspect cassandra-origin-1 | jq -r '.[].Mounts[] | select( .Type=="volume" ).Name'`
docker rm -f cassandra-origin-1
docker volume rm ${VOLUME_CASSANDRA_ORIGIN_1}

🗒️ Well, this is really the end. Time to wrap it up.

⬅️ Back Next ➡️