安装rabbitmq
wget -O /etc/yum.repos.d/epel-erlang.repo
yum install erlang git -y
wget
rpm -ivh rabbitmq-server-2.8.2-1.noarch.rpm
启用插件:
rabbitmq-plugins enable mochiweb rabbitmq_management rabbitmq_management_agent rabbitmq_mochiweb webmachine amqp_client rabbitmq_stomp
启动服务:
/etc/init.d/rabbitmq-server start
管理页面
guest:guest
添加MC用户:
rabbitmqctl add_user mcollective akin
rabbitmqctl set_permissions -p / mcollective "^amq.gen-" ".*" ".*"
安装MC2.0
gem install stomp
git clone git://github.com/puppetlabs/marionette-collective.git
cd marionette-collective
git checkout 2.1.0
rake rpm
cd /usr/src/redhat/RPMS/noarch
rpm -ivh mcollective-common-2.1.0-1.el5.noarch.rpm
rpm -ivh mcollective-2.1.0-1.el5.noarch.rpm
//大家可以直接可以下载RPM的包,是一样的,
puppet client安装mc server
配置如下:
vi /etc/mcollective/server.cfg
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 = unset
connector = stomp
plugin.stomp.host = localhost
plugin.stomp.port = 61613
plugin.stomp.user = mcollective
plugin.stomp.password = akin
# Facts
factsource = yaml
plugin.yaml = /etc/mcollective/facts.yaml
puppet server端安装mc client:(当然可以两个都安装,配置同上)
cat /etc/mcollective/client.cfg
topicprefix = /topic/
main_collective = mcollective
collectives = mcollective
libdir = /usr/libexec/mcollective
logger_type = console
loglevel = warn
# Plugins
securityprovider = psk
plugin.psk = unset
connector = stomp
plugin.stomp.host = 192.168.14.11
plugin.stomp.port = 6313
plugin.stomp.user = mcollective
plugin.stomp.password = akin
# Facts
factsource = yaml
plugin.yaml = /etc/mcollective/facts.yaml
启动:
/etc/init.d/mcollective start
测试:
[root@akin puppet]# mco ping
akin2.com time=69.73 ms
akin.com time=72.82 ms
---- ping statistics ----
2 replies max: 72.82 min: 69.73 avg: 71.27
You have new mail in /var/spool/mail/root
[root@akin puppet]# mco find
akin2.com
akin.com
阅读(1092) | 评论(0) | 转发(0) |