Templates.
This commit is contained in:
parent
2589c84f4d
commit
41287ec041
9
caddy/destroy.sh
Executable file
9
caddy/destroy.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
source "${AGENT_PATH}/common.sh"
|
||||||
|
_check_required_env_vars
|
||||||
|
|
||||||
|
./uninstall.sh
|
||||||
|
|
||||||
|
datadestroy "volume=$DATA_VOLUME" "volume=$CONFIG_VOLUME" || _die "Failed to Destroy"
|
||||||
|
|
||||||
|
echo "Destroyed ${CONTAINER_NAME}."
|
@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
source "${AGENT_PATH}/common.sh"
|
|
||||||
_check_required_env_vars
|
|
||||||
|
|
||||||
# NUKE SCRIPT
|
|
||||||
|
|
||||||
./uninstall.sh
|
|
||||||
|
|
||||||
datanuke "volume=$DATA_VOLUME" "volume=$CONFIG_VOLUME" || _die "Failed to nuke"
|
|
||||||
|
|
||||||
echo "Nuking of ${CONTAINER_NAME} complete."
|
|
12
simple-object-storage/destroy.sh
Executable file
12
simple-object-storage/destroy.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
source "${AGENT_PATH}/common.sh"
|
||||||
|
_check_required_env_vars
|
||||||
|
|
||||||
|
# Simple Object Storage Destroy Script
|
||||||
|
# Removes container AND volume.
|
||||||
|
|
||||||
|
./uninstall.sh
|
||||||
|
|
||||||
|
datadestroy "volume=${VOLUME_NAME}" || _die "Failed to Destroy volume ${VOLUME_NAME}"
|
||||||
|
|
||||||
|
echo "Destroyed ${CONTAINER_NAME}."
|
@ -1,12 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
source "${AGENT_PATH}/common.sh"
|
|
||||||
_check_required_env_vars
|
|
||||||
|
|
||||||
# Simple Object Storage Nuke Script
|
|
||||||
# Removes container AND volume.
|
|
||||||
|
|
||||||
./uninstall.sh
|
|
||||||
|
|
||||||
datanuke "volume=${VOLUME_NAME}" || _die "Failed to nuke volume ${VOLUME_NAME}"
|
|
||||||
|
|
||||||
echo "Nuke complete for service ${CONTAINER_NAME}."
|
|
10
squashkiwi/destroy.sh
Executable file
10
squashkiwi/destroy.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
source "${AGENT_PATH}/common.sh"
|
||||||
|
_check_required_env_vars "LOCAL_DATA_FOLDER"
|
||||||
|
|
||||||
|
./uninstall.sh
|
||||||
|
|
||||||
|
datadestroy "path=${LOCAL_DATA_FOLDER}" || _die "Failed to destroy ${LOCAL_DATA_FOLDER}"
|
||||||
|
|
||||||
|
echo "Drestroyed ${CONTAINER_NAME}"
|
||||||
|
|
@ -1,10 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
source "${AGENT_PATH}/common.sh"
|
|
||||||
_check_required_env_vars "LOCAL_DATA_FOLDER"
|
|
||||||
|
|
||||||
./uninstall.sh
|
|
||||||
|
|
||||||
datanuke "path=${LOCAL_DATA_FOLDER}" || _die "Failed to nuke ${LOCAL_DATA_FOLDER}"
|
|
||||||
|
|
||||||
echo "Nuke of ${CONTAINER_NAME} complete"
|
|
||||||
|
|
@ -2,17 +2,16 @@
|
|||||||
source "${AGENT_PATH}/common.sh"
|
source "${AGENT_PATH}/common.sh"
|
||||||
_check_required_env_vars "LOCAL_DATA_FOLDER" "CONTAINER_NAME"
|
_check_required_env_vars "LOCAL_DATA_FOLDER" "CONTAINER_NAME"
|
||||||
|
|
||||||
# Nginx Example Nuke Script
|
|
||||||
# Removes container and local data folder.
|
# Removes container and local data folder.
|
||||||
|
|
||||||
# Call uninstall script first
|
# Call uninstall script first
|
||||||
./uninstall.sh
|
./uninstall.sh
|
||||||
|
|
||||||
datanuke "path=${LOCAL_DATA_FOLDER}" || _die "Failed to nuke ${LOCAL_DATA_FOLDER}"
|
datadestroy "path=${LOCAL_DATA_FOLDER}" || _die "Failed to Destroy ${LOCAL_DATA_FOLDER}"
|
||||||
|
|
||||||
if [ -d "${LOCAL_DATA_FOLDER}" ]; then
|
if [ -d "${LOCAL_DATA_FOLDER}" ]; then
|
||||||
echo "datanuke failed to remove ${LOCAL_DATA_FOLDER}"
|
echo "datadestroy failed to remove ${LOCAL_DATA_FOLDER}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Nuke complete for service ${CONTAINER_NAME}."
|
echo "Destroyed ${CONTAINER_NAME}."
|
@ -10,4 +10,4 @@ if _is_container_running $CONTAINER_NAME; then _die "Couldn't stop existing cont
|
|||||||
if _is_container_exists $CONTAINER_NAME; then _die "Couldn't remove existing container"; fi
|
if _is_container_exists $CONTAINER_NAME; then _die "Couldn't remove existing container"; fi
|
||||||
|
|
||||||
echo "Service ${CONTAINER_NAME} uninstalled."
|
echo "Service ${CONTAINER_NAME} uninstalled."
|
||||||
echo "Note: This does NOT remove the local data folder. Use nuke.sh for that."
|
echo "Note: This does NOT remove the local data folder. Use destroy for that."
|
||||||
|
@ -55,8 +55,8 @@ title "Checking template $TEMPLATE"
|
|||||||
|
|
||||||
SERVICE_NAME="test-$TEMPLATE"
|
SERVICE_NAME="test-$TEMPLATE"
|
||||||
|
|
||||||
title "Nuking old service"
|
title "Destroying old service"
|
||||||
ds nuke localhost $SERVICE_NAME || die "Failed to nuke old service"
|
ds destroy localhost $SERVICE_NAME || die "Failed to destroy old service"
|
||||||
|
|
||||||
title "Creating service"
|
title "Creating service"
|
||||||
ds create-service localhost $SERVICE_NAME $TEMPLATE || die "Failed to create service"
|
ds create-service localhost $SERVICE_NAME $TEMPLATE || die "Failed to create service"
|
||||||
@ -82,7 +82,7 @@ ds restore localhost $SERVICE_NAME latest || die "Failed to restore service"
|
|||||||
title "Checking status"
|
title "Checking status"
|
||||||
ds status localhost $SERVICE_NAME || die "Failed to check status"
|
ds status localhost $SERVICE_NAME || die "Failed to check status"
|
||||||
|
|
||||||
title "Nuking service"
|
title "Nuking service (alias for destroy)"
|
||||||
ds nuke localhost $SERVICE_NAME || die "Failed to nuke service"
|
ds nuke localhost $SERVICE_NAME || die "Failed to nuke service"
|
||||||
|
|
||||||
title "Listing services"
|
title "Listing services"
|
||||||
|
@ -9,5 +9,5 @@ _remove_container $CONTAINER_NAME || _die "Failed to remove container ${CONTAINE
|
|||||||
|
|
||||||
echo "Service ${CONTAINER_NAME} uninstalled."
|
echo "Service ${CONTAINER_NAME} uninstalled."
|
||||||
|
|
||||||
# Note: Watchtower doesn't typically have volumes to nuke.
|
# Note: Watchtower doesn't have volumes to destroy.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user