Foreman安装配置

Foreman安装配置

官方网站:


环境:
CentOS7.2
puppet-3.8.7
foreman-1.13


一.配置yum源
这里配置了依赖的几个国内源以加速下载
cat >/etc/yum.repos.d/foreman-extra.repo <<EOF

[epel]

name=epel

baseurl=http://mirrors.aliyun.com/epel/7/x86_64

enabled=1

gpgcheck=0

[sclo-sclo]

name=sclo-sclo

baseurl=http://mirrors.aliyun.com/centos/7/sclo/x86_64/sclo

enabled=1

gpgcheck=0

[sclo-rh]

name=sclo-rh

baseurl=http://mirrors.aliyun.com/centos/7/sclo/x86_64/rh

enabled=1

gpgcheck=0

[foreman-nightly]

name=foreman-nightly

baseurl=http://yum.theforeman.org/nightly/el7/x86_64/

enabled=1

gpgcheck=0

EOF
yum -y install rubygem-oauth tfm-rubygem-passenger-native tfm-rubygem-foreman_setup
yum -y install foreman foreman-proxy foreman-cli foreman-postgresql foreman-installer


二.初始化
1.配置hosts
echo '192.168.8.202 node5.example.com' >>/etc/hosts
2.foreman-installer

[root@node5 ~]# foreman-installer --foreman-admin-username=admin --foreman-admin-password=“foreman”

Installing             Done                                               [100%] [.................]

  Success!

  * Foreman is running at https://node5.example.com

      Initial credentials are admin / “foreman”

  * Foreman Proxy is running at https://node5.example.com:8443

  * Puppetmaster is running at port 8140

 

  The full log is at /var/log/foreman-installer/foreman.log

提示: 
foreman-installer默认会安装并start,enable httpd,postgresql-server,passenger等依赖组件。
foreman默认用户名和密码可以通过以上参数来指定,如不指定则用户名为admin,密码为随机字符串
注意: puppetmaster在安装了foreman后会由foreman组件来接管启动停止,systemd启动时会报地址占用

[root@node5 ~]# systemctl status foreman-proxy

foreman-proxy.service - Foreman Proxy

   Loaded: loaded (/usr/lib/systemd/system/foreman-proxy.service; enabled; vendor preset: disabled)

   Active: active (running) since 日 2016-10-30 00:17:23 CST; 18min ago

 Main PID: 3768 (ruby)

   CGroup: /system.slice/foreman-proxy.service

           └─3768 ruby /usr/share/foreman-proxy/bin/smart-proxy


10月 30 00:17:22 node5.example.com systemd[1]: Starting Foreman Proxy...

10月 30 00:17:23 node5.example.com systemd[1]: PID file /run/foreman-proxy/foreman-proxy.pid ...rt.

10月 30 00:17:23 node5.example.com systemd[1]: foreman-proxy.service: Supervising process 376...ts.

10月 30 00:17:23 node5.example.com systemd[1]: Started Foreman Proxy.

Hint: Some lines were ellipsized, use -l to show in full.



三.WebUI
https://node5.example.com
Foreman安装配置
Foreman安装配置

Foreman安装配置

Foreman安装配置

Foreman安装配置


https://node5.example.com:8443
Foreman安装配置
原文地址:https://www.cnblogs.com/lixuebin/p/10814004.html