Skip to content

chore: migrate scripts and automation to azurelocal-toolkit #1

Description

@kristopherjturner

Summary

In the early private-preview phase, the azurelocal-ztp repository served as a monolithic solution combining both documentation and reusable automation. Now that ZTP is part of the broader Azure Local public initiative, we need to split these concerns: keep the guides here, but move all reusable scripts and tools to the azurelocal-toolkit (the canonical home for shared automation across the organization).

Current State

The repo currently contains production scripts under scripts/common/:

Core Modules

  • AzureLocalConfig.psm1 — Configuration loading and environment setup
  • RedfishUtils.psm1 — BMC/Redfish API operations (iDRAC, XCC, iLO abstraction)

Discovery & Inventory

  • scripts/common/discovery/ — Hardware inventory and BMC discovery
  • scripts/common/service-principals/ — Azure service principal management

Standalone Tools

  • scripts/common/utilities/tools/Discover-Servers.ps1 — BMC discovery
  • scripts/common/utilities/tools/Mount-AzureLocalISO.ps1 — Virtual media mounting
  • scripts/common/utilities/tools/Set-ServerBootSource.ps1 — UEFI boot order configuration
  • scripts/common/utilities/tools/Restart-Servers.ps1 — Server reboot orchestration
  • scripts/common/utilities/tools/Reset-BootSequence.ps1 — UEFI boot variable cleanup (SysPrepClean)
  • scripts/common/utilities/tools/Reset-BOSSVirtualDisk.ps1 — Dell BOSS card reset for boot loops
  • scripts/common/utilities/tools/Generate-ConfigFromReference.ps1 — Config generation from template
  • scripts/common/utilities/tools/Create-AzureResourceGroup.ps1 — Azure resource group setup
  • scripts/common/utilities/tools/Download-ConfiguratorApp.ps1 — Configurator app download

Entry Point

  • scripts/Trigger-ZTPDeployment.ps1 — Main orchestration script

Why Move Now

  1. Reusability: These scripts are not ZTP-specific. The Redfish automation (iDRAC, XCC, iLO) is useful for any Azure Local deployment, not just ZTP.
  2. Maintenance: Centralized in toolkit = single source of truth for BMC automation patterns
  3. Discoverability: Operators looking for "how do I automate iDRAC" should find it in toolkit, not hidden in a ZTP doc repo
  4. Separation of concerns: azurelocal-ztp becomes a guide repo (what to do, step-by-step), while toolkit holds implementation (how to do it, reusable code)

Implementation Plan

Phase 1: Structure in azurelocal-toolkit

  1. Create scripts/bmc-automation/ directory in toolkit for Redfish/BMC work
    • Move RedfishUtils.psm1 there
    • Move iDRAC/XCC/iLO-specific scripts there
  2. Create scripts/discovery/ for hardware inventory tools
  3. Create scripts/azure/ for Azure-specific setup (service principals, resource groups)
  4. Create scripts/boot-management/ for boot sequence and UEFI manipulation

Phase 2: Update Documentation

  1. Update all guide files in azurelocal-ztp to reference toolkit scripts:
    • docs/server-preparation.md → points to toolkit repo for script location
    • docs/azure-portal-provisioning.md → points to toolkit
    • docs/automation-pipelines.md → documents how workflows call toolkit
  2. Add "Prerequisites" section to each guide showing git clone azurelocal-toolkit
  3. Update repo-management/automation.md to link to toolkit script docs

Phase 3: Cleanup

  1. Delete scripts/ from azurelocal-ztp (except placeholder README if needed for clarity)
  2. Update .github/workflows/ to check out both repos as needed
  3. Verify all documentation builds without broken references

Phase 4: Update azurelocal-toolkit

  1. Add toolkit README section documenting the BMC automation suite
  2. Create scripts/bmc-automation/README.md with supported hardware matrix (iDRAC, XCC, iLO)
  3. Add toolkit CHANGELOG entry

Acceptance Criteria

  • All scripts moved to azurelocal-toolkit under appropriate directories
  • azurelocal-toolkit documentation includes BMC automation section with supported hardware
  • All guides in azurelocal-ztp updated to reference toolkit scripts with correct clone/import paths
  • No hardcoded paths or assumptions that scripts are in azurelocal-ztp
  • Example workflow in azurelocal-ztp shows full end-to-end flow with toolkit integration
  • azurelocal-ztp scripts/ directory removed (docs only remain)

Notes

  • This maintains the separation: docs stay in ZTP repo, reusable code moves to toolkit
  • Allows toolkit to be a complete "everything you need to automate Azure Local" resource
  • ZTP becomes the "how-to guide for Simplified machine provisioning" rather than a toolkit repo
  • Future contributors looking for iDRAC automation find it in toolkit, not scattered across repos

Metadata

Metadata

Assignees

No one assigned

    Labels

    ado-trackedIssue has a linked ADO work item

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions