azure-deploy

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Azure Deploy

Azure 部署

AUTHORITATIVE GUIDANCE — MANDATORY COMPLIANCE
PREREQUISITE: The azure-validate skill MUST be invoked and completed with status
Validated
BEFORE executing this skill.
⛔ STOP — PREREQUISITE CHECK REQUIRED Before proceeding, verify BOTH prerequisites are met:
  1. azure-prepare was invoked and completed →
    .azure/deployment-plan.md
    exists
  2. azure-validate was invoked and passed → plan status =
    Validated
If EITHER is missing, STOP IMMEDIATELY:
  • No plan? → Invoke azure-prepare skill first
  • Status not
    Validated
    ? → Invoke azure-validate skill first
⛔ DO NOT MANUALLY UPDATE THE PLAN STATUS
You are FORBIDDEN from changing the plan status to
Validated
yourself. Only the azure-validate skill is authorized to set this status after running actual validation checks. If you update the status without running validation, deployments will fail.
DO NOT ASSUME the app is ready. DO NOT SKIP validation to save time. Skipping steps causes deployment failures. The complete workflow ensures success:
azure-prepare
azure-validate
azure-deploy
权威指南 — 必须遵守
前置条件:执行该技能前,必须先调用azure-validate技能且执行完成后状态为
Validated
⛔ 停止 — 必须检查前置条件 继续操作前,请确认两项前置条件均已满足:
  1. 已调用并完成azure-prepare → 存在
    .azure/deployment-plan.md
    文件
  2. 已调用并通过azure-validate校验 → 方案状态 =
    Validated
如有任意一项缺失,请立即停止
  • 没有部署方案?→ 先调用azure-prepare技能
  • 状态不是
    Validated
    ?→ 先调用azure-validate技能
⛔ 禁止手动修改方案状态
严禁自行将方案状态修改为
Validated
。仅azure-validate技能有权在完成实际校验检查后设置该状态。如果未运行校验就修改状态,会导致部署失败。
不要假设应用已准备就绪,不要为了节省时间跳过校验。跳过步骤会引发部署失败。完整工作流可保障部署成功:
azure-prepare
azure-validate
azure-deploy

Triggers

触发场景

Activate this skill when user wants to:
  • Execute deployment of an already-prepared application (azure.yaml and infra/ exist)
  • Push updates to an existing Azure deployment
  • Run
    azd up
    ,
    azd deploy
    , or
    az deployment
    on a prepared project
  • Ship already-built code to production
  • Deploy an application that already includes API Management (APIM) gateway infrastructure
Scope: This skill executes deployments. It does not create applications, generate infrastructure code, or scaffold projects. For those tasks, use azure-prepare.
APIM / AI Gateway: Use this skill to deploy applications whose APIM/AI gateway infrastructure was already created during azure-prepare. For creating or changing APIM resources, see APIM deployment guide. For AI governance policies, invoke azure-aigateway skill.
当用户需要执行以下操作时激活该技能:
  • 为已经准备好的应用执行部署(已存在azure.yaml和infra/目录)
  • 向已有的Azure部署推送更新
  • 在已准备好的项目上运行
    azd up
    azd deploy
    az deployment
    命令
  • 将已构建完成的代码发布到生产环境
  • 部署已包含API Management(APIM)网关基础设施的应用
适用范围:该技能仅用于执行部署。它不会创建应用、生成基础设施代码或搭建项目框架。这类任务请使用azure-prepare
APIM / AI 网关:如果应用的APIM/AI网关基础设施已在azure-prepare阶段创建完成,可使用该技能部署应用。如需创建或修改APIM资源,请参考APIM部署指南。如需配置AI治理策略,请调用azure-aigateway技能。

Rules

规则

  1. Run after azure-prepare and azure-validate
  2. .azure/deployment-plan.md
    must exist with status
    Validated
  3. Pre-deploy checklist requiredPre-Deploy Checklist
  4. Destructive actions require
    ask_user
    global-rules
  5. Scope: deployment execution only — This skill owns execution of
    azd up
    ,
    azd deploy
    ,
    terraform apply
    , and
    az deployment
    commands. These commands are run through this skill's error recovery and verification pipeline.

  1. 必须在azure-prepare和azure-validate之后运行
  2. 必须存在状态为
    Validated
    .azure/deployment-plan.md
    文件
  3. 必须完成部署前检查清单 —— 部署前检查清单
  4. 执行破坏性操作前需要
    ask_user
    确认
    —— 全局规则
  5. 适用范围:仅执行部署 —— 该技能负责执行
    azd up
    azd deploy
    terraform apply
    az deployment
    命令,这些命令会通过该技能内置的错误恢复和校验流水线运行。

Steps

执行步骤

#ActionReference
1Check Plan — Read
.azure/deployment-plan.md
, verify status =
Validated
AND Validation Proof section is populated
.azure/deployment-plan.md
2Pre-Deploy Checklist — MUST complete ALL stepsPre-Deploy Checklist
3Load Recipe — Based on
recipe.type
in
.azure/deployment-plan.md
recipes/README.md
4Execute Deploy — Follow recipe stepsRecipe README
5Post-Deploy — Configure SQL managed identity and apply EF migrations if applicablePost-Deployment
6Handle Errors — See recipe's
errors.md
7Verify Success — Confirm deployment completed and endpoints are accessibleVerification
8Live Role Verification — Query Azure to confirm provisioned RBAC roles are correct and sufficientlive-role-verification.md
9Report Results — Present deployed endpoint URLs to the user as fully-qualified
https://
links
Verification
⛔ URL FORMAT RULE
When presenting endpoint URLs to the user, you MUST always use fully-qualified URLs with the
https://
scheme (e.g.
https://myapp.azurewebsites.net
, not
myapp.azurewebsites.net
). Many Azure CLI commands return bare hostnames without a scheme — always prepend
https://
before presenting them.
⛔ VALIDATION PROOF CHECK
When checking the plan, verify the Validation Proof section (Section 7) contains actual validation results with commands run and timestamps. If this section is empty, validation was bypassed — invoke azure-validate skill first.
#操作参考文档
1检查部署方案 —— 读取
.azure/deployment-plan.md
,确认状态为
Validated
校验证明部分已填充内容
.azure/deployment-plan.md
2部署前检查清单 —— 必须完成所有步骤部署前检查清单
3加载部署方案 —— 基于
.azure/deployment-plan.md
中的
recipe.type
字段
recipes/README.md
4执行部署 —— 遵循部署方案步骤执行部署方案README
5部署后配置 —— 如适用,配置SQL托管身份并执行EF迁移部署后配置
6错误处理 —— 参考部署方案的
errors.md
7验证部署成功 —— 确认部署完成,端点可正常访问验证说明
8线上角色校验 —— 查询Azure确认已配置的RBAC角色正确且权限充足线上角色校验说明
9反馈结果 —— 将部署完成的端点URL以完整的
https://
链接形式提供给用户
验证说明
⛔ URL格式规则
向用户展示端点URL时,必须始终使用带
https://
协议的完整URL(例如
https://myapp.azurewebsites.net
,而非
myapp.azurewebsites.net
)。很多Azure CLI命令返回的裸主机名不带协议,展示前请务必在前面拼接
https://
⛔ 校验证明检查规则
检查部署方案时,请确认校验证明部分(第7节)包含实际的校验结果、执行的命令和时间戳。如果该部分为空,说明校验被跳过,请先调用azure-validate技能。

SDK Quick References

SDK快速参考

  • Azure Developer CLI: azd
  • Azure Identity: Python | .NET | TypeScript | Java
  • Azure Developer CLI: azd
  • Azure Identity: Python | .NET | TypeScript | Java

MCP Tools

MCP工具

ToolPurpose
mcp_azure_mcp_subscription_list
List available subscriptions
mcp_azure_mcp_group_list
List resource groups in subscription
mcp_azure_mcp_azd
Execute AZD commands
azure__role
List role assignments for live RBAC verification (step 8)
工具用途
mcp_azure_mcp_subscription_list
列出可用的订阅
mcp_azure_mcp_group_list
列出订阅下的资源组
mcp_azure_mcp_azd
执行AZD命令
azure__role
列出角色分配用于RBAC线上校验(步骤8)

References

参考文档

  • Troubleshooting - Common issues and solutions
  • Post-Deployment Steps - SQL + EF Core setup
  • 故障排查 - 常见问题和解决方案
  • 部署后步骤 - SQL + EF Core配置