Puppet. Centos 7. Puppet + Foreman install: различия между версиями

Материал из Wiki
Перейти к навигации Перейти к поиску
(Создана пустая страница)
 
 
Строка 1: Строка 1:
= 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) ==
<code>nano /etc/hosts</code>
192.168.199.181 centos7-test01.local
...
<code>hostnamectl set-hostname centos7-test01.local</code>
<code>rpm -ivh <nowiki>https://yum.puppetlabs.com/puppet5/puppet5-release-el-7.noarch.rpm</nowiki></code>
<code>rpm -ivh <nowiki>http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm</nowiki></code>
<code>rpm -ivh <nowiki>https://yum.theforeman.org/releases/1.20/el7/x86_64/foreman-release.rpm</nowiki></code>
<code>yum -y install foreman-installer</code>
<code>foreman-installer</code>
After installation - note down initial '''USERNAME''' and '''PASSWORD'''
== Puppet Agent (Client) ==
<code>hostnamectl set-hostname centos7-test02.local</code>
<code>nano /root/puppet_install.sh</code>
#!/bin/bash
yum install ntp -y
\cp /usr/share/zoneinfo/Europe/Moscow /etc/localtime; ntpdate ru.pool.ntp.org
rpm -ivh <nowiki>http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm</nowiki>
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
<code>/root/puppet_install.sh</code>
== Puppet Master (Server) ==
Sign client's cert by CLI
<code>/opt/puppetlabs/bin/puppet cert sign centos7-test02.local</code>
'''- OR -'''
<code>/opt/puppetlabs/bin/puppet cert sign --all</code>
   '''- OR -'''    
Sign client's cert by Foreman web interface
* Инфраструктура - Капсулы - centos7-test01.local - Сертификаты
** centos7-test02.local - Подписать
[[Категория:Puppet]]
__ОБЯЗАТЕЛЬНОЕ_ОГЛАВЛЕНИЕ__
[[Категория:Centos 7]]

Текущая версия на 11:54, 2 сентября 2022

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 - Подписать