Alexandros Kosiaris has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/212786

Change subject: Assign role::postgres::maps to labsdb1004
......................................................................

Assign role::postgres::maps to labsdb1004

Change-Id: I30dccd0c122d5f4b47c42114a561cf1aef82c896
---
M manifests/role/postgres.pp
M manifests/site.pp
2 files changed, 14 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/86/212786/1

diff --git a/manifests/role/postgres.pp b/manifests/role/postgres.pp
index 5dbbae6..6326006 100644
--- a/manifests/role/postgres.pp
+++ b/manifests/role/postgres.pp
@@ -27,7 +27,7 @@
 class role::postgres::master {
     include role::postgres::common
     include ::postgresql::postgis
-    include passwords::postgres
+    include ::passwords::postgres
 
     class { 'postgresql::master':
         includes => 'tuning.conf',
@@ -79,25 +79,12 @@
             attrs    => 'CREATEROLE CREATEDB',
             database => 'template1',
     }
-
-    # TODO: An old user that requested to join early on. Should be migrated to
-    # the new schema
-    postgresql::spatialdb { 'wikimaps_atlas': }
-    postgresql::user { 'planemad@labs':
-            ensure   => 'present',
-            user     => 'planemad',
-            password => $passwords::postgres::planemad_password,
-            cidr     => '10.68.16.0/21',
-            type     => 'host',
-            method   => 'md5',
-            database => 'wikimaps_atlas',
-    }
 }
 
 class role::postgres::slave {
     include role::postgres::common
-    include postgresql::postgis
-    include passwords::postgres
+    include ::postgresql::postgis
+    include ::passwords::postgres
 
     system::role { 'role::postgres::slave':
         ensure      => 'present',
@@ -116,3 +103,13 @@
         pgstats_pass => $passwords::postgres::ganglia_pass,
     }
 }
+
+class role::postgres::maps {
+    include osm
+    postgresql::spatialdb { 'gis': }
+    # Import planet.osm
+    osm::planet_import { 'gis':
+        input_pbf_file => '/srv/labsdb/planet-latest-osm.pbf',
+        require        => Postgresql::Spatialdb['gis']
+    }
+}
diff --git a/manifests/site.pp b/manifests/site.pp
index e6044ec..28018a9 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1277,6 +1277,7 @@
     $postgres_slave_v4 = '10.64.37.9'
 
     include role::postgres::master
+    include role::postgres::maps
     # role labs::db::slave
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I30dccd0c122d5f4b47c42114a561cf1aef82c896
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>

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

Reply via email to