prole/etc/deploy_pipeline.sh
chrisfu edbc6c5385 Checkpoint: Refactor installer UI and update Supabase deployment strategy
- Refactored install.py and installer package for improved UI and navigation.

- Replaced Supabase k8s manifests with a dedicated deployment script and port-wiring logic.

- Added new deployment pipeline and finalization scripts in etc/.

- Updated initialization scripts for Kerberos, authority, and port forwards.

- Updated port mappings and tests.
2026-02-03 14:55:05 -08:00

63 lines
1.5 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# etc/deploy_pipeline.sh
# Collects artifacts and prepares terraform directory for GCP deployment
usage() {
echo "Usage: $0 --mode <gcp>"
echo "Options:"
echo " --mode gcp Prepare and publish the terraform pipeline to GCP"
exit 1
}
if [[ $# -eq 0 ]]; then
usage
fi
MODE=""
while [[ $# -gt 0 ]]; do
case "$1" in
--mode)
MODE="$2"
shift 2
;;
*)
usage
;;
esac
done
if [[ "$MODE" != "gcp" ]]; then
echo "Error: Only 'gcp' mode is supported currently."
usage
fi
# Mode GCP Implementation
echo "Preparing GCP deployment pipeline..."
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
STAGING_DIR="${STAGING_DIR:-$PROJECT_ROOT/data/staging}"
TF_DIR="$PROJECT_ROOT/deploy/gcp/terraform"
if [[ ! -d "$STAGING_DIR" ]]; then
echo "Staging directory not found: $STAGING_DIR"
echo "Please ensure artifacts are staged before running this script."
exit 1
fi
echo "Collecting artifacts from $STAGING_DIR..."
# Logic to lift and shift kubernetes deployment into terraform directory
# For now, we'll just simulate this by copying relevant files or updating tfvars
# Example: copy staged manifests to a specific location in TF directory if needed
# mkdir -p "$TF_DIR/manifests"
# cp "$STAGING_DIR"/*.yaml "$TF_DIR/manifests/"
echo "Preparing terraform directory at $TF_DIR..."
# cd "$TF_DIR"
# terraform init
echo "GCP deployment pipeline prepared successfully."
echo "You can now run terraform apply in $TF_DIR"