Last active
December 17, 2015 11:59
-
-
Save thomasbiddle/5606624 to your computer and use it in GitHub Desktop.
Setting up Puppet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setting up the master | |
echo "deb http://apt.puppetlabs.com precise main" > /etc/apt/sources.list.d/puppet.list | |
curl http://apt.puppetlabs.com/pubkey.gpg | apt-key add - | |
apt-get update | |
apt-get install puppetmaster | |
echo 'import "nodes"' > /etc/manifests/site.pp | |
touch /etc/manifests/nodes.pp | |
echo "127.0.0.1 puppet" > /etc/hosts | |
hostname puppet | |
echo "puppet" >> /etc/hostname | |
echo "OPEN INCOMING PORT 8140" | |
reboot | |
# Setting up the client | |
echo "deb http://apt.puppetlabs.com precise main" > /etc/apt/sources.list.d/puppet.list | |
curl http://apt.puppetlabs.com/pubkey.gpg | apt-key add - | |
apt-get update | |
apt-get install puppet | |
echo "ADD A HOST ENTRY POINTING 'puppet' TO YOUR PUPPET MASTER | |
# Most of the puppet config below is boiler plate and will be set as default, but I | |
# like to have it all anyways. | |
# Puppet Master /etc/puppet/puppet.conf | |
# | |
# Be sure to update the hostname at the bottom. | |
# | |
[main] | |
logdir=/var/log/puppet | |
vardir=/var/lib/puppet | |
ssldir=/var/lib/puppet/ssl | |
rundir=/var/run/puppet | |
factpath=$vardir/lib/facter | |
templatedir=$confdir/templates | |
[master] | |
# These are needed when the puppetmaster is run by passenger | |
# and can safely be removed if webrick is used. | |
ssl_client_header = SSL_CLIENT_S_DN | |
ssl_client_verify_header = SSL_CLIENT_VERIFY | |
modulepath = /etc/puppet/modules | |
manifestdir = /etc/puppet/manifests | |
manifest = $manifestdir/site.pp | |
pluginsync = true | |
certname=YOUR_SERVER_HOSTNAME | |
# Puppet Client | |
[main] | |
logdir=/var/log/puppet | |
vardir=/var/lib/puppet | |
ssldir=/var/lib/puppet/ssl | |
rundir=/var/run/puppet | |
factpath=$vardir/lib/facter | |
templatedir=$confdir/templates | |
[master] | |
# These are needed when the puppetmaster is run by passenger | |
# and can safely be removed if webrick is used. | |
ssl_client_header = SSL_CLIENT_S_DN | |
ssl_client_verify_header = SSL_CLIENT_VERIFY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment