Puppet. Centos 7. Puppet + Foreman install

Материал из Wiki
Перейти к навигации Перейти к поиску

Links

https://www.itzgeek.com/how-tos/linux/centos-how-tos/install-foreman-on-centos-7-rhel-7-ubuntu-14-04-3.html

Install

Puppet Master (Server)

nano /etc/hosts

192.168.199.181 centos7-test01.local
...

hostnamectl set-hostname centos7-test01.local

rpm -ivh https://yum.puppetlabs.com/puppet5/puppet5-release-el-7.noarch.rpm

rpm -ivh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

rpm -ivh https://yum.theforeman.org/releases/1.20/el7/x86_64/foreman-release.rpm

yum -y install foreman-installer

foreman-installer

After installation - note down initial USERNAME and PASSWORD

Puppet Agent (Client)

hostnamectl set-hostname centos7-test02.local

nano /root/puppet_install.sh

#!/bin/bash
yum install ntp -y
\cp /usr/share/zoneinfo/Europe/Moscow /etc/localtime; ntpdate ru.pool.ntp.org
rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
yum install -y puppet
sed -i s/START=no/START=yes/g /etc/default/puppet
sed -i '/\/var\/log\/puppet/a \server=centos7-test01.local' /etc/puppet/puppet.conf
sed -i 's/templatedir/#templatedir/' /etc/puppet/puppet.conf
systemctl start puppetagent
systemctl enable puppetagent
puppet agent --test

/root/puppet_install.sh

Puppet Master (Server)

Sign client's cert by CLI

/opt/puppetlabs/bin/puppet cert sign centos7-test02.local

- OR -

/opt/puppetlabs/bin/puppet cert sign --all

   - OR -    

Sign client's cert by Foreman web interface

  • Инфраструктура - Капсулы - centos7-test01.local - Сертификаты
    • centos7-test02.local - Подписать