Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计通过

apiops-deploymentAPI 操作部署

Agent Skill

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

总安装

238

周安装

10

GitHub Stars

162

下载量

83
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:apiops-deployment(API 操作部署)
来源仓库:https://github.com/thomast1906/github-copilot-agent-skills
仓库路径:skills/apiops-deployment
安装命令:
npx skills add https://github.com/thomast1906/github-copilot-agent-skills --skill apiops-deployment
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/thomast1906/github-copilot-agent-skills --skill apiops-deployment

简介

提供基于 Bicep/Terraform 的云基础设施模板和 CI/CD 流水线设计模式,遵循 APIOps 实践。

  • 适合 Azure API Management 的跨环境部署,支持 dev→test→prod 分阶段发布流程。
  • 包含配置管理、参数化环境和资源依赖处理,帮助实现基础设施即代码的标准化运维。
  • 部署前必须明确目标订阅、区域和资源组,避免误操作影响生产服务可用性。
  • apiops-deployment 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

APIOps Deployment Skill

Provides Infrastructure as Code (Bicep/Terraform) templates and CI/CD pipeline patterns for deploying Azure API Management following APIOps principles and phased deployment strategies.

When to Use This Skill

Activate this skill when users need:

  • Infrastructure deployment: Generate Bicep/Terraform for APIM, Front Door, VNet, supporting services
  • CI/CD pipelines: Create GitHub Actions or Azure DevOps workflows for APIOps
  • Environment promotion: Implement dev → test → prod deployment workflows
  • Configuration management: Environment-specific parameters (dev/test/prod)
  • Disaster recovery: Backup/restore procedures, blue-green deployments
  • Phased rollout: Follow deployment planning guide with 7 phases over 17 weeks

Phased Deployment Strategy

See DEPLOYMENT_PLANNING_GUIDE.md for complete 17-week, 7-phase plan

Phase Summary

PhaseDurationFocusKey Deliverables
1Week 1-2Core InfrastructureVNet, APIM(dev), Front Door, Key Vault, monitoring
2Week 3-4Authentication & IAMEntra ID, Entra External ID, OAuth policies
3Week 5-8API Onboarding (Dev)5 pilot APIs, policies, developer portal
4Week 9-10Production InfrastructureAPIM(prod) Premium 3u, zone-redundant
5Week 11-12Production APIsMigrate 5 pilot APIs, performance testing
6Week 13-15Governance & ScalingAPI Center, additional APIs, APIOps automation
7Week 16-17Operations HandoffRunbooks, training, monitoring dashboards

Important: MCP Tools (ALWAYS Use Before Code Generation)

1. Get Azure Verified Modules (AVM)

BEFORE writing any Bicep, check for Azure Verified Modules:

Tool: azure_bicep-get_azure_verified_module
ResourceType: "Microsoft.ApiManagement/service"

Why: AVM modules follow Microsoft best practices, reduce code duplication, tested at scale

2. Call Deployment Best Practices FIRST

Tool: mcp_azure_mcp_get_azure_bestpractices
Intent: "Azure API Management deployment best practices Bicep"

3. Search Deployment Documentation

Tool: mcp_azure_mcp_documentation search
Query: "APIM VNet Internal Bicep deployment"

Infrastructure as Code Templates

See references/IaC_TEMPLATES.md for complete Bicep/Terraform templates

Quick Bicep Example: Production APIM

param location string = 'uksouth'
param apimName string = 'apim-api-marketplace-prod-uks'
param publisherEmail string = 'admin@example.com'
param publisherName string = 'API Marketplace Team'
param vnetName string = 'vnet-apim-prod-uks'
param subnetName string = 'snet-apim'

resource vnet 'Microsoft.Network/virtualNetworks@2023-04-01' existing = {
  name: vnetName
}

resource apim 'Microsoft.ApiManagement/service@2023-05-01-preview' = {
  name: apimName
  location: location
  sku: {
    name: 'Premium'
    capacity: 3 // Zone-redundant: 3 units across 3 availability zones
  }
  properties: {
    publisherEmail: publisherEmail
    publisherName: publisherName
    virtualNetworkType: 'Internal' // VNet Internal mode
    virtualNetworkConfiguration: {
      subnetResourceId: '${vnet.id}/subnets/${subnetName}'
    }
    customProperties: {
      'Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10': 'False'
      'Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11': 'False'
      'Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30': 'False'
      'Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10': 'False'
      'Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11': 'False'
      'Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30': 'False'
      'Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168': 'False'
    }
    disableGateway: false
  }
  identity: {
    type: 'SystemAssigned' // Managed Identity for Key Vault access
  }
  zones: [
    '1'
    '2'
    '3'
  ] // Zone redundancy for 99.99% SLA
}

output apimId string = apim.id
output managedIdentityPrincipalId string = apim.identity.principalId

Key Configuration:

  • VNet Internal mode (virtualNetworkType: 'Internal')
  • Premium SKU with 3 units (zone-redundant)
  • TLS 1.2+ only (disable weak protocols)
  • Managed Identity (no service accounts)
  • Zones [1, 2, 3] for 99.99% SLA

APIOps CI/CD Pipeline Pattern

GitHub Actions Workflow (Recommended)

name: APIOps - Deploy APIM Infrastructure

on:
  workflow_dispatch:
  push:
    branches: [main]
    paths:
      - 'infra/**'
      - '.github/workflows/deploy-infra.yml'

env:
  AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
  AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}

jobs:
  # ===== Dev Environment =====
  deploy-dev:
    runs-on: ubuntu-latest
    environment: development
    steps:
      - uses: actions/checkout@v4

      - name: Azure Login
        uses: azure/login@v2
        with:
          client-id: ${{ secrets.AZURE_CLIENT_ID }}
          tenant-id: ${{ env.AZURE_TENANT_ID }}
          subscription-id: ${{ env.AZURE_SUBSCRIPTION_ID }}

      - name: Deploy Bicep
        uses: azure/arm-deploy@v2
        with:
          scope: resourcegroup
          resourceGroupName: rg-apim-dev-uks
          template: ./infra/main.bicep
          parameters: ./infra/params/dev.bicepparam
          failOnStdErr: false

      - name: Smoke Test
        run: |
          # Verify APIM health endpoint
          curl -f https://management.azure.com/subscriptions/${{ env.AZURE_SUBSCRIPTION_ID }}/resourceGroups/rg-apim-dev-uks/providers/Microsoft.ApiManagement/service/apim-api-marketplace-dev-uks?api-version=2023-05-01-preview \
            -H "Authorization: Bearer $(az account get-access-token --query accessToken -o tsv)"

  # ===== Test Environment (After Dev) =====
  deploy-test:
    needs: deploy-dev
    runs-on: ubuntu-latest
    environment: test
    steps:
      # Same steps as dev, use test.bicepparam
      - uses: actions/checkout@v4
      - uses: azure/login@v2
        with:
          client-id: ${{ secrets.AZURE_CLIENT_ID }}
          tenant-id: ${{ env.AZURE_TENANT_ID }}
          subscription-id: ${{ env.AZURE_SUBSCRIPTION_ID }}
      - uses: azure/arm-deploy@v2
        with:
          scope: resourcegroup
          resourceGroupName: rg-apim-test-uks
          template: ./infra/main.bicep
          parameters: ./infra/params/test.bicepparam
          failOnStdErr: false

  # ===== Production (Manual Approval Required) =====
  deploy-prod:
    needs: deploy-test
    runs-on: ubuntu-latest
    environment:
      name: production
      # GitHub environment protection rule: Require manual approval
    steps:
      - uses: actions/checkout@v4
      - uses: azure/login@v2
        with:
          client-id: ${{ secrets.AZURE_CLIENT_ID }}
          tenant-id: ${{ env.AZURE_TENANT_ID }}
          subscription-id: ${{ env.AZURE_SUBSCRIPTION_ID }}

      - name: Deploy Production APIM
        uses: azure/arm-deploy@v2
        with:
          scope: resourcegroup
          resourceGroupName: rg-apim-prod-uks
          template: ./infra/main.bicep
          parameters: ./infra/params/prod.bicepparam
          failOnStdErr: false

      - name: Production Smoke Test
        run: |
          # Verify Front Door → APIM connectivity
          curl -f https://api.yourdomain.com/health

      - name: Tag Release
        run: |
          git tag -a "apim-prod-$(date +%Y%m%d-%H%M%S)" -m "Production deployment"
          git push origin --tags

Key Features:

  • Dev → Test → Prod progression (serial jobs with needs)
  • Manual approval for production (environment: production with protection rules)
  • Smoke tests after each deployment
  • Git tags for production releases (audit trail)
  • Federated credential authentication (no secrets in code)

Environment-Specific Parameters

dev.bicepparam

using './main.bicep'

param location = 'uksouth'
param environment = 'dev'
param apimSku = 'Developer' // £45/month
param apimCapacity = 1
param virtualNetworkType = 'Internal'
param enableFrontDoor = false // Dev: Direct APIM access
param tags = {
  Environment: 'Development'
  ManagedBy: 'IaC'
  CostCenter: 'Engineering'
}

prod.bicepparam

using './main.bicep'

param location = 'uksouth'
param environment = 'prod'
param apimSku = 'Premium' // £1,944/month (3 units)
param apimCapacity = 3 // Zone-redundant
param virtualNetworkType = 'Internal'
param enableFrontDoor = true // Prod: Front Door + Private Link
param enableApiCenter = true // £135/month
param tags = {
  Environment: 'Production'
  ManagedBy: 'IaC'
  CostCenter: 'Operations'
  Criticality: 'High'
}

Pattern: Single main.bicep template, environment-specific .bicepparam files for configuration


Backup & Restore Procedures

APIM Backup (Automated)

#!/bin/bash
# backup-apim.sh - Schedule daily via Azure Automation or GitHub Actions

APIM_NAME="apim-api-marketplace-prod-uks"
RESOURCE_GROUP="rg-apim-prod-uks"
STORAGE_ACCOUNT="stapimproduksbkp"
CONTAINER="apim-backups"
BACKUP_NAME="apim-backup-$(date +%Y%m%d-%H%M%S)"

# Trigger APIM backup to Storage Account
az apim backup create \
  --name "$APIM_NAME" \
  --resource-group "$RESOURCE_GROUP" \
  --storage-account-name "$STORAGE_ACCOUNT" \
  --storage-account-container "$CONTAINER" \
  --backup-name "$BACKUP_NAME"

echo "Backup created: $BACKUP_NAME"

APIM Restore (Disaster Recovery)

#!/bin/bash
# restore-apim.sh - Run during DR scenario

APIM_NAME="apim-api-marketplace-prod-uks"
RESOURCE_GROUP="rg-apim-prod-uks"
STORAGE_ACCOUNT="stapimproduksbkp"
CONTAINER="apim-backups"
BACKUP_NAME="apim-backup-20260128-120000" # Latest successful backup

# Restore APIM from backup
az apim backup restore \
  --name "$APIM_NAME" \
  --resource-group "$RESOURCE_GROUP" \
  --storage-account-name "$STORAGE_ACCOUNT" \
  --storage-account-container "$CONTAINER" \
  --backup-name "$BACKUP_NAME"

echo "APIM restored from backup: $BACKUP_NAME"

Backup Retention:

  • Daily backups for 30 days (Azure Storage lifecycle policy)
  • Weekly backups for 12 weeks
  • Monthly backups for 12 months
  • Geo-redundant storage (GRS) to UK West

Deployment Validation Checklist

Before production deployment, verify:

  • Infrastructure Code: Bicep/Terraform linted and validated (az bicep build, terraform validate)
  • Network Configuration: VNet Internal mode, Private Link configured
  • Security: TLS 1.2+, weak protocols disabled, Key Vault integration
  • Authentication: OAuth policies deployed, Entra ID/External ID configured
  • Rate Limiting: All APIs have rate-limit-by-key policies
  • Monitoring: Application Insights, diagnostic logs, alerts configured
  • Backups: Automated daily backups to GRS storage
  • Smoke Tests: Health endpoints responding, Front Door → APIM connectivity verified
  • Manual Approval: Production deployment requires human approval (GitHub environment protection)
  • Rollback Plan: Previous Bicep/Terraform state in Git, APIM backup available

Common Deployment Issues & Solutions

Issue: APIM VNet Integration Fails

Error: The subnet is not valid for API Management instance

Solution:

  1. Ensure subnet size ≥ /27 (32 IPs minimum)
  2. Subnet must not have any other resources
  3. Delegate subnet to Microsoft.ApiManagement/service: delegations: [{name: 'delegation' properties: {serviceName: 'Microsoft.ApiManagement/service'}}]

Issue: Private Link Connection Pending

Error: Front Door → APIM Private Link status Pending Approval

Solution:

  1. Approve Private Endpoint connection in APIM: az network private-endpoint-connection approve \ --resource-name apim-api-marketplace-prod-uks \ --resource-group rg-apim-prod-uks \ --name <connection-name> \ --type Microsoft.ApiManagement/service
  2. Verify status: az network private-endpoint-connection list \ --name apim-api-marketplace-prod-uks \ --resource-group rg-apim-prod-uks \ --type Microsoft.ApiManagement/service

Issue: Deployment Takes 45+ Minutes

Cause: APIM Premium with zone redundancy takes 30-60 minutes to deploy

Solution: Expected behavior. Use incremental deployments:

  • Day 1: Deploy APIM infrastructure (wait 45 min)
  • Day 2+: Deploy API configurations (fast, minutes)

Optimization: Use --what-if flag to preview changes without deploying


Related Skills

  • azure-apim-architecture - Understand architecture before deploying
  • apim-policy-authoring - Deploy policies as part of APIOps workflow
  • api-security-review - Validate security before production deployment

Microsoft Documentation


Skill Version: 1.0 Last Updated: 29 January 2026 Primary Knowledge: DEPLOYMENT_PLANNING_GUIDE.md, references/IaC_TEMPLATES.md

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.68%
按下载量换算28

Claude

32.46%
按下载量换算27

Cursor

20.03%
按下载量换算17

Gemini CLI

8.84%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills