6 月 202014
 

之前安装了 mco  和 foreman  ,现在的问题就是整合2个工具,测试了很多有很多问题。最终还是整合了。

首先安装 plugins

参考文档:http://theforeman.org/manuals/1.4/index.html#6.Plugins   (注意版本)

Configure the repo by creating /etc/yum.repos.d/foreman_plugins.repo:

[foreman-plugins]
name=Foreman plugins
baseurl=http://yum.theforeman.org/plugins/1.4/el6/x86_64/
enabled=1
gpgcheck=0

 

Install the package, e.g.

yum install ruby193-rubygem-foreman_discovery

yum -y install ruby193-rubygems-devel

yum -y install ruby193-ruby-devel

安装  foreman-mco

yum -y install ruby193-rubygem-uglifier

yum -y install ruby193-rubygem-foreman-mco

 

配置  foreman

image

 

配置配置文件

/etc/foreman-proxy/settings.yml

添加 

# enable MCollective integration
:mcollective: true

 

根据 smart-proxy的配置文档添加

:puppet_provider: mcollective

添加sudo 执行

cd /etc/sudoers.d/

cp foreman-proxy  foreman-mco

vi  foreman-mco

[root@puppet ~]# cat /etc/sudoers.d/foreman-mco
foreman-proxy ALL = NOPASSWD : /usr/bin/mco  *
Defaults:foreman-proxy !requiretty

如果按照之前mco的注册的话 mcollective 注册是 hostname ,而foreman执行脚本是 fqdn。

示例

about to execute: /usr/bin/sudo /usr/bin/mco puppet runonce -I php53.test.com

而不是  /usr/bin/mco puppet runonce -I php53.,所以要将 mcollective  server 的 identity 指定,可以通过puppet 的模板实现

在 server.cfg的模板添加

#identity
identity = <%= fqdn %>

即可

下面上图

image

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny