This repository has been archived by the owner on Oct 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Zipcar/namespaces
Namespaces
- Loading branch information
Showing
10 changed files
with
130 additions
and
70 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Vault Playground V2.0.0 destroy | ||
# Vault Playground V.2.1.0 destroy | ||
# | ||
# This script terminates and removes all containers deployed in the Vault Playground docker network (vp). | ||
# | ||
|
||
vp_network_name=vp | ||
: "${VP_NAMESPACE:=vp}" # Namespace for the local Vault playground, used for network and container names | ||
|
||
if [ ! $(command -v docker) ]; then | ||
echo -e "\ndocker not found! It must be installed before proceeding: https://www.docker.com/get-docker\n" | ||
exit 1 | ||
fi | ||
|
||
containers_to_destroy=$(docker ps -qa --no-trunc -f network=${vp_network_name}) | ||
containers_to_destroy=$(docker ps -qa --no-trunc -f network=${VP_NAMESPACE}) | ||
|
||
if [ ${#containers_to_destroy} != 0 ]; then | ||
docker rm -f ${containers_to_destroy} | ||
docker network rm ${vp_network_name} | ||
docker network rm ${VP_NAMESPACE} | ||
else | ||
echo "No containers found in network or network does not exist. Maybe everything was already destroyed?" | ||
echo "No containers found in the $VP_NAMESPACE network or network does not exist. Maybe everything was already destroyed or you need to pass in VP_NAMESPACE?" | ||
fi | ||
|
||
echo "To purge all cached data run the purge script" |
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
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
Oops, something went wrong.