Azure Local离线模式部署 Appliance(系列篇之九)
1. 关键注意点官方原文 Important 段项说明网络/名称一致性Portal 输入的参数必须与已建交换机命名/网段一致不支持虚拟部署必须用物理机VLANAppliance 如果需要 VLAN用Set-VMNetworkAdapterIsolation -ManagementOS设置节点数最少 3 节点管理 instance 最多16 节点部署时长可能数小时详见 §10.4控制面可用性节点重启/升级期间可能短暂不可用详见 §10.2部署盘会建一个2 TB thin-provisioned infrastructure volume——不要动详见 §10.1Appliance 迁移集群创建后appliance VM 会从单节点迁到 cluster storage、转为 clustered VM详见 §10.32. 部署前置条件官方清单需求文档硬件Eligibility criteria身份Identity 文档网络Network 文档PKIPKI 文档准备节点Prepare 文档获取文件Acquire 文档部署前 Checklist官方原文网络计划IP pool、ingress IP、FQDN、DNS、网关DNS server 能解析 FQDNAzure Local 节点本地凭据部署用的 Active Directory 凭据AD OU 和网络需求按 Azure Local 部署前置密码复杂度满足要求AD 已准备好 Azure Local 部署约 23 张 ingress 证书 根 CA 公钥具体数量以 Manifest 和 Endpoint Matrix 为准——后续版本可能调整2 张 management 证书身份提供商参数AD FS 应用、credential、服务器、证书链Disconnected operations 部署文件manifest applianceAzure Local composite ISOOEM 固件/驱动⚠️证书数量说明当前 Azure Local 2601 版本共需约 23 张 Ingress Endpoint Certificates未来版本2602/2603/...可能为 25、27 等不同数量——具体以 Manifest 和 Endpoint Matrix 为准不要硬记数字。3. 部署序列工具 / 执行节点 / 权限 全景阶段工具实际执行节点权限1. OS 安装/配置标准工具全部节点本地管理员2. Operations module bootstrapPowerShellSeed Node本地管理员3.Install-Appliance基础设施卷 K8s ARMPowerShellSeed Node本地管理员4. 集群创建 Appliance 迁移自动无需手动干预ClusterOwner RBAC role5. 注册 / 日常运维本地 Portal / PowerShell / CLIClusterOperator RBAC roleSeed Node 节点名排序最小的节点只作为 bootstrap 协调者集群建好之后没有特殊身份详见 §10.5。4. 部署详细步骤PowerShell 流水4.1 准备基础路径与文件$applianceConfigBasePath C:\AzureLocalDisconnectedOperations # 复制下载文件到 seed node Copy-Item \\fileserver\share\azurelocalfiles\* $applianceConfigBasePath # 期望看到的文件 Get-ChildItem $applianceConfigBasePath # AzureLocal.DisconnectedOperations.zip # AzureLocal.DisconnectedOperations.manifest # ArcA_LocalData_A.vhdx # ArcA_SharedData_A.vhdx # OSAndDocker_A.vhdx # ArcA_SharedData_ACSTable_A.vhdx # ArcA_SharedData_ACSBlob_A.vhdx # ThirdPartyNotices.txt4.2 解压 zipExpand-Archive $($applianceConfigBasePath)\AzureLocal.DisconnectedOperations.zip -DestinationPath $applianceConfigBasePath # 解压后删除 zip 省空间解压后期望OperationsModule/ AzureLocal.DisconnectedOperations.manifest manifest.xml IRVM.zip ArcA_LocalData_A.vhdx ArcA_SharedData_A.vhdx ArcA_SharedData_ACSBlob_A.vhdx ArcA_SharedData_ACSTable_A.vhdx OSAndDocker_A.vhdx Storage.json4.3 拷贝证书$certsPath $($applianceConfigBasePath)\certs Copy-Item \\fileserver\share\azurelocalcerts $certspath -recurse # 期望结构 Get-ChildItem $certsPath Get-ChildItem $certsPath -recurse -filter *.pfx # ManagementEndpointsCerts/ # IngressEndpointsCerts/ # 总共 ≥ 24 张证书4.4 导入 OperationsModuleImport-Module $applianceConfigBasePath\OperationsModule\Azure.Local.DisconnectedOperations.psd1 -Force $mgmntCertFolderPath $certspath\ManagementEndpointsCerts $ingressCertFolderPath $certspath\IngressEndpointsCerts5. 三组配置对象必填5.1 Management 网络配置$CertPassword retracted | ConvertTo-Securestring -AsPlainText -Force $ManagementIngressIpAddress 192.168.50.100 $ManagementNICPrefixLength 24 $mgmtNetworkConfigParams { ManagementIpAddress $ManagementIngressIpAddress ManagementIpv4PrefixLength $ManagementNICPrefixLength TlsCertificatePath $mgmntCertFolderPath\ManagementEndpointSsl.pfx TlsCertificatePassword $CertPassword ClientCertificatePath $mgmntCertFolderPath\ManagementEndpointClientAuth.pfx ClientCertificatePassword $CertPassword } $managementNetworkConfiguration New-ApplianceManagementNetworkConfiguration mgmtNetworkConfigParams5.2 Ingress 网络配置$azureLocalDns 192.168.200.150 $NodeGw 192.168.200.1 $IngressIpAddress 192.168.200.115 $NICPrefixLength 24 $ingressNetworkConfigurationParams { DnsServer $azureLocalDns IngressNetworkGateway $NodeGw IngressIpAddress $IngressIpAddress IngressNetworkPrefixLength $NICPrefixLength ExternalDomainSuffix autonomous.cloud.private } $ingressNetworkConfiguration New-ApplianceIngressNetworkConfiguration ingressNetworkConfigurationParams5.3 Identity 配置$oidcCertChain Get-CertificateChainFromEndpoint -requestUri https://adfs.azurestack.local/adfs # 没 LDAPS 可省略下一行 $ldapsCertChain Get-CertificateChainFromEndpoint -requestUri https://dc01.azurestack.local $ldapPort 3269 # 3268 非加密 $ldapPassword RETRACTED | ConvertTo-SecureString -AsPlainText -Force $identityParams { Authority https://adfs.azurestack.local/adfs ClientId ClientId RootOperatorUserPrincipalName operatorazurestack.local LdapServer adfs.azurestack.local # demo 值 LdapPort $ldapPort LdapCredential New-Object PSCredential -ArgumentList (ldap, $ldapPassword) SyncGroupIdentifier SynGroupIdentifier OidcCertChainInfo $oidcCertChain LdapsCertChainInfo $ldapsCertChain } $identityConfiguration New-ApplianceExternalIdentityConfiguration identityParams⚠️企业最佳实践推荐协议推荐目标不推荐目标原因OIDC身份认证AD FS直接连 DCAD FS 是 OIDC 标准实现承载 Federation 协议DC 不直接对外暴露 OIDC endpointLDAPS目录同步Domain ControllerADFSLDAP/LDAPS 是目录访问协议身份同步最终来源就是 ADAD FS 本身也只是 AD 的代理即LdapServer dc01.contoso.com直接 DCAuthority https://adfs.contoso.com/adfsAD FS。OidcCertChainInfo和LdapsCertChainInfo可以省略demo 用但生产强烈建议填。6. 安装 / 启动 ApplianceOperationsModule 提供Install-Appliancecmdlet在 deploy 文档后续章节会展开因文档超过抓取上限未能完整捕获。输入上述三个配置对象开始 bootstrap。⚠️ 安装会①建 2 TB infrastructure volume②部署 appliance VM③从 seed node 出发扩展为集群 VM。预计数小时详见 §10.4。7. 部署后注册下一节部署完成后必须用一次联网做 self-attestation 注册——见 deploy-register.md。8. Appliance 内部架构官方未展开官方没有提供 Appliance 内部架构图——但了解组件构成有助于理解部署时长、迁移逻辑、故障定位。下面的图示基于官方文档 Arc Resource Bridge 公开技术资料综合推断。关键解读Infrastructure Volume 才是核心——Appliance VM 只是这个卷上的一个 VHDX所有 K8s / ARM 数据都在卷上Appliance 是自带 K8s 的——它不是传统 Windows Server 角色而是一个 Arc Resource Bridge K8s Local ARM 的复合体注册为 Cluster Role 之后——Appliance 像其他 VM 一样享受 HA 能力节点故障时自动迁移9. 部署后注册自我证明 / Self-Attestation部署完成后必须用一次联网做 self-attestation 注册——见 deploy-register.md。理论上 Air-gapped 模式可以通过双向便携介质完成 self-attestation但实务上建议至少在控制面初始化阶段临时开放一次出站——这是 Microsoft 支持链路里最难离线化的环节。10. 技术分析官方未展开说明本节专门解释官方文档没有明说的技术原理。每个点都是企业部署时绕不开的为什么。10.1 Infrastructure Volume 的本质2 TB Thin官方原文Important 段 A 2 TB thin-provisioned infrastructure volume gets created as part of this step. Dont attempt to modify, expand, or use the volume.技术分析Infrastructure Volume 本质是 Azure Local 创建的Storage Spaces DirectS2DThin-Provisioned Virtual Disk。因此它天然继承 S2D Virtual Disk 的标准能力包括Online Expand在线扩容Storage Pool 扩容ReFS 在线扩展微软当前文档没有单独讨论该卷的扩容策略因为这是 S2D 的基础能力而不是 Deploy 文档关注点。企业环境如果确有容量需求可以按 Azure Local / S2D 的标准方式扩容但应避免影响 Appliance 生命周期管理——扩容后 Operations Module 的版本检测、镜像校验等流程需要重新跑。10.2 Control Plane 不可用的影响范围官方原文The control plane might be down for a while during node reboots and upgrades.技术分析Control Plane 主要承载ARM API、Portal、Operations Module等管理能力。节点升级期间Control Plane VM 可能发生迁移或重启因此Portal / API 会短暂不可用。这并不意味着 S2D 或 Hyper-V 工作负载会同时停止。正常情况下Management PlanePortal / ARM / Operations Module—— 受影响Compute PlaneCSV / VM / Storage Stack——继续运行Workload 业务 VM—— 不受影响高可用由 Hyper-V Cluster 保证两者生命周期不同Compute Plane 升级是逐节点的滚动升级Management Plane 是整体重启/迁移。写正常情况下而不是绝对化——极端场景如 S2D 同时出问题下两者会一起受影响但这是 Azure Local 整体异常不是断开操作特有。10.3 Appliance Migration 的实际步骤官方原文Once the cluster is created, the appliance is moved to cluster storage, and the VM is registered as a cluster VM.技术分析Bootstrap 初期 Appliance VM 部署在Seed Node 本地存储上。Cluster 创建完成以后按以下顺序自动迁移Infrastructure Volume 建立S2D 池中创建 2 TB thin 卷CSV OnlineCluster Shared Volume 联机作为共享存储后端Appliance VM 存储迁移从 Seed Node 本地存储 → CSV 上的 Infrastructure VolumeVM 注册为 Cluster Role成为 Hyper-V Cluster 资源享受 HA 能力之后 Appliance 不再依赖 Seed Node——Seed Node 可以下线/重启Appliance 会自动迁移到其他节点。10.4Install-Appliance为什么数小时官方原文This step takes a few hours. Dont try to interrupt the process.技术分析Install-Appliance并不是部署一个 VM——而是在按顺序部署多个组件栈阶段部署内容典型耗时1创建 Infrastructure VolumeS2D thin分钟级2部署 Appliance VMOS 基础镜像10-30 min3初始化 Kubernetes RuntimeArc Resource Bridge 拉镜像30-60 min4部署 Local ARM / Identity / Monitoring Stack30-60 min5注册 Cluster Role / 迁移到 CSV10-30 min总耗时 1.5-3 小时是正常范围——最慢的环节是 K8s 镜像拉取与初始化如果是 Air-gappedOperationsModule 会从本地介质加载时间可能更短但仍需等待 K8s 自身 ready。10.5 Seed Node 的真实角色官方原文Run the deploy step on the first machine by alphabetical order.技术分析Seed Node只是 Bootstrap Coordinator启动协调者——负责发起Install-Appliance命令提供本地暂存部署初期 Appliance VM 跑在它的本地存储上触发 cluster create appliance migration最终 Appliance 迁移到 Cluster 之后Seed Node 没有特殊身份——它就是集群里的一个普通节点。因此 Seed Node 选谁并不关键——但选硬件配置最好的节点、或网络位置最便利的节点可减少后期运维摩擦。10.6 部署脚本时序哪个节点先跑什么官方原文All nodes must complete prepare steps first, then deploy on seed node.官方没说其余节点何时加入集群——按 Azure Local 集群创建标准流程seed node 触发 cluster create 后剩余节点通过Add-ClusterNode或 Azure LocalAddNodecmdlet 加入具体顺序由 OperationsModule 自动协调无需人工干预。10.7 可能数小时的最长时限官方没明确给出 SLA 上限。实务经验健康部署1.5–3 小时拉镜像缓慢4–6 小时超过 8 小时未完成按 Troubleshoot 文档 排查进度查看路径OperationsModule 实时输出 Cluster Event LogGet-WinEvent -LogName Microsoft-Windows-FailoverClustering/Operational10.8Install-Appliance的 Idempotency官方没说失败后能否重跑——按已知 issue 与 OperationsModule 行为失败重跑前通常需要先Remove-Appliance或手工清理残留 VHDX / Cluster Role如果 control plane 部署卡住 8 小时官方建议直接 redeploy不是 fix是重建详细 cleanup 流程Azure Local Cleanup Script