conjurdemos / cdemo

A tour of Conjur including LDAP sync, scalable machine identity, policy-based mgmt, ssh key mgmt and Splunk integration.
21 stars 18 forks source link

Adds `bin/remove-containers` script #71

Closed ryanprior closed 6 years ago

ryanprior commented 6 years ago

What does this PR do?

This PR introduces a new script which script removes all running cdemo Docker containers, if any. It will not remove containers that are not part of the cdemo cluster.

How to test

  1. run the Ansible playbooks as described in README.md
  2. run another Docker container:
    $ sudo docker run -d --name test-pr-71 ubuntu sleep infinity
  3. run sudo docker ps and verify that a bunch of containers are up, including the ones the cdemo playbooks create and our separately created test-pr-71 container
  4. run sudo bin/remove-containers
  5. run sudo docker ps and verify that the cdemo containers have been removed, but others (like test-pr-71) are still up
  6. clean up the test container: sudo docker rm -f test-pr-71