feat: initial commit for starlane-router (FastAPI + Gradient)

This commit is contained in:
greg
2025-08-25 20:08:09 -07:00
commit a991008666
13 changed files with 404 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
#!/usr/bin/env bash
set -euo pipefail
# Requirements:
# - doctl installed and authenticated: `doctl auth init`
# - kubectl installed
# - DigitalOcean account with permissions
# Usage:
# ./scripts/doctl_create_cluster.sh my-a2a-cluster nyc1 s-1vcpu-2gb 1.29.1-do.0
# Defaults if not provided.
CLUSTER_NAME=${1:-a2a-cluster}
REGION=${2:-nyc1}
NODE_SIZE=${3:-s-1vcpu-2gb}
VERSION=${4:-1.29.1-do.0}
NODE_COUNT=${5:-1}
echo "Creating cluster: $CLUSTER_NAME in $REGION size=$NODE_SIZE nodes=$NODE_COUNT version=$VERSION"
doctl kubernetes cluster create "$CLUSTER_NAME" \
--region "$REGION" \
--version "$VERSION" \
--size "$NODE_SIZE" \
--count "$NODE_COUNT" \
--auto-upgrade=false \
--wait
# Fetch kubeconfig
mkdir -p "$HOME/.kube"
doctl kubernetes cluster kubeconfig save "$CLUSTER_NAME"
echo "Cluster created and kubeconfig saved. Current context:"
KUBECONTEXT=$(kubectl config current-context)
echo "$KUBECONTEXT"
echo "Optional: install nginx ingress controller"
cat <<EOF
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.10.1/deploy/static/provider/cloud/deploy.yaml
EOF