Puppet5+Puppetboard on Debian 9 Stretch

1 minute read

6GB RAM min required

install java:

apt-get install openjdk-8-jdk-headless

add puppet5 repo:

wget https://apt.puppetlabs.com/puppet5-release-jessie.deb
dpkg -i puppet5-release-jessie.deb

add jessie repo for libreadline6

echo "deb http://ftp.fr.debian.org/debian/ jessie main" > /etc/apt/sources.list.d/jessie.list
apt-get update
apt-get -t jessie install libreadline6
rm puppet5-release-jessie.deb /etc/apt/sources.list.d/jessie.list
apt-get update

Install puppet5

apt-get install puppetserver
ln -s /opt/puppetlabs/bin/puppet /usr/bin/
systemctl enable puppetserver
systemctl start puppetserver
puppet agent --test --server=puppet5.siddou.com

Install puppetdb:

apt-get install puppetdb puppetdb-termini postgresql postgresql-contrib apt-transport-https
puppet module install puppetlabs-puppetdb
nano /etc/puppetlabs/code/environments/manifests/site.pp
node puppet5 {
  class { 'puppetdb': }
  class { 'puppetdb::master::config': }
}
puppet agent --test --server=puppet5.siddou.com
puppet resource service puppetdb ensure=running enable=true

check:

tail /var/log/puppetlabs/puppetdb/puppetdb.log

If JAVA SSL problem:

puppetdb ssl-setup

Install Puppetboard:

nano /etc/puppetlabs/puppet/puppet.conf

add:

[master]
..
reports = store,puppetdb
 
[agent]
runinterval=1800
report = true
 
 
[main]
server = puppet5.siddou.com
systemctl restart puppetserver
puppet agent --test
nano /etc/puppetlabs/code/environments/manifests/site.pp
node puppet5 {
  class { 'puppetdb': }
  class { 'puppetdb::master::config': }
  class { 'apache':
    default_vhost => false,
}
  class { 'apache::mod::wsgi': }
  class { 'puppetboard':
    manage_git        => 'latest',
    manage_virtualenv => 'latest',
}
  class { 'puppetboard::apache::vhost':
    vhost_name           => 'puppet5',
    port                 => 443,
    ssl                  => true,
    ssl_key              => "/etc/puppetlabs/puppet/ssl/private_keys/puppetboard.siddou.com.pem",
    ssl_cert             => "/etc/puppetlabs/puppet/ssl/certs/puppetboard.siddou.com.pem",
}
}
apt-get install virtualenv
puppet module install puppetlabs-apache
puppet module install puppet-puppetboard
 
puppet cert generate puppetboard.siddou.com
puppet agent --test

go to https://puppet5serverIP

Leave a comment

Leave a comment