Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Mcollective introduction

Talk in the Melbourne infrastructure coders meetup of June. Introduction to orchestration concept and mcollective.

  • Soyez le premier à commenter

Mcollective introduction

  1. 1. Infrastructure CodersMcollective: An introduction to the marionette. Melbourne 06-06-2012
  2. 2. Javier Turégano#devops @setoide#opensource#it-management
  3. 3. DisclaimerNot mcollective Ninja
  4. 4. Why do we need orchestration?
  5. 5. Example architecture Balancer Webapp Webapp Webapp Bdd
  6. 6. Use case: Add one webapp server Deploy Provision Apply config Last version new node as webserver Of App Add to Grant access Start LoadBalance to DB webserver r Activate In Prod! monitoring
  7. 7. Use case: Deploy new version Update Provision 1 Db schema New app Send traffic (addings) server Update Replace Test Db schema App servers (removals) In Prod!
  8. 8. Some options available Func Fabric Capistrano mcollective
  9. 9. Marionete Colective mcollective is a framework to build serverorchestration or parallel job execution systems Created by R.I. Pienaar
  10. 10. Is it better than an SSH loop?Asynchronous/Event drivenScalableRIP Hostnames – use facts, classes.Modular (security, middleware, agents)Auto discoveryDe-centralized inventory
  11. 11. Architecture
  12. 12. Install middleware# apt-get install rabbitmq# rabbitmqctl add_user mcollective marionette# rabbitmqctl set_user_tags mcollective administrator# rabbitmqctl set_permissions -p / mcollective ".*" ".*" ".*"
  13. 13. Install mcollectiveIn your servers:# sudo apt-get install mcollectiveIn your admnistrators machines:# sudo apt-get install mcollective-client
  14. 14. Configure mcollectivetopicprefix = /topic/main_collective = mcollectivecollectives = mcollectivelibdir = /usr/share/mcollective/pluginslogfile = /var/log/mcollective.logloglevel = infodaemonize = 0# Pluginssecurityprovider = pskplugin.psk = unsetconnector = stompplugin.stomp.host= masterplugin.stomp.port= 6163plugin.stomp.user= mcollectiveplugin.stomp.password= marionette# Factsfactsource = facter
  15. 15. Advanced config Some interesting options:loglevel=debug#factsource = facterfactsource = yamlplugin.yaml = /etc/mcollective/facts.yamlclassesfile = /var/lib/puppet/state/classes.txt
  16. 16. Puppet modulesPuppet modules available. For RHEL: puppetlabs/rabbitmq puppetlabs/mcollective
  17. 17. DEMO TIME!
  18. 18. Finding nodesTargeting nodes using facts and classes:# mc-ping# mc-find-hosts -F virtual=virtualbox# mc-find-hosts -F “memoryfree>100M”# mc-find-hosts -C mcollective -F operatingsystem="Ubuntu"
  19. 19. InventoryPowerful distributed inventory system:# mc-facts virtual# mc-facts processorcount# mc-inventory box01
  20. 20. Plugins You can get plugins from:http://projects.puppetlabs.com/projects/mcollective-plugins/wiki Facts-facter Filemgr Iptables Package Process Puppetd Service
  21. 21. Using the filemgr plugin# mco rpc filemgr status file=/tmp/filemgr
  22. 22. Using the iptables plugin# mco iptables block 192.168.0.0 -C base -vNode01 # iptables -L -n -v
  23. 23. Using the package plugin# mco package status vim-puppet -C base -v# mco package uninstall vim-puppet -C base -v
  24. 24. Executing puppet# mco puppetd status -C baseEdit puppet base class# mco puppetd runonce 1 -v -C baseCheck output in /var/log/syslog
  25. 25. RIPHosnames QUESTIONS?
  26. 26. Images http://www.flickr.com/photos/ag2r/3783369226/http://www.flickr.com/photos/31348155@N03/5584078173/http://www.flickr.com/photos/61927538@N00/205992050/http://www.flickr.com/photos/safari_vacation/5842069535

×