为 Azure Automation State Configuration 大规模配置数据Configure data at scale for Azure Automation State Configuration

适用于:Windows PowerShell 5.1Applies To: Windows PowerShell 5.1

管理数百甚至数千个服务器可能很有难度。Managing hundreds or thousands of servers can be a challenge. 客户反馈表明,最困难的方面实际上是管理配置数据Customers have provided feedback that the most difficult aspect is actually managing configuration data. 跨逻辑构造(如位置、类型和环境)组织信息。Organizing information across logical constructs like location, type, and environment.

备注

本文引用了由开源社区维护的一个解决方案。This article refers to a solution that is maintained by the Open Source community. 支持仅以 GitHub 协作的形式提供,而不是由 Azure 提供。Support is only available in the form of GitHub collaboration, not from Azure.

社区项目:DatumCommunity project: Datum

为了解决此难题,已创建了一个名为 Datum 的由社区维护的解决方案。A community maintained solution named Datum has been created to resolve this challenge. Datum 是基于其他配置管理平台中的极佳思路构建的,实现的解决方案类型与 PowerShell DSC 相同。Datum builds on great ideas from other configuration management platforms and implements the same type of solution for PowerShell DSC. 信息将基于逻辑思路组织到文本文件中Information is organized in to text files based on logical ideas. 示例有:Examples would be:

  • 应该全局应用的设置Settings that should apply globally
  • 应该应用于某个位置中所有服务器的设置Settings that should apply to all servers in a location
  • 应该应用于所有数据库服务器的设置Settings that should apply to all database servers
  • 各个服务器设置Individual server settings

此信息按照你偏好的文件格式(JSON、Yaml 或 PSD1)进行组织。This information is organized in the file format you prefer (JSON, Yaml, or PSD1). 然后提供 cmdlet,以通过将每个文件中的信息合并到服务器或服务器角色的单一视图,来生成配置数据文件。Then cmdlets are provided to generate configuration data files by consolidating the information from each file in to single view of a server or server role.

生成数据文件后,可将其与 DSC 配置脚本配合使用,以生成 MOF 文件,并将 MOF 文件上传到 Azure 自动化Once the data files have been generated, you can use them with DSC Configuration scripts to generate MOF files and upload the MOF files to Azure Automation. 然后,在本地在 Azure 中注册服务器以拉取配置。Then register your servers from either on-premises or in Azure to pull configurations.

若要试用 Datum,请访问 PowerShell 库并下载该解决方案,或者单击“项目站点”以查看文档To try out Datum, visit the PowerShell Gallery and download the solution or click "Project Site" to view the documentation.

后续步骤Next steps