Alexandros Kosiaris has submitted this change and it was merged.

Change subject: osm: split and move roles to modules/role/
......................................................................


osm: split and move roles to modules/role/

Split the role classes into one file per class
and move them over to modules/role/ in autoload
layout.

Change-Id: Ic9139ffe76d6aef6431c3a3d8fe773cf4fa8ec61
---
A modules/role/manifests/osm/common.pp
R modules/role/manifests/osm/master.pp
A modules/role/manifests/osm/slave.pp
3 files changed, 55 insertions(+), 58 deletions(-)

Approvals:
  Alexandros Kosiaris: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/role/manifests/osm/common.pp 
b/modules/role/manifests/osm/common.pp
new file mode 100644
index 0000000..51b3983
--- /dev/null
+++ b/modules/role/manifests/osm/common.pp
@@ -0,0 +1,29 @@
+class role::osm::common {
+    include standard
+
+    $datadir = '/srv/postgres/9.1/main'
+
+    file { '/etc/postgresql/9.1/main/tuning.conf':
+        ensure => 'present',
+        owner  => 'root',
+        group  => 'root',
+        mode   => '0444',
+        source => 'puppet:///files/osm/tuning.conf',
+    }
+
+    sysctl::parameters { 'postgres_shmem':
+        values => {
+            # That is derived after tuning postgresql, deriving automatically 
is
+            # not the safest idea yet.
+            'kernel.shmmax' => 8388608000,
+        },
+    }
+
+    ferm::service { 'postgresql':
+        proto  => 'tcp',
+        port   => 5432,
+        srange => '$INTERNAL',
+    }
+
+    ganglia::plugin::python { 'diskstat': }
+}
diff --git a/manifests/role/osm.pp b/modules/role/manifests/osm/master.pp
similarity index 74%
rename from manifests/role/osm.pp
rename to modules/role/manifests/osm/master.pp
index 9dbd557..d874117 100644
--- a/manifests/role/osm.pp
+++ b/modules/role/manifests/osm/master.pp
@@ -1,35 +1,3 @@
-# OSM role classes
-
-class role::osm::common {
-    include standard
-
-    $datadir = '/srv/postgres/9.1/main'
-
-    file { '/etc/postgresql/9.1/main/tuning.conf':
-        ensure => 'present',
-        owner  => 'root',
-        group  => 'root',
-        mode   => '0444',
-        source => 'puppet:///files/osm/tuning.conf',
-    }
-
-    sysctl::parameters { 'postgres_shmem':
-        values => {
-            # That is derived after tuning postgresql, deriving automatically 
is
-            # not the safest idea yet.
-            'kernel.shmmax' => 8388608000,
-        },
-    }
-
-    ferm::service { 'postgresql':
-        proto  => 'tcp',
-        port   => 5432,
-        srange => '$INTERNAL',
-    }
-
-    ganglia::plugin::python { 'diskstat': }
-}
-
 class role::osm::master {
     include role::osm::common
     include postgresql::postgis
@@ -172,29 +140,3 @@
     }
 }
 
-class role::osm::slave {
-    include role::osm::common
-    include postgresql::postgis
-    include passwords::osm
-    include base::firewall
-    # Note: This is here to illustrate the fact that the slave is expected to
-    # have the same dbs as the master.
-    #postgresql::spatialdb { 'gis': }
-
-    system::role { 'role::osm::slave':
-        ensure      => 'present',
-        description => 'openstreetmaps db slave',
-    }
-
-    class {'postgresql::slave':
-        master_server    => $osm_master,
-        replication_pass => $passwords::osm::replication_pass,
-        includes         => 'tuning.conf',
-        datadir          => $role::osm::common::datadir,
-    }
-
-    class { 'postgresql::ganglia':
-        pgstats_user => $passwords::osm::ganglia_user,
-        pgstats_pass => $passwords::osm::ganglia_pass,
-    }
-}
diff --git a/modules/role/manifests/osm/slave.pp 
b/modules/role/manifests/osm/slave.pp
new file mode 100644
index 0000000..bc70ec8
--- /dev/null
+++ b/modules/role/manifests/osm/slave.pp
@@ -0,0 +1,26 @@
+class role::osm::slave {
+    include role::osm::common
+    include postgresql::postgis
+    include passwords::osm
+    include base::firewall
+    # Note: This is here to illustrate the fact that the slave is expected to
+    # have the same dbs as the master.
+    #postgresql::spatialdb { 'gis': }
+
+    system::role { 'role::osm::slave':
+        ensure      => 'present',
+        description => 'openstreetmaps db slave',
+    }
+
+    class {'postgresql::slave':
+        master_server    => $osm_master,
+        replication_pass => $passwords::osm::replication_pass,
+        includes         => 'tuning.conf',
+        datadir          => $role::osm::common::datadir,
+    }
+
+    class { 'postgresql::ganglia':
+        pgstats_user => $passwords::osm::ganglia_user,
+        pgstats_pass => $passwords::osm::ganglia_pass,
+    }
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/260936
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9139ffe76d6aef6431c3a3d8fe773cf4fa8ec61
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to