参考文档

https://theforeman.org/manuals/1.5/index.html#3.InstallingForeman

https://theforeman.org/manuals/1.19/quickstart_guide.html

因为小版本众多而且已经失败了2次,故直接安装rpm而不用yum根据EPEL搜索不同的软件

nmtui更新机器名和DNS名

echo "192.168.10.130 puppet.pcdog.com">>/etc/hosts

cat /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.10.130 puppet.pcdog.com

ping puppet.pcdog.com

PING puppet.pcdog.com (192.168.10.130) 56(84) bytes of data.

64 bytes from puppet.pcdog.com (192.168.10.130): icmp_seq=1 ttl=64 time=0.036 ms

64 bytes from puppet.pcdog.com (192.168.10.130): icmp_seq=2 ttl=64 time=0.044 ms

64 bytes from puppet.pcdog.com (192.168.10.130): icmp_seq=3 ttl=64 time=0.068 ms

^C

--- puppet.pcdog.com ping statistics ---

3 packets transmitted, 3 received, 0% packet loss, time 1999ms

rtt min/avg/max/mdev = 0.036/0.049/0.068/0.014 ms

安装puppet agent

rpm -ivh http://yum.puppetlabs.com/puppet5/el/7/x86_64/puppet-agent-5.5.6-1.el7.x86_64.rpm

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_Linux

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_系统/运维_02

安装jdk

yum install -y java-1.8.0-openjdk

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_系统/运维_03

安装puppet server

rpm -ivh http://yum.puppetlabs.com/puppet5/el/7/x86_64/puppetserver-5.3.5-1.el7.noarch.rpm

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_Linux_04

安装foreman install

rpm -ivh https://yum.theforeman.org/releases/latest/el7/x86_64/foreman-installer-1.19.0-1.el7.noarch.rpm

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_系统/运维_05

还缺4个包

http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_foreman_06

yum install -y foreman-selinux ruby rubygem-highline rubygem-kafo

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_puppet_07

再来安装foreman install

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_foreman_08

foreman-installer

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_puppet_09

tail -f /var/log/foreman-installer/foreman.log

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_foreman_10

下载postgres中

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_puppet_11

容我看个电视

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_foreman_12

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_Linux_13

15分钟左右,速度还算不错

看到官网,如果你有其他db server的话,可以直接用

foreman-installer \

--foreman-db-type=mysql \

--foreman-db-manage=false \

--foreman-db-host=dbserver.example.com \

--foreman-db-database=dbname \

--foreman-db-username=dbuser \

--foreman-db-password=dbpassword

As a post-installation step, to populate the database correctly, run:

foreman-rake db:migrate

foreman-rake db:seed

foreman-rake apipie:cache:index

看下服务

service foreman-proxy status

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_foreman_14

netstat -naltp | grep 8140

netstat -naltp | grep 443

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_Linux_15

webui

puppet.pcdog.org / 192.168.10.129

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_系统/运维_16

我密码呢

grep "admin_password" /var/log/foreman-installer/foreman.log

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_系统/运维_17

终于登陆了

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_foreman_18

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_系统/运维_19

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_Linux_20

添加本机作为客户端,证书还没有签发

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_Linux_21

创建自动签名,本机自动连接上了

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_foreman_22

首页也多了一个健康主机

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_puppet_23