Spaces:
Paused
Paused
File size: 1,416 Bytes
f870b34 ae122c6 f870b34 ae122c6 f870b34 ae122c6 f870b34 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
#!/bin/bash
set -e
# Yuga Planner Kubernetes Deployment Script
# This script loads credentials from environment variables or creds.py and deploys to Kubernetes
echo "π Deploying Yuga Planner to Kubernetes..."
# Check if we're in the correct directory (project root)
if [ ! -f "deploy/kubernetes.yaml" ]; then
echo "β Error: kubernetes.yaml not found. Please run this script from the project root."
exit 1
fi
# Get the script directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Source the credential loading script
source "${SCRIPT_DIR}/load-credentials.sh"
# Check and load credentials
if ! check_credentials; then
exit 1
fi
# Check if envsubst is available
if ! command -v envsubst &> /dev/null; then
echo "β Error: envsubst is required but not installed. Please install gettext-base package."
exit 1
fi
# Check if kubectl is available
if ! command -v kubectl &> /dev/null; then
echo "β Error: kubectl is required but not installed."
exit 1
fi
# Substitute environment variables and apply to Kubernetes
echo "π§ Substituting environment variables and deploying..."
envsubst < deploy/kubernetes.yaml | kubectl apply -f -
echo "β
Deployment complete!"
echo "π Access the application at: http://<node-ip>:30860"
echo "π Check deployment status: kubectl get pods -l app=yuga-planner"
echo "π View logs: kubectl logs -l app=yuga-planner -f"
|