Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Puppet at GitHub: PuppetConf 2013

Puppet at GitHub: PuppetConf 2013

Will Farrington

August 22, 2013
Tweet

More Decks by Will Farrington

Other Decks in Technology

Transcript

  1. " The State of Puppet at GitHub % % %

    % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
  2. " The State of Puppet at GitHub % % %

    % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % 42.5%
  3. " The State of Puppet at GitHub % % %

    % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % now with ops taken out
  4. " The State of Puppet at GitHub 0 100 200

    300 400 2012-08-25 2012-10-20 2012-12-15 2013-02-09 2013-04-06 2013-06-01 2013-07-27 commits on master per week, last 12 months
  5. " The State of Puppet at GitHub 0 1000 2000

    3000 4000 total commits by author past year
  6. " The State of Puppet at GitHub 0 175 350

    525 700 total commits by author past year, except ops
  7. " The State of Puppet at GitHub 0 175 350

    525 700 total commits by authors with >10 commits, past year, except ops
  8. " The State of Puppet at GitHub "yo puppetdb, gimme

    all your nagios::object::* resources so I can update this nagios config"
  9. " The State of Puppet at GitHub "yo puppetdb, gimme

    all the filtergen::rule resources I would realize so I can update this filtergen config"
  10. " The State of Puppet at GitHub as it turns

    out, an api call is faster than running puppet on a host
  11. " The State of Puppet at GitHub "Imagine Puppet Dashboard

    meets Razor and went on a weekend trip to the beach with the Heroku API and drank epic amounts of blue drink"
  12. " The State of Puppet at GitHub aka we reinvented

    our own, smaller version of Foreman
  13. " The State of Puppet at GitHub Create nil =>

    1 Update 1 => 2 Delete 2 => nil
  14. " The State of Puppet at GitHub # /usr/local/sbin/fetch_gpanel_enc \

    fe1.rs.github.com --- parameters: gpanel_cabinet: D20-13 gpanel_enabled: true gpanel_monitored: false
  15. " The State of Puppet at GitHub any variables we

    pass through are prefixed with gpanel_
  16. ( How GitHub Writes Puppet if you aren't using puppet-lint

    to audit your puppet codebase, you are doing it wrong
  17. ( How GitHub Writes Puppet $ git commit -am "can't

    lint this" modules/github/manifests/role/redis.pp: syntax ok modules/github/manifests/role/redis.pp - WARNING: => is not properly aligned on line 118 1 errors found, aborting commit.
  18. ( How GitHub Writes Puppet if you aren't writing tests

    for your puppet code before running it on a server, you are doing it wrong
  19. ( How GitHub Writes Puppet $ git commit -am "tests

    dont pass but whatever lol" 1) Expected redis::server would include class "more_than_a_single_c_thread" 1 failures encountered, aborting commit.
  20. ( How GitHub Writes Puppet node /^github-redis\d+/ { class {

    'github::role::polling_redis': enabled => $::gpanel_enabled, environment => $::gpanel_environment, private_ipv4 => $::ipaddress, } }
  21. ( How GitHub Writes Puppet treat your site classes as

    cascades down to your dist classes
  22. ( How GitHub Writes Puppet class redis::server( # params )

    { class { 'redis::config': ... } -> class { 'redis::package': ... } ~> class { 'redis::service': ... } }
  23. ( How GitHub Writes Puppet class github::redis( # params )

    inherits github::defaults { $memory = $environment ? { 'stg' => '2G', default => $half_memory_gb } class { 'redis::server': ... } }
  24. ( How GitHub Writes Puppet class github::role::polling_redis( # params )

    { class { 'github::redis': # overrides based on specific node } }
  25. ( How GitHub Writes Puppet an erb template that requires

    your class to take 52876423 parameters so you can configure every possible value in my.cnf
  26. ( How GitHub Writes Puppet augeas { 'my.cnf/performance': context =>

    '/files/etc/mysql/my.cnf/mysqld', changes => [ # automatic dump/restore 'set innodb_auto_lru_dump 18000', # innodb "set innodb_buffer_pool_size ${innodb_buffer_pool_size}", 'set innodb_log_file_size 256M', 'set innodb_log_buffer_size 8M', 'set innodb_lazy_drop_table 1', ], require => Percona::Server[$::fqdn] }
  27. ) How GitHub Ships Puppet that's not the same as

    181 nodes not running production
  28. ) How GitHub Ships Puppet Hubot automatically merges the master

    branch before allowing any branch to deploy
  29. ) How GitHub Ships Puppet the list of roles you'd

    never think would touch production puppet webkit developer core git developers core ruby developers svn developers search developer frontend designers windows developers mac developers support enterprise sales
  30. * The Future of Puppet at GitHub upgrading a large,

    old codebase from 2.7 to 3 is really painful
  31. * The Future of Puppet at GitHub aka the story

    of github/shell and the wonders of ssh in a for-loop
  32. * The Future of Puppet at GitHub there are a

    lot of cool things about mcollective
  33. * The Future of Puppet at GitHub I think it

    will be a part of our stack in the future
  34. * The Future of Puppet at GitHub but you can

    still go pretty damn far with bash and ssh
  35. * The Future of Puppet at GitHub waiting for multiple

    runs to converge exported resources is painful