AWS コンピューティング リソースの構成管理に基づいて Puppet をサポートするためのクラウド テンプレートの構成には、いくつかのオプションがあります。
ユーザー名とパスワードを使用した AWS での Puppet の管理
| 例... | ブループリント YAML のサンプル |
|---|---|
| サポート対象の Amazon マシン イメージでのクラウド設定の認証。 | inputs:
username:
type: string
title: Username
default: puppet
password:
type: string
title: Password
encrypted: true
default: VMware@123
resources:
Webserver:
type: Cloud.AWS.EC2.Instance
properties:
flavor: small
image: centos
cloudConfig: |
#cloud-config
ssh_pwauth: yes
chpasswd:
list: |
${input.username}:${input.password}
expire: false
users:
- default
- name: ${input.username}
lock_passwd: false
sudo: ['ALL=(ALL) NOPASSWD:ALL']
groups: [wheel, sudo, admin]
shell: '/bin/bash'
ssh-authorized-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDytVL+Q6/+vGbmkXoRpX dmettem@dmettem-m01.vmware.com
runcmd:
- echo "Defaults:${input.username} !requiretty" >> /etc/sudoers.d/${input.username}
Puppet_Agent:
type: Cloud.Puppet
properties:
provider: PEOnAWS
environment: production
role: 'role::linux_webserver'
host: '${Webserver.*}'
osType: linux
username: '${input.username}'
password: '${input.password}'
useSudo: true |
| 既存のユーザーを使用したカスタム Amazon マシン イメージでのクラウド設定の認証。 | inputs:
username:
type: string
title: Username
default: puppet
password:
type: string
title: Password
encrypted: true
default: VMware@123
resources:
Webserver:
type: Cloud.AWS.EC2.Instance
properties:
flavor: small
image: centos
cloudConfig: |
#cloud-config
runcmd:
- sudo sed -e 's/.*PasswordAuthentication no.*/PasswordAuthentication yes/' -i /etc/ssh/sshd_config
- sudo service sshd restart
Puppet_Agent:
type: Cloud.Puppet
properties:
provider: PEOnAWS
environment: production
role: 'role::linux_webserver'
host: '${Webserver.*}'
osType: linux
username: '${input.username}'
password: '${input.password}'
useSudo: true |
生成済みのパブリック キーまたはプライベート キーを使用した AWS での Puppet の管理
| 例... | ブループリント YAML のサンプル |
|---|---|
| 生成済みのパブリック キーまたはプライベート キーでアクセスする AWS での remoteAccess.authentication 認証。 | inputs: {}
resources:
Machine:
type: Cloud.AWS.EC2.Instance
properties:
flavor: small
imageRef: ami-a4dc46db
remoteAccess:
authentication: generatedPublicPrivateKey
Puppet_Agent:
type: Cloud.Puppet
properties:
provider: puppet-BlueprintProvisioningITSuite
environment: production
role: 'role::linux_webserver'
host: '${Machine.*}’
osType: linux
username: ubuntu
useSudo: true
agentConfiguration:
runInterval: 15m
certName: ‘${Machine.address}'
useSudo: true |