Last active
May 25, 2018 04:49
-
-
Save cclloyd/00e353dee2a5799b220ce8c6540be9a7 to your computer and use it in GitHub Desktop.
Installation and config of a single machine for both puppetserver and use itself as puppet agent
This file contains 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
sudo /opt/puppetlabs/bin/puppet resource service puppetserver ensure=running | |
sudo r10k deploy environment -p production --verbose | |
sudo /opt/puppetlabs/bin/puppet agent -t --verbose |
This file contains 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
# /etc/puppetlabs/puppet/hiera.yaml | |
--- | |
:backends: | |
- yaml | |
:hierarchy: | |
- "nodes/{%::trusted.certname}" | |
- common | |
:yaml: | |
:datadir: | |
This file contains 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
wget https://apt.puppetlabs.com/puppet5-release-xenial.deb; | |
sudo dpkg -i puppet5-release-xenial.deb; | |
sudo apt update; | |
sudo apt-get update | |
sudo apt-get install -y aptitude | |
sudo aptitude install -y puppetserver puppet-agent puppet-common ruby; | |
sudo gem install r10k; | |
sudo mkdir /etc/puppetlabs/r10k; | |
sudo touch /etc/puppetlabs/r10k.yaml; |
This file contains 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
# /etc/puppetlabs/puppet/puppet.conf | |
[master] | |
vardir = /opt/puppetlabs/server/data/puppetserver | |
logdir = /var/log/puppetlabs/puppetserver | |
rundir = /var/run/puppetlabs/puppetserver | |
pidfile = /var/run/puppetlabs/puppetserver/puppetserver.pid | |
codedir = /etc/puppetlabs/code | |
server = example.com | |
[main] | |
dns_alt_names = example.com | |
certname = example.com | |
[agent] | |
server = example.com |
This file contains 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
# /etc/default/puppetserver | |
JAVA_ARGS="-Xms1024M -Xmx1024M -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger" |
This file contains 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
# /etc/puppetlabs/r10k/r10k.yaml | |
# The location to use for storing cached Git repos | |
:cachedir: '/var/cache/r10k' | |
# A list of git repositories to create | |
:sources: | |
# This will clone the git repository and instantiate an environment per | |
# branch in /etc/puppetlabs/code/environments | |
:my-org: | |
remote: 'https://github.com/cclloyd/cclloyd-provisioning' | |
basedir: '/etc/puppetlabs/code/environments' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment