🛠️ Infrastructure Scripts
Scripts for updating a CONDOR GPU VM after pulling the latest code. Run as root on the target machine.
Quick Start
Run the full update (interactive — prompts for all configuration once):
sudo bash azure/infrastructure/scripts/update.sh
Scripts
| Script | Purpose |
|---|---|
update.sh | Orchestrator — prompts for configuration, validates, then runs all four steps below in order. |
update-db.sh | Applies db/init/001_schema.sql against the running PostgreSQL container. |
update-srtm.sh | Downloads SRTM1 terrain tiles for California coverage. Cached tiles are skipped. |
update-compose.sh | Tears down the Docker Compose stack, rebuilds all images, restarts services, and waits for health checks. |
update-containerapp.sh | Logs in to ACR, builds and pushes the server image, and updates the Azure Container App. |
acr-bootstrap-build.sh | One-time ACR bootstrap — clones the repo into a temp directory and builds the server image in ACR. |
Running Individual Scripts
Each script (except acr-bootstrap-build.sh) can be run standalone. It will prompt for only the configuration it needs:
# Just rebuild Docker Compose
sudo bash azure/infrastructure/scripts/update-compose.sh
# Just apply DB migrations
sudo bash azure/infrastructure/scripts/update-db.sh
# Just download SRTM tiles
sudo bash azure/infrastructure/scripts/update-srtm.sh
# Just redeploy the Container App
sudo bash azure/infrastructure/scripts/update-containerapp.sh
info
When run via update.sh, guard variables prevent re-prompting and re-validation across scripts.
ACR Bootstrap Build
The acr-bootstrap-build.sh script requires the following environment variables:
| Variable | Description |
|---|---|
ACR_NAME | Azure Container Registry name |
RESOURCE_GROUP_NAME | Resource group containing the ACR |
REPO_URL | Azure DevOps repository URL |
REPO_BRANCH | Branch to clone |
REPO_PAT | Personal Access Token for repo access |
IMAGE_TAG | Tag for the built Docker image |