Gehel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345861 )

Change subject: osm - remove dead code
......................................................................

osm - remove dead code

osm::planet_import had an empty implementation, it is now removed. We can
recreate it if we really want to manage import of OSM data with puppet.

Since import is a fairly long operation that is done only during the initial
setup of an OSM database, it might make more sense to have a script running
outside of puppet.

Change-Id: Ib7188f01acfddf047c7881ee1b76760416d61649
---
D modules/osm/manifests/planet_import.pp
D modules/osm/spec/defines/osm_planet_import_spec.rb
M modules/role/manifests/osm/master.pp
3 files changed, 0 insertions(+), 47 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/61/345861/1

diff --git a/modules/osm/manifests/planet_import.pp 
b/modules/osm/manifests/planet_import.pp
deleted file mode 100644
index 5ce9710..0000000
--- a/modules/osm/manifests/planet_import.pp
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# Definition: osm::planet_import
-#
-# This definition provides a way to load planet_osm in a gis enabled db
-# You must have downloaded the pbf first and placed it in a configurable place
-#
-# Parameters:
-#
-# Actions:
-#   load a planet.osm
-#
-# Requires:
-#   Class['postgresql::postgis']
-#   define['postgresql::spatialdb']
-#
-# Sample Usage:
-#  osm::planet_import { 'mydb': input_pbf_file => '/myfile.pbf' }
-#
-define osm::planet_import(
-    $input_pbf_file,
-    ) {
-
-    # Check if our db tables exist
-    $tables_exist="/usr/bin/psql -d ${name} --tuples-only -c \'SELECT 
table_name FROM information_schema.tables;\'|/bin/grep \'planet_osm\'"
-}
diff --git a/modules/osm/spec/defines/osm_planet_import_spec.rb 
b/modules/osm/spec/defines/osm_planet_import_spec.rb
deleted file mode 100644
index 87a7304..0000000
--- a/modules/osm/spec/defines/osm_planet_import_spec.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-require 'spec_helper'
-
-describe 'osm::planet_import', :type => :define do
-    let(:title) { 'somedb' }
-    let(:facts) { {
-        :memoryfree => '1000 MB',
-        }
-    }
-    let(:params) { {
-        :input_pbf_file => '/nonexistent',
-        }
-    }
-    context 'with ensure present' do
-        it { should contain_exec('load_900913-somedb') }
-        it { should contain_exec('load_planet_osm-somedb') }
-    end
-end
diff --git a/modules/role/manifests/osm/master.pp 
b/modules/role/manifests/osm/master.pp
index 74d1b4c..9eba61f 100644
--- a/modules/role/manifests/osm/master.pp
+++ b/modules/role/manifests/osm/master.pp
@@ -48,11 +48,6 @@
 
     # Create the spatialdb
     postgresql::spatialdb { 'gis': }
-    # Import planet.osm
-    osm::planet_import { 'gis':
-        input_pbf_file => '/srv/labsdb/planet-latest-osm.pbf',
-        require        => Postgresql::Spatialdb['gis']
-    }
     osm::planet_sync { 'gis':
         pg_password => hiera('osm::postgresql_osmupdater_pass'),
         period      => 'day',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7188f01acfddf047c7881ee1b76760416d61649
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Gehel <guillaume.leder...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to