Mcollective architecture 2-mcollective + MQ architecture deployment

Source: Internet
Author: User
Tags publish subscribe stomp xml parser rabbitmq

Zero-basic learning puppet automated configuration management documents

1 mcollective Introduction

Mcollective is a framework for server orchestration and parallel execution systems. First, mcollective is a system management solution that provides programmable control over Server clusters. At this point, it features similar functions: func, fabric and Capistrano.

Second, the design of mcollective breaks the path of a central storage-based system and a tool like SSH, and is no longer obsessed with the SSH for loop. It uses modern tools such as publish subscribe middleware and a modern concept of discovering network resources in real time through the target data (meta data) instead of the Host Name (hostnames. Provides a scalable and rapid parallel execution environment.

The mcollective tool is a command line interface, but it can communicate with thousands of application instances, and the transmission speed is amazing. Regardless of the location of the deployed instance, the communication can be transmitted at line speed, using a push information system similar to multi-channel transmission. The mcollective tool does not have a visual user interface. You can only retrieve the instances to be applied. Puppet dashboard provides this function.

2. install and configure rabbitmq2.1 to install and configure rabbitmq

2.1.1 install rabbitmq

[[Email protected] RPMs] # Yum install Erlang # rabbitmq depends on the Erlang language, about 65 Erlang dependency packages need to be installed [[[email protected] RPMs] # Yum install rabbitmq-server [[email protected] RPMs] # ll/usr/lib/rabbitmq/lib /rabbitmq_server-3.1.5/plugins/# The stomp plug-in has been installed by default, older versions need to download and install-RW-r -- 1 Root 242999 Aug 24 amqp_client-3.1.5.ez-rw-r -- r -- 1 Root 85847 Aug 24 rabbitmq_stomp-3.1.5.ez...

2.1.2 start rabbitmq-Server

[[Email protected] RPMs] #/etc/rc. d/init. d/rabbitmq-Server start # Start the rabbitmq service starting rabbitmq-server: successrabbitmq-server. [[email protected] RPMs] #/etc/rc. d/init. d/rabbitmq-server status # view the rabbitmq status of node [email protected]... [{pid, 43198}, {running_applications, [{rabbit, "rabbitmq", "3.1.5" },{ mnesia, "mnesia CXC 138 12", "4.5 "}, {OS _mon, "CPO CXC 138 46", "2.2.7" },{ xmerl, "XML Parser", "1.2.10" },{ SASL, "SASL CXC 138 11 ", "2.1.10" },{ stdlib, "ERTs CXC 138 10", "1.17.5" },{ kernel, "ERTs CXC 138 10", "2.14.5"}] },{ OS, {UNIX, Linux },{ erlang_version, "Erlang r14b04 (erts-5.8.5) [Source] [64-bit] [RQ: 1] [async-threads: 30] [kernel-Poll: True] \ n "}, {memory, [{total, 27101856}, {connection_procs, 2648}, {queue_procs, 5296}, {plugins, 0 },{ other_proc, 9182320 },{ mnesia, 57456 },{ mgmt_db, 0 },{ msg_index, 21848 },{ other_ets, 765504 },{ binary, 3296 }, {code, 14419185 },{ atom, 1354457 },{ other_system, 1289846}] },{ vm_memory_high_watermark, 0.4 },{ vm_memory_limit, 838362726 },{ disk_free_limit, 1000000000 }, {disk_free, 15992676352}, {file_descriptors, [{total_limit, 924}, {total_used, 3}, {sockets_limit, 829}, {sockets_used, 1}]}, {processes, [{limit, 1048576 },{ used, 122}] },{ run_queue, 0 },{ uptime, 4}]... done. [[email protected] RPMs] # netstat-NLP | grep beam # The default listening port is 5672tcp 0 0.0.0.0: 44422 0.0.0.0: * Listen 43198/beam TCP 0: 5672:: * Listen 43198/Beam

2.1.3 configure rabbitmq

2.1.3.1 load the amqp_client and rabbit_stomp plug-ins

[[Email protected] sbin] # ln-S/usr/lib/rabbitmq/lib/rabbitmq_server-3.1.5/sbin/rabbitmq-plugins/usr/sbin/rabbitmq-plugins # CREATE Command rabbitmq- soft connection of plugins [[email protected] sbin] # ln-S/usr/lib/rabbitmq/lib/rabbitmq_server-3.1.5/sbin/rabbitmq-ENV/usr/sbin/rabbitmq-env # create command rabbitmq-env soft connection [[email protected] sbin] # rabbitmq-plugins enable rabbitmq_stomp # enable the rabbitmq_stomp plug-in the following plugins have been enabled: amqp_client rabbitmq_stompplugin configuration has changed. restart rabbitmq for changes to take effect. [[email protected] sbin] #/etc/rc. d/init. d/rabbitmq-server restartrestarting rabbitmq-server: successrabbitmq-server. [[email protected] rabbitmq] # tailf/var/log/rabbitmq/Rabbit \ @ puppetserver. log # You can see from the log that the stomp plug-in has been loaded successfully = info report ===3-oct-2013: 20: 25: 18 === started stomp TCP listener on [:]: 61613 = info report ===3-oct-2013: 20: 25: 18 === server startup complete; 2 plugins started. * amqp_client * rabbitmq_stomp
  • 2.1.3.2 create the rabbitmq. config configuration file and modify the listening port to 61613.

    [[Email protected] RPMs] # Vim/etc/rabbitmq. config [

    {Stomp, [{tcp_listeners, [61613]} # Set connector to stomp and listen to port 61613

    ]. [[Email protected] RPMs] #/etc/rc. d/init. d/rabbitmq-server restart restarting rabbitmq-server: Success rabbitmq-server. [[email protected] RPMs] # netstat-NLP | grep beam # The default listening port is 61613 TCP 0 0 0.0.0.0: 56532 0.0.0.0:Listen 1906/beam. SMP
    TCP 0 0 ::: 61613 :::
    Listen 1906/beam. SMP
    TCP 0 0: 5672: * Listen 1906/beam. SMP

2.1.3.3 Delete the default account guest, create an account "mcollective" for mcollective, set the password to "secret", and set permissions.

[[Email protected] RPMs] # rabbitmqctl delete_user guestdeleting user "guest "...... done. [[email protected] RPMs] # rabbitmqctl add_user mcollective secretcreating user "mcollective "...... done. [[email protected] RPMs] # rabbitmqctl set_permissions-P "/" mcollective ". *"". *"". * "setting permissions for user" mcollective "in vhost "/"...... done. [[email protected] sbin] # rabbitmqctl list_users # view the listing users of the listener... mcollective []... done.

Note:Rabbitmq has a default Guest Account, which has all permissions on message queues by default. We recommend that you delete this account for security reasons.

For more configuration details, see http://www.rabbitmq.com/admin-guide.html

For more configuration details, see: http://docs.puppetlabs.com/mcollective/reference/plugins/connector_rabbitmq.html

3. install and configure mcollective3.1 to install mcollective

3.1.1 install the mcollective client on the test end

[[Email protected] RPMs] # Yum install mcollective-common mcollective-Client # dependency package rubygem-Stomp

3.1.2 install the mcollective server on the node

[[Email protected] ~] # Yum install mcollective-common # dependency on rubygem-Stomp, rubygems, and Ruby packages
3.2 configure mcollective

3.2.1 configure the mcollective client on the test end

[[Email protected] RPMs] # Vim/etc/mcollective/client. export topicprefix =/topic/main_collective = mcollectivecollectives = mcollectivelibdir =/usr/libexec/mcollectivelogger_type = consoleloglevel = warn # pluginssecurityprovider = pskplugin. PSK = a36cd839414370e10fd281b8a38a4f48 # mcollective communication sharing key, consistent with the mcollective Server Connector = stomp # communication protocol plugin. stomp. host = 192.168.100.110 # middleware address plugin. stomp. port = 61613 # middleware listening port plugin. stomp. user = mcollective # middleware communication account plugin. stomp. password = Secret # middleware communication password # factsfactsource = yamlplugin. yaml =/etc/mcollective/facts. yaml

3.2.2 configure the mcollective server on the node

[[Email protected] RPMs] # Vim/etc/mcollective/server. CFG topicprefix =/topic/main_collective = mcollectivecollectives = mcollectivelibdir =/usr/libexec/mcollective # logfile where plugins are stored =/var/log/mcollective. logloglevel = infodaemonize = 1 # pluginssecurityprovider = pskplugin. PSK = a36cd839414370e10fd281b8a38a4f48 # mcollective communication sharing key, consistent with the mcollective client connector = stomp # communication protocol plugin. stomp. host = 1 92.16100.110 # middleware address plugin. stomp. port = 61613 # middleware listening port plugin. stomp. user = mcollective # middleware communication account plugin. stomp. password = Secret # middleware communication password # factsfactsource = yamlplugin. yaml =/etc/mcollective/facts. yaml [[email protected] ~] #/Etc/rc. d/init. d/mcollective startstarting mcollective: [OK] [[email protected] ~] # Chkconfig mcollective on [[email protected] ~] #
3.3 test the communication between mcollective and Middleware
[[Email protected] RPMs] # MCO Ping # Check all surviving nodes agent2.kisspuppet.com time = 119.98 msagent1.kisspuppet.com time = 159.31 Ms ---- Ping statistics ---- 2 Replies MAX: 159.31 min: 119.98 AVG: 139.64 [[email protected] RPMs] # MCO findagent1.kisspuppet.comagent2.kisspuppet.com
Return to the main directory for communication:

Public Account: puppet2014You can search and join, or scan the following QR code to join

650) This. width = 650; "src =" http://kisspuppet.com/img/weixin.jpg "alt =" Public Account "/> Public Account

QQ chat group: 296934942

650) This. width = 650; "src =" http://kisspuppet.com/img/contact1.jpg "/>


This article is from the "www.kisspuppet.com" blog, please be sure to keep this source http://dreamfire.blog.51cto.com/418026/1566372

Mcollective architecture 2-mcollective + MQ architecture deployment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.