Use mcollective for a period of time, each time in the control machine to write commands to run the agent feel very inconvenient, so want to have no special mcollective Web console, search issued the existing two: Kermit and Mcomaster.
Kermit looks more functional than Mcomaster, but because Kermit is a Django development, and Mcomaster is a ruby development, it's mcollective, Pupppet same strain, and learning costs are low.
This article introduces the construction of the Mcomaster system (os:centos6.2), which involves the link may be some need to flip the wall. Click here to see the installation instructions for the Mcomaster website
===================================================================================================
1, Mcomaster Introduction
Mcomaster is a mcollective framework of the Web console system, through Mcomaster can execute the node machine agent, that is, the various commands in MCO, and these only need to move the mouse, no longer remote to the MCO control machine to knock commands. And you can view the returned results in real time. So all this needs us to build the mcollective environment first. If you do not know mcollective, it is recommended to go to my previous article to look over: http://www.cnblogs.com/waiwofei/p/3698675.html
2, the building of ruby Environment
Since Mcomaster requirements must be more than ruby1.9, and the previous installation with Yum is ruby1.87, the latest Yum source is only 1.87, so prepare to use the source code to install the Ruby environment. Download ruby2.12 source code.
tar xzvf ruby-2.1. 2. Tar . gz# cd Ruby-2.1. 2 # . /configure --prefix=/usr/ruby/ make do install CP /usr/ruby/bin/ruby /usr/bin/cp /usr/ruby/bin/gem /usr/bin/
Then look at the Ruby and GEM versions to see if the installation was successful.
# ruby-2.12p95 (from-45877) [x86_64--V 2.2. 2
3, puppet installation
Puppet in the Mcomaster deployment is not necessary, but Puppet is we will definitely use, so first puppet, of course, you can not take this step. The gem-mounted puppet is used here
Install/usr/ruby/lib/ruby/gems/2.1. 0/gems/puppet-3.6. 2 cp conf/* /etc/puppet/# cp ext/redhat/server.init/etc/init.d/puppetmaster# chmod +x/ etc/init.d/puppetmaster# CP bin/puppet/usr/bin/# mkdir/etc/puppet/manifests /etc/puppet/modules# Service puppetmaster start start puppetmaster: [OK]
The next step is the general configuration of the puppet server and client, with reference to http://www.chenshake.com/puppet-study-notes/
4, ACTIVEMQ installation
Yum Install tanukiwrapper activemq activemq-info-provider
After the installation is complete, the ACTIVEMQ is configured as follows
# vim/etc/activemq/activemq.xml ...<simpleAuthenticationPlugin> <users><!--<authenticationuser username="${activemq.username}"password="${activemq.password}" groups="Admins,everyone"/>--#禁用<authenticationuser username="mcollective"password="Secret" groups="Mcollective,admins,everyone"/>#配置通信的账号及密码</users> </simpleAuthenticationPlugin>... ..<authorizationPlugin>#配置权限, the default is<map> <authorizationMap> <authorizationEntries> <authori Zationentry queue=">" Write="Admins"Read="Admins"admin="Admins"/> <authorizationentry topic=">" Write="Admins"Read="Admins"admin="Admins"/> <authorizationentry topic="mcollective.>" Write="mcollective"Read="mcollective"admin="mcollective"/> <authorizationentry topic="mcollective.>" Write="mcollective"Read="mcollective"admin="mcollective"/> <authorizationentry topic="activemq.advisory.>"Read="everyone" Write="everyone"admin="everyone"/> </authorizationEntries> </authorizationMap> </map> </authorizationPlugin>... ..<transportConnectors> <transportconnector name="Openwire"Uri="tcp://0.0.0.0:61616"/> <transportconnector name="Stomp+nio"Uri="stomp://0.0.0.0:61613"/>#配置通信协议为stomp, listening on port 61613</transportConnectors>
grep 61613 #查看监听端口tcp 0 0 :::61613 :::* LISTEN 33805 /java
5, Mcollective Installation
Install Mcollective-common first, because Yum installation will be ruby1.87 and so on at the same time, so we pass https://yum.puppetlabs.com/el/6.2 Download the corresponding Mcollective-common rpm file.
Then install it by using the following statement
# RPM-IVH mcollective-common-2.5. 2-1. el6.noarch.rpm--nodeps
Then install mcollective-client via gem
Install mcollective-CP /usr/ruby/lib/ruby/gems/2.1. 0/gems/mcollective-client-2.5. 2/bin/mco/usr/bin/
Next is the mcollective control machine and some of the general configuration of the node machine, omitted here, if you are not clear, you can refer to this link: http://www.cnblogs.com/waiwofei/p/3698675.html
After completion is the test of the MCO can be used, MCO Ping can check the 2 node machine online
Ping node72.puppet.net time =115.32 msnode81.puppet.net time =131.42 Ms Ping Statistics----2131.42115.32123.37
# MCO Inventory node72.puppet.netInventory fornode72.puppet.net:Server statistics:version:2.3.2Start Time: the- -- - Ten: A: to+0800Config file:d:\mcollective\etc\server.cfg collectives:mcollective M Ain collective:mcollective Process ID:11040Total Messages:131Messages Passed Filters:131Messages Filtered:0Expired Messages:0Replies Sent:8Total Processor Time:3.338seconds System Time:0.561seconds agents:discovery filesystem puppet registration Rpcutil runcmd Data Plug Ins:agent fstat Puppet resource Configuration Management classes:no Classes Applied Facts:mcollective=1
6. Mcomaster Installation and Configuration
First install Redis,mcomaster will be used to, specific view here: http://www.cnblogs.com/zhuhongbao/archive/2013/06/04/3117997.html
Then download Mcomaster source, Https://github.com/ajf8/mcomaster, extract to/usr/directory
# cd/usr/mcomaster-master/install Install
Installing the necessary gem packages above will take some time to complete and continue
CP config/application.example.yml config/cp config/database.example.yml config/ Database.yml The following is the initialization database, the default is sqlite# rails_env=production rake db:reset and then add to mcomaster Use account # rails_env= Production Script/add_user. SH ' [email protected] ' # rake Assets:precompile
Next we need to do some configuration for mcollective
Performed on the Mcollective control machine
CP mcollective/agent/registration.rb/usr/libexec/mcollective/mcollective/agent/CP mcollective/discovery/redisdiscovery.*/usr/libexec/mcollective/mcollective/discovery//etc/mcollective /= = = 6379 0
Execute on the mcollective node machine
CP mcollective/registration/meta.rb/usr/libexec/mcollective/mcollective/registration/= 63790= =Yes
Now Mcomaster should be able to run.
# Rails Server-e production => booting Thin = Rails 4.0 . 0 application starting in production on Http:// 0.0.0.0:3000 = Run ' Rails Server-h ' for startup options = Ctrl-c to Shutdown server >> Thin Web server (v1 . 5.1 codename straight Razor) >> Maximum connections set to 1024 >> Listening on 0.0 . 0.0 : 3000 , CTRL + C to stop
Open Browser Input http://192.168.11.170:3000