[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69ARKVBSS58J1D0DYP908DE":3,"skill-same:01M69ARKVBSS58J1D0DYP908DE":101},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":52,"linkOnly":53,"markdownContent":54,"markdownBody":55,"frontMatter":56,"refName":58,"commitSha":59,"skillDirectory":60,"forksCount":61,"repositoryHtmlUrl":62,"repositoryHomepageUrl":17,"ownerHtmlUrl":63,"ownerBlogUrl":64,"ownerDescription":65,"updatedAt":66,"install":67,"resources":80},"01M69ARKVBSS58J1D0DYP908DE","e2e-infrastructure","物理 AI 端到端测试基础设施部署","Deploy or undeploy the complete Physical AI E2E test infrastructure, including Terraform, robotics charts, Azure ML, and OSMO.","部署或卸载完整的物理 AI（Physical AI）端到端（E2E）测试基础设施，包括 Terraform、机器人图表（charts）、Azure ML 和 OSMO。","microsoft\u002Fphysical-ai-toolchain","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69ARCAV4WR03MSZSQPHZ2S8",138,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fphysical-ai-toolchain\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fe2e-infrastructure\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQNXPY1AV6BSR5VKHDMWRH","部署与发布管理","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],"e2e infrastructure","infrastructure","e2e","Charts","with","test infrastructure","complete","physical","azure cli","e2e test","robotics","jq","Bash","helm","cli","ml","azure","deploy","test","linux","python","2026-11-10 10:12:30",false,"---\nname: e2e-infrastructure\ndescription: \"Deploy or undeploy the complete Physical AI E2E test infrastructure, including Terraform, robotics charts, Azure ML, and OSMO.\"\ncompatibility: \"Linux with Bash 4+, Azure CLI, Terraform, kubectl, Helm, jq, envsubst, Python 3, and OSMO CLI.\"\n---\n\n\u003C!-- cspell:ignore tfvars undeploying worktree -->\n\n# E2E Test Infrastructure\n\nDeploy or undeploy the dedicated cloud infrastructure used by the Physical AI E2E tests. This skill manages infrastructure only; invoke the `e2e-tests` skill separately to run tests.\n\n## Fixed Paths\n\nResolve paths from the repository checkout that contains this skill:\n\n```bash\nREPO_ROOT=\"$(git rev-parse --show-toplevel)\"\nSKILL_DIR=\"$REPO_ROOT\u002F.github\u002Fskills\u002Fe2e-infrastructure\"\nTF_DIR=\"$REPO_ROOT\u002Finfrastructure\u002Fterraform\"\nTFVARS=\"$TF_DIR\u002Fterraform.tfvars\"\nSETUP_DIR=\"$REPO_ROOT\u002Finfrastructure\u002Fsetup\"\nDRIVER=\"$SKILL_DIR\u002Fscripts\u002Fmanage-e2e-infrastructure.sh\"\n```\n\nDo not operate on another checkout, Terraform directory, variable file, workspace, or state. Do not create a remote backend. The canonical E2E variable template is bundled at `templates\u002Fterraform.tfvars.example`. Pass the resolved `REPO_ROOT` to the driver so worktree sessions use their own checkout and Terraform state.\n\n## Operating Contract\n\nUse the bundled Bash driver for both interactive and Azure Automation Hybrid Runbook Worker execution:\n\n```bash\nbash \"$DRIVER\" deploy --repo-root \"$REPO_ROOT\"\nbash \"$DRIVER\" undeploy \\\n  --repo-root \"$REPO_ROOT\" \\\n  --confirm-resource-group \u003Cterraform-resolved-resource-group>\n```\n\nCreate `infrastructure\u002Fterraform\u002Fterraform.tfvars` before deployment to override the bundled E2E defaults. When the file is absent, the driver copies `templates\u002Fterraform.tfvars.example` and selects an unused instance.\n\n### Personal environment overrides\n\nKeep user-specific subscription, governance, expiry, and naming requirements in personal Copilot instructions rather than the tracked skill or template. Personal instructions complement this skill by preparing its supported inputs before the driver runs; they must not replace the driver or weaken its state, retry, verification, or undeploy checks.\n\nUse this pattern in a user-level instruction:\n\n```markdown\nScope: `\u002Fe2e-infrastructure deploy` in `microsoft\u002Fphysical-ai-toolchain`.\n\n- Before invoking the bundled driver, ensure the checkout-local, gitignored `infrastructure\u002Fterraform\u002Fterraform.tfvars` exists. If absent, copy `.github\u002Fskills\u002Fe2e-infrastructure\u002Ftemplates\u002Fterraform.tfvars.example`.\n- Add the organization-required entries to the existing `tags` map. Preserve every existing setting and tag, and do not edit the tracked template for personal policy.\n- Compute any environment-specific expiry tag in the personal instruction and add it to the local `tags` map before invoking the driver.\n- Follow `.github\u002Fskills\u002Fe2e-infrastructure\u002FSKILL.md` for all deployment and undeployment behavior.\n```\n\nFor example, a personal instruction can require this checkout-local configuration without recording the real tag names or values in the repository:\n\n```hcl\ntags = {\n  Purpose     = \"e2e-testing\"\n  RequiredTag = \"\u003Corganization-required-value>\"\n}\n```\n\nThe driver reads `var.tags`, merges the configured tags onto the external resource group, and passes the variable file to Terraform. An existing `terraform.tfvars` remains the configuration baseline for resumed deployments.\n\nOptional deployment controls:\n\n| Input                      | Environment variable | Default                  | Purpose                                                                  |\n|----------------------------|----------------------|--------------------------|--------------------------------------------------------------------------|\n| `--resource-owner`         | `E2E_RESOURCE_OWNER` | Signed-in Azure username | Set the owner appended when the driver creates the final resource prefix |\n| `--confirm-resource-group` | None                 | Empty                    | Exact Terraform-resolved resource group required for undeploy            |\n\nThe worker must provide Bash, Azure CLI, Terraform, kubectl, Helm, jq, OSMO CLI, access to this checkout, and an authenticated Azure CLI session. For managed identity authentication, run `az login --identity` before the driver.\n\nWhen Copilot invokes the driver, request one confirmation for the complete deploy or undeploy operation. For undeploy, pass the exact resource-group name resolved from Terraform state or the saved destroy context through `--confirm-resource-group`; the driver rejects missing or mismatched values before changing state or deleting resources.\n\nThe confirmed driver owns the complete sequence, including bounded Terraform retries and ordered setup scripts; do not request confirmations between its internal steps.\n\nThe driver:\n\n1. Sources `prerequisites\u002Faz-sub-init.sh`.\n2. Creates a missing `terraform.tfvars` atomically from the bundled template, appends the normalized resource owner to `resource_prefix`, then changes only its final prefix and `instance = \"NNN\"` assignments. An existing file remains the configuration baseline.\n3. Reuses the current instance when Terraform state is non-empty.\n4. Selects the first globally available username-scoped instance from `001` through `999` when state is empty, failing immediately on Azure API errors.\n5. Creates the selected resource group for Terraform to consume as an existing group and purges soft-deleted Azure ML workspaces and Key Vaults retained from an earlier use of that group.\n6. Merges the configured Terraform tags onto the external resource group while preserving existing tags. Terraform reads the same configured tags from `terraform.tfvars`.\n7. Runs Terraform init, plan, and apply with three bounded attempts against the same state and configuration.\n   A failed Azure Managed Redis shell is removed before planning or retrying so a transient capacity failure receives a fresh create request.\n8. Selects an available private IP from the AKS system subnet and runs all three platform setup scripts in numeric order.\n9. Verifies Terraform outputs, live Azure resource IDs, Helm releases, Azure ML extension and compute state, and Kubernetes readiness; then logs the OSMO CLI into the private gateway directly or through a temporary Kubernetes tunnel, selects the default pool, ensures the generic `huggingface` credential exists, and lists one workflow as a smoke test.\n10. Supports deterministic undeploy from local Terraform state, including partial deployments, destroy retries, resource-group-wide soft-delete purging, and targeted kubeconfig cleanup.\n11. Uses an exclusive Terraform-directory lock so concurrent Automation jobs cannot share the same state or variable file.\n12. Writes timestamped JSONL events and a terminal JSON summary under `infrastructure\u002Fsetup\u002Fgenerated\u002F\u003Cenvironment>\u002Fe2e-operations\u002F\u003Coperation-id>\u002F`.\n\nUse `--config-preview` for read-only resolution:\n\n```bash\nbash \"$DRIVER\" deploy --repo-root \"$REPO_ROOT\" --config-preview\n```\n\n## Instance Selection\n\nThe driver generates `terraform.tfvars` from the bundled E2E template when the file is absent. It derives the owner from the signed-in Azure username, removes the domain and non-alphanumeric characters, lowercases the result, appends it to the template's `resource_prefix`, and persists the combined value as the final `resource_prefix`. Use `--resource-owner` when the derived value is unsuitable.\n\nThe data-lake storage account sets the owner-length limit because `stdl\u003Cresource-prefix>\u003Cowner>\u003Cenvironment>\u003CNNN>` must fit Azure's 24-character storage-account limit. The default `e2e`, `dev`, and three-digit instance leave 11 owner characters. The driver calculates the limit from the configured base prefix and environment and truncates the normalized owner from the right with a warning.\n\nAn existing `terraform.tfvars` treats `resource_prefix` as the final owner-inclusive prefix and reuses it unchanged. The driver migrates the earlier `resource_owner` assignment into that final prefix without changing deployed resource names. If local state is non-empty, it recovers the three-digit instance from the Terraform resource-group output. For empty state, it searches `001` through `999` in ascending order and chooses the first candidate for which all checks pass:\n\nBoth Azure ML compute pools use `identity_type = \"UserAssigned\"`. The platform module binds them to the Terraform-created Azure ML user-assigned managed identity.\n\n| Resource           | Candidate name                             | Required live result                                                    |\n|--------------------|--------------------------------------------|-------------------------------------------------------------------------|\n| Resource group     | `rg-\u003Cresource-prefix>-\u003Cenvironment>-\u003CNNN>` | `az group exists` is `false`                                            |\n| Key Vault          | `kv\u003Cresource-prefix>\u003Cenvironment>\u003CNNN>`    | Microsoft.KeyVault `checkNameAvailability` reports `nameAvailable=true` |\n| Primary storage    | `st\u003Cresource-prefix>\u003Cenvironment>\u003CNNN>`    | `az storage account check-name` reports `nameAvailable=true`            |\n| Data lake storage  | `stdl\u003Cresource-prefix>\u003Cenvironment>\u003CNNN>`  | `az storage account check-name` reports `nameAvailable=true`            |\n| Container registry | `acr\u003Cresource-prefix>\u003Cenvironment>\u003CNNN>`   | `az acr check-name` reports `nameAvailable=true`                        |\n\nUse the subscription-scoped Key Vault REST endpoint with resource type `Microsoft.KeyVault\u002Fvaults`; `az keyvault check-name` checks managed HSM names and is not valid for this test. A Key Vault name retained by soft delete is unavailable and therefore rejects the candidate.\n\nName-availability API errors are failures, not evidence that a name is available. The driver normalizes the instance line before and after its edit and stops if any other byte changes.\n\n## Deploy Behavior\n\nThe deploy operation requires empty state for a new instance or resumes the instance already represented by non-empty state. It fails closed when Terraform state cannot be read or when the resource-group output conflicts with `terraform.tfvars`.\n\nThe template sets `should_create_resource_group = false`. For a new instance, the driver creates the resource group before plan and apply. It then permanently deletes any Azure ML workspace that ARM reports as `SoftDeleted` in that group and any deleted Key Vault whose retained resource ID belongs to the group. An unsupported soft-deleted ARM resource type stops deployment rather than being ignored.\n\nThe driver merges every configured Terraform tag onto the externally managed group, and Terraform reads the same tag map from `terraform.tfvars`. Personal instructions may add environment-specific governance or expiry tags to the gitignored variable file before deployment.\n\nAzure ML can retain a soft-deleted workspace that is absent from `az resource list`, while its create operation still rejects the name. Confirm the purge with `DELETE ...\u002Fworkspaces\u002F\u003Cname>?api-version=2024-04-01&forceToPurge=true`. If the endpoint returns `204` but creation remains blocked, set the existing `workspace_name_suffix` Terraform input to a unique suffix and resume the same state. Do not abandon the instance or infer another environment.\n\nAfter Terraform succeeds, the driver previews and runs these scripts from `infrastructure\u002Fsetup\u002F`:\n\n1. `01-deploy-robotics-charts.sh`\n2. `02-deploy-azureml-extension.sh`\n3. `03-deploy-osmo.sh`\n\nThe deployment requires working Key Vault data-plane access, directly or through a private endpoint. Terraform can provision secret resources through ARM, and the OSMO setup script can fall back to a sensitive Terraform output only for the OSMO admin password. PostgreSQL and Managed Redis credentials still use `az keyvault secret show`, and Key Vault CSI mounts remain enabled. Stop when policy blocks those reads; do not describe the deployment as supporting a fully blocked Key Vault data plane.\n\nThe OSMO script receives a stable private service IP selected through Azure's VNet availability API. Existing deployments retain the service annotation's current address.\n\nThe driver first connects directly to the private address. When the host has no VNet route, it temporarily runs `kubectl port-forward service\u002Fosmo-gateway 9000:80 --namespace osmo-control-plane` through the AKS API and performs verification through `http:\u002F\u002F127.0.0.1:9000`. Deployment verification fails unless OSMO login, `osmo profile set pool default`, credential verification, and `osmo workflow list --count 1 --format-type json` all succeed. The driver terminates its tunnel after verification.\n\nFor a new E2E environment, the driver creates `huggingface` as a `GENERIC` OSMO credential with a deliberately invalid dummy `hf_token`. If a generic credential with that name already exists, the driver preserves it rather than overwriting a potentially real token.\n\n## Regional Capacity Fallback\n\nUse this fallback only when the driver exhausts its configured attempts and every terminal Terraform error for a resource is an Azure regional capacity or SKU-availability failure such as `InsufficientCapacity` or `SkuNotAvailable`. Do not use it for authorization, quota, configuration, validation, networking, or provider errors.\n\n1. Preserve the current instance, Terraform state, variable file, resource group, workspace, and all unaffected resource locations.\n2. Identify the exact failing Terraform resource address, Azure resource type, configured SKU, and current location from Terraform and the Azure error. Do not infer them from naming conventions.\n3. Query the live subscription-scoped provider, SKU, or resource-specific availability API for that exact resource type and SKU. Select a different supported location with no relevant restriction. Do not use a memorized region list, and stop if the API fails or returns no unrestricted alternative.\n4. Temporarily hardcode only the failing resource's `location` argument to the selected location. Change a dependent resource only when the Azure API explicitly requires it to be colocated with the failing resource. Do not change the global `var.location`, resource-group location, SKU, `terraform.tfvars`, Terraform state, or unrelated resources.\n5. Run `terraform fmt -check` on every changed Terraform file, then resume the same deployment through the bundled driver. The driver remains responsible for planning, applying, setup, and verification.\n6. Keep the override in place across any resume needed before the driver reports a fully successful deployment. Restore every changed source line to its exact original value after successful deployment, or after undeploying a failed environment. Never commit a temporary capacity override.\n\nFor Azure Managed Redis, query the subscription-scoped `Microsoft.Cache\u002Fskus` endpoint and filter for the configured `redisEnterprise` SKU:\n\n```bash\nsubscription_id=$(az account show --query id --output tsv)\naz rest \\\n    --method get \\\n    --url \"https:\u002F\u002Fmanagement.azure.com\u002Fsubscriptions\u002F${subscription_id}\u002Fproviders\u002FMicrosoft.Cache\u002Fskus?api-version=2024-11-01\"\n```\n\nThis is the sole exception to the general prohibition on switching regions. It moves only capacity-constrained resources to live available capacity and does not create a second environment.\n\n## Undeploy Behavior\n\nUndeploy requires non-empty local Terraform state or a valid saved destroy context and never discovers a destroy target by enumerating Azure resources. The driver writes context under `infrastructure\u002Fsetup\u002Fgenerated\u002F\u003Cenvironment>\u002F` as soon as it creates the external resource group, enriches it with available Terraform outputs before making changes, and reuses it when cleanup starts or resumes after Terraform state becomes empty.\n\nBefore any state removal, destroy, purge, or resource-group deletion, the active Azure subscription and live full resource-group ID must match the captured identity, and `--confirm-resource-group` must exactly match `rg-\u003Cresource-prefix>-\u003Cenvironment>-\u003Cinstance>`. The driver scopes Azure cleanup operations to the captured subscription so a same-named group elsewhere cannot become the deletion target.\n\nBefore destroy, the driver removes E2E resources protected by `prevent_destroy` from Terraform state so the final resource-group deletion retains responsibility for those resources. It also removes ARM-plane Key Vault secret children because that resource API does not support `DELETE`. The driver destroys the remaining state with bounded retries, verifies that state is empty, purges soft-deleted Azure ML workspaces retained in the group, and deletes the externally managed resource group.\n\nThe driver checks the Terraform-resolved Key Vault again after resource-group deletion to handle delayed soft deletion, purging it when Azure reports that exact vault as deleted. Missing outputs are permitted for partial failed deployments. It removes only the captured AKS kubeconfig and generated destroy context; it retains `terraform.tfvars` and empty Terraform state.\n\n## Failure Handling\n\n- Preserve the selected instance and Terraform state across every retry.\n- Stop after the configured attempt limit.\n- Do not switch region, SKU, variable file, workspace, or checkout except for the regional capacity fallback above.\n- Treat setup-script and verification failures as deployment failures.\n- Never print Terraform-sensitive outputs, credentials, or generated secrets.\n- Preserve each operation's `events.jsonl` and `summary.json` as the sanitized retry, target, and outcome record.\n","\u003C!-- cspell:ignore tfvars undeploying worktree -->\n\n# E2E Test Infrastructure\n\nDeploy or undeploy the dedicated cloud infrastructure used by the Physical AI E2E tests. This skill manages infrastructure only; invoke the `e2e-tests` skill separately to run tests.\n\n## Fixed Paths\n\nResolve paths from the repository checkout that contains this skill:\n\n```bash\nREPO_ROOT=\"$(git rev-parse --show-toplevel)\"\nSKILL_DIR=\"$REPO_ROOT\u002F.github\u002Fskills\u002Fe2e-infrastructure\"\nTF_DIR=\"$REPO_ROOT\u002Finfrastructure\u002Fterraform\"\nTFVARS=\"$TF_DIR\u002Fterraform.tfvars\"\nSETUP_DIR=\"$REPO_ROOT\u002Finfrastructure\u002Fsetup\"\nDRIVER=\"$SKILL_DIR\u002Fscripts\u002Fmanage-e2e-infrastructure.sh\"\n```\n\nDo not operate on another checkout, Terraform directory, variable file, workspace, or state. Do not create a remote backend. The canonical E2E variable template is bundled at `templates\u002Fterraform.tfvars.example`. Pass the resolved `REPO_ROOT` to the driver so worktree sessions use their own checkout and Terraform state.\n\n## Operating Contract\n\nUse the bundled Bash driver for both interactive and Azure Automation Hybrid Runbook Worker execution:\n\n```bash\nbash \"$DRIVER\" deploy --repo-root \"$REPO_ROOT\"\nbash \"$DRIVER\" undeploy \\\n  --repo-root \"$REPO_ROOT\" \\\n  --confirm-resource-group \u003Cterraform-resolved-resource-group>\n```\n\nCreate `infrastructure\u002Fterraform\u002Fterraform.tfvars` before deployment to override the bundled E2E defaults. When the file is absent, the driver copies `templates\u002Fterraform.tfvars.example` and selects an unused instance.\n\n### Personal environment overrides\n\nKeep user-specific subscription, governance, expiry, and naming requirements in personal Copilot instructions rather than the tracked skill or template. Personal instructions complement this skill by preparing its supported inputs before the driver runs; they must not replace the driver or weaken its state, retry, verification, or undeploy checks.\n\nUse this pattern in a user-level instruction:\n\n```markdown\nScope: `\u002Fe2e-infrastructure deploy` in `microsoft\u002Fphysical-ai-toolchain`.\n\n- Before invoking the bundled driver, ensure the checkout-local, gitignored `infrastructure\u002Fterraform\u002Fterraform.tfvars` exists. If absent, copy `.github\u002Fskills\u002Fe2e-infrastructure\u002Ftemplates\u002Fterraform.tfvars.example`.\n- Add the organization-required entries to the existing `tags` map. Preserve every existing setting and tag, and do not edit the tracked template for personal policy.\n- Compute any environment-specific expiry tag in the personal instruction and add it to the local `tags` map before invoking the driver.\n- Follow `.github\u002Fskills\u002Fe2e-infrastructure\u002FSKILL.md` for all deployment and undeployment behavior.\n```\n\nFor example, a personal instruction can require this checkout-local configuration without recording the real tag names or values in the repository:\n\n```hcl\ntags = {\n  Purpose     = \"e2e-testing\"\n  RequiredTag = \"\u003Corganization-required-value>\"\n}\n```\n\nThe driver reads `var.tags`, merges the configured tags onto the external resource group, and passes the variable file to Terraform. An existing `terraform.tfvars` remains the configuration baseline for resumed deployments.\n\nOptional deployment controls:\n\n| Input                      | Environment variable | Default                  | Purpose                                                                  |\n|----------------------------|----------------------|--------------------------|--------------------------------------------------------------------------|\n| `--resource-owner`         | `E2E_RESOURCE_OWNER` | Signed-in Azure username | Set the owner appended when the driver creates the final resource prefix |\n| `--confirm-resource-group` | None                 | Empty                    | Exact Terraform-resolved resource group required for undeploy            |\n\nThe worker must provide Bash, Azure CLI, Terraform, kubectl, Helm, jq, OSMO CLI, access to this checkout, and an authenticated Azure CLI session. For managed identity authentication, run `az login --identity` before the driver.\n\nWhen Copilot invokes the driver, request one confirmation for the complete deploy or undeploy operation. For undeploy, pass the exact resource-group name resolved from Terraform state or the saved destroy context through `--confirm-resource-group`; the driver rejects missing or mismatched values before changing state or deleting resources.\n\nThe confirmed driver owns the complete sequence, including bounded Terraform retries and ordered setup scripts; do not request confirmations between its internal steps.\n\nThe driver:\n\n1. Sources `prerequisites\u002Faz-sub-init.sh`.\n2. Creates a missing `terraform.tfvars` atomically from the bundled template, appends the normalized resource owner to `resource_prefix`, then changes only its final prefix and `instance = \"NNN\"` assignments. An existing file remains the configuration baseline.\n3. Reuses the current instance when Terraform state is non-empty.\n4. Selects the first globally available username-scoped instance from `001` through `999` when state is empty, failing immediately on Azure API errors.\n5. Creates the selected resource group for Terraform to consume as an existing group and purges soft-deleted Azure ML workspaces and Key Vaults retained from an earlier use of that group.\n6. Merges the configured Terraform tags onto the external resource group while preserving existing tags. Terraform reads the same configured tags from `terraform.tfvars`.\n7. Runs Terraform init, plan, and apply with three bounded attempts against the same state and configuration.\n   A failed Azure Managed Redis shell is removed before planning or retrying so a transient capacity failure receives a fresh create request.\n8. Selects an available private IP from the AKS system subnet and runs all three platform setup scripts in numeric order.\n9. Verifies Terraform outputs, live Azure resource IDs, Helm releases, Azure ML extension and compute state, and Kubernetes readiness; then logs the OSMO CLI into the private gateway directly or through a temporary Kubernetes tunnel, selects the default pool, ensures the generic `huggingface` credential exists, and lists one workflow as a smoke test.\n10. Supports deterministic undeploy from local Terraform state, including partial deployments, destroy retries, resource-group-wide soft-delete purging, and targeted kubeconfig cleanup.\n11. Uses an exclusive Terraform-directory lock so concurrent Automation jobs cannot share the same state or variable file.\n12. Writes timestamped JSONL events and a terminal JSON summary under `infrastructure\u002Fsetup\u002Fgenerated\u002F\u003Cenvironment>\u002Fe2e-operations\u002F\u003Coperation-id>\u002F`.\n\nUse `--config-preview` for read-only resolution:\n\n```bash\nbash \"$DRIVER\" deploy --repo-root \"$REPO_ROOT\" --config-preview\n```\n\n## Instance Selection\n\nThe driver generates `terraform.tfvars` from the bundled E2E template when the file is absent. It derives the owner from the signed-in Azure username, removes the domain and non-alphanumeric characters, lowercases the result, appends it to the template's `resource_prefix`, and persists the combined value as the final `resource_prefix`. Use `--resource-owner` when the derived value is unsuitable.\n\nThe data-lake storage account sets the owner-length limit because `stdl\u003Cresource-prefix>\u003Cowner>\u003Cenvironment>\u003CNNN>` must fit Azure's 24-character storage-account limit. The default `e2e`, `dev`, and three-digit instance leave 11 owner characters. The driver calculates the limit from the configured base prefix and environment and truncates the normalized owner from the right with a warning.\n\nAn existing `terraform.tfvars` treats `resource_prefix` as the final owner-inclusive prefix and reuses it unchanged. The driver migrates the earlier `resource_owner` assignment into that final prefix without changing deployed resource names. If local state is non-empty, it recovers the three-digit instance from the Terraform resource-group output. For empty state, it searches `001` through `999` in ascending order and chooses the first candidate for which all checks pass:\n\nBoth Azure ML compute pools use `identity_type = \"UserAssigned\"`. The platform module binds them to the Terraform-created Azure ML user-assigned managed identity.\n\n| Resource           | Candidate name                             | Required live result                                                    |\n|--------------------|--------------------------------------------|-------------------------------------------------------------------------|\n| Resource group     | `rg-\u003Cresource-prefix>-\u003Cenvironment>-\u003CNNN>` | `az group exists` is `false`                                            |\n| Key Vault          | `kv\u003Cresource-prefix>\u003Cenvironment>\u003CNNN>`    | Microsoft.KeyVault `checkNameAvailability` reports `nameAvailable=true` |\n| Primary storage    | `st\u003Cresource-prefix>\u003Cenvironment>\u003CNNN>`    | `az storage account check-name` reports `nameAvailable=true`            |\n| Data lake storage  | `stdl\u003Cresource-prefix>\u003Cenvironment>\u003CNNN>`  | `az storage account check-name` reports `nameAvailable=true`            |\n| Container registry | `acr\u003Cresource-prefix>\u003Cenvironment>\u003CNNN>`   | `az acr check-name` reports `nameAvailable=true`                        |\n\nUse the subscription-scoped Key Vault REST endpoint with resource type `Microsoft.KeyVault\u002Fvaults`; `az keyvault check-name` checks managed HSM names and is not valid for this test. A Key Vault name retained by soft delete is unavailable and therefore rejects the candidate.\n\nName-availability API errors are failures, not evidence that a name is available. The driver normalizes the instance line before and after its edit and stops if any other byte changes.\n\n## Deploy Behavior\n\nThe deploy operation requires empty state for a new instance or resumes the instance already represented by non-empty state. It fails closed when Terraform state cannot be read or when the resource-group output conflicts with `terraform.tfvars`.\n\nThe template sets `should_create_resource_group = false`. For a new instance, the driver creates the resource group before plan and apply. It then permanently deletes any Azure ML workspace that ARM reports as `SoftDeleted` in that group and any deleted Key Vault whose retained resource ID belongs to the group. An unsupported soft-deleted ARM resource type stops deployment rather than being ignored.\n\nThe driver merges every configured Terraform tag onto the externally managed group, and Terraform reads the same tag map from `terraform.tfvars`. Personal instructions may add environment-specific governance or expiry tags to the gitignored variable file before deployment.\n\nAzure ML can retain a soft-deleted workspace that is absent from `az resource list`, while its create operation still rejects the name. Confirm the purge with `DELETE ...\u002Fworkspaces\u002F\u003Cname>?api-version=2024-04-01&forceToPurge=true`. If the endpoint returns `204` but creation remains blocked, set the existing `workspace_name_suffix` Terraform input to a unique suffix and resume the same state. Do not abandon the instance or infer another environment.\n\nAfter Terraform succeeds, the driver previews and runs these scripts from `infrastructure\u002Fsetup\u002F`:\n\n1. `01-deploy-robotics-charts.sh`\n2. `02-deploy-azureml-extension.sh`\n3. `03-deploy-osmo.sh`\n\nThe deployment requires working Key Vault data-plane access, directly or through a private endpoint. Terraform can provision secret resources through ARM, and the OSMO setup script can fall back to a sensitive Terraform output only for the OSMO admin password. PostgreSQL and Managed Redis credentials still use `az keyvault secret show`, and Key Vault CSI mounts remain enabled. Stop when policy blocks those reads; do not describe the deployment as supporting a fully blocked Key Vault data plane.\n\nThe OSMO script receives a stable private service IP selected through Azure's VNet availability API. Existing deployments retain the service annotation's current address.\n\nThe driver first connects directly to the private address. When the host has no VNet route, it temporarily runs `kubectl port-forward service\u002Fosmo-gateway 9000:80 --namespace osmo-control-plane` through the AKS API and performs verification through `http:\u002F\u002F127.0.0.1:9000`. Deployment verification fails unless OSMO login, `osmo profile set pool default`, credential verification, and `osmo workflow list --count 1 --format-type json` all succeed. The driver terminates its tunnel after verification.\n\nFor a new E2E environment, the driver creates `huggingface` as a `GENERIC` OSMO credential with a deliberately invalid dummy `hf_token`. If a generic credential with that name already exists, the driver preserves it rather than overwriting a potentially real token.\n\n## Regional Capacity Fallback\n\nUse this fallback only when the driver exhausts its configured attempts and every terminal Terraform error for a resource is an Azure regional capacity or SKU-availability failure such as `InsufficientCapacity` or `SkuNotAvailable`. Do not use it for authorization, quota, configuration, validation, networking, or provider errors.\n\n1. Preserve the current instance, Terraform state, variable file, resource group, workspace, and all unaffected resource locations.\n2. Identify the exact failing Terraform resource address, Azure resource type, configured SKU, and current location from Terraform and the Azure error. Do not infer them from naming conventions.\n3. Query the live subscription-scoped provider, SKU, or resource-specific availability API for that exact resource type and SKU. Select a different supported location with no relevant restriction. Do not use a memorized region list, and stop if the API fails or returns no unrestricted alternative.\n4. Temporarily hardcode only the failing resource's `location` argument to the selected location. Change a dependent resource only when the Azure API explicitly requires it to be colocated with the failing resource. Do not change the global `var.location`, resource-group location, SKU, `terraform.tfvars`, Terraform state, or unrelated resources.\n5. Run `terraform fmt -check` on every changed Terraform file, then resume the same deployment through the bundled driver. The driver remains responsible for planning, applying, setup, and verification.\n6. Keep the override in place across any resume needed before the driver reports a fully successful deployment. Restore every changed source line to its exact original value after successful deployment, or after undeploying a failed environment. Never commit a temporary capacity override.\n\nFor Azure Managed Redis, query the subscription-scoped `Microsoft.Cache\u002Fskus` endpoint and filter for the configured `redisEnterprise` SKU:\n\n```bash\nsubscription_id=$(az account show --query id --output tsv)\naz rest \\\n    --method get \\\n    --url \"https:\u002F\u002Fmanagement.azure.com\u002Fsubscriptions\u002F${subscription_id}\u002Fproviders\u002FMicrosoft.Cache\u002Fskus?api-version=2024-11-01\"\n```\n\nThis is the sole exception to the general prohibition on switching regions. It moves only capacity-constrained resources to live available capacity and does not create a second environment.\n\n## Undeploy Behavior\n\nUndeploy requires non-empty local Terraform state or a valid saved destroy context and never discovers a destroy target by enumerating Azure resources. The driver writes context under `infrastructure\u002Fsetup\u002Fgenerated\u002F\u003Cenvironment>\u002F` as soon as it creates the external resource group, enriches it with available Terraform outputs before making changes, and reuses it when cleanup starts or resumes after Terraform state becomes empty.\n\nBefore any state removal, destroy, purge, or resource-group deletion, the active Azure subscription and live full resource-group ID must match the captured identity, and `--confirm-resource-group` must exactly match `rg-\u003Cresource-prefix>-\u003Cenvironment>-\u003Cinstance>`. The driver scopes Azure cleanup operations to the captured subscription so a same-named group elsewhere cannot become the deletion target.\n\nBefore destroy, the driver removes E2E resources protected by `prevent_destroy` from Terraform state so the final resource-group deletion retains responsibility for those resources. It also removes ARM-plane Key Vault secret children because that resource API does not support `DELETE`. The driver destroys the remaining state with bounded retries, verifies that state is empty, purges soft-deleted Azure ML workspaces retained in the group, and deletes the externally managed resource group.\n\nThe driver checks the Terraform-resolved Key Vault again after resource-group deletion to handle delayed soft deletion, purging it when Azure reports that exact vault as deleted. Missing outputs are permitted for partial failed deployments. It removes only the captured AKS kubeconfig and generated destroy context; it retains `terraform.tfvars` and empty Terraform state.\n\n## Failure Handling\n\n- Preserve the selected instance and Terraform state across every retry.\n- Stop after the configured attempt limit.\n- Do not switch region, SKU, variable file, workspace, or checkout except for the regional capacity fallback above.\n- Treat setup-script and verification failures as deployment failures.\n- Never print Terraform-sensitive outputs, credentials, or generated secrets.\n- Preserve each operation's `events.jsonl` and `summary.json` as the sanitized retry, target, and outcome record.\n",{"name":5,"description":7,"compatibility":57},"Linux with Bash 4+, Azure CLI, Terraform, kubectl, Helm, jq, envsubst, Python 3, and OSMO CLI.","main","39b9db6f0c0cee5c51d548ee422fe41cd1e7ff03",".github\u002Fskills\u002Fe2e-infrastructure",72,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fphysical-ai-toolchain","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-14 17:25:41",{"source":9,"skillName":5,"commands":68,"prompt":78,"zipAvailable":79},[69,72,75],{"tool":70,"command":71},"npx","npx skills add microsoft\u002Fphysical-ai-toolchain --skill e2e-infrastructure",{"tool":73,"command":74},"bunx","bunx skills add microsoft\u002Fphysical-ai-toolchain --skill e2e-infrastructure",{"tool":76,"command":77},"pnpm","pnpm dlx skills add microsoft\u002Fphysical-ai-toolchain --skill e2e-infrastructure","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fphysical-ai-toolchain\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fe2e-infrastructure\u002FSKILL.md",true,[81,87,91,95],{"path":82,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":85,"sourceHtmlUrl":86},"scripts\u002Flib\u002Foperation-state.sh","SCRIPT","脚本",3555,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fphysical-ai-toolchain\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fe2e-infrastructure\u002Fscripts\u002Flib\u002Foperation-state.sh",{"path":88,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":89,"sourceHtmlUrl":90},"scripts\u002Flib\u002Fterraform-operations.sh",1556,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fphysical-ai-toolchain\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fe2e-infrastructure\u002Fscripts\u002Flib\u002Fterraform-operations.sh",{"path":92,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":93,"sourceHtmlUrl":94},"scripts\u002Fmanage-e2e-infrastructure.sh",47447,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fphysical-ai-toolchain\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fe2e-infrastructure\u002Fscripts\u002Fmanage-e2e-infrastructure.sh",{"path":96,"resourceType":97,"resourceTypeDesc":98,"sizeBytes":99,"sourceHtmlUrl":100},"templates\u002Fterraform.tfvars.example","OTHER","其他",5759,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fphysical-ai-toolchain\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fe2e-infrastructure\u002Ftemplates\u002Fterraform.tfvars.example",[102,110,117,124,131,138],{"skillNo":103,"name":104,"nameZh":17,"description":105,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":109},"01M78JTQEPW7M3HRGHF4SBB2P4","submit-lerobot-training","Submit a LeRobot imitation learning training job to OSMO with configurable policy, dataset, and Azure ML logging. Use when the user runs \u002Fsubmit-lerobot-training.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fphysical-ai-toolchain\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fsubmit-lerobot-training\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":111,"name":112,"nameZh":17,"description":113,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":109},"01M78JTMTZY0EDECA60C6C9TR3","start-dataviewer","Launch the dataviewer app with an optional dataset path, open it in the browser, and optionally run a VLM judge smoke pass. Use when the user runs \u002Fstart-dataviewer.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fphysical-ai-toolchain\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fstart-dataviewer\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":17,"description":120,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":109},"01M78JT7VKCVSEM8N7SR67973R","dataviewer-annotate","One-shot: launch the dataviewer with the VLM judge enabled and run the multi-step VLM-as-judge pipeline across an entire dataset. Use when the user runs \u002Fdataviewer-annotate.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fphysical-ai-toolchain\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fdataviewer-annotate\u002FSKILL.md",[],[],{"skillNo":125,"name":126,"nameZh":17,"description":127,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":109},"01M78JT5SY9QXT8X7KQX2A9EJ5","check-training-status","Check status, stream logs, and retrieve Azure ML metrics for a running or completed OSMO LeRobot training job. Use when the user runs \u002Fcheck-training-status.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fphysical-ai-toolchain\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fcheck-training-status\u002FSKILL.md",[],[],{"skillNo":132,"name":133,"nameZh":17,"description":134,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":109},"01M78JT2TMR9AKTKGMJ7D0HMT4","chatlog","Create and maintain structured conversation chatlogs capturing problems, solutions, and lessons learned. Use when the user runs \u002Fchatlog.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fphysical-ai-toolchain\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fchatlog\u002FSKILL.md",[],[],{"skillNo":139,"name":140,"nameZh":141,"description":142,"descriptionZh":143,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":144,"categories":145,"keywords":152,"publishedAt":52},"01M69AS2WAAD5CZ9S9CBSEZ226","synthetic-data","NVIDIA Cosmos合成数据生成","Generate synthetic training data using NVIDIA Cosmos world foundation models for SDG pipelines","使用 NVIDIA Cosmos 世界基础模型为 SDG 管道生成合成训练数据。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fphysical-ai-toolchain\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fsynthetic-data\u002FSKILL.md",[146,149],{"categoryNo":147,"categoryName":148,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",{"categoryNo":150,"categoryName":151,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C0NK93YXC7GERCH372ZVDF","AI 模型训练与微调",[153,154,155,156,157,158,159,160,161,162,163,164,165],"synthetic data","data","synthetic","world","NVIDIA","generate","for","models","training","cosmos","pipelines","Training Data","foundation"]