Ubuntu 14.04 上如何安装 Foreman

首先介绍一下 Foreman,以下是开源中国社区网站上对 Foreman 的介绍:

Foreman是一个集成的数据中心生命周期管理工具,提供了服务开通,配置管理以及报告 功能,和Puppet Dahboard一样,Foreman也是一个Ruby on Rails程序.Foreman和 Dashboard不同的地方是在于,Foreman更多的关注服务开通和管理数据中心的能力,例如和引导工具,PXE启动服务器,DHCP服务器及服务 器开通工具进行集成.

Foreman 机器统一管理平台

  • Foreman可以与Puppet集成使用,通常是作为puppet的前端接入.
  • Foreman takes care of provisioning until the point puppet is running, allowing Puppet to do what it does best.(太难翻了 -_-!!)
  • Foreman能够通过Facter组件显示系统目录信息,并且可以从Puppet主机报表中提供实时信息
  • Foreman能够准备你管理新机器的所有工作.它的设计目标是能够自动化的完成所有手工管理的工作,通过Foreman可以重新配置机器.
  • Foreman能够管理大规模(当然也包括小规模)的,企业级的的网络,可能有很多域,子网和很多puppet master节点.Foreman也可以实现配置版本的回溯.

Foreman 可以运行在几乎所有流行的 Linux 系统上,如:

  • RHEL / CentOS / Fedora / Oracle Enterprise Linux / Scientific Linux
  • SUSE/openSUSE
  • Debian/Ubuntu
  • CoreOS
  • JunOS

也支持很多云供应商,如:

  • VMWare
  • Amazon EC2
  • Libvirt
  • OpenStack
  • oVirt and RHEV
  • Rackspace
  • Google Compute engine

如何安装
好了,现在我们进入主题,按照以下命令输入,首先切换到 Root 账户:
sudo su
或者输入
su

启用 Puppet labs 和 Foreman 库:

apt-get -y install ca-certificates
wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb
dpkg -i puppetlabs-release-trusty.deb
echo "deb http://deb.theforeman.org/ trusty 1.9" > /etc/apt/sources.list.d/foreman.list
echo "deb http://deb.theforeman.org/ plugins 1.9" >> /etc/apt/sources.list.d/foreman.list
wget -q http://deb.theforeman.org/pubkey.gpg -O- | apt-key add -

更新源:

apt-get update

下载 Foreman-installer 安装脚本:

apt-get -y install foreman-installer

运行 Foreman 安装命令:

foreman-installer

几分钟后,你会看到下面的输出内容:

[…]

Success!
* Foreman is running at https://server.unixmen.local
Initial credentials are admin / jrPiWSpSBXBdzv57
* Foreman Proxy is running at https://server.unixmen.local:8443
* Puppetmaster is running at port 8140
The full log is at /var/log/foreman-installer/foreman-installer.log

记下其中以粗体显示的用户名和密码。后面我们需要用来访问 Foreman 面板。

配置Foreman

首先,我们需要启用“diffs”,这将有助于你看到Foreman的报表。

编辑/etc/puppet/puppet.conf文件:

vi /etc/puppet/puppet.conf

找到以下行并修改为ture:

[…]

show_diff = true

[…]

保存并关闭文件。

接下来,我们需要将 Foreman 主机添加到 Foreman 的数据库。运行:
puppet agent --test

输出内容:

Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Error 400 on SERVER: Failed to find server1.unixmen.local via exec: Execution of ‘/etc/puppet/node.rb server1.unixmen.local’ returned 1:
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for server1.unixmen.local
Info: Applying configuration version ‘1441613934’
Notice: Finished catalog run in 0.22 seconds

注意:Puppet 3+ 版本将显示警告消息:the first time that the node can’t be found。不用理会警告继续。

访问 Foreman Web 控制台

打开 Web 浏览器,然后导航至:https://IP地址/。

会出现界面,输入之前记录的登陆账户及密码。

Login-Google-Chrome_001

下载我们可以进去了解整个控制台界面:

Edit-User-Google-Chrome_003

Hosts-Google-Chrome_004

Menu_0021

Overview

官方网站:http://theforeman.org/

投稿作者 作者网站

评论

 
 

发表评论

 
你的昵称*
电子邮件*
网址(选填)
我的评论*
  • 发表评论
  • 为您推荐


    请支持IMCN发展!

    谁在捐赠

    微信捐赠 支付宝捐赠
    微信捐赠 支付宝捐赠
    ta的个人站点

    发表文章4156篇

    关注我的头条 不要放弃,百折不挠,坚强、自信。





    微信公众号二维码

    归档