参考文档

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

9c35ab2076f8486e98f20aed53fc4518

4beaf685eaf34255ab784ef845d112b3

安装jdk

yum install -y java-1.8.0-openjdk

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_第1张图片

安装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_第2张图片

安装foreman install

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

acb402b232354acf8f9655beb1375474

还缺4个包

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

29a3d15abb2447a8a80d23ec5001305d

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

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_第3张图片

再来安装foreman install

6cc035c4190f4a3c91d5561055c366bc

foreman-installer

df29881bed414909b3ff0b65db983927

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

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_第4张图片

下载postgres中

53f7848cc2fc4673ae95794c02cc597a

容我看个电视

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_第5张图片

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_第6张图片

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_第7张图片

netstat -naltp | grep 8140

netstat -naltp | grep 443

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_第8张图片

webui

puppet.pcdog.org / 192.168.10.129

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_第9张图片

我密码呢

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

dc4351f3d6b942ba8914638b2305698c

终于登陆了

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_第10张图片

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_第11张图片

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_第12张图片

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

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_第13张图片

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

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_第14张图片

首页也多了一个健康主机

Puppet 实验十二 Foreman dashboard 仪表盘来管理puppet_第15张图片