1)client 是控制端,从 client 发出指令,如 puppet agent
2)client 发出指令后, middleware 接收到指令,将这些指令广播到各个节点,这些节点一般称为服务器端
3)服务器端接收到指令,同时对照指令中指定的筛选条件,如果符合则执行指令,并将结果返回给中间件
4)中间件将结果返回给 client
mcollective client、activemq server、puppet master
mcollective server、puppet agent
<simpleAuthenticationPlugin>
<users>
<authenticationUser username="admin" password="redhat" groups="mcollective,admins,everyone"/>
<authenticationUser username="mcollective" password="redhat" groups="mcollective,admins,everyone"/>
</users>
</simpleAuthenticationPlugin>
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
<!-- <transportConnector name="stomp+nio" uri="stomp+nio://0.0.0.0:61613"/> -->
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
</transportConnectors>
|
topicprefix = /topic/
main_collective = mcollective
collectives = mcollective
libdir = /usr/libexec/mcollective
logger_type = console
loglevel = warn
# Plugins
securityprovider = psk
plugin.psk = redhat
connector = stomp
plugin.stomp.host = 172.16.5.200
plugin.stomp.port = 61613
plugin.stomp.user = mcollective
plugin.stomp.password = redhat
# Facts
factsource = yaml
plugin.yaml = /etc/mcollective/facts.yaml
|
topicprefix = /topic/
main_collective = mcollective
collectives = mcollective
libdir = /usr/libexec/mcollective
logfile = /var/log/mcollective.log
loglevel = info
daemonize = 1
# Plugins
securityprovider = psk
plugin.psk = redhat
connector = stomp
plugin.stomp.host = 172.16.5.200
plugin.stomp.port = 61613
plugin.stomp.user = mcollective
plugin.stomp.password = redhat
# Facts
factsource = yaml
plugin.yaml = /etc/mcollective/facts.yaml
|
当执行mco ping时,报如下错误:
/usr/lib/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:55:in `gem_original_require': no such file to load -- stomp (LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/site_ruby/1.8/mcollective.rb:2
from /usr/bin/mco:3:in `require'
from /usr/bin/mco:3
解决方法:
gem install stomp
|
mco facts -v --with-fact operatingsystem='OracleLinux' kernelrelease
mco puppet -v runonce rpc --np -F lsbmajdistrelease='6' -F operatingsystem='OracleLinux'
linux交流群:22346652。欢迎Linux爱好者加入,一起学习,一起进步。