This commit is contained in:
Zeeshaun
2026-03-25 14:50:13 -05:00
parent 883009770f
commit b690921fd7
592 changed files with 46618 additions and 0 deletions
@@ -0,0 +1,29 @@
APP_NAME="document-ingestor"
APP_VERSION="1.0"
echo "Setting up cluster..."
mkdir -p logs
LOG_FILE="logs/k8s_setup.log"
kind create cluster --config ../kind.cluster.config --wait 300s --name $APP_NAME 2>&1 | tee -a $LOG_FILE
kubectl create namespace landmarkcu --dry-run=client -o yaml | kubectl apply -f - 2>&1 >> $LOG_FILE
echo "deploying ingress-nginx..." 2>&1 | tee -a $LOG_FILE
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx 2>&1 >> $LOG_FILE
helm repo update 2>&1 >> $LOG_FILE
helm upgrade --install my-release ingress-nginx/ingress-nginx \
--set controller.service.type=LoadBalancer \
--set controller.service.nodePorts.http=30000 \
--set controller.service.nodePorts.https=30001 2>&1 >> $LOG_FILE
echo "...ingress-nginx deployed!" 2>&1 >> $LOG_FILE
echo "performing docker build..." 2>&1 >> $LOG_FILE
LOG_FILE="logs/docker_build.log"
docker build -t local/$APP_NAME:$APP_VERSION ../.. 2>&1 >> $LOG_FILE
echo "docker build complete!"
kind load docker-image local/$APP_NAME:$APP_VERSION --name $APP_NAME 2>&1 >> $LOG_FILE
echo "applying $app_name to kubernetes cluster" 2>&1 | tee -a $LOG_FILE
LOG_FILE="logs/kubectl_apply.log"
kubectl apply -k ../../_deploy/overlays/local 2>&1 >> $LOG_FILE
@@ -0,0 +1,5 @@
APP_NAME="document-ingestor"
mkdir -p logs
LOG_FILE="logs/cluster_teardown.log"
kind delete cluster --name $APP_NAME 2>&1 | tee -a $LOG_FILE
echo "Deletion complete!" 2>&1 | tee -a $LOG_FILE
@@ -0,0 +1,2 @@
kubectl delete -k ../../_deploy/overlays/local
kubectl apply -k ../../_deploy/overlays/local