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.

Diving Into Puppet Providers Development: The Puppet-Corosync Module

1,612 views

Published on

This talk will tell you about Types and Providers development in Puppet. It was given during Puppetcamp Paris 2016 on June 7th 2016.

Published in: Technology
  • Be the first to comment

Diving Into Puppet Providers Development: The Puppet-Corosync Module

  1. 1. Diving Into Providers DevelopmentDiving Into Providers DevelopmentDiving Into Providers DevelopmentDiving Into Providers DevelopmentDiving Into Providers DevelopmentDiving Into Providers DevelopmentDiving Into Providers DevelopmentDiving Into Providers DevelopmentDiving Into Providers DevelopmentDiving Into Providers DevelopmentDiving Into Providers DevelopmentDiving Into Providers DevelopmentDiving Into Providers DevelopmentDiving Into Providers DevelopmentDiving Into Providers DevelopmentDiving Into Providers DevelopmentDiving Into Providers Development The Puppet-Corosync ModuleThe Puppet-Corosync ModuleThe Puppet-Corosync ModuleThe Puppet-Corosync ModuleThe Puppet-Corosync ModuleThe Puppet-Corosync ModuleThe Puppet-Corosync ModuleThe Puppet-Corosync ModuleThe Puppet-Corosync ModuleThe Puppet-Corosync ModuleThe Puppet-Corosync ModuleThe Puppet-Corosync ModuleThe Puppet-Corosync ModuleThe Puppet-Corosync ModuleThe Puppet-Corosync ModuleThe Puppet-Corosync ModuleThe Puppet-Corosync Module Julien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien Pivotto PuppetCamp Paris, June 7th, 2016
  2. 2. $::user$::user$::user$::user$::user$::user$::user$::user$::user$::user$::user$::user$::user$::user$::user$::user$::user Julien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien Pivotto • Open-Source consultant at inuits.euOpen-Source consultant at inuits.euOpen-Source consultant at inuits.euOpen-Source consultant at inuits.euOpen-Source consultant at inuits.euOpen-Source consultant at inuits.euOpen-Source consultant at inuits.euOpen-Source consultant at inuits.euOpen-Source consultant at inuits.euOpen-Source consultant at inuits.euOpen-Source consultant at inuits.euOpen-Source consultant at inuits.euOpen-Source consultant at inuits.euOpen-Source consultant at inuits.euOpen-Source consultant at inuits.euOpen-Source consultant at inuits.euOpen-Source consultant at inuits.eu • Puppet user since 2011 (0.24 -> 4.5)Puppet user since 2011 (0.24 -> 4.5)Puppet user since 2011 (0.24 -> 4.5)Puppet user since 2011 (0.24 -> 4.5)Puppet user since 2011 (0.24 -> 4.5)Puppet user since 2011 (0.24 -> 4.5)Puppet user since 2011 (0.24 -> 4.5)Puppet user since 2011 (0.24 -> 4.5)Puppet user since 2011 (0.24 -> 4.5)Puppet user since 2011 (0.24 -> 4.5)Puppet user since 2011 (0.24 -> 4.5)Puppet user since 2011 (0.24 -> 4.5)Puppet user since 2011 (0.24 -> 4.5)Puppet user since 2011 (0.24 -> 4.5)Puppet user since 2011 (0.24 -> 4.5)Puppet user since 2011 (0.24 -> 4.5)Puppet user since 2011 (0.24 -> 4.5) • Member of the Belgian PUG & voxpupuliMember of the Belgian PUG & voxpupuliMember of the Belgian PUG & voxpupuliMember of the Belgian PUG & voxpupuliMember of the Belgian PUG & voxpupuliMember of the Belgian PUG & voxpupuliMember of the Belgian PUG & voxpupuliMember of the Belgian PUG & voxpupuliMember of the Belgian PUG & voxpupuliMember of the Belgian PUG & voxpupuliMember of the Belgian PUG & voxpupuliMember of the Belgian PUG & voxpupuliMember of the Belgian PUG & voxpupuliMember of the Belgian PUG & voxpupuliMember of the Belgian PUG & voxpupuliMember of the Belgian PUG & voxpupuliMember of the Belgian PUG & voxpupuli • Puppet core & modules contributorPuppet core & modules contributorPuppet core & modules contributorPuppet core & modules contributorPuppet core & modules contributorPuppet core & modules contributorPuppet core & modules contributorPuppet core & modules contributorPuppet core & modules contributorPuppet core & modules contributorPuppet core & modules contributorPuppet core & modules contributorPuppet core & modules contributorPuppet core & modules contributorPuppet core & modules contributorPuppet core & modules contributorPuppet core & modules contributor • The Foreman user & contributorThe Foreman user & contributorThe Foreman user & contributorThe Foreman user & contributorThe Foreman user & contributorThe Foreman user & contributorThe Foreman user & contributorThe Foreman user & contributorThe Foreman user & contributorThe Foreman user & contributorThe Foreman user & contributorThe Foreman user & contributorThe Foreman user & contributorThe Foreman user & contributorThe Foreman user & contributorThe Foreman user & contributorThe Foreman user & contributor • @roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie on irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/github
  3. 3. inuits.eu
  4. 4. Puppet Types & ProvidersPuppet Types & ProvidersPuppet Types & ProvidersPuppet Types & ProvidersPuppet Types & ProvidersPuppet Types & ProvidersPuppet Types & ProvidersPuppet Types & ProvidersPuppet Types & ProvidersPuppet Types & ProvidersPuppet Types & ProvidersPuppet Types & ProvidersPuppet Types & ProvidersPuppet Types & ProvidersPuppet Types & ProvidersPuppet Types & ProvidersPuppet Types & Providers Licensed under a Creative Commons Attribution 2.0 License https://www.flickr.com/photos/mseckington/3445427966
  5. 5. Puppet DSL is declarativePuppet DSL is declarativePuppet DSL is declarativePuppet DSL is declarativePuppet DSL is declarativePuppet DSL is declarativePuppet DSL is declarativePuppet DSL is declarativePuppet DSL is declarativePuppet DSL is declarativePuppet DSL is declarativePuppet DSL is declarativePuppet DSL is declarativePuppet DSL is declarativePuppet DSL is declarativePuppet DSL is declarativePuppet DSL is declarative package { 'nginx': ensure => present, }
  6. 6. AbstractionAbstractionAbstractionAbstractionAbstractionAbstractionAbstractionAbstractionAbstractionAbstractionAbstractionAbstractionAbstractionAbstractionAbstractionAbstractionAbstraction • Puppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSL • …describes resources…describes resources…describes resources…describes resources…describes resources…describes resources…describes resources…describes resources…describes resources…describes resources…describes resources…describes resources…describes resources…describes resources…describes resources…describes resources…describes resources • …defined by types…defined by types…defined by types…defined by types…defined by types…defined by types…defined by types…defined by types…defined by types…defined by types…defined by types…defined by types…defined by types…defined by types…defined by types…defined by types…defined by types • …implemented by providers…implemented by providers…implemented by providers…implemented by providers…implemented by providers…implemented by providers…implemented by providers…implemented by providers…implemented by providers…implemented by providers…implemented by providers…implemented by providers…implemented by providers…implemented by providers…implemented by providers…implemented by providers…implemented by providers
  7. 7. Puppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSL package { 'nginx': ensure => present, }
  8. 8. Puppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSLPuppet DSL package { 'nginx': ensure => present, provider => 'gem', }
  9. 9. ClusterlabsClusterlabsClusterlabsClusterlabsClusterlabsClusterlabsClusterlabsClusterlabsClusterlabsClusterlabsClusterlabsClusterlabsClusterlabsClusterlabsClusterlabsClusterlabsClusterlabs Licensed under a Creative Commons Attribution 2.0 License https://www.flickr.com/photos/blondinrikard/8455288325
  10. 10. Clusterlabs suiteClusterlabs suiteClusterlabs suiteClusterlabs suiteClusterlabs suiteClusterlabs suiteClusterlabs suiteClusterlabs suiteClusterlabs suiteClusterlabs suiteClusterlabs suiteClusterlabs suiteClusterlabs suiteClusterlabs suiteClusterlabs suiteClusterlabs suiteClusterlabs suite • High-Availability toolsHigh-Availability toolsHigh-Availability toolsHigh-Availability toolsHigh-Availability toolsHigh-Availability toolsHigh-Availability toolsHigh-Availability toolsHigh-Availability toolsHigh-Availability toolsHigh-Availability toolsHigh-Availability toolsHigh-Availability toolsHigh-Availability toolsHigh-Availability toolsHigh-Availability toolsHigh-Availability tools • Manage services, ensure availabilityManage services, ensure availabilityManage services, ensure availabilityManage services, ensure availabilityManage services, ensure availabilityManage services, ensure availabilityManage services, ensure availabilityManage services, ensure availabilityManage services, ensure availabilityManage services, ensure availabilityManage services, ensure availabilityManage services, ensure availabilityManage services, ensure availabilityManage services, ensure availabilityManage services, ensure availabilityManage services, ensure availabilityManage services, ensure availability • Decides where services runDecides where services runDecides where services runDecides where services runDecides where services runDecides where services runDecides where services runDecides where services runDecides where services runDecides where services runDecides where services runDecides where services runDecides where services runDecides where services runDecides where services runDecides where services runDecides where services run • Manages Virtual IP'sManages Virtual IP'sManages Virtual IP'sManages Virtual IP'sManages Virtual IP'sManages Virtual IP'sManages Virtual IP'sManages Virtual IP'sManages Virtual IP'sManages Virtual IP'sManages Virtual IP'sManages Virtual IP'sManages Virtual IP'sManages Virtual IP'sManages Virtual IP'sManages Virtual IP'sManages Virtual IP's
  11. 11. Clusterlabs componentsClusterlabs componentsClusterlabs componentsClusterlabs componentsClusterlabs componentsClusterlabs componentsClusterlabs componentsClusterlabs componentsClusterlabs componentsClusterlabs componentsClusterlabs componentsClusterlabs componentsClusterlabs componentsClusterlabs componentsClusterlabs componentsClusterlabs componentsClusterlabs components • Resource Agents: manipulate servicesResource Agents: manipulate servicesResource Agents: manipulate servicesResource Agents: manipulate servicesResource Agents: manipulate servicesResource Agents: manipulate servicesResource Agents: manipulate servicesResource Agents: manipulate servicesResource Agents: manipulate servicesResource Agents: manipulate servicesResource Agents: manipulate servicesResource Agents: manipulate servicesResource Agents: manipulate servicesResource Agents: manipulate servicesResource Agents: manipulate servicesResource Agents: manipulate servicesResource Agents: manipulate services Start, StopStart, StopStart, StopStart, StopStart, StopStart, StopStart, StopStart, StopStart, StopStart, StopStart, StopStart, StopStart, StopStart, StopStart, StopStart, StopStart, Stop MonitorMonitorMonitorMonitorMonitorMonitorMonitorMonitorMonitorMonitorMonitorMonitorMonitorMonitorMonitorMonitorMonitor Promote, DemotePromote, DemotePromote, DemotePromote, DemotePromote, DemotePromote, DemotePromote, DemotePromote, DemotePromote, DemotePromote, DemotePromote, DemotePromote, DemotePromote, DemotePromote, DemotePromote, DemotePromote, DemotePromote, Demote • Corosync: cross-nodes communicationCorosync: cross-nodes communicationCorosync: cross-nodes communicationCorosync: cross-nodes communicationCorosync: cross-nodes communicationCorosync: cross-nodes communicationCorosync: cross-nodes communicationCorosync: cross-nodes communicationCorosync: cross-nodes communicationCorosync: cross-nodes communicationCorosync: cross-nodes communicationCorosync: cross-nodes communicationCorosync: cross-nodes communicationCorosync: cross-nodes communicationCorosync: cross-nodes communicationCorosync: cross-nodes communicationCorosync: cross-nodes communication • Pacemaker: Coordinator, taking decisionsPacemaker: Coordinator, taking decisionsPacemaker: Coordinator, taking decisionsPacemaker: Coordinator, taking decisionsPacemaker: Coordinator, taking decisionsPacemaker: Coordinator, taking decisionsPacemaker: Coordinator, taking decisionsPacemaker: Coordinator, taking decisionsPacemaker: Coordinator, taking decisionsPacemaker: Coordinator, taking decisionsPacemaker: Coordinator, taking decisionsPacemaker: Coordinator, taking decisionsPacemaker: Coordinator, taking decisionsPacemaker: Coordinator, taking decisionsPacemaker: Coordinator, taking decisionsPacemaker: Coordinator, taking decisionsPacemaker: Coordinator, taking decisions Who runsWho runsWho runsWho runsWho runsWho runsWho runsWho runsWho runsWho runsWho runsWho runsWho runsWho runsWho runsWho runsWho runs WhereWhereWhereWhereWhereWhereWhereWhereWhereWhereWhereWhereWhereWhereWhereWhereWhere Who is masterWho is masterWho is masterWho is masterWho is masterWho is masterWho is masterWho is masterWho is masterWho is masterWho is masterWho is masterWho is masterWho is masterWho is masterWho is masterWho is master ……………………………………………
  12. 12. http://clusterlabs.org/img/Deploy.20121116.png
  13. 13. Inside a clusterInside a clusterInside a clusterInside a clusterInside a clusterInside a clusterInside a clusterInside a clusterInside a clusterInside a clusterInside a clusterInside a clusterInside a clusterInside a clusterInside a clusterInside a clusterInside a cluster • Primitives: Floating IP, ServicePrimitives: Floating IP, ServicePrimitives: Floating IP, ServicePrimitives: Floating IP, ServicePrimitives: Floating IP, ServicePrimitives: Floating IP, ServicePrimitives: Floating IP, ServicePrimitives: Floating IP, ServicePrimitives: Floating IP, ServicePrimitives: Floating IP, ServicePrimitives: Floating IP, ServicePrimitives: Floating IP, ServicePrimitives: Floating IP, ServicePrimitives: Floating IP, ServicePrimitives: Floating IP, ServicePrimitives: Floating IP, ServicePrimitives: Floating IP, Service • Location Rules: Where should they runLocation Rules: Where should they runLocation Rules: Where should they runLocation Rules: Where should they runLocation Rules: Where should they runLocation Rules: Where should they runLocation Rules: Where should they runLocation Rules: Where should they runLocation Rules: Where should they runLocation Rules: Where should they runLocation Rules: Where should they runLocation Rules: Where should they runLocation Rules: Where should they runLocation Rules: Where should they runLocation Rules: Where should they runLocation Rules: Where should they runLocation Rules: Where should they run • Colocation Rules: Who runs with who?Colocation Rules: Who runs with who?Colocation Rules: Who runs with who?Colocation Rules: Who runs with who?Colocation Rules: Who runs with who?Colocation Rules: Who runs with who?Colocation Rules: Who runs with who?Colocation Rules: Who runs with who?Colocation Rules: Who runs with who?Colocation Rules: Who runs with who?Colocation Rules: Who runs with who?Colocation Rules: Who runs with who?Colocation Rules: Who runs with who?Colocation Rules: Who runs with who?Colocation Rules: Who runs with who?Colocation Rules: Who runs with who?Colocation Rules: Who runs with who? • Order rules: Who runs before who?Order rules: Who runs before who?Order rules: Who runs before who?Order rules: Who runs before who?Order rules: Who runs before who?Order rules: Who runs before who?Order rules: Who runs before who?Order rules: Who runs before who?Order rules: Who runs before who?Order rules: Who runs before who?Order rules: Who runs before who?Order rules: Who runs before who?Order rules: Who runs before who?Order rules: Who runs before who?Order rules: Who runs before who?Order rules: Who runs before who?Order rules: Who runs before who? • ……………………………………………
  14. 14. http://puppetlabs.com
  15. 15. Puppetizing a clusterPuppetizing a clusterPuppetizing a clusterPuppetizing a clusterPuppetizing a clusterPuppetizing a clusterPuppetizing a clusterPuppetizing a clusterPuppetizing a clusterPuppetizing a clusterPuppetizing a clusterPuppetizing a clusterPuppetizing a clusterPuppetizing a clusterPuppetizing a clusterPuppetizing a clusterPuppetizing a cluster • Ensures managed services config syncEnsures managed services config syncEnsures managed services config syncEnsures managed services config syncEnsures managed services config syncEnsures managed services config syncEnsures managed services config syncEnsures managed services config syncEnsures managed services config syncEnsures managed services config syncEnsures managed services config syncEnsures managed services config syncEnsures managed services config syncEnsures managed services config syncEnsures managed services config syncEnsures managed services config syncEnsures managed services config sync • Ensures cluster configuration is consistentEnsures cluster configuration is consistentEnsures cluster configuration is consistentEnsures cluster configuration is consistentEnsures cluster configuration is consistentEnsures cluster configuration is consistentEnsures cluster configuration is consistentEnsures cluster configuration is consistentEnsures cluster configuration is consistentEnsures cluster configuration is consistentEnsures cluster configuration is consistentEnsures cluster configuration is consistentEnsures cluster configuration is consistentEnsures cluster configuration is consistentEnsures cluster configuration is consistentEnsures cluster configuration is consistentEnsures cluster configuration is consistent • Increase confidence in updatesIncrease confidence in updatesIncrease confidence in updatesIncrease confidence in updatesIncrease confidence in updatesIncrease confidence in updatesIncrease confidence in updatesIncrease confidence in updatesIncrease confidence in updatesIncrease confidence in updatesIncrease confidence in updatesIncrease confidence in updatesIncrease confidence in updatesIncrease confidence in updatesIncrease confidence in updatesIncrease confidence in updatesIncrease confidence in updates • Multiple environemnts: dev, uat, prodMultiple environemnts: dev, uat, prodMultiple environemnts: dev, uat, prodMultiple environemnts: dev, uat, prodMultiple environemnts: dev, uat, prodMultiple environemnts: dev, uat, prodMultiple environemnts: dev, uat, prodMultiple environemnts: dev, uat, prodMultiple environemnts: dev, uat, prodMultiple environemnts: dev, uat, prodMultiple environemnts: dev, uat, prodMultiple environemnts: dev, uat, prodMultiple environemnts: dev, uat, prodMultiple environemnts: dev, uat, prodMultiple environemnts: dev, uat, prodMultiple environemnts: dev, uat, prodMultiple environemnts: dev, uat, prod
  16. 16. The old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old way • Around 2011Around 2011Around 2011Around 2011Around 2011Around 2011Around 2011Around 2011Around 2011Around 2011Around 2011Around 2011Around 2011Around 2011Around 2011Around 2011Around 2011 • Put the whole config in a filePut the whole config in a filePut the whole config in a filePut the whole config in a filePut the whole config in a filePut the whole config in a filePut the whole config in a filePut the whole config in a filePut the whole config in a filePut the whole config in a filePut the whole config in a filePut the whole config in a filePut the whole config in a filePut the whole config in a filePut the whole config in a filePut the whole config in a filePut the whole config in a file • Reload config when file changesReload config when file changesReload config when file changesReload config when file changesReload config when file changesReload config when file changesReload config when file changesReload config when file changesReload config when file changesReload config when file changesReload config when file changesReload config when file changesReload config when file changesReload config when file changesReload config when file changesReload config when file changesReload config when file changes
  17. 17. The old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old wayThe old way file { '/etc/cluster/cib.cfg': ensure => 'file', content => template('ms−cluster/cib−drbd.cfg.erb'), group => '0', mode => '0644', owner => '0', } exec { 'loadcrmconfig': refreshonly => true, command => '/usr/sbin/crm configure load replace / etc/cluster/cib.cfg', subscribe => File['/etc/cluster/cib.cfg'], }
  18. 18. Execs are badExecs are badExecs are badExecs are badExecs are badExecs are badExecs are badExecs are badExecs are badExecs are badExecs are badExecs are badExecs are badExecs are badExecs are badExecs are badExecs are bad • refreshonly + failurerefreshonly + failurerefreshonly + failurerefreshonly + failurerefreshonly + failurerefreshonly + failurerefreshonly + failurerefreshonly + failurerefreshonly + failurerefreshonly + failurerefreshonly + failurerefreshonly + failurerefreshonly + failurerefreshonly + failurerefreshonly + failurerefreshonly + failurerefreshonly + failure • complex onlyifcomplex onlyifcomplex onlyifcomplex onlyifcomplex onlyifcomplex onlyifcomplex onlyifcomplex onlyifcomplex onlyifcomplex onlyifcomplex onlyifcomplex onlyifcomplex onlyifcomplex onlyifcomplex onlyifcomplex onlyifcomplex onlyif • command => template()command => template()command => template()command => template()command => template()command => template()command => template()command => template()command => template()command => template()command => template()command => template()command => template()command => template()command => template()command => template()command => template()
  19. 19. Puppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-Corosync • A "Puppetlabs" moduleA "Puppetlabs" moduleA "Puppetlabs" moduleA "Puppetlabs" moduleA "Puppetlabs" moduleA "Puppetlabs" moduleA "Puppetlabs" moduleA "Puppetlabs" moduleA "Puppetlabs" moduleA "Puppetlabs" moduleA "Puppetlabs" moduleA "Puppetlabs" moduleA "Puppetlabs" moduleA "Puppetlabs" moduleA "Puppetlabs" moduleA "Puppetlabs" moduleA "Puppetlabs" module • Managing the cluster servicesManaging the cluster servicesManaging the cluster servicesManaging the cluster servicesManaging the cluster servicesManaging the cluster servicesManaging the cluster servicesManaging the cluster servicesManaging the cluster servicesManaging the cluster servicesManaging the cluster servicesManaging the cluster servicesManaging the cluster servicesManaging the cluster servicesManaging the cluster servicesManaging the cluster servicesManaging the cluster services CorosyncCorosyncCorosyncCorosyncCorosyncCorosyncCorosyncCorosyncCorosyncCorosyncCorosyncCorosyncCorosyncCorosyncCorosyncCorosyncCorosync PacemakerPacemakerPacemakerPacemakerPacemakerPacemakerPacemakerPacemakerPacemakerPacemakerPacemakerPacemakerPacemakerPacemakerPacemakerPacemakerPacemaker CMANCMANCMANCMANCMANCMANCMANCMANCMANCMANCMANCMANCMANCMANCMANCMANCMAN pcsdpcsdpcsdpcsdpcsdpcsdpcsdpcsdpcsdpcsdpcsdpcsdpcsdpcsdpcsdpcsdpcsd • Good but lack of updates & interestGood but lack of updates & interestGood but lack of updates & interestGood but lack of updates & interestGood but lack of updates & interestGood but lack of updates & interestGood but lack of updates & interestGood but lack of updates & interestGood but lack of updates & interestGood but lack of updates & interestGood but lack of updates & interestGood but lack of updates & interestGood but lack of updates & interestGood but lack of updates & interestGood but lack of updates & interestGood but lack of updates & interestGood but lack of updates & interest • Define good types and providersDefine good types and providersDefine good types and providersDefine good types and providersDefine good types and providersDefine good types and providersDefine good types and providersDefine good types and providersDefine good types and providersDefine good types and providersDefine good types and providersDefine good types and providersDefine good types and providersDefine good types and providersDefine good types and providersDefine good types and providersDefine good types and providers
  20. 20. Puppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-CorosyncPuppetlabs-Corosync • Uses "crm" in the backUses "crm" in the backUses "crm" in the backUses "crm" in the backUses "crm" in the backUses "crm" in the backUses "crm" in the backUses "crm" in the backUses "crm" in the backUses "crm" in the backUses "crm" in the backUses "crm" in the backUses "crm" in the backUses "crm" in the backUses "crm" in the backUses "crm" in the backUses "crm" in the back • crm is a CLI tool to manage the CIBcrm is a CLI tool to manage the CIBcrm is a CLI tool to manage the CIBcrm is a CLI tool to manage the CIBcrm is a CLI tool to manage the CIBcrm is a CLI tool to manage the CIBcrm is a CLI tool to manage the CIBcrm is a CLI tool to manage the CIBcrm is a CLI tool to manage the CIBcrm is a CLI tool to manage the CIBcrm is a CLI tool to manage the CIBcrm is a CLI tool to manage the CIBcrm is a CLI tool to manage the CIBcrm is a CLI tool to manage the CIBcrm is a CLI tool to manage the CIBcrm is a CLI tool to manage the CIBcrm is a CLI tool to manage the CIB • It was used by all the distrosIt was used by all the distrosIt was used by all the distrosIt was used by all the distrosIt was used by all the distrosIt was used by all the distrosIt was used by all the distrosIt was used by all the distrosIt was used by all the distrosIt was used by all the distrosIt was used by all the distrosIt was used by all the distrosIt was used by all the distrosIt was used by all the distrosIt was used by all the distrosIt was used by all the distrosIt was used by all the distros
  21. 21. Puppetlabs-Corosync typesPuppetlabs-Corosync typesPuppetlabs-Corosync typesPuppetlabs-Corosync typesPuppetlabs-Corosync typesPuppetlabs-Corosync typesPuppetlabs-Corosync typesPuppetlabs-Corosync typesPuppetlabs-Corosync typesPuppetlabs-Corosync typesPuppetlabs-Corosync typesPuppetlabs-Corosync typesPuppetlabs-Corosync typesPuppetlabs-Corosync typesPuppetlabs-Corosync typesPuppetlabs-Corosync typesPuppetlabs-Corosync types • cs_primitivecs_primitivecs_primitivecs_primitivecs_primitivecs_primitivecs_primitivecs_primitivecs_primitivecs_primitivecs_primitivecs_primitivecs_primitivecs_primitivecs_primitivecs_primitivecs_primitive • cs_groupcs_groupcs_groupcs_groupcs_groupcs_groupcs_groupcs_groupcs_groupcs_groupcs_groupcs_groupcs_groupcs_groupcs_groupcs_groupcs_group • cs_locationcs_locationcs_locationcs_locationcs_locationcs_locationcs_locationcs_locationcs_locationcs_locationcs_locationcs_locationcs_locationcs_locationcs_locationcs_locationcs_location • cs_colocationcs_colocationcs_colocationcs_colocationcs_colocationcs_colocationcs_colocationcs_colocationcs_colocationcs_colocationcs_colocationcs_colocationcs_colocationcs_colocationcs_colocationcs_colocationcs_colocation • cs_clonecs_clonecs_clonecs_clonecs_clonecs_clonecs_clonecs_clonecs_clonecs_clonecs_clonecs_clonecs_clonecs_clonecs_clonecs_clonecs_clone
  22. 22. The Clusterlabs SchismThe Clusterlabs SchismThe Clusterlabs SchismThe Clusterlabs SchismThe Clusterlabs SchismThe Clusterlabs SchismThe Clusterlabs SchismThe Clusterlabs SchismThe Clusterlabs SchismThe Clusterlabs SchismThe Clusterlabs SchismThe Clusterlabs SchismThe Clusterlabs SchismThe Clusterlabs SchismThe Clusterlabs SchismThe Clusterlabs SchismThe Clusterlabs Schism • 2013: RHEL/CentOS 6.42013: RHEL/CentOS 6.42013: RHEL/CentOS 6.42013: RHEL/CentOS 6.42013: RHEL/CentOS 6.42013: RHEL/CentOS 6.42013: RHEL/CentOS 6.42013: RHEL/CentOS 6.42013: RHEL/CentOS 6.42013: RHEL/CentOS 6.42013: RHEL/CentOS 6.42013: RHEL/CentOS 6.42013: RHEL/CentOS 6.42013: RHEL/CentOS 6.42013: RHEL/CentOS 6.42013: RHEL/CentOS 6.42013: RHEL/CentOS 6.4 • Removes support for crmRemoves support for crmRemoves support for crmRemoves support for crmRemoves support for crmRemoves support for crmRemoves support for crmRemoves support for crmRemoves support for crmRemoves support for crmRemoves support for crmRemoves support for crmRemoves support for crmRemoves support for crmRemoves support for crmRemoves support for crmRemoves support for crm • Implements its own replacement: pcsImplements its own replacement: pcsImplements its own replacement: pcsImplements its own replacement: pcsImplements its own replacement: pcsImplements its own replacement: pcsImplements its own replacement: pcsImplements its own replacement: pcsImplements its own replacement: pcsImplements its own replacement: pcsImplements its own replacement: pcsImplements its own replacement: pcsImplements its own replacement: pcsImplements its own replacement: pcsImplements its own replacement: pcsImplements its own replacement: pcsImplements its own replacement: pcs • crm is not available anymorecrm is not available anymorecrm is not available anymorecrm is not available anymorecrm is not available anymorecrm is not available anymorecrm is not available anymorecrm is not available anymorecrm is not available anymorecrm is not available anymorecrm is not available anymorecrm is not available anymorecrm is not available anymorecrm is not available anymorecrm is not available anymorecrm is not available anymorecrm is not available anymore • pcs is young and buggypcs is young and buggypcs is young and buggypcs is young and buggypcs is young and buggypcs is young and buggypcs is young and buggypcs is young and buggypcs is young and buggypcs is young and buggypcs is young and buggypcs is young and buggypcs is young and buggypcs is young and buggypcs is young and buggypcs is young and buggypcs is young and buggy
  23. 23. 2013-20152013-20152013-20152013-20152013-20152013-20152013-20152013-20152013-20152013-20152013-20152013-20152013-20152013-20152013-20152013-20152013-2015 • Puppetlabs-Corosync evolves slowlyPuppetlabs-Corosync evolves slowlyPuppetlabs-Corosync evolves slowlyPuppetlabs-Corosync evolves slowlyPuppetlabs-Corosync evolves slowlyPuppetlabs-Corosync evolves slowlyPuppetlabs-Corosync evolves slowlyPuppetlabs-Corosync evolves slowlyPuppetlabs-Corosync evolves slowlyPuppetlabs-Corosync evolves slowlyPuppetlabs-Corosync evolves slowlyPuppetlabs-Corosync evolves slowlyPuppetlabs-Corosync evolves slowlyPuppetlabs-Corosync evolves slowlyPuppetlabs-Corosync evolves slowlyPuppetlabs-Corosync evolves slowlyPuppetlabs-Corosync evolves slowly • Joshua Hoblitt strarts implementing pcsJoshua Hoblitt strarts implementing pcsJoshua Hoblitt strarts implementing pcsJoshua Hoblitt strarts implementing pcsJoshua Hoblitt strarts implementing pcsJoshua Hoblitt strarts implementing pcsJoshua Hoblitt strarts implementing pcsJoshua Hoblitt strarts implementing pcsJoshua Hoblitt strarts implementing pcsJoshua Hoblitt strarts implementing pcsJoshua Hoblitt strarts implementing pcsJoshua Hoblitt strarts implementing pcsJoshua Hoblitt strarts implementing pcsJoshua Hoblitt strarts implementing pcsJoshua Hoblitt strarts implementing pcsJoshua Hoblitt strarts implementing pcsJoshua Hoblitt strarts implementing pcs • I continue the implementationI continue the implementationI continue the implementationI continue the implementationI continue the implementationI continue the implementationI continue the implementationI continue the implementationI continue the implementationI continue the implementationI continue the implementationI continue the implementationI continue the implementationI continue the implementationI continue the implementationI continue the implementationI continue the implementation • Puppet Contributor Summit LTPuppet Contributor Summit LTPuppet Contributor Summit LTPuppet Contributor Summit LTPuppet Contributor Summit LTPuppet Contributor Summit LTPuppet Contributor Summit LTPuppet Contributor Summit LTPuppet Contributor Summit LTPuppet Contributor Summit LTPuppet Contributor Summit LTPuppet Contributor Summit LTPuppet Contributor Summit LTPuppet Contributor Summit LTPuppet Contributor Summit LTPuppet Contributor Summit LTPuppet Contributor Summit LT • Please git back the module to communityPlease git back the module to communityPlease git back the module to communityPlease git back the module to communityPlease git back the module to communityPlease git back the module to communityPlease git back the module to communityPlease git back the module to communityPlease git back the module to communityPlease git back the module to communityPlease git back the module to communityPlease git back the module to communityPlease git back the module to communityPlease git back the module to communityPlease git back the module to communityPlease git back the module to communityPlease git back the module to community
  24. 24. 2015 & onwards2015 & onwards2015 & onwards2015 & onwards2015 & onwards2015 & onwards2015 & onwards2015 & onwards2015 & onwards2015 & onwards2015 & onwards2015 & onwards2015 & onwards2015 & onwards2015 & onwards2015 & onwards2015 & onwards • Puppetlabs-corosync is moved to VoxpupuliPuppetlabs-corosync is moved to VoxpupuliPuppetlabs-corosync is moved to VoxpupuliPuppetlabs-corosync is moved to VoxpupuliPuppetlabs-corosync is moved to VoxpupuliPuppetlabs-corosync is moved to VoxpupuliPuppetlabs-corosync is moved to VoxpupuliPuppetlabs-corosync is moved to VoxpupuliPuppetlabs-corosync is moved to VoxpupuliPuppetlabs-corosync is moved to VoxpupuliPuppetlabs-corosync is moved to VoxpupuliPuppetlabs-corosync is moved to VoxpupuliPuppetlabs-corosync is moved to VoxpupuliPuppetlabs-corosync is moved to VoxpupuliPuppetlabs-corosync is moved to VoxpupuliPuppetlabs-corosync is moved to VoxpupuliPuppetlabs-corosync is moved to Voxpupuli • Now it is an active moduleNow it is an active moduleNow it is an active moduleNow it is an active moduleNow it is an active moduleNow it is an active moduleNow it is an active moduleNow it is an active moduleNow it is an active moduleNow it is an active moduleNow it is an active moduleNow it is an active moduleNow it is an active moduleNow it is an active moduleNow it is an active moduleNow it is an active moduleNow it is an active module • With unit and acceptance testsWith unit and acceptance testsWith unit and acceptance testsWith unit and acceptance testsWith unit and acceptance testsWith unit and acceptance testsWith unit and acceptance testsWith unit and acceptance testsWith unit and acceptance testsWith unit and acceptance testsWith unit and acceptance testsWith unit and acceptance testsWith unit and acceptance testsWith unit and acceptance testsWith unit and acceptance testsWith unit and acceptance testsWith unit and acceptance tests • Semantic versioning: current version 1.0.2Semantic versioning: current version 1.0.2Semantic versioning: current version 1.0.2Semantic versioning: current version 1.0.2Semantic versioning: current version 1.0.2Semantic versioning: current version 1.0.2Semantic versioning: current version 1.0.2Semantic versioning: current version 1.0.2Semantic versioning: current version 1.0.2Semantic versioning: current version 1.0.2Semantic versioning: current version 1.0.2Semantic versioning: current version 1.0.2Semantic versioning: current version 1.0.2Semantic versioning: current version 1.0.2Semantic versioning: current version 1.0.2Semantic versioning: current version 1.0.2Semantic versioning: current version 1.0.2 • Pull Requests and Issues reviewed/fixedPull Requests and Issues reviewed/fixedPull Requests and Issues reviewed/fixedPull Requests and Issues reviewed/fixedPull Requests and Issues reviewed/fixedPull Requests and Issues reviewed/fixedPull Requests and Issues reviewed/fixedPull Requests and Issues reviewed/fixedPull Requests and Issues reviewed/fixedPull Requests and Issues reviewed/fixedPull Requests and Issues reviewed/fixedPull Requests and Issues reviewed/fixedPull Requests and Issues reviewed/fixedPull Requests and Issues reviewed/fixedPull Requests and Issues reviewed/fixedPull Requests and Issues reviewed/fixedPull Requests and Issues reviewed/fixed
  25. 25. Types and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and Providers
  26. 26. Types and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and ProvidersTypes and Providers • Built-in types and providersBuilt-in types and providersBuilt-in types and providersBuilt-in types and providersBuilt-in types and providersBuilt-in types and providersBuilt-in types and providersBuilt-in types and providersBuilt-in types and providersBuilt-in types and providersBuilt-in types and providersBuilt-in types and providersBuilt-in types and providersBuilt-in types and providersBuilt-in types and providersBuilt-in types and providersBuilt-in types and providers User -> ldap, aix, pw, useradd…User -> ldap, aix, pw, useradd…User -> ldap, aix, pw, useradd…User -> ldap, aix, pw, useradd…User -> ldap, aix, pw, useradd…User -> ldap, aix, pw, useradd…User -> ldap, aix, pw, useradd…User -> ldap, aix, pw, useradd…User -> ldap, aix, pw, useradd…User -> ldap, aix, pw, useradd…User -> ldap, aix, pw, useradd…User -> ldap, aix, pw, useradd…User -> ldap, aix, pw, useradd…User -> ldap, aix, pw, useradd…User -> ldap, aix, pw, useradd…User -> ldap, aix, pw, useradd…User -> ldap, aix, pw, useradd… Service -> freebsd, windows, systemd, …Service -> freebsd, windows, systemd, …Service -> freebsd, windows, systemd, …Service -> freebsd, windows, systemd, …Service -> freebsd, windows, systemd, …Service -> freebsd, windows, systemd, …Service -> freebsd, windows, systemd, …Service -> freebsd, windows, systemd, …Service -> freebsd, windows, systemd, …Service -> freebsd, windows, systemd, …Service -> freebsd, windows, systemd, …Service -> freebsd, windows, systemd, …Service -> freebsd, windows, systemd, …Service -> freebsd, windows, systemd, …Service -> freebsd, windows, systemd, …Service -> freebsd, windows, systemd, …Service -> freebsd, windows, systemd, … Package -> yum, msi, pacman, …Package -> yum, msi, pacman, …Package -> yum, msi, pacman, …Package -> yum, msi, pacman, …Package -> yum, msi, pacman, …Package -> yum, msi, pacman, …Package -> yum, msi, pacman, …Package -> yum, msi, pacman, …Package -> yum, msi, pacman, …Package -> yum, msi, pacman, …Package -> yum, msi, pacman, …Package -> yum, msi, pacman, …Package -> yum, msi, pacman, …Package -> yum, msi, pacman, …Package -> yum, msi, pacman, …Package -> yum, msi, pacman, …Package -> yum, msi, pacman, … Stable, proved, evolve with Puppet versionStable, proved, evolve with Puppet versionStable, proved, evolve with Puppet versionStable, proved, evolve with Puppet versionStable, proved, evolve with Puppet versionStable, proved, evolve with Puppet versionStable, proved, evolve with Puppet versionStable, proved, evolve with Puppet versionStable, proved, evolve with Puppet versionStable, proved, evolve with Puppet versionStable, proved, evolve with Puppet versionStable, proved, evolve with Puppet versionStable, proved, evolve with Puppet versionStable, proved, evolve with Puppet versionStable, proved, evolve with Puppet versionStable, proved, evolve with Puppet versionStable, proved, evolve with Puppet version • Custom types and providersCustom types and providersCustom types and providersCustom types and providersCustom types and providersCustom types and providersCustom types and providersCustom types and providersCustom types and providersCustom types and providersCustom types and providersCustom types and providersCustom types and providersCustom types and providersCustom types and providersCustom types and providersCustom types and providers Distributed in modulesDistributed in modulesDistributed in modulesDistributed in modulesDistributed in modulesDistributed in modulesDistributed in modulesDistributed in modulesDistributed in modulesDistributed in modulesDistributed in modulesDistributed in modulesDistributed in modulesDistributed in modulesDistributed in modulesDistributed in modulesDistributed in modules Concat -> concatConcat -> concatConcat -> concatConcat -> concatConcat -> concatConcat -> concatConcat -> concatConcat -> concatConcat -> concatConcat -> concatConcat -> concatConcat -> concatConcat -> concatConcat -> concatConcat -> concatConcat -> concatConcat -> concat Acl -> posixAcl -> posixAcl -> posixAcl -> posixAcl -> posixAcl -> posixAcl -> posixAcl -> posixAcl -> posixAcl -> posixAcl -> posixAcl -> posixAcl -> posixAcl -> posixAcl -> posixAcl -> posixAcl -> posix Cs_primitive -> pcs, crmCs_primitive -> pcs, crmCs_primitive -> pcs, crmCs_primitive -> pcs, crmCs_primitive -> pcs, crmCs_primitive -> pcs, crmCs_primitive -> pcs, crmCs_primitive -> pcs, crmCs_primitive -> pcs, crmCs_primitive -> pcs, crmCs_primitive -> pcs, crmCs_primitive -> pcs, crmCs_primitive -> pcs, crmCs_primitive -> pcs, crmCs_primitive -> pcs, crmCs_primitive -> pcs, crmCs_primitive -> pcs, crm
  27. 27. PluginsyncPluginsyncPluginsyncPluginsyncPluginsyncPluginsyncPluginsyncPluginsyncPluginsyncPluginsyncPluginsyncPluginsyncPluginsyncPluginsyncPluginsyncPluginsyncPluginsync • lib directory of moduleslib directory of moduleslib directory of moduleslib directory of moduleslib directory of moduleslib directory of moduleslib directory of moduleslib directory of moduleslib directory of moduleslib directory of moduleslib directory of moduleslib directory of moduleslib directory of moduleslib directory of moduleslib directory of moduleslib directory of moduleslib directory of modules • lib/puppet/providerlib/puppet/providerlib/puppet/providerlib/puppet/providerlib/puppet/providerlib/puppet/providerlib/puppet/providerlib/puppet/providerlib/puppet/providerlib/puppet/providerlib/puppet/providerlib/puppet/providerlib/puppet/providerlib/puppet/providerlib/puppet/providerlib/puppet/providerlib/puppet/provider • lib/puppet/typelib/puppet/typelib/puppet/typelib/puppet/typelib/puppet/typelib/puppet/typelib/puppet/typelib/puppet/typelib/puppet/typelib/puppet/typelib/puppet/typelib/puppet/typelib/puppet/typelib/puppet/typelib/puppet/typelib/puppet/typelib/puppet/type • can also sync: augeas, facts, …can also sync: augeas, facts, …can also sync: augeas, facts, …can also sync: augeas, facts, …can also sync: augeas, facts, …can also sync: augeas, facts, …can also sync: augeas, facts, …can also sync: augeas, facts, …can also sync: augeas, facts, …can also sync: augeas, facts, …can also sync: augeas, facts, …can also sync: augeas, facts, …can also sync: augeas, facts, …can also sync: augeas, facts, …can also sync: augeas, facts, …can also sync: augeas, facts, …can also sync: augeas, facts, …
  28. 28. TypesTypesTypesTypesTypesTypesTypesTypesTypesTypesTypesTypesTypesTypesTypesTypesTypes
  29. 29. Puppet typePuppet typePuppet typePuppet typePuppet typePuppet typePuppet typePuppet typePuppet typePuppet typePuppet typePuppet typePuppet typePuppet typePuppet typePuppet typePuppet type • A Resource TypeA Resource TypeA Resource TypeA Resource TypeA Resource TypeA Resource TypeA Resource TypeA Resource TypeA Resource TypeA Resource TypeA Resource TypeA Resource TypeA Resource TypeA Resource TypeA Resource TypeA Resource TypeA Resource Type • Describes what you want (not HOW)Describes what you want (not HOW)Describes what you want (not HOW)Describes what you want (not HOW)Describes what you want (not HOW)Describes what you want (not HOW)Describes what you want (not HOW)Describes what you want (not HOW)Describes what you want (not HOW)Describes what you want (not HOW)Describes what you want (not HOW)Describes what you want (not HOW)Describes what you want (not HOW)Describes what you want (not HOW)Describes what you want (not HOW)Describes what you want (not HOW)Describes what you want (not HOW) • Has parameters and propertiesHas parameters and propertiesHas parameters and propertiesHas parameters and propertiesHas parameters and propertiesHas parameters and propertiesHas parameters and propertiesHas parameters and propertiesHas parameters and propertiesHas parameters and propertiesHas parameters and propertiesHas parameters and propertiesHas parameters and propertiesHas parameters and propertiesHas parameters and propertiesHas parameters and propertiesHas parameters and properties • Parameter: only for PuppetizationParameter: only for PuppetizationParameter: only for PuppetizationParameter: only for PuppetizationParameter: only for PuppetizationParameter: only for PuppetizationParameter: only for PuppetizationParameter: only for PuppetizationParameter: only for PuppetizationParameter: only for PuppetizationParameter: only for PuppetizationParameter: only for PuppetizationParameter: only for PuppetizationParameter: only for PuppetizationParameter: only for PuppetizationParameter: only for PuppetizationParameter: only for Puppetization • Property: Something you can checkProperty: Something you can checkProperty: Something you can checkProperty: Something you can checkProperty: Something you can checkProperty: Something you can checkProperty: Something you can checkProperty: Something you can checkProperty: Something you can checkProperty: Something you can checkProperty: Something you can checkProperty: Something you can checkProperty: Something you can checkProperty: Something you can checkProperty: Something you can checkProperty: Something you can checkProperty: Something you can check
  30. 30. cs_primitive.rbcs_primitive.rbcs_primitive.rbcs_primitive.rbcs_primitive.rbcs_primitive.rbcs_primitive.rbcs_primitive.rbcs_primitive.rbcs_primitive.rbcs_primitive.rbcs_primitive.rbcs_primitive.rbcs_primitive.rbcs_primitive.rbcs_primitive.rbcs_primitive.rb Puppet::Type.newtype(:cs_primitive) do @doc = "Type for manipulating Corosync/Pacemaker primitives." ensurable end
  31. 31. namevarnamevarnamevarnamevarnamevarnamevarnamevarnamevarnamevarnamevarnamevarnamevarnamevarnamevarnamevarnamevarnamevar newparam(:name) do desc "Name identifier of primitive." isnamevar end
  32. 32. Simple parameterSimple parameterSimple parameterSimple parameterSimple parameterSimple parameterSimple parameterSimple parameterSimple parameterSimple parameterSimple parameterSimple parameterSimple parameterSimple parameterSimple parameterSimple parameterSimple parameter newparam(:cib) do desc "Name of the shadow CIB this primitive should be created in." end
  33. 33. Simple PropertySimple PropertySimple PropertySimple PropertySimple PropertySimple PropertySimple PropertySimple PropertySimple PropertySimple PropertySimple PropertySimple PropertySimple PropertySimple PropertySimple PropertySimple PropertySimple Property newproperty(:parameters) do desc "Hash of params for the primitive." end
  34. 34. Pre-defined valuesPre-defined valuesPre-defined valuesPre-defined valuesPre-defined valuesPre-defined valuesPre-defined valuesPre-defined valuesPre-defined valuesPre-defined valuesPre-defined valuesPre-defined valuesPre-defined valuesPre-defined valuesPre-defined valuesPre-defined valuesPre-defined values newproperty(:kind) do desc "Designates the kindness of the rule" newvalues(:Optional , :Mandatory) defaultto :Optional end
  35. 35. newvaluesnewvaluesnewvaluesnewvaluesnewvaluesnewvaluesnewvaluesnewvaluesnewvaluesnewvaluesnewvaluesnewvaluesnewvaluesnewvaluesnewvaluesnewvaluesnewvalues • List of accepted valuesList of accepted valuesList of accepted valuesList of accepted valuesList of accepted valuesList of accepted valuesList of accepted valuesList of accepted valuesList of accepted valuesList of accepted valuesList of accepted valuesList of accepted valuesList of accepted valuesList of accepted valuesList of accepted valuesList of accepted valuesList of accepted values • Any other value will throw an errorAny other value will throw an errorAny other value will throw an errorAny other value will throw an errorAny other value will throw an errorAny other value will throw an errorAny other value will throw an errorAny other value will throw an errorAny other value will throw an errorAny other value will throw an errorAny other value will throw an errorAny other value will throw an errorAny other value will throw an errorAny other value will throw an errorAny other value will throw an errorAny other value will throw an errorAny other value will throw an error • Accept RegexesAccept RegexesAccept RegexesAccept RegexesAccept RegexesAccept RegexesAccept RegexesAccept RegexesAccept RegexesAccept RegexesAccept RegexesAccept RegexesAccept RegexesAccept RegexesAccept RegexesAccept RegexesAccept Regexes • Implies validation checksImplies validation checksImplies validation checksImplies validation checksImplies validation checksImplies validation checksImplies validation checksImplies validation checksImplies validation checksImplies validation checksImplies validation checksImplies validation checksImplies validation checksImplies validation checksImplies validation checksImplies validation checksImplies validation checks
  36. 36. ValidationValidationValidationValidationValidationValidationValidationValidationValidationValidationValidationValidationValidationValidationValidationValidationValidation newproperty(:parameters) do desc "Hash of params for the primitive." validate do |value| raise Puppet::Error , 'Must be a hash.' unless value.is_a? Hash end defaultto Hash.new end
  37. 37. validatevalidatevalidatevalidatevalidatevalidatevalidatevalidatevalidatevalidatevalidatevalidatevalidatevalidatevalidatevalidatevalidate • Function inside a parameter/propertyFunction inside a parameter/propertyFunction inside a parameter/propertyFunction inside a parameter/propertyFunction inside a parameter/propertyFunction inside a parameter/propertyFunction inside a parameter/propertyFunction inside a parameter/propertyFunction inside a parameter/propertyFunction inside a parameter/propertyFunction inside a parameter/propertyFunction inside a parameter/propertyFunction inside a parameter/propertyFunction inside a parameter/propertyFunction inside a parameter/propertyFunction inside a parameter/propertyFunction inside a parameter/property • Cheks that value matches expecationsCheks that value matches expecationsCheks that value matches expecationsCheks that value matches expecationsCheks that value matches expecationsCheks that value matches expecationsCheks that value matches expecationsCheks that value matches expecationsCheks that value matches expecationsCheks that value matches expecationsCheks that value matches expecationsCheks that value matches expecationsCheks that value matches expecationsCheks that value matches expecationsCheks that value matches expecationsCheks that value matches expecationsCheks that value matches expecations • Never trust user inputNever trust user inputNever trust user inputNever trust user inputNever trust user inputNever trust user inputNever trust user inputNever trust user inputNever trust user inputNever trust user inputNever trust user inputNever trust user inputNever trust user inputNever trust user inputNever trust user inputNever trust user inputNever trust user input • Type checkingType checkingType checkingType checkingType checkingType checkingType checkingType checkingType checkingType checkingType checkingType checkingType checkingType checkingType checkingType checkingType checking
  38. 38. mungemungemungemungemungemungemungemungemungemungemungemungemungemungemungemungemunge newproperty(:first) do desc "First Corosync primitive." munge do |value| value = "#{value}:start" unless value. include?(':') value end end
  39. 39. mungemungemungemungemungemungemungemungemungemungemungemungemungemungemungemungemunge • Transform user inputTransform user inputTransform user inputTransform user inputTransform user inputTransform user inputTransform user inputTransform user inputTransform user inputTransform user inputTransform user inputTransform user inputTransform user inputTransform user inputTransform user inputTransform user inputTransform user input • NormalizeNormalizeNormalizeNormalizeNormalizeNormalizeNormalizeNormalizeNormalizeNormalizeNormalizeNormalizeNormalizeNormalizeNormalizeNormalizeNormalize • Can be use for backwards compatibilityCan be use for backwards compatibilityCan be use for backwards compatibilityCan be use for backwards compatibilityCan be use for backwards compatibilityCan be use for backwards compatibilityCan be use for backwards compatibilityCan be use for backwards compatibilityCan be use for backwards compatibilityCan be use for backwards compatibilityCan be use for backwards compatibilityCan be use for backwards compatibilityCan be use for backwards compatibilityCan be use for backwards compatibilityCan be use for backwards compatibilityCan be use for backwards compatibilityCan be use for backwards compatibility
  40. 40. insync?insync?insync?insync?insync?insync?insync?insync?insync?insync?insync?insync?insync?insync?insync?insync?insync? newproperty(:epoch) do def insync?(is) return true if ! @resource.replace? super end end
  41. 41. insync?insync?insync?insync?insync?insync?insync?insync?insync?insync?insync?insync?insync?insync?insync?insync?insync? • Checks if a property is in syncChecks if a property is in syncChecks if a property is in syncChecks if a property is in syncChecks if a property is in syncChecks if a property is in syncChecks if a property is in syncChecks if a property is in syncChecks if a property is in syncChecks if a property is in syncChecks if a property is in syncChecks if a property is in syncChecks if a property is in syncChecks if a property is in syncChecks if a property is in syncChecks if a property is in syncChecks if a property is in sync • If it matches the actual contentIf it matches the actual contentIf it matches the actual contentIf it matches the actual contentIf it matches the actual contentIf it matches the actual contentIf it matches the actual contentIf it matches the actual contentIf it matches the actual contentIf it matches the actual contentIf it matches the actual contentIf it matches the actual contentIf it matches the actual contentIf it matches the actual contentIf it matches the actual contentIf it matches the actual contentIf it matches the actual content
  42. 42. Cosmetic functionsCosmetic functionsCosmetic functionsCosmetic functionsCosmetic functionsCosmetic functionsCosmetic functionsCosmetic functionsCosmetic functionsCosmetic functionsCosmetic functionsCosmetic functionsCosmetic functionsCosmetic functionsCosmetic functionsCosmetic functionsCosmetic functions • change_to_schange_to_schange_to_schange_to_schange_to_schange_to_schange_to_schange_to_schange_to_schange_to_schange_to_schange_to_schange_to_schange_to_schange_to_schange_to_schange_to_s • String used for the report upon changeString used for the report upon changeString used for the report upon changeString used for the report upon changeString used for the report upon changeString used for the report upon changeString used for the report upon changeString used for the report upon changeString used for the report upon changeString used for the report upon changeString used for the report upon changeString used for the report upon changeString used for the report upon changeString used for the report upon changeString used for the report upon changeString used for the report upon changeString used for the report upon change
  43. 43. booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanboolean require 'puppet/parameter/boolean' newparam(:force , :boolean => true, :parent => Puppet::Parameter::Boolean)
  44. 44. autorequiresautorequiresautorequiresautorequiresautorequiresautorequiresautorequiresautorequiresautorequiresautorequiresautorequiresautorequiresautorequiresautorequiresautorequiresautorequiresautorequires autorequire(:cs_shadow) do autos = [] autos << @parameters[:cib].value if @parameters[:cib] autos end autorequire(:service) do %w(corosync pacemaker) end
  45. 45. generate resourcesgenerate resourcesgenerate resourcesgenerate resourcesgenerate resourcesgenerate resourcesgenerate resourcesgenerate resourcesgenerate resourcesgenerate resourcesgenerate resourcesgenerate resourcesgenerate resourcesgenerate resourcesgenerate resourcesgenerate resourcesgenerate resources def generate return [] if self[:autocommit] != true options = { name: @title } [Puppet::Type.type(:cs_commit).new( options)] end
  46. 46. TypesTypesTypesTypesTypesTypesTypesTypesTypesTypesTypesTypesTypesTypesTypesTypesTypes • Types describe itemsTypes describe itemsTypes describe itemsTypes describe itemsTypes describe itemsTypes describe itemsTypes describe itemsTypes describe itemsTypes describe itemsTypes describe itemsTypes describe itemsTypes describe itemsTypes describe itemsTypes describe itemsTypes describe itemsTypes describe itemsTypes describe items • They are the API users useThey are the API users useThey are the API users useThey are the API users useThey are the API users useThey are the API users useThey are the API users useThey are the API users useThey are the API users useThey are the API users useThey are the API users useThey are the API users useThey are the API users useThey are the API users useThey are the API users useThey are the API users useThey are the API users use • They should be completeThey should be completeThey should be completeThey should be completeThey should be completeThey should be completeThey should be completeThey should be completeThey should be completeThey should be completeThey should be completeThey should be completeThey should be completeThey should be completeThey should be completeThey should be completeThey should be complete • No interaction with systemNo interaction with systemNo interaction with systemNo interaction with systemNo interaction with systemNo interaction with systemNo interaction with systemNo interaction with systemNo interaction with systemNo interaction with systemNo interaction with systemNo interaction with systemNo interaction with systemNo interaction with systemNo interaction with systemNo interaction with systemNo interaction with system
  47. 47. ProvidersProvidersProvidersProvidersProvidersProvidersProvidersProvidersProvidersProvidersProvidersProvidersProvidersProvidersProvidersProvidersProviders
  48. 48. ProvidersProvidersProvidersProvidersProvidersProvidersProvidersProvidersProvidersProvidersProvidersProvidersProvidersProvidersProvidersProvidersProviders • Get the state of the resourcesGet the state of the resourcesGet the state of the resourcesGet the state of the resourcesGet the state of the resourcesGet the state of the resourcesGet the state of the resourcesGet the state of the resourcesGet the state of the resourcesGet the state of the resourcesGet the state of the resourcesGet the state of the resourcesGet the state of the resourcesGet the state of the resourcesGet the state of the resourcesGet the state of the resourcesGet the state of the resources • Change the resources to the desired stateChange the resources to the desired stateChange the resources to the desired stateChange the resources to the desired stateChange the resources to the desired stateChange the resources to the desired stateChange the resources to the desired stateChange the resources to the desired stateChange the resources to the desired stateChange the resources to the desired stateChange the resources to the desired stateChange the resources to the desired stateChange the resources to the desired stateChange the resources to the desired stateChange the resources to the desired stateChange the resources to the desired stateChange the resources to the desired state
  49. 49. ProviderProviderProviderProviderProviderProviderProviderProviderProviderProviderProviderProviderProviderProviderProviderProviderProvider Puppet::Type.type(:cs_primitive).provide(: pcs) do desc 'Manage cs_primitives with the pcs command' end
  50. 50. How providers workHow providers workHow providers workHow providers workHow providers workHow providers workHow providers workHow providers workHow providers workHow providers workHow providers workHow providers workHow providers workHow providers workHow providers workHow providers workHow providers work • Fetch information per ressourceFetch information per ressourceFetch information per ressourceFetch information per ressourceFetch information per ressourceFetch information per ressourceFetch information per ressourceFetch information per ressourceFetch information per ressourceFetch information per ressourceFetch information per ressourceFetch information per ressourceFetch information per ressourceFetch information per ressourceFetch information per ressourceFetch information per ressourceFetch information per ressource • Fetch all the resources at onceFetch all the resources at onceFetch all the resources at onceFetch all the resources at onceFetch all the resources at onceFetch all the resources at onceFetch all the resources at onceFetch all the resources at onceFetch all the resources at onceFetch all the resources at onceFetch all the resources at onceFetch all the resources at onceFetch all the resources at onceFetch all the resources at onceFetch all the resources at onceFetch all the resources at onceFetch all the resources at once • One type often have multiple providersOne type often have multiple providersOne type often have multiple providersOne type often have multiple providersOne type often have multiple providersOne type often have multiple providersOne type often have multiple providersOne type often have multiple providersOne type often have multiple providersOne type often have multiple providersOne type often have multiple providersOne type often have multiple providersOne type often have multiple providersOne type often have multiple providersOne type often have multiple providersOne type often have multiple providersOne type often have multiple providers
  51. 51. Pick the right providerPick the right providerPick the right providerPick the right providerPick the right providerPick the right providerPick the right providerPick the right providerPick the right providerPick the right providerPick the right providerPick the right providerPick the right providerPick the right providerPick the right providerPick the right providerPick the right provider • Using installed commandsUsing installed commandsUsing installed commandsUsing installed commandsUsing installed commandsUsing installed commandsUsing installed commandsUsing installed commandsUsing installed commandsUsing installed commandsUsing installed commandsUsing installed commandsUsing installed commandsUsing installed commandsUsing installed commandsUsing installed commandsUsing installed commands • Using factsUsing factsUsing factsUsing factsUsing factsUsing factsUsing factsUsing factsUsing factsUsing factsUsing factsUsing factsUsing factsUsing factsUsing factsUsing factsUsing facts • Explicitely (provider metaparameter)Explicitely (provider metaparameter)Explicitely (provider metaparameter)Explicitely (provider metaparameter)Explicitely (provider metaparameter)Explicitely (provider metaparameter)Explicitely (provider metaparameter)Explicitely (provider metaparameter)Explicitely (provider metaparameter)Explicitely (provider metaparameter)Explicitely (provider metaparameter)Explicitely (provider metaparameter)Explicitely (provider metaparameter)Explicitely (provider metaparameter)Explicitely (provider metaparameter)Explicitely (provider metaparameter)Explicitely (provider metaparameter)
  52. 52. Provider choiceProvider choiceProvider choiceProvider choiceProvider choiceProvider choiceProvider choiceProvider choiceProvider choiceProvider choiceProvider choiceProvider choiceProvider choiceProvider choiceProvider choiceProvider choiceProvider choice commands :cmd => "yum", :rpm => "rpm" if command('rpm') confine :true => begin rpm('−−version') rescue Puppet::ExecutionFailure false else true end end defaultfor :osfamily => :redhat
  53. 53. Explicit providerExplicit providerExplicit providerExplicit providerExplicit providerExplicit providerExplicit providerExplicit providerExplicit providerExplicit providerExplicit providerExplicit providerExplicit providerExplicit providerExplicit providerExplicit providerExplicit provider package { 'nginx': ensure => present, provider => 'gem', }
  54. 54. PrefetchPrefetchPrefetchPrefetchPrefetchPrefetchPrefetchPrefetchPrefetchPrefetchPrefetchPrefetchPrefetchPrefetchPrefetchPrefetchPrefetch • Fetch all resources firstFetch all resources firstFetch all resources firstFetch all resources firstFetch all resources firstFetch all resources firstFetch all resources firstFetch all resources firstFetch all resources firstFetch all resources firstFetch all resources firstFetch all resources firstFetch all resources firstFetch all resources firstFetch all resources firstFetch all resources firstFetch all resources first • Then create/change what is neededThen create/change what is neededThen create/change what is neededThen create/change what is neededThen create/change what is neededThen create/change what is neededThen create/change what is neededThen create/change what is neededThen create/change what is neededThen create/change what is neededThen create/change what is neededThen create/change what is neededThen create/change what is neededThen create/change what is neededThen create/change what is neededThen create/change what is neededThen create/change what is needed • Very efficientVery efficientVery efficientVery efficientVery efficientVery efficientVery efficientVery efficientVery efficientVery efficientVery efficientVery efficientVery efficientVery efficientVery efficientVery efficientVery efficient
  55. 55. prefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetching def self.instances instances = [] cmd = [command(:pcs), 'cluster', 'cib'] raw, = run_command_in_cib(cmd) doc = REXML::Document.new(raw) REXML::XPath.each(doc, '//primitive') do |e| instances << new(element_to_hash(e)) end instances end
  56. 56. prefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetchingprefetching resources { 'cs_primitive': purge => true , noop => true , }
  57. 57. Applying changeApplying changeApplying changeApplying changeApplying changeApplying changeApplying changeApplying changeApplying changeApplying changeApplying changeApplying changeApplying changeApplying changeApplying changeApplying changeApplying change • Per property (def mode=, def content=)Per property (def mode=, def content=)Per property (def mode=, def content=)Per property (def mode=, def content=)Per property (def mode=, def content=)Per property (def mode=, def content=)Per property (def mode=, def content=)Per property (def mode=, def content=)Per property (def mode=, def content=)Per property (def mode=, def content=)Per property (def mode=, def content=)Per property (def mode=, def content=)Per property (def mode=, def content=)Per property (def mode=, def content=)Per property (def mode=, def content=)Per property (def mode=, def content=)Per property (def mode=, def content=) • Once for all (def flush)Once for all (def flush)Once for all (def flush)Once for all (def flush)Once for all (def flush)Once for all (def flush)Once for all (def flush)Once for all (def flush)Once for all (def flush)Once for all (def flush)Once for all (def flush)Once for all (def flush)Once for all (def flush)Once for all (def flush)Once for all (def flush)Once for all (def flush)Once for all (def flush)
  58. 58. set per propertyset per propertyset per propertyset per propertyset per propertyset per propertyset per propertyset per propertyset per propertyset per propertyset per propertyset per propertyset per propertyset per propertyset per propertyset per propertyset per property def mode=(value) File.chmod(value.to_i(8), resource[: path]) end
  59. 59. flushflushflushflushflushflushflushflushflushflushflushflushflushflushflushflushflush mk_resource_methods def flush unless @property_hash.empty? cmd = [command(:pcs), 'property', 'set ', "#{@property_hash[:name]}=#{ @property_hash[:value]}"] run_command_in_cib(cmd) end end
  60. 60. FeaturesFeaturesFeaturesFeaturesFeaturesFeaturesFeaturesFeaturesFeaturesFeaturesFeaturesFeaturesFeaturesFeaturesFeaturesFeaturesFeatures • Not all providers are equalNot all providers are equalNot all providers are equalNot all providers are equalNot all providers are equalNot all providers are equalNot all providers are equalNot all providers are equalNot all providers are equalNot all providers are equalNot all providers are equalNot all providers are equalNot all providers are equalNot all providers are equalNot all providers are equalNot all providers are equalNot all providers are equal • systemd can Mask servicessystemd can Mask servicessystemd can Mask servicessystemd can Mask servicessystemd can Mask servicessystemd can Mask servicessystemd can Mask servicessystemd can Mask servicessystemd can Mask servicessystemd can Mask servicessystemd can Mask servicessystemd can Mask servicessystemd can Mask servicessystemd can Mask servicessystemd can Mask servicessystemd can Mask servicessystemd can Mask services • sysvinit can notsysvinit can notsysvinit can notsysvinit can notsysvinit can notsysvinit can notsysvinit can notsysvinit can notsysvinit can notsysvinit can notsysvinit can notsysvinit can notsysvinit can notsysvinit can notsysvinit can notsysvinit can notsysvinit can not
  61. 61. In the providerIn the providerIn the providerIn the providerIn the providerIn the providerIn the providerIn the providerIn the providerIn the providerIn the providerIn the providerIn the providerIn the providerIn the providerIn the providerIn the provider has_feature :kindness
  62. 62. Check for a featureCheck for a featureCheck for a featureCheck for a featureCheck for a featureCheck for a featureCheck for a featureCheck for a featureCheck for a featureCheck for a featureCheck for a featureCheck for a featureCheck for a featureCheck for a featureCheck for a featureCheck for a featureCheck for a feature def flush unless @property_hash.empty? updated << " kind=#{@property_hash[: kind]}" if feature? :kindness end end
  63. 63. Restrict parameters in typeRestrict parameters in typeRestrict parameters in typeRestrict parameters in typeRestrict parameters in typeRestrict parameters in typeRestrict parameters in typeRestrict parameters in typeRestrict parameters in typeRestrict parameters in typeRestrict parameters in typeRestrict parameters in typeRestrict parameters in typeRestrict parameters in typeRestrict parameters in typeRestrict parameters in typeRestrict parameters in type newproperty(:kind , required_features: : kindness) do desc "How to enforce the constraint." end
  64. 64. TestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTesting Licensed under a Creative Commons Attribution 2.0 License https://www.flickr.com/photos/dahlstroms/3945656390
  65. 65. Testing typesTesting typesTesting typesTesting typesTesting typesTesting typesTesting typesTesting typesTesting typesTesting typesTesting typesTesting typesTesting typesTesting typesTesting typesTesting typesTesting types • Unit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit tests • Test validation, munging, change_to_s, …Test validation, munging, change_to_s, …Test validation, munging, change_to_s, …Test validation, munging, change_to_s, …Test validation, munging, change_to_s, …Test validation, munging, change_to_s, …Test validation, munging, change_to_s, …Test validation, munging, change_to_s, …Test validation, munging, change_to_s, …Test validation, munging, change_to_s, …Test validation, munging, change_to_s, …Test validation, munging, change_to_s, …Test validation, munging, change_to_s, …Test validation, munging, change_to_s, …Test validation, munging, change_to_s, …Test validation, munging, change_to_s, …Test validation, munging, change_to_s, … • Test presence of documentationTest presence of documentationTest presence of documentationTest presence of documentationTest presence of documentationTest presence of documentationTest presence of documentationTest presence of documentationTest presence of documentationTest presence of documentationTest presence of documentationTest presence of documentationTest presence of documentationTest presence of documentationTest presence of documentationTest presence of documentationTest presence of documentation
  66. 66. Testing providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providers • Unit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit testsUnit tests • Test resource methodsTest resource methodsTest resource methodsTest resource methodsTest resource methodsTest resource methodsTest resource methodsTest resource methodsTest resource methodsTest resource methodsTest resource methodsTest resource methodsTest resource methodsTest resource methodsTest resource methodsTest resource methodsTest resource methods • Mock commands to runMock commands to runMock commands to runMock commands to runMock commands to runMock commands to runMock commands to runMock commands to runMock commands to runMock commands to runMock commands to runMock commands to runMock commands to runMock commands to runMock commands to runMock commands to runMock commands to run • Mock a transform from A to BMock a transform from A to BMock a transform from A to BMock a transform from A to BMock a transform from A to BMock a transform from A to BMock a transform from A to BMock a transform from A to BMock a transform from A to BMock a transform from A to BMock a transform from A to BMock a transform from A to BMock a transform from A to BMock a transform from A to BMock a transform from A to BMock a transform from A to BMock a transform from A to B
  67. 67. Testing providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providersTesting providers • Acceptance testsAcceptance testsAcceptance testsAcceptance testsAcceptance testsAcceptance testsAcceptance testsAcceptance testsAcceptance testsAcceptance testsAcceptance testsAcceptance testsAcceptance testsAcceptance testsAcceptance testsAcceptance testsAcceptance tests • BeakerBeakerBeakerBeakerBeakerBeakerBeakerBeakerBeakerBeakerBeakerBeakerBeakerBeakerBeakerBeakerBeaker • Test that resources appliesTest that resources appliesTest that resources appliesTest that resources appliesTest that resources appliesTest that resources appliesTest that resources appliesTest that resources appliesTest that resources appliesTest that resources appliesTest that resources appliesTest that resources appliesTest that resources appliesTest that resources appliesTest that resources appliesTest that resources appliesTest that resources applies • Test the desired stateTest the desired stateTest the desired stateTest the desired stateTest the desired stateTest the desired stateTest the desired stateTest the desired stateTest the desired stateTest the desired stateTest the desired stateTest the desired stateTest the desired stateTest the desired stateTest the desired stateTest the desired stateTest the desired state • Test for indempotencyTest for indempotencyTest for indempotencyTest for indempotencyTest for indempotencyTest for indempotencyTest for indempotencyTest for indempotencyTest for indempotencyTest for indempotencyTest for indempotencyTest for indempotencyTest for indempotencyTest for indempotencyTest for indempotencyTest for indempotencyTest for indempotency • Run on actual OS or containersRun on actual OS or containersRun on actual OS or containersRun on actual OS or containersRun on actual OS or containersRun on actual OS or containersRun on actual OS or containersRun on actual OS or containersRun on actual OS or containersRun on actual OS or containersRun on actual OS or containersRun on actual OS or containersRun on actual OS or containersRun on actual OS or containersRun on actual OS or containersRun on actual OS or containersRun on actual OS or containers
  68. 68. Puppetlabs modulesPuppetlabs modulesPuppetlabs modulesPuppetlabs modulesPuppetlabs modulesPuppetlabs modulesPuppetlabs modulesPuppetlabs modulesPuppetlabs modulesPuppetlabs modulesPuppetlabs modulesPuppetlabs modulesPuppetlabs modulesPuppetlabs modulesPuppetlabs modulesPuppetlabs modulesPuppetlabs modules • Beaker tests implemented on travisBeaker tests implemented on travisBeaker tests implemented on travisBeaker tests implemented on travisBeaker tests implemented on travisBeaker tests implemented on travisBeaker tests implemented on travisBeaker tests implemented on travisBeaker tests implemented on travisBeaker tests implemented on travisBeaker tests implemented on travisBeaker tests implemented on travisBeaker tests implemented on travisBeaker tests implemented on travisBeaker tests implemented on travisBeaker tests implemented on travisBeaker tests implemented on travis • Only for a few OSOnly for a few OSOnly for a few OSOnly for a few OSOnly for a few OSOnly for a few OSOnly for a few OSOnly for a few OSOnly for a few OSOnly for a few OSOnly for a few OSOnly for a few OSOnly for a few OSOnly for a few OSOnly for a few OSOnly for a few OSOnly for a few OS • Uses DockerUses DockerUses DockerUses DockerUses DockerUses DockerUses DockerUses DockerUses DockerUses DockerUses DockerUses DockerUses DockerUses DockerUses DockerUses DockerUses Docker • e.g puppetlabs-apachee.g puppetlabs-apachee.g puppetlabs-apachee.g puppetlabs-apachee.g puppetlabs-apachee.g puppetlabs-apachee.g puppetlabs-apachee.g puppetlabs-apachee.g puppetlabs-apachee.g puppetlabs-apachee.g puppetlabs-apachee.g puppetlabs-apachee.g puppetlabs-apachee.g puppetlabs-apachee.g puppetlabs-apachee.g puppetlabs-apachee.g puppetlabs-apache
  69. 69. Voxpupuli modulesVoxpupuli modulesVoxpupuli modulesVoxpupuli modulesVoxpupuli modulesVoxpupuli modulesVoxpupuli modulesVoxpupuli modulesVoxpupuli modulesVoxpupuli modulesVoxpupuli modulesVoxpupuli modulesVoxpupuli modulesVoxpupuli modulesVoxpupuli modulesVoxpupuli modulesVoxpupuli modules • Beaker tests implemented on hypervisorBeaker tests implemented on hypervisorBeaker tests implemented on hypervisorBeaker tests implemented on hypervisorBeaker tests implemented on hypervisorBeaker tests implemented on hypervisorBeaker tests implemented on hypervisorBeaker tests implemented on hypervisorBeaker tests implemented on hypervisorBeaker tests implemented on hypervisorBeaker tests implemented on hypervisorBeaker tests implemented on hypervisorBeaker tests implemented on hypervisorBeaker tests implemented on hypervisorBeaker tests implemented on hypervisorBeaker tests implemented on hypervisorBeaker tests implemented on hypervisor • Ubuntu 14.04/CentOS 7Ubuntu 14.04/CentOS 7Ubuntu 14.04/CentOS 7Ubuntu 14.04/CentOS 7Ubuntu 14.04/CentOS 7Ubuntu 14.04/CentOS 7Ubuntu 14.04/CentOS 7Ubuntu 14.04/CentOS 7Ubuntu 14.04/CentOS 7Ubuntu 14.04/CentOS 7Ubuntu 14.04/CentOS 7Ubuntu 14.04/CentOS 7Ubuntu 14.04/CentOS 7Ubuntu 14.04/CentOS 7Ubuntu 14.04/CentOS 7Ubuntu 14.04/CentOS 7Ubuntu 14.04/CentOS 7 • Virtual MachineVirtual MachineVirtual MachineVirtual MachineVirtual MachineVirtual MachineVirtual MachineVirtual MachineVirtual MachineVirtual MachineVirtual MachineVirtual MachineVirtual MachineVirtual MachineVirtual MachineVirtual MachineVirtual Machine
  70. 70. Docker vs HypervisorsDocker vs HypervisorsDocker vs HypervisorsDocker vs HypervisorsDocker vs HypervisorsDocker vs HypervisorsDocker vs HypervisorsDocker vs HypervisorsDocker vs HypervisorsDocker vs HypervisorsDocker vs HypervisorsDocker vs HypervisorsDocker vs HypervisorsDocker vs HypervisorsDocker vs HypervisorsDocker vs HypervisorsDocker vs Hypervisors • Docker is Linux-OnlyDocker is Linux-OnlyDocker is Linux-OnlyDocker is Linux-OnlyDocker is Linux-OnlyDocker is Linux-OnlyDocker is Linux-OnlyDocker is Linux-OnlyDocker is Linux-OnlyDocker is Linux-OnlyDocker is Linux-OnlyDocker is Linux-OnlyDocker is Linux-OnlyDocker is Linux-OnlyDocker is Linux-OnlyDocker is Linux-OnlyDocker is Linux-Only • Not an full Operating systemNot an full Operating systemNot an full Operating systemNot an full Operating systemNot an full Operating systemNot an full Operating systemNot an full Operating systemNot an full Operating systemNot an full Operating systemNot an full Operating systemNot an full Operating systemNot an full Operating systemNot an full Operating systemNot an full Operating systemNot an full Operating systemNot an full Operating systemNot an full Operating system • Docker is not an option to test corosyncDocker is not an option to test corosyncDocker is not an option to test corosyncDocker is not an option to test corosyncDocker is not an option to test corosyncDocker is not an option to test corosyncDocker is not an option to test corosyncDocker is not an option to test corosyncDocker is not an option to test corosyncDocker is not an option to test corosyncDocker is not an option to test corosyncDocker is not an option to test corosyncDocker is not an option to test corosyncDocker is not an option to test corosyncDocker is not an option to test corosyncDocker is not an option to test corosyncDocker is not an option to test corosync
  71. 71. How we could improve testsHow we could improve testsHow we could improve testsHow we could improve testsHow we could improve testsHow we could improve testsHow we could improve testsHow we could improve testsHow we could improve testsHow we could improve testsHow we could improve testsHow we could improve testsHow we could improve testsHow we could improve testsHow we could improve testsHow we could improve testsHow we could improve tests • Write more tests, more situationsWrite more tests, more situationsWrite more tests, more situationsWrite more tests, more situationsWrite more tests, more situationsWrite more tests, more situationsWrite more tests, more situationsWrite more tests, more situationsWrite more tests, more situationsWrite more tests, more situationsWrite more tests, more situationsWrite more tests, more situationsWrite more tests, more situationsWrite more tests, more situationsWrite more tests, more situationsWrite more tests, more situationsWrite more tests, more situations • Populate several VM'sPopulate several VM'sPopulate several VM'sPopulate several VM'sPopulate several VM'sPopulate several VM'sPopulate several VM'sPopulate several VM'sPopulate several VM'sPopulate several VM'sPopulate several VM'sPopulate several VM'sPopulate several VM'sPopulate several VM'sPopulate several VM'sPopulate several VM'sPopulate several VM's • Increase range of OSIncrease range of OSIncrease range of OSIncrease range of OSIncrease range of OSIncrease range of OSIncrease range of OSIncrease range of OSIncrease range of OSIncrease range of OSIncrease range of OSIncrease range of OSIncrease range of OSIncrease range of OSIncrease range of OSIncrease range of OSIncrease range of OS
  72. 72. What is difficult?What is difficult?What is difficult?What is difficult?What is difficult?What is difficult?What is difficult?What is difficult?What is difficult?What is difficult?What is difficult?What is difficult?What is difficult?What is difficult?What is difficult?What is difficult?What is difficult?
  73. 73. IdempotenceIdempotenceIdempotenceIdempotenceIdempotenceIdempotenceIdempotenceIdempotenceIdempotenceIdempotenceIdempotenceIdempotenceIdempotenceIdempotenceIdempotenceIdempotenceIdempotence • Make it work the first timeMake it work the first timeMake it work the first timeMake it work the first timeMake it work the first timeMake it work the first timeMake it work the first timeMake it work the first timeMake it work the first timeMake it work the first timeMake it work the first timeMake it work the first timeMake it work the first timeMake it work the first timeMake it work the first timeMake it work the first timeMake it work the first time • Match exactly the realityMatch exactly the realityMatch exactly the realityMatch exactly the realityMatch exactly the realityMatch exactly the realityMatch exactly the realityMatch exactly the realityMatch exactly the realityMatch exactly the realityMatch exactly the realityMatch exactly the realityMatch exactly the realityMatch exactly the realityMatch exactly the realityMatch exactly the realityMatch exactly the reality • From any situation to any situationFrom any situation to any situationFrom any situation to any situationFrom any situation to any situationFrom any situation to any situationFrom any situation to any situationFrom any situation to any situationFrom any situation to any situationFrom any situation to any situationFrom any situation to any situationFrom any situation to any situationFrom any situation to any situationFrom any situation to any situationFrom any situation to any situationFrom any situation to any situationFrom any situation to any situationFrom any situation to any situation
  74. 74. Defining typesDefining typesDefining typesDefining typesDefining typesDefining typesDefining typesDefining typesDefining typesDefining typesDefining typesDefining typesDefining typesDefining typesDefining typesDefining typesDefining types • Parameters/Properties should be obviousParameters/Properties should be obviousParameters/Properties should be obviousParameters/Properties should be obviousParameters/Properties should be obviousParameters/Properties should be obviousParameters/Properties should be obviousParameters/Properties should be obviousParameters/Properties should be obviousParameters/Properties should be obviousParameters/Properties should be obviousParameters/Properties should be obviousParameters/Properties should be obviousParameters/Properties should be obviousParameters/Properties should be obviousParameters/Properties should be obviousParameters/Properties should be obvious • They should not be provider specificThey should not be provider specificThey should not be provider specificThey should not be provider specificThey should not be provider specificThey should not be provider specificThey should not be provider specificThey should not be provider specificThey should not be provider specificThey should not be provider specificThey should not be provider specificThey should not be provider specificThey should not be provider specificThey should not be provider specificThey should not be provider specificThey should not be provider specificThey should not be provider specific • Your types are your API'sYour types are your API'sYour types are your API'sYour types are your API'sYour types are your API'sYour types are your API'sYour types are your API'sYour types are your API'sYour types are your API'sYour types are your API'sYour types are your API'sYour types are your API'sYour types are your API'sYour types are your API'sYour types are your API'sYour types are your API'sYour types are your API's
  75. 75. DocumentationDocumentationDocumentationDocumentationDocumentationDocumentationDocumentationDocumentationDocumentationDocumentationDocumentationDocumentationDocumentationDocumentationDocumentationDocumentationDocumentation • Little documentationLittle documentationLittle documentationLittle documentationLittle documentationLittle documentationLittle documentationLittle documentationLittle documentationLittle documentationLittle documentationLittle documentationLittle documentationLittle documentationLittle documentationLittle documentationLittle documentation • Blog postsBlog postsBlog postsBlog postsBlog postsBlog postsBlog postsBlog postsBlog postsBlog postsBlog postsBlog postsBlog postsBlog postsBlog postsBlog postsBlog posts • A book (2012)A book (2012)A book (2012)A book (2012)A book (2012)A book (2012)A book (2012)A book (2012)A book (2012)A book (2012)A book (2012)A book (2012)A book (2012)A book (2012)A book (2012)A book (2012)A book (2012) • Puppet codebasePuppet codebasePuppet codebasePuppet codebasePuppet codebasePuppet codebasePuppet codebasePuppet codebasePuppet codebasePuppet codebasePuppet codebasePuppet codebasePuppet codebasePuppet codebasePuppet codebasePuppet codebasePuppet codebase
  76. 76. SERVER-94SERVER-94SERVER-94SERVER-94SERVER-94SERVER-94SERVER-94SERVER-94SERVER-94SERVER-94SERVER-94SERVER-94SERVER-94SERVER-94SERVER-94SERVER-94SERVER-94 • Ruby code in lib/ is not isolated per envRuby code in lib/ is not isolated per envRuby code in lib/ is not isolated per envRuby code in lib/ is not isolated per envRuby code in lib/ is not isolated per envRuby code in lib/ is not isolated per envRuby code in lib/ is not isolated per envRuby code in lib/ is not isolated per envRuby code in lib/ is not isolated per envRuby code in lib/ is not isolated per envRuby code in lib/ is not isolated per envRuby code in lib/ is not isolated per envRuby code in lib/ is not isolated per envRuby code in lib/ is not isolated per envRuby code in lib/ is not isolated per envRuby code in lib/ is not isolated per envRuby code in lib/ is not isolated per env • Workaround: use multiple puppetmastersWorkaround: use multiple puppetmastersWorkaround: use multiple puppetmastersWorkaround: use multiple puppetmastersWorkaround: use multiple puppetmastersWorkaround: use multiple puppetmastersWorkaround: use multiple puppetmastersWorkaround: use multiple puppetmastersWorkaround: use multiple puppetmastersWorkaround: use multiple puppetmastersWorkaround: use multiple puppetmastersWorkaround: use multiple puppetmastersWorkaround: use multiple puppetmastersWorkaround: use multiple puppetmastersWorkaround: use multiple puppetmastersWorkaround: use multiple puppetmastersWorkaround: use multiple puppetmasters • Puppetserver (clojure) makes it possiblePuppetserver (clojure) makes it possiblePuppetserver (clojure) makes it possiblePuppetserver (clojure) makes it possiblePuppetserver (clojure) makes it possiblePuppetserver (clojure) makes it possiblePuppetserver (clojure) makes it possiblePuppetserver (clojure) makes it possiblePuppetserver (clojure) makes it possiblePuppetserver (clojure) makes it possiblePuppetserver (clojure) makes it possiblePuppetserver (clojure) makes it possiblePuppetserver (clojure) makes it possiblePuppetserver (clojure) makes it possiblePuppetserver (clojure) makes it possiblePuppetserver (clojure) makes it possiblePuppetserver (clojure) makes it possible
  77. 77. Other examplesOther examplesOther examplesOther examplesOther examplesOther examplesOther examplesOther examplesOther examplesOther examplesOther examplesOther examplesOther examplesOther examplesOther examplesOther examplesOther examples
  78. 78. Types/Providers examplesTypes/Providers examplesTypes/Providers examplesTypes/Providers examplesTypes/Providers examplesTypes/Providers examplesTypes/Providers examplesTypes/Providers examplesTypes/Providers examplesTypes/Providers examplesTypes/Providers examplesTypes/Providers examplesTypes/Providers examplesTypes/Providers examplesTypes/Providers examplesTypes/Providers examplesTypes/Providers examples • dobbymoodge-acl: type and providerdobbymoodge-acl: type and providerdobbymoodge-acl: type and providerdobbymoodge-acl: type and providerdobbymoodge-acl: type and providerdobbymoodge-acl: type and providerdobbymoodge-acl: type and providerdobbymoodge-acl: type and providerdobbymoodge-acl: type and providerdobbymoodge-acl: type and providerdobbymoodge-acl: type and providerdobbymoodge-acl: type and providerdobbymoodge-acl: type and providerdobbymoodge-acl: type and providerdobbymoodge-acl: type and providerdobbymoodge-acl: type and providerdobbymoodge-acl: type and provider • augeasproviders: types and providersaugeasproviders: types and providersaugeasproviders: types and providersaugeasproviders: types and providersaugeasproviders: types and providersaugeasproviders: types and providersaugeasproviders: types and providersaugeasproviders: types and providersaugeasproviders: types and providersaugeasproviders: types and providersaugeasproviders: types and providersaugeasproviders: types and providersaugeasproviders: types and providersaugeasproviders: types and providersaugeasproviders: types and providersaugeasproviders: types and providersaugeasproviders: types and providers • jenkinsci-jenkins: types and providerjenkinsci-jenkins: types and providerjenkinsci-jenkins: types and providerjenkinsci-jenkins: types and providerjenkinsci-jenkins: types and providerjenkinsci-jenkins: types and providerjenkinsci-jenkins: types and providerjenkinsci-jenkins: types and providerjenkinsci-jenkins: types and providerjenkinsci-jenkins: types and providerjenkinsci-jenkins: types and providerjenkinsci-jenkins: types and providerjenkinsci-jenkins: types and providerjenkinsci-jenkins: types and providerjenkinsci-jenkins: types and providerjenkinsci-jenkins: types and providerjenkinsci-jenkins: types and provider • jenkinsci-jenkins: package providerjenkinsci-jenkins: package providerjenkinsci-jenkins: package providerjenkinsci-jenkins: package providerjenkinsci-jenkins: package providerjenkinsci-jenkins: package providerjenkinsci-jenkins: package providerjenkinsci-jenkins: package providerjenkinsci-jenkins: package providerjenkinsci-jenkins: package providerjenkinsci-jenkins: package providerjenkinsci-jenkins: package providerjenkinsci-jenkins: package providerjenkinsci-jenkins: package providerjenkinsci-jenkins: package providerjenkinsci-jenkins: package providerjenkinsci-jenkins: package provider • zabbix, aws, …zabbix, aws, …zabbix, aws, …zabbix, aws, …zabbix, aws, …zabbix, aws, …zabbix, aws, …zabbix, aws, …zabbix, aws, …zabbix, aws, …zabbix, aws, …zabbix, aws, …zabbix, aws, …zabbix, aws, …zabbix, aws, …zabbix, aws, …zabbix, aws, …
  79. 79. Types and providersTypes and providersTypes and providersTypes and providersTypes and providersTypes and providersTypes and providersTypes and providersTypes and providersTypes and providersTypes and providersTypes and providersTypes and providersTypes and providersTypes and providersTypes and providersTypes and providers • Express everythingExpress everythingExpress everythingExpress everythingExpress everythingExpress everythingExpress everythingExpress everythingExpress everythingExpress everythingExpress everythingExpress everythingExpress everythingExpress everythingExpress everythingExpress everythingExpress everything • Integrate with PuppetIntegrate with PuppetIntegrate with PuppetIntegrate with PuppetIntegrate with PuppetIntegrate with PuppetIntegrate with PuppetIntegrate with PuppetIntegrate with PuppetIntegrate with PuppetIntegrate with PuppetIntegrate with PuppetIntegrate with PuppetIntegrate with PuppetIntegrate with PuppetIntegrate with PuppetIntegrate with Puppet • The power is hidden in providersThe power is hidden in providersThe power is hidden in providersThe power is hidden in providersThe power is hidden in providersThe power is hidden in providersThe power is hidden in providersThe power is hidden in providersThe power is hidden in providersThe power is hidden in providersThe power is hidden in providersThe power is hidden in providersThe power is hidden in providersThe power is hidden in providersThe power is hidden in providersThe power is hidden in providersThe power is hidden in providers • Enable KISS for Puppet codersEnable KISS for Puppet codersEnable KISS for Puppet codersEnable KISS for Puppet codersEnable KISS for Puppet codersEnable KISS for Puppet codersEnable KISS for Puppet codersEnable KISS for Puppet codersEnable KISS for Puppet codersEnable KISS for Puppet codersEnable KISS for Puppet codersEnable KISS for Puppet codersEnable KISS for Puppet codersEnable KISS for Puppet codersEnable KISS for Puppet codersEnable KISS for Puppet codersEnable KISS for Puppet coders

×