One-command azd Bootstrap¶
Motivation¶
Direct Container App operations can fail in a fresh subscription with Subscription ... is not registered for the Microsoft.App resource provider before the normal azd up preprovision hook has a chance to run. The initial deployment guide also required a manual App Registration step and a copied API_CLIENT_ID, which made a fresh clone feel harder than necessary.
User-facing change¶
After Azure sign-in and azd environment selection, azd up can create or reuse the App Registration automatically, register required Azure resource providers, and deploy the full six-sidecar Container App without a manual API_CLIENT_ID copy step. Fresh clones can also run ./deploy.sh to perform the login check, default azd environment setup, azd up, and browser launch in one command.
API / IaC diff summary¶
- Added
scripts/dev/register-providers.shwith the deployment provider list:Microsoft.App,Microsoft.Authorization,Microsoft.ContainerRegistry,Microsoft.Insights,Microsoft.KeyVault,Microsoft.ManagedIdentity,Microsoft.Network,Microsoft.OperationalInsights,Microsoft.Resources, andMicrosoft.Storage. - The same helper now starts first-run workflow provider registration for
Microsoft.Compute,Microsoft.ContainerService, andMicrosoft.Quota, covering VM family quota checks and dashboard-driven AKS provisioning before those flows are used. - Updated
azure.yamlto call the helper instead of carrying an inline provider loop. - Updated
deploy.sh,azure.yaml, andscripts/dev/preflight-check.shto pass the target subscription explicitly when registering providers. - Hardened
scripts/dev/preflight-check.shtool version collection soset -euo pipefailcannot stop the check before provider registration. - Changed
infra/main.parameters.jsonsoAPI_CLIENT_IDdefaults to an empty bootstrap value instead of blockingazd upbefore postprovision. - Updated
scripts/dev/postprovision.shto runscripts/dev/setup-app-registration.shwhenAPI_CLIENT_IDis missing, then use the persisted value for frontend build args and Container App env vars. - Updated
scripts/dev/setup-app-registration.shto preserve existing SPA redirect URIs and add the deployed Container App URL throughADDITIONAL_REDIRECT_URIS. - Added root
deploy.sh, which checks Azure CLI login, ensuresazdis signed in as the same user, creates/selectsAZD_ENV_NAME=elb-dashboard, sets the default location/subscription/tenant, runsazd up, and opens the deployed Container App URL. - Updated preflight and direct deployment scripts to call the provider helper so non-
azd uppaths do not skip provider registration. - Updated
README.mdanddocs/get-started.mdto presentazd upas the deployment command after sign-in.
Validation evidence¶
bash -n scripts/dev/register-providers.sh scripts/dev/preflight-check.sh scripts/dev/quick-deploy.sh scripts/dev/postprovision.sh scripts/dev/setup-app-registration.sh-> passed.PROVIDER_REGISTRATION_TIMEOUT_SECONDS=60 bash scripts/dev/register-providers.sh --subscription 577d6332-de48-4a30-be66-dded26a712ea-> deployment providers reportedok,Microsoft.ComputeandMicrosoft.Quotareportedok, andMicrosoft.ContainerServiceregistration was started with stateRegistering.bash -n deploy.sh scripts/dev/register-providers.sh scripts/dev/preflight-check.sh scripts/dev/postprovision.sh scripts/dev/quick-deploy.sh && uv run mkdocs build --strict-> passed; MkDocs still reports the pre-existing informational missing-anchor message for#phase-2-sign-in-and-create-the-app-registration.AZURE_LOCATION=eastus PROVIDER_REGISTRATION_TIMEOUT_SECONDS=60 ./deploy.sh --prepare-only-> selectedME-MngEnvMCAP982529-jungha-1, configured theelb-dashboardazd environment, and ran provider registration before exiting prepare-only mode.bash -n scripts/dev/preflight-check.sh && scripts/dev/preflight-check.sh-> passed; provider registration ran from preflight andMicrosoft.ContainerServicereachedRegistered.- Final provider state check in
577d6332-de48-4a30-be66-dded26a712ea-> all deployment providers plusMicrosoft.Compute,Microsoft.ContainerService, andMicrosoft.QuotareportedRegistered. azd env get-values --environment elb-demo-> confirmed the affected deployment environment is present.- Provider state check in the demo subscription -> all required namespaces reported
Registered. - Redirect URI merge expression used by
scripts/dev/setup-app-registration.sh-> returned the expected unique URI list in a localjqprobe. AZURE_LOCATION=eastus ./deploy.shin theaz-junghaAzure CLI context -> provisionedrg-elb-dashboard, reused App Registrationelastic-blast-control-plane, built and pushedelb-api,elb-frontend, andelb-terminal, swapped the six-sidecar Container App layout, and completed with/api/healthreturning 200.curl -fsS --max-time 30 https://ca-elb-control.jollymushroom-0452ee01.eastus.azurecontainerapps.io/api/health-> returned{"status":"ok","version":"0.0.1","revision":"ca-elb-control--0000001"}.curl -fsS --max-time 30 https://ca-elb-control.jollymushroom-0452ee01.eastus.azurecontainerapps.io/runtime-config.js-> returned runtime config with tenant184be312-98bf-4c54-903a-e77288f0f984and a non-emptyVITE_AZURE_CLIENT_ID.- Integrated browser opened
https://ca-elb-control.jollymushroom-0452ee01.eastus.azurecontainerapps.io/and rendered theElasticBLAST on Azuresign-in screen.