Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Corosync
+
Pacemaker
Corosync
+
Pacemaker
Marian HackMan Marinov <mm@1h.com>
ArchitectureArchitecture
Corosync
Pacemaker Pacemaker Pacemaker
ArchitectureArchitecture
Corosync
Pacemaker Pacemaker Pacemaker
121.12.12.6
ArchitectureArchitecture
Corosync
Pacemaker Pacemaker Pacemaker
121.12.12.6
ArchitectureArchitecture
Corosync
Pacemaker Pacemaker Pacemaker
121.12.12.6
ArchitectureArchitecture
Corosync
Pacemaker Pacemaker Pacemaker
121.12.12.6
ArchitectureArchitecture
Corosync
Pacemaker Pacemaker Pacemaker
121.12.12.6
ArchitectureArchitecture
➢ Corosync
➢ A messaging and membership layer
➢ Quorum information (odd number of nodes)
➢ Pacema...
ManagementManagement
➢ crmsh
➢ Cluster Resource Manager shell
➢ pcs
➢ Pacemaker configuration system
Easy clusterEasy cluster
node tom
node jerry
primitive apache lsb:apache 
op monitor interval=2s target-role=Started
primi...
Config 1Config 1
node luke attributes standby=off
node leia attributes standby=off
node han attributes standby=off
primiti...
Config 2Config 2
clone apache-clone apache meta clone-max=3 
clone-node-max=1 globally-unique=false ordered=false 
interle...
Config 3Config 3
location cli-prefer-cron-migrate cron-migrate 
role=Started inf: luke
colocation dont-put-cron-with-webs ...
ConceptsConcepts
➢ Resource = service
➢ clone = multiple instances of a resource
➢ ms = master-slave instances of a resour...
Types of servicesTypes of services
➢ LSB - linux standard base
➢ can be used for basic stuff
➢ /etc/init.d/resource
➢ OCF ...
LogicLogic
➢ ordering
➢ location constrains
➢ co-location constrains
AlternativesAlternatives
➢ Nomad - www.nomadproject.io
➢ VRRP
➢ vrrpd - github.com/fredbcode/Vrrpd
➢ keepalived - www.keep...
Thank YouThank You
IRC: irc.freenode.net hackman
ICQ: 7556201
Jabber: hackman@jabber.com
E-Mail: mm@1h.com
Upcoming SlideShare
Loading in …5
×

Corosync and Pacemaker

1,066 views

Published on

High-availability with corosync and pacemaker

Published in: Engineering
  • Be the first to comment

Corosync and Pacemaker

  1. 1. Corosync + Pacemaker Corosync + Pacemaker Marian HackMan Marinov <mm@1h.com>
  2. 2. ArchitectureArchitecture Corosync Pacemaker Pacemaker Pacemaker
  3. 3. ArchitectureArchitecture Corosync Pacemaker Pacemaker Pacemaker 121.12.12.6
  4. 4. ArchitectureArchitecture Corosync Pacemaker Pacemaker Pacemaker 121.12.12.6
  5. 5. ArchitectureArchitecture Corosync Pacemaker Pacemaker Pacemaker 121.12.12.6
  6. 6. ArchitectureArchitecture Corosync Pacemaker Pacemaker Pacemaker 121.12.12.6
  7. 7. ArchitectureArchitecture Corosync Pacemaker Pacemaker Pacemaker 121.12.12.6
  8. 8. ArchitectureArchitecture ➢ Corosync ➢ A messaging and membership layer ➢ Quorum information (odd number of nodes) ➢ Pacemaker ➢ Cluster Resource Manager ➢ resource-agents
  9. 9. ManagementManagement ➢ crmsh ➢ Cluster Resource Manager shell ➢ pcs ➢ Pacemaker configuration system
  10. 10. Easy clusterEasy cluster node tom node jerry primitive apache lsb:apache op monitor interval=2s target-role=Started primitive ip-10 IPaddr2 params ip=122.12.31.10 cidr_netmask=24 nic=bond0 On tom: # iptables -t nat -I PREROUTING -j DNAT -d 122.12.31.10 -p tcp --dport 80 --to 10.0.0.1:80 On jerry: # iptables -t nat -I PREROUTING -j DNAT -d 122.12.31.10 -p tcp --dport 80 --to 10.0.0.2:80
  11. 11. Config 1Config 1 node luke attributes standby=off node leia attributes standby=off node han attributes standby=off primitive apache lsb:apache op monitor interval=2s target-role=Started primitive bind lsb:named op monitor interval=5s target-role=Started primitive cron-migrate lsb:cron-migrate op monitor interval=15s target-role=Started meta is-managed=true target-role=Started primitive ip-10 IPaddr2 params ip=122.12.31.10 cidr_netmask=24 nic=bond0 primitive ip-11 IPaddr2 params ip=122.12.31.11 cidr_netmask=24 nic=bond0
  12. 12. Config 2Config 2 clone apache-clone apache meta clone-max=3 clone-node-max=1 globally-unique=false ordered=false interleave=false target-role=Started clone bind-clone bind meta clone-max=3 clone-node-max=1 globally-unique=false ordered=false interleave=false target-role=Started
  13. 13. Config 3Config 3 location cli-prefer-cron-migrate cron-migrate role=Started inf: luke colocation dont-put-cron-with-webs -100: cron-migrate ( ip-10 ip-11 ) property cib-bootstrap-options: dc-version=1.1.10-14.el6_5.2-368c726 cluster-infrastructure="classic openais (with plugin)" expected-quorum-votes=3 stonith-enabled=false is-managed-default=true maintenance-mode=false no-quorum-policy=ignore rsc_defaults rsc-options: resource-stickiness=100
  14. 14. ConceptsConcepts ➢ Resource = service ➢ clone = multiple instances of a resource ➢ ms = master-slave instances of a resource
  15. 15. Types of servicesTypes of services ➢ LSB - linux standard base ➢ can be used for basic stuff ➢ /etc/init.d/resource ➢ OCF - Open Cluster Framework ➢ required for ms resources ➢ /usr/lib/ocf/resource.d/heartbeat
  16. 16. LogicLogic ➢ ordering ➢ location constrains ➢ co-location constrains
  17. 17. AlternativesAlternatives ➢ Nomad - www.nomadproject.io ➢ VRRP ➢ vrrpd - github.com/fredbcode/Vrrpd ➢ keepalived - www.keepalived.org All of the above lack the resource agent scripts and notion for MS and Cloned resources
  18. 18. Thank YouThank You IRC: irc.freenode.net hackman ICQ: 7556201 Jabber: hackman@jabber.com E-Mail: mm@1h.com

×