James
James

Reputation: 191

Can I install puppet to all my clients(hosts) at once?

I have installed puppet in the master and one of the clients. Now I want to install it in all the 100 servers I have and sign the certificate. I know I can sign the certificates to all at once, but is there a way to install puppet in all the hosts at once?

Upvotes: 0

Views: 39

Answers (2)

romain-nio
romain-nio

Reputation: 1205

If you don't want to create image, you can launch bash "post-script" that will be executed just after the start of each instances. See http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html#user-data-shell-scripts

Example of AWS CLI call to launch one instance :

ec2-run-instances --key KEYPAIR --user-data-file install.sh <ami_version>

and with this in the install.sh file :

yum install -y puppet facter hiera

Upvotes: 1

BMW
BMW

Reputation: 45243

Several ways:

bake the image

Bake the image with puppet agent installed for these 100 servers.

For example, add shell command yum install -y puppet facter hiera when bake the centos image

refer:

packer.io

packer-template

So if you prepared the image, export to vsphere or generate aws ami image, any instance start with this image will have puppet installed already.

Using automation tools

If these clients are already created and running. Use ansible or any other automation tool to install puppet directly

Upvotes: 1

Related Questions