10 Things I Wish I'd Known When I Started Using Puppet

Download 10 Things I Wish I'd Known When I Started Using Puppet

Post on 13-Apr-2017

190 views

Category:

Software

0 download

Embed Size (px)

TRANSCRIPT

<p>PowerPoint Presentation</p> <p>10 ThingsI Wish Id Known When I Started Using PuppetPaul Anderson paul.anderson@puppet.com</p> <p>% facter paulAlliteration =&gt; Affirmative }</p> <p>Top500 =&gt; 7 systems,SME =&gt; [ HPC, Supercomputing ],</p> <p>Puppet_employee =&gt; 9 months,Puppet_user =&gt; 2 years,Consultant =&gt; 10 years,{ Admin =&gt; 21 years,</p> <p>1. Puppet Projects, POCs and Pilots get Pressed into Production</p> <p>Plan for Production</p> <p>Theres a balance here: Think about version control, workflow, best practices, hiera, etc. Implement what will be useful in the near term. Think about the medium-term workflow, and plan for successBut Dont get too hung up on the long term such as immediately scaling to 10ks of nodes (https://docs.puppet.com/pe/latest/install_system_requirements.html#for-large-environment-installations)4</p> <p>2. Puppet Code is PowerfulWith great power comes great responsibility- Uncle Ben Parker</p> <p>With Puppet You Get:Beware the siren call of the exec resource!6Desired State ModelFact-based Configuration ManagementSystem State Information</p> <p>Reporting &amp; Audit Trails</p> <p>Catalog IdempotencyConsistent Additive Improvement</p> <p>3. No Obfuscated Puppet CodeBrilliant Puppet code is easy to read, not indecipherableDont get stuck maintaining your codebase forever</p> <p>4. Start with focus on timeFree yourself up to tackle bigger challengesCONFIDENTIAL IF NOT, DELETE THIS LINE</p> <p>Quick ROIFree up timeBuild Trust</p> <p>(Then comes Oracle, Websphere, etc.)</p> <p>5. Start with what you knowDont learn puppet at the same time youre learning new tech</p> <p>12</p> <p>case $equus {</p> <p>horse: { include puppet }</p> <p>zebra: { include admin }</p> <p>} </p> <p>6. Use Abstraction WellArchitect your codebase so it scales and is maintainable14</p> <p>Roles and ProfilesServer = $$$Role ModuleProfile ModuleComponent ModuleClassResources</p> <p>7. Facts Steer the Catalog(and sometimes the other way around)16</p> <p>Facts Steer the Catalog</p> <p>Facts Steer the CatalogAgent (Facts)Master (Catalog)Custom facts:java_version =&gt; 1.7.0_60if versioncmp($java_version, 1.8.0) &lt; 0 {include java_updater}class java_updater {installers, execs, purges, hardening, etc.}</p> <p>8. Put a Version on it!</p> <p>Put a Version on it!</p> <p>Check everything into VCSWork with PackagesUse r10k with Control Repo and Env.Tarballs jordansissel/fpmWindows good ol choco?</p> <p>Clear, predictable workflowAdd process/people to scale</p> <p>Promotes Transparency and Trust</p> <p>9. Organizational Change is Difficult21</p> <p>22</p> <p>Theres no better way to overpower a trickle of doubt than with a flood of naked truth- Frank Underwood</p> <p>Simulate23</p> <p>Communicate</p> <p>Enable</p> <p>10. Youre not alone!The community and Puppet team have your back!CONFIDENTIAL IF NOT, DELETE THIS LINE</p> <p>Look left, look right, 3/3 of you are interested in Puppet Ask.puppet.comLearn.puppet.com (self-paced training)Forge.puppet.com#puppet on freenodehttps://www.youtube.com/user/PuppetLabsInc@puppetizeVoxpupuli.orghttps://groups.google.com/forum/#!forum/puppet-usershttps://puppetcommunity.slack.com/</p> <p>Questions?26</p> <p>root@localhost:/etc/sysctl.d# facter networking.interfaces.eth0{ bindings =&gt; [ { address =&gt; "10.0.2.15", netmask =&gt; "255.255.255.0", network =&gt; "10.0.2.0" } ], bindings6 =&gt; [ { } ], dhcp =&gt; "10.0.2.2", ip =&gt; "10.0.2.15",}</p> <p>Facter: networking.interfaces.eth0.ipPP: ${::facts[networking][interfaces][eth0][ip]}ERB: </p> <p>One of the participants asked a question about accessing nested facts. I happened to have this example handy, so I added it to the slides.</p> <p>Note that one can also get the IP by going through bindings, but note the array brackets: facter networking.interfaces.eth0.bindings.0.address28</p>