Puppet 支持的具有用户名和密码访问权限的云模板
在本示例中,您将 Puppet 配置管理添加到在具有用户名和密码访问权限的
vCenter
计算资源上部署的云模板。 - 在有效的网络上设置 Puppet Enterprise 实例。
- 使用集成功能将 Puppet Enterprise 实例添加到Automation Assembler。请参见在 Automation Assembler 中配置 Puppet Enterprise 集成
- 设置vSphere帐户和vCenter计算资源。
此过程显示的示例是关于如何创建 Puppet 支持的可部署资源,该资源需要用户名和密码身份验证。用户名和密码访问权限意味着,用户必须从计算资源手动登录到 Puppet 主计算机,才能调用 Puppet 配置管理。
或者,您可以配置远程访问身份验证,从而在云模板中设置配置管理,以便计算资源能在 Puppet 主计算机上进行身份验证。启用远程访问后,计算资源会自动生成密钥以满足密码身份验证。仍需要使用有效的用户名。
- 将 Puppet 配置管理组件添加到所需云模板的画布上的vSphere计算资源中。
- 选择。
- 单击添加集成,然后选择 Puppet。
- 在 Puppet 配置页面上输入相应的信息。配置说明示例值主机名Puppet 主计算机的主机名或 IP 地址Puppet-UbuntuSSH 端口用于在Automation Assembler和 Puppet 主计算机之间进行通信的 SSH 端口。(可选)不适用Autosign 密钥Puppet 主计算机上配置的共享密钥,节点应提供此共享密钥以支持 autosign 证书请求。特定于用户位置指示 Puppet 主计算机是位于私有云还是公有云上。仅当部署计算资源与 Puppet 主计算机之间存在连接时,才支持跨云部署。云代理公有云帐户(如 Microsoft Azure 或 Amazon Web Services)不需要此配置。如果您使用的是基于vCenter的云帐户,请为您的帐户选择相应的云代理。不适用用户名Puppet 主计算机的 SSH 和 RBAC 用户名。特定于用户。YAML 值为“${input.username}”密码Puppet 主计算机的 SSH 和 RBAC 密码。特定于用户。YAML 值为“${input.password}”Use sudo commands for this user选择对 procidd 使用 sudo 命令。true名称Puppet 主计算机名称。PEMasterOnPrem说明
- 将用户名和密码属性添加到 Puppet YAML,如以下示例中所示。
- 确保 Puppet 云模板 YAML 的 remoteAccess 属性值设置为authentication: username and password,如以下示例中所示。
vCenter
用户名和密码 YAML 代码以下示例显示了用于在
vCenter
计算资源上添加用户名和密码身份验证的具有代表性的 YAML 代码。
inputs: username: type: string title: Username description: Username to use to install Puppet agent default: puppet password: type: string title: Password default: VMware@123 encrypted: true description: Password for the given username to install Puppet agent resources: Puppet-Ubuntu: type: Cloud.vSphere.Machine properties: flavor: small imageRef: >- https://cloud-images.ubuntu.com/releases/16.04/release-20170307/ubuntu-16.04-server-cloudimg-amd64.ova remoteAccess: authentication: usernamePassword username: '${input.username}' password: '${input.password}' Puppet_Agent: type: Cloud.Puppet properties: provider: PEMasterOnPrem environment: production role: 'role::linux_webserver' username: '${input.username}' password: '${input.password}' host: '${Puppet-Ubuntu.*}' useSudo: true agentConfiguration: certName: '${Puppet-Ubuntu.address}'