Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7389296
  • 博文数量: 1755
  • 博客积分: 18684
  • 博客等级: 上将
  • 技术积分: 16227
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-02 10:28
个人简介

啥也没写

文章分类

全部博文(1755)

文章存档

2024年(1)

2023年(44)

2022年(39)

2021年(46)

2020年(43)

2019年(27)

2018年(44)

2017年(50)

2016年(47)

2015年(15)

2014年(21)

2013年(43)

2012年(143)

2011年(228)

2010年(263)

2009年(384)

2008年(246)

2007年(30)

2006年(38)

2005年(2)

2004年(1)

分类: LINUX

2012-06-19 17:35:45

插件地址:

查看mc lib目录:
grep libdir /etc/mcollective/server.cfg
libdir = /usr/libexec/mcollective

安装:
cd /usr/libexec/mcollective
git clone git://github.com/puppetlabs/mcollective-plugins.git

cd /usr/libexec/mcollective/mcollective
cp /usr/libexec/mcollective/mcollective-plugins/agent/puppetd/agent/puppetd.* ./agent/
cp /usr/libexec/mcollective/mcollective-plugins/agent/puppetd/application/puppetd.rb  ./application/

cp /usr/libexec/mcollective/mcollective-plugins/agent/filemgr/agent/*.* ./agent/
cp /usr/libexec/mcollective/mcollective-plugins/agent/filemgr/application/*.*  ./application/

cp /usr/libexec/mcollective/mcollective-plugins/agent/package/agent/*.* ./agent/
cp /usr/libexec/mcollective/mcollective-plugins/agent/package/application/*.*  ./application/

cp /usr/libexec/mcollective/mcollective-plugins/agent/process/agent/*.* ./agent/
cp /usr/libexec/mcollective/mcollective-plugins/agent/process/application/*.*  ./application/
gem install sys-proctable 

cp /usr/libexec/mcollective/mcollective-plugins/agent/puppetca/agent/*.* ./agent/

cp /usr/libexec/mcollective/mcollective-plugins/agent/puppetral/agent/*.* ./agent/

cp /usr/libexec/mcollective/mcollective-plugins/agent/service/agent/*.* ./agent/
cp /usr/libexec/mcollective/mcollective-plugins/agent/service/application/*.*  ./application/

//packge&service要改名!!!!!

重启一下MC的服务就OK了,

重启生效
/etc/init.d/mcollective restart

[root@akin ~]# mco pgrep ruby

 * [============================================================> ] 2 / 2

akin.com
     PID USER        VSZ              COMMAND
    3221 puppet      173.766 MB       /usr/local/bin/ruby /usr/sbin/puppetmasterd
    7999 root        125.746 MB       ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid 

akin2.com
     PID USER        VSZ              COMMAND
   19289 root        121.637 MB       ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid 
   25650 root        168.777 MB       /usr/local/bin/ruby /usr/sbin/puppetd

   ---- process list stats ----
        Matched hosts: 2
    Matched processes: 4
        Resident Size: 58.785 MB
         Virtual Size: 589.926 MB

Finished processing 2 / 2 hosts in 392.70 ms

里面有些插件是要安装别的工具的,比如说dsh,他就要安装DSH的工具,不是很好用!

可以使用的命令如下:
查看文件状态:mco rpc filemgr status file=/etc/passwd
创建文件:mco rpc filemgr touch file=/tmp/akin.com.txt
删除文件:mco rpc filemgr -v remove file=/tmp/akin.com.txt
查运行进程:mco pgrep ruby
查看服务运行情况:mco service -v sshd status
安装软件:mco package -v install screen
改变puppet运行状态:mco puppetd -v runonce
其中-v是显示详细信息,,可以不加!


阅读(1977) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

zhang11322012-10-23 15:58:06

我执行下面的命令,没报错,但是puppet好像也没执行成功嘛,请问一下是什么原因呢?
[root@sn state]# mco puppetd runonce -v
Determining the amount of hosts matching filter for 2 seconds .... 2

* [ ============================================================> ] 2 / 2


sm114                                   : OK
    {:enabled=>1,   &nb