Commits

Charles McLaughlin committed 75f6781

puppet and stress testing examples

  • Participants
  • Parent commits 04ab667

Comments (0)

Files changed (2)

       </ul>
     </li>
   </ul>
+  <br/>
   <ul>
     <li>Cacti</li>
   </ul>
 <div class="slide">
   <h1>Configuration Management with Puppet</h1>
   <pre>
-    FIXME
+node production-host {
+  include base
+  include autofs::production
+  include nagios::client
+}
+
+node frontend inherits production-host { 
+  include bitbucket-skel::production
+  include nginx
+  include memcached
+  include java
+}
+
+node "bitbucket01.managed.contegix.com" inherits frontend {
+}
+  </pre>
+</div> 
+
+<div class="slide">
+  <h1>Configuration Management with Puppet</h1>
+  <pre>
+class memcached {
+  package { "memcached": ensure => installed }
+
+  service { "memcached":
+    ensure  => running, enable  => true, hasstatus => true,
+    restart => "/etc/init.d/memcached reload",
+    require => Package['memcached']
+  }
+
+  file {
+    "/etc/sysconfig/memcached":
+      owner   => root, group   => root,
+      mode    => 0644, ensure  => file,
+      source  => "puppet:///memcached/memcached",
+      notify  => Service["memcached"]
+  }
+
+  munin::munin-node::plugin { "memcached_bytes":
+      target => "/usr/share/munin/plugins/memcached_"
+  }
+}
+  </pre>
+</div>
+
+<div class="slide">
+  <h1>Configuration Management with Puppet</h1>
+  <pre>
+class nagios {
+...
+  class client {
+  ...
+    @@nagios_host { $fqdn:
+        ensure             => present,
+        alias              => $hostname,
+        address            => $ipaddress,
+        use                => "generic-host",
+        max_check_attempts => 10,
+        contact_groups     => "admins",
+    }
+
+    @@nagios_service {"check_disk_${hostname}":
+      check_command       => "check_nrpe!check_disk",
+      use                 => "generic-service",
+      host_name           => "$fqdn",
+      notification_period => "24x7",
+      service_description => "${hostname}_check_disk",
+    }
+  </pre>
+</div>
+
+<div class="slide">
+  <h1>Configuration Management with Puppet</h1>
+  <h2>This is written to the Nagios config files:</h2>
+  <br/>
+  <pre>
+define host {
+  address                        172.16.10.1
+  max_check_attempts             10
+  contact_groups                 admins
+  host_name                      bitbucket01.managed.contegix.com
+  use                            generic-host
+  alias                          bitbucket01
+}
+
+define service {
+  check_command                  check_nrpe!check_disk
+  host_name                      bitbucket01.managed.contegix.com
+  notification_period            24x7
+  ## --PUPPET_NAME-- (called '_naginator_name' in the manifest)                check_disk_bitbucket01                      
+  use                            generic-service
+  service_description            bitbucket01_check_disk
+}
   </pre>
 </div>
 
 <div class="slide">
   <h1>Stress Testing</h1>
   <h2>I/O</h2>
-  <ul><li>FIXME bonnie++ example</li></ul>
+  <ul>
+    noatime, deadline I/O scheduler
+    <li><pre>bonnie++ -d /tmp -s 64g -u user:group -f -n 0 -r 7687 -b 2</li>
+  </ul>
   <h2>Postgres</h2>
-  <ul><li>FIXME pgbench example</li></ul>
+  <ul>
+    <li>max_connections, shared_mem, effective_cache_size, work_mem, kernel.shmmax</li>
+    <li><pre>pgbench -T seconds -j threads -c clients dbname</li>
+  </ul>
   <h2>Network</h2>
-  <ul><li>Beware of c-states and Broadcom NICs on recent kernels - FIXME link</li></ul>
+  <ul><li>Beware of c-states and Broadcom NICs on recent kernels [<a href="http://lists.us.dell.com/pipermail/linux-poweredge/2011-June/044901.html">1</a>, <a href="http://support.citrix.com/article/CTX127395">2</a>]</li></ul>
 </div>
 
 <div class="slide">

File ui/default/pretty.css

 .slide code {padding: 2px 0.25em; font-weight: bold; color: #533;}
 .slide code.bad, code del {color: red;}
 .slide code.old {color: silver;}
-.slide pre {padding: 0; margin: 0.25em 0 0.5em 0.5em; color: #533; font-size: 90%;}
+.slide pre {padding: 0; margin: 0.25em 0 0.5em 0.5em; color: #533; font-size: 80%;}
 .slide pre code {display: block;}
 .slide ul {margin-left: 0.5%; margin-right: 1%; list-style: none;}
 .slide li {margin-top: 0.1em; margin-right: 0;}