Lab 1 — Azure resources + APIs
Examples and curl commands on this page substitute <SUFFIX>
with your value.
Concepts
- Azure Web Apps (Linux) with Zip Deploy; no Docker
- SQLite persistence in /home/site/data
- Web UIs served from each API’s
web/
folder
Steps 1) Create RG/ASP/Web Apps (or let scripts create apps on first deploy) 2) Deploy Leave API via scripts/deploy_leave_api_zip.sh
3) Deploy Timesheet API via scripts/deploy_timesheet_api_zip.sh
4) Validate /health
and open the root web UIs
Quick-start (optional)
# Login
az login
# Unique suffix and core names
export SUFFIX=$(printf "%04d" $((RANDOM % 10000)))
export RG="mcp-python-demo-rg-$SUFFIX"
export REGION="eastus2"
export ASP_NAME="mcp-demo-asp-$SUFFIX"
export LEAVE_API_APP="mcp-leave-api-$SUFFIX"
export TIMESHEET_API_APP="mcp-timesheet-api-$SUFFIX"
export LEAVE_MCP_APP="mcp-leave-mcp-$SUFFIX"
export TIMESHEET_MCP_APP="mcp-timesheet-mcp-$SUFFIX"
export CHAT_CLIENT_APP="mcp-chat-client-$SUFFIX"
# Core resources
az group create --name "$RG" --location "$REGION"
az appservice plan create -g "$RG" -n "$ASP_NAME" --sku B1 --is-linux
# Create Web Apps (runtime placeholder)
az webapp create -g "$RG" -p "$ASP_NAME" -n "$LEAVE_API_APP" --runtime "PYTHON|3.10"
az webapp create -g "$RG" -p "$ASP_NAME" -n "$TIMESHEET_API_APP" --runtime "PYTHON|3.10"
az webapp create -g "$RG" -p "$ASP_NAME" -n "$LEAVE_MCP_APP" --runtime "PYTHON|3.10"
az webapp create -g "$RG" -p "$ASP_NAME" -n "$TIMESHEET_MCP_APP" --runtime "PYTHON|3.10"
az webapp create -g "$RG" -p "$ASP_NAME" -n "$CHAT_CLIENT_APP" --runtime "PYTHON|3.10"
Commands
Validate
- Leave API:
- Timesheet API:
- Web UIs at respective roots
Troubleshooting
- If health endpoints fail initially, wait 20–60s and retry
- Check App Service Logs > Log stream for errors
- Ensure SCM/Oryx build flags are disabled (scripts set these)