feat(radio-chicken): add Kubernetes manifests and migration scripts for Radio Chicken
Sync HTPC Manifests to GitOps / Sync Manifests to GitOps Repo (push) Successful in 4s
Sync HTPC Manifests to GitOps / Sync Manifests to GitOps Repo (push) Successful in 4s
This commit is contained in:
Executable
+42
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env bash
|
||||
# ==============================================================================
|
||||
# Radio Chicken Host Cleanup Script
|
||||
# ==============================================================================
|
||||
set -euo pipefail
|
||||
|
||||
CLUSTER_HOST="10.2.0.4"
|
||||
SSH_USER="bart"
|
||||
|
||||
COLOR_GREEN="\033[0;32m"
|
||||
COLOR_YELLOW="\033[1;33m"
|
||||
COLOR_RED="\033[0;31m"
|
||||
COLOR_RESET="\033[0m"
|
||||
|
||||
log_info() { echo -e "${COLOR_GREEN}[INFO]${COLOR_RESET} $1"; }
|
||||
log_warn() { echo -e "${COLOR_YELLOW}[WARN]${COLOR_RESET} $1"; }
|
||||
log_err() { echo -e "${COLOR_RED}[ERROR]${COLOR_RESET} $1"; }
|
||||
|
||||
echo "========================================================================"
|
||||
echo " OPRUIMEN OUDE RADIO CHICKEN DOCKER CONTAINERS OP HOST (${CLUSTER_HOST})"
|
||||
echo "========================================================================"
|
||||
echo "Let op: Voer dit script pas uit nadat de Kubernetes pod stabiel draait."
|
||||
echo "Dit script verwijdert de gestopte Docker containers (barttradio, icecast,"
|
||||
echo "radio_chicken_autoplacer, radio_chicken_mv_downloader)."
|
||||
echo "De code en configuratie in /home/bart/jellyfinradio blijven onaangeraakt."
|
||||
echo "========================================================================"
|
||||
echo ""
|
||||
|
||||
read -p "Weet je zeker dat je de oude Docker containers wilt verwijderen? (j/N): " -r CONFIRM
|
||||
if [[ ! "$CONFIRM" =~ ^[jJyY]$ ]]; then
|
||||
log_info "Opruimen geannuleerd."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
log_info "Verwijderen van oude host Docker containers..."
|
||||
ssh "${SSH_USER}@${CLUSTER_HOST}" "
|
||||
echo '--> Verwijderen van containers...'
|
||||
docker rm -f barttradio radio_chicken_autoplacer radio_chicken_mv_downloader icecast 2>/dev/null || true
|
||||
echo 'Containers opgeruimd.'
|
||||
"
|
||||
|
||||
log_info "Opruimactie succesvol afgerond."
|
||||
Reference in New Issue
Block a user