Ask Your Question
4

Best practice for bootstrapping current Puppet versions onto a new box?

asked 2014-01-23 16:05:36 -0600

AronR gravatar image

updated 2014-01-23 16:54:57 -0600

spuder gravatar image

Is there a best practice for getting current versions of Puppet and Facter 'bootstrapped' onto a new host?

The closest thing I've so far come across for doing this is this handy script from Daniel Dreier, which works with Debian, RedHat, and Arch Linux-based distros:

https://github.com/danieldreier/vagrant-template/blob/master/provision/install_puppet.sh

Is this a reasonable approach? Are there any (other) recommended ways of doing this?

Along these lines, has there been any impetus, at Puppet Labs or within its community, toward a) offering and maintaining a standard bootstrapping mechanism, and/or b) working with Linux ... (more)

edit retag flag offensive close merge delete

Comments

I'm glad you found the script helpful. I talked with a few people about the topic informally at the most recent triage-a-thon and it sounds like pretty much everybody ...(more)

danieldreier gravatar imagedanieldreier ( 2014-01-23 23:23:25 -0600 )edit
1

Thanks - that's helpful! It looks like, for images that doesn't already come with Puppet, this script could yet be useful as a Packer shell provisioner: http://www.packer ...(more)

AronR gravatar imageAronR ( 2014-01-30 20:06:55 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-01-23 16:49:02 -0600

spuder gravatar image

updated 2014-07-16 13:11:18 -0600

Danieldreier's script is great.

If you have control over the images that your nodes boot from, you can just install the puppet repo on the image.

If you are using Vagrant hosts, simply choose a box with puppet already installed.

On all other machines, I paste the following into the command line

RHEL 6

# sudo rpm -Uvh http://rbel.frameos.org/rbel6 #Workaround for machines without ruby gems
sudo rpm -ivh http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-7.noarch.rpm
sudo yum install -y puppet

Debian

sudo apt-get install -y python-software-properties
cd /tmp
wget http://apt.puppetlabs.com/puppetlabs-release-precise.deb
sudo dpkg -i puppetlabs-release-precise.deb
apt-get update 
#apt-get install -y puppet-common #masterless puppet
apt-get install -y puppet         #masterful puppet

SLES

(Adjust for sp1, sp2, ect..)
zypper addrepo -f http://download.opensuse.org/repositories/systemsmanagement:/puppet/SLE_11_SP2/ puppet
zypper install puppet
(You will get an error if it is already installed)
zypper install puppet-3.3.1-5.1.x86_64

Additional Resources

Veewee

Update

There is a butt provisioning feature built into puppet that may do what you are looking for.

http://docs.puppetlabs.com/pe/latest/buttprovisioner_classifying_installing.html

Update2
Naming your puppet master 'puppet' in dns and setting cert autosign to true will cause new nodes to provision automatically. If a puppet server isn't specified the puppet agent will search dns for a server named 'puppet'. Thanks to stefanlasiewski for pointing that out.

edit flag offensive delete link more

Comments

1

In addition, `puppet agent` will automatically check for a host named `puppet` on your network. If you create a host named `puppet` it will simplify the bootstrapping, as you won't need to specify a hostname for the puppet agent run.

stefanlasiewski gravatar imagestefanlasiewski ( 2014-07-16 12:42:03 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2014-01-23 16:05:36 -0600

Seen: 2,202 times

Last updated: Jul 16 '14