feat(scripts): start-app.sh — apply all manifests, open browser
This commit is contained in:
parent
24d9502705
commit
8f6178e057
37
start-app.sh
Normal file
37
start-app.sh
Normal file
@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "[start-app] Starting Task Manager on Kubernetes..."
|
||||
|
||||
# Note: this script assumes ./prepare-app.sh has already been run successfully
|
||||
# (images built into minikube, hostPath dir created, PV applied). Re-applying
|
||||
# the prepare-stage manifests below is idempotent and safe, but does NOT build
|
||||
# images or create the hostPath dir. Without prepare-app.sh, pods will fail with
|
||||
# ImagePullBackOff.
|
||||
|
||||
echo "[start-app] Applying namespace.yaml..."
|
||||
kubectl apply -f namespace.yaml
|
||||
|
||||
echo "[start-app] Applying statefulset.yaml..."
|
||||
kubectl apply -f statefulset.yaml
|
||||
|
||||
echo "[start-app] Applying service.yaml..."
|
||||
kubectl apply -f service.yaml
|
||||
|
||||
echo "[start-app] Applying deployment.yaml..."
|
||||
kubectl apply -f deployment.yaml
|
||||
|
||||
# Wait for everything to become ready
|
||||
echo "[start-app] Waiting for db StatefulSet..."
|
||||
kubectl -n taskapp rollout status statefulset/db --timeout=180s
|
||||
|
||||
echo "[start-app] Waiting for api Deployment..."
|
||||
kubectl -n taskapp rollout status deployment/api --timeout=180s
|
||||
|
||||
echo "[start-app] Waiting for web Deployment..."
|
||||
kubectl -n taskapp rollout status deployment/web --timeout=180s
|
||||
|
||||
echo ""
|
||||
echo "[start-app] App is running!"
|
||||
echo "[start-app] Opening browser at the web service URL..."
|
||||
minikube service web -n taskapp
|
||||
Loading…
Reference in New Issue
Block a user