{"id":1243,"date":"2010-01-02T16:52:27","date_gmt":"2010-01-02T15:52:27","guid":{"rendered":"http:\/\/www.devco.net\/?p=1243"},"modified":"2010-08-17T12:22:59","modified_gmt":"2010-08-17T11:22:59","slug":"mcollective_release_04x","status":"publish","type":"post","link":"https:\/\/www.devco.net\/archives\/2010\/01\/02\/mcollective_release_04x.php","title":{"rendered":"MCollective Release 0.4.x"},"content":{"rendered":"

A few days ago I released Marionette Collective version 0.4.0 and today I released 0.4.1. This release branch introduce a major new feature called Simple RPC.<\/p>\n

In prior releases it took quite a bit of ruby knowledge to write a agent and client. In addition clients all ended up implementing their own little protocols for data exchange. We’ve simplified agents and clients and we’ve created a standard protocol between clients and agents.<\/p>\n

Standard protocols between clients and agents means we have a standard one-size-fits-all client program called mc-rpc<\/em> and it opens the door to writing simple web interfaces that can talk to all compliant agents. We’ve made a test REST <-> Simple RPC<\/a> bridge as an example.<\/p>\n

Writing a client can now be done without all the earlier setup, command line parsing and so forth, it can now be as simple as:<\/p>\n

<\/p>\n

\r\nrequire 'mcollective'\r\n \r\ninclude MCollective::RPC\r\n \r\nmc = rpcclient(\"rpctest\")\r\n\r\nprintrpc mc.echo(:msg => \"Welcome to MCollective Simple RPC\")\r\n\r\nprintrpcstats\r\n<\/pre>\n

<\/code><\/p>\n

This simple client has full discovery, full –help<\/em> output, and takes care of printing results and stats in a uniform way. <\/p>\n

This should make it much easier to write more complex agents, like deployers that interact with packages, firewalls and services all in a single simple script.<\/p>\n

We’ve taken a better approach in presenting the output from clients now, instead of listing 1000 OK<\/em>s on success it will now only print whats failing.<\/p>\n

Output from above client would look something along these lines:<\/p>\n

<\/p>\n

\r\n$ hello.rb\r\n\r\n * [ ============================================================> ] 43 \/ 43\r\n\r\nFinished processing 43 \/ 43 hosts in 392.60 ms\r\n<\/pre>\n

<\/code><\/p>\n

As you can see we have a nice progress indicator that will work for 1 or 1000 nodes, you can still see status of every reply by just running the client in verbose – which will also add more detailed stats at the end.<\/p>\n

Agents are also much easier, here’s a echo agent:<\/p>\n

<\/p>\n

\r\nclass Rpctest\n

<\/code><\/p>\n

You can get full information on this new feature here<\/a>. We've also created a lot of new wiki docs about ActiveMQ setup for use with MCollective and we've recorded a new introduction video here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"

A few days ago I released Marionette Collective version 0.4.0 and today I released 0.4.1. This release branch introduce a major new feature called Simple RPC. In prior releases it took quite a bit of ruby knowledge to write a agent and client. In addition clients all ended up implementing their own little protocols for […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","footnotes":""},"categories":[1],"tags":[121,78],"_links":{"self":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/1243"}],"collection":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/comments?post=1243"}],"version-history":[{"count":6,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/1243\/revisions"}],"predecessor-version":[{"id":1709,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/1243\/revisions\/1709"}],"wp:attachment":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/media?parent=1243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/categories?post=1243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/tags?post=1243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}