Skip to content

davewongillies/mcosched

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

- Installation 
git clone git://github.com/thinkfr/mcosched.git 

sudo su

cd mcosched

yum -y install ruby-devel make gcc-c++
gem install tzinfo
gem install eventmachine
gem install rufus-scheduler
gem install daemons 
gem install json      # if you want to test outside of MCollective 
gem install uuidtools # if you want to test outside of MCollective

# On the managed nodes :
cp mcoplugins/agent/scheduler.rb /usr/libexec/mcollective/mcollective/agent/
cp mcoplugins/agent/scheduler.ddl /usr/libexec/mcollective/mcollective/agent/
mkdir -p /usr/libexec/mcollective/mcollective/util/
cp mcoplugins/util/schedhandler.rb /usr/libexec/mcollective/mcollective/util/

/sbin/service mcollective restart

./schedulerd run   # to test if it does not complain, then : 

mkdir -p /usr/local/bin
cp -f schedulerd sched.rb lib/mc-debugger-tk.rb /usr/local/bin
cp -f service/schedulerd /etc/init.d/

/sbin/chkconfig schedulerd on
/sbin/service schedulerd start
/sbin/service schedulerd status

# On the client (management) node(s) :
cp mcoplugins/application/schedule.rb /usr/libexec/mcollective/mcollective/application


- Examples of use (CLI wrapper):
mco schedule rpcutil ping --with-id=/el6/
mco schedule rpcutil ping -s in -a 60s --with-id=/el6/
mco schedule package yum_clean --with-id=/el6/
mco schedule package yum_checkupdates --with-id=/el6/
mco schedule sleep sleepy seconds=120 --with-id=/el6/
mco schedule package status package=ruby --with-id=/el6/
mco schedule package status package=ruby -s in -a 60s --with-id=/el6/

mco schedule -o -k <jobid> --with-id=/el6/


- Examples of use (raw agent):
mco rpc scheduler schedule agentname='rpcutil' actionname='ping' --with-id=/el6/ --verbose

mco rpc scheduler schedule agentname='rpcutil' actionname='ping' schedtype=in schedarg='60s' --with-id=/el6/ --verbose

mco rpc scheduler schedule agentname='package' actionname='yum_clean' --with-id=/el6/ --verbose

mco rpc scheduler schedule agentname='package' actionname='yum_checkupdates' --with-id=/el6/ --verbose

mco rpc scheduler schedule agentname='sleep'   actionname='sleepy' params=seconds seconds=120 --with-id=/el6/ --verbose

mco rpc scheduler schedule agentname='package' actionname='status' params=package package=ruby --with-id=/el6/ --verbose

mco rpc scheduler schedule agentname='package' actionname='status' params=package package=ruby schedtype=in schedarg='60s' --with-id=/el6/ --verbose

mco rpc scheduler query output=yes --verbose jobid=xyz

About

Scheduler for MCollective actions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published