exp(deploy): [preflight] microsoft foundry baseline azure subscription fit#92
Draft
ferantivero wants to merge 2 commits intoAzure-Samples:mainfrom
Draft
Conversation
Python scoring engine that ranks Azure regions by deployment viability using a 0 (eliminated) / 1 (degraded) / 2 (perfect) scoring model. Phase 1 scoring (global, offline data): - VM SKU availability with same-family gen fallback - Storage SKU availability with tier fallback chains - App Service Plan availability with SKU alternatives and zone redundancy - Availability zones (≥3 AZ preferred) - Hard filters for AI Search and AI Foundry region coverage Phase 2 scoring (per-region API calls): - Model quota with tier/version alternatives - vCPU quota with joint VM+vCPU resolution — walks alt-gen VMs when primary family has no quota, verifying both SKU availability and vCPU - VM SKU subscription restrictions with zone-aware fallback - App Service Plan instance quota CLI subcommands: candidates, filter, delta, report. Exits non-zero when no viable region is found. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Shell script that collects Azure data in parallel and drives the scoring engine through a best-first branch-and-bound region search. Phase 1 — parallel global API calls: - VM SKUs via Azure retail pricing API (curl + jq) - Storage, App Service, zones, AI Search, CogSvc availability - Resource name availability (storage, Key Vault, Cosmos DB, AI Search) Phase 2 — per-region probes (best-first with early termination): - Model quota gate (skip region immediately if no quota) - vCPU headroom, SKU restrictions, App Service quota (parallel) - Stops when a region meets MAX_DELTA threshold Required env vars: VM_SKU, STORAGE, MODEL, APP_SKU, BASE_NAME, STA_NAME, STW_NAME, KV_NAME, CDB_NAME, AIS_NAME. Optional: MODEL_EXCLUDE, MAX_DELTA (default 0), APP_CAPACITY (default 3). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WHY
Deploying this reference implementation requires multiple Azure resources to coexist in a single region. Each has its own availability, quota limits, and subscription restrictions that vary per subscription. Discovering region incompatibilities mid-deployment wastes time and leaves partial resources that require manual cleanup.
WHAT
Two-phase best-first branch-and-bound region search that scores every constraint as 0 (eliminated), 1 (degraded), or 2 (exact match). Degraded scores map to Bicep parameter changes needed (the "delta").
Highlights:
TEST
Typical run: ~80s evaluating 29 candidate regions, with early termination after first viable match. Each additional region probe adds ~15-20s.


P1
P2