<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,119 +1,120 @@
 class md3000 {
 
-    # kernel sources for PAE kernel require for MPT and MPP drivers. 
-    # minicom required for serial port access to RAID controllers.
-    # lsscsi is a handy tool to have installed on systems with storage arrays.
-    # though lsscsi should be added to kickstart for all servers.
-    # dkms is available from rpmforge so we don't have to worry about Dell's
-    # specific version (its the same as of this writing).
-
-    package { [&quot;kernel-PAE-devel&quot;, &quot;minicom&quot;, &quot;lsscsi&quot;, &quot;dkms&quot;]:
-        ensure =&gt; installed,
-    }
+    case $operatingsystem {
+        centos: {
+            $osver     = &quot;el5&quot;
+            $kerneldev = &quot;kernel-PAE-devel&quot;
+            $provider  = &quot;yum&quot;
+            Package { require =&gt; [Yumrepo[&quot;sans&quot;], Yumrepo[&quot;base&quot;]] }
+        }
+        redhat: {
+            $osver     = &quot;el${redhatrelease}&quot;
+            $kerneldev = [&quot;kernel-devel&quot;, &quot;kernel-smp-devel&quot;]
+            $provider  = &quot;up2date&quot;
+            Package { 
+                require =&gt; File[&quot;/etc/sysconfig/rhn/up2date&quot;]
 
-    file { &quot;/etc/minirc.dfl&quot;:
-        source  =&gt; &quot;puppet:///md3000/minirc.dfl&quot;,
-        require =&gt; Package[&quot;minicom&quot;],
+                # comment out the above and uncomment the following when the
+                # sans-el4 repo is fully functional and ready.
+                #require =&gt; [
+                #    Yumrepo[&quot;sans-el4&quot;],
+                #    File[&quot;/etc/sysconfig/rhn/up2date&quot;] 
+                #]
+            }
+        }
     }
 
-    # Install the storage manager software on the local system.
+    include md3000::devel
+    include md3000::admin
 
-    class sm {
-        package { [&quot;SMagent&quot;, &quot;SMruntime&quot;, &quot;SMutil&quot;, &quot;SMclient&quot;]: 
-            ensure =&gt; installed, 
-        }
+}
 
-        #service { [&quot;SMagent&quot;, &quot;SMmonitor&quot;]:
-        #    ensure =&gt; running,
-        #    enable =&gt; true,
-        #    require =&gt; Package[&quot;SMagent&quot;, &quot;SMruntime&quot;, &quot;SMutil&quot;, &quot;SMclient&quot;],
-        #}
-    }
+class md3000::devel {
 
-    # Portability: change the line below to reflect the host adapter.
-    # This could become a variable set at the node level.
-    class modprobe {
-        append_line { &quot;mpt_modprobe&quot;:
-            file =&gt; &quot;/etc/modprobe.conf&quot;,
-            line =&gt; &quot;alias scsi_hostadapter2 mptspi&quot;,
-        }
-    }
-    # Use this class on systems utilizing the device mapper multipath driver for
-    # multipath support. Do not use on systems utilizing MPP.
-    class multipath {
-        package { [&quot;device-mapper-multipath&quot;, &quot;kpartx&quot;]:
-            ensure =&gt; installed,
-        }
-        file { &quot;/etc/multipath.conf&quot;:
-            source  =&gt; &quot;puppet:///md3000/multipath.conf&quot;,
-            require =&gt; Package[&quot;device-mapper-multipath&quot;],
-        }
-        file { &quot;/etc/lvm/lvm.conf&quot;:
-            source  =&gt; &quot;puppet:///md3000/lvm.conf&quot;,
-            require =&gt; Package[&quot;device-mapper-multipath&quot;],
-        }
-        service { &quot;multipathd&quot;:
-            ensure     =&gt; running,
-            enable     =&gt; true,
-            hasrestart =&gt; true,
-            hasstatus  =&gt; true,
-            subscribe  =&gt; File[&quot;/etc/multipath.conf&quot;],
-            require    =&gt; Package[&quot;device-mapper-multipath&quot;],
-        }
+    # Get the appropriate dev packages installed.
+
+    package { $kerneldev:
+        ensure   =&gt; installed,
+        provider =&gt; $provider
     }
+
+    package { &quot;gcc&quot;: ensure =&gt; installed, }
+    
 }
 
-# use this class on systems utilizing MPP RDAC (supported by Dell) for 
-# multipath support.
-# It will make calls to the md3000::mpp::drver define to install required
-# device drivers for the SAS 5/E and MPP RDAC drivers.
+class md3000::admin {
 
-# When upgrading mptlinux and linuxrdac package versions to new releases, be
-# sure to edit the distro-specific statements below.
+    # Install packages to administer the disk array.
 
-class md3000::mpp {
-    case $operatingsystem {
-        redhat: { $osver = &quot;rh${operatingsystemrelease}&quot; }
-        centos: { $osver = &quot;rh5&quot; }
+    # minicom to provide access to the RAID controllers via serial password 
+    # reset cable.
+
+    package { &quot;minicom&quot;: ensure =&gt; installed, }
+
+    file { &quot;/etc/minirc.dfl&quot;: 
+        source  =&gt; &quot;puppet:///md3000/minirc.dfl&quot;,
+        require =&gt; Package[&quot;minicom&quot;],
     }
+    
+    # MD Storage Manager.
 
-    case $osver {
-        rh4: {
-            md3000::mpp::driver { [
-                &quot;mptlinux-3.02.83.12-7dkms&quot;,
-                &quot;linuxrdac-09.01.B6.75-1dkms&quot;
-            ]: 
-                osver =&gt; &quot;$osver&quot;,
-            }
-        }
-        rh5: {
-            md3000::mpp::driver { [
-                &quot;mptlinux-4.00.07.00-2dkms&quot;,
-                &quot;linuxrdac-09.01.C6.06b-1dkms&quot;
-            ]: 
-                osver =&gt; &quot;$osver&quot;,
-            }
-            package { [
-                &quot;sg-3.5.34dell-1dkms&quot;,
-                &quot;libXp-1.0.0-8&quot;
-            ]: 
-                ensure   =&gt; installed, 
-            }
-        }
+    package { [&quot;SMagent&quot;, &quot;SMruntime&quot;, &quot;SMutil&quot;, &quot;SMclient&quot;]:
+        ensure =&gt; installed,
+        provider =&gt; yum,
+        require =&gt; Yumrepo[&quot;sans&quot;],
     }
-} 
 
-# example usage:
-# md3000::mpp::driver { &quot;mptlinux-4.00.07.00-2dkms&quot;: osver =&gt; &quot;rh4&quot;, }
+}
 
-define md3000::mpp::driver ($osver = 'rh5', $ensure = 'present') {
-    package { &quot;${name}&quot;:
-        ensure   =&gt; &quot;${ensure}&quot;,
-        provider =&gt; rpm,
-        require  =&gt; Package[&quot;dkms&quot;],
-        source   =&gt; &quot;http://puppet/pub/md3000/${osver}/${name}.noarch.rpm&quot;,
+# Use this class on systems utilizing the device mapper multipath driver for
+# multipath support. Do not use on systems utilizing MPP.
+class md3000::multipath {
+    package { [&quot;device-mapper-multipath&quot;, &quot;kpartx&quot;]:
+        ensure =&gt; installed,
+    }
+    file { &quot;/etc/multipath.conf&quot;:
+        source  =&gt; &quot;puppet:///md3000/multipath.conf&quot;,
+        require =&gt; Package[&quot;device-mapper-multipath&quot;],
+    }
+    file { &quot;/etc/lvm/lvm.conf&quot;:
+        source  =&gt; &quot;puppet:///md3000/lvm.conf&quot;,
+        require =&gt; Package[&quot;device-mapper-multipath&quot;],
+    }
+    service { &quot;multipathd&quot;:
+        ensure     =&gt; running,
+        enable     =&gt; true,
+        hasrestart =&gt; true,
+        hasstatus  =&gt; true,
+        subscribe  =&gt; File[&quot;/etc/multipath.conf&quot;],
+        require    =&gt; Package[&quot;device-mapper-multipath&quot;],
     }
 }
-# vim modeline - have 'set modeline' and 'syntax on' in your ~/.vimrc.
+
+# md3000::driver defined type installs the proper HBA and multipath drivers
+# for RDAC MPP.
+# 
+# Variables used:
+# $osver: Dell names directories rh#. This may not be needed when the md3000
+#   rpms are available through yum.
+# $ensure: whether to install the drivers. Default is present.
+# $mptlinux: The specific version of the mptlinux package to install.
+# $linuxrdac: The specific version of the linuxrdac package to install.
+# The mptlinux and linuxrdac packages require specific parameters passed to
+# the dkms build and install commands in order to get the modules built for
+# the current running kernel. 
+#
+# Example usage:
+# md3000::driver {
+#   osver =&gt; &quot;rh4&quot;,
+#   mptlinux =&gt; &quot;4.00.07.00-2dkms&quot;,
+#   linuxrdac =&gt; &quot;09.01.C6.06b-1dkms&quot;,
+# }
+
+#define md3000::driver (
+#    $osver = 'rh5', 
+#    $ensure = 'present', 
+#    $mptlinux, $linuxrdac
+#){
+#    
+#}
 # vi:syntax=puppet:filetype=puppet:ts=4:et:
-# EOF</diff>
      <filename>md3000/manifests/init.pp</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0bbbf42e5fbbf9291c840ba3bfc5983067f1b51b</id>
    </parent>
  </parents>
  <author>
    <name>Joshua Timberman</name>
    <email>jtimberman@sans.org</email>
  </author>
  <url>http://github.com/sansnoc/puppet/commit/8b5a3069e8469e319b8a477246f8f06925bc3bba</url>
  <id>8b5a3069e8469e319b8a477246f8f06925bc3bba</id>
  <committed-date>2008-06-18T08:46:57-07:00</committed-date>
  <authored-date>2008-06-18T08:46:57-07:00</authored-date>
  <message>updated md3000</message>
  <tree>0f2ffc8b426c1008cc91fce4da7a721185624d7a</tree>
  <committer>
    <name>Joshua Timberman</name>
    <email>jtimberman@sans.org</email>
  </committer>
</commit>
