Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: Revert "maps: Add tileratorui service"
......................................................................

Revert "maps: Add tileratorui service"

The tileratorui service is really the tilerator service with a very
small change to allow it to only serve administrative requests. While in
theory the separation between administrative requests only service and
job runner only service makes sense, the fact that this is the only
difference between the two services does not make it really worthy.
Architecturally speaking, this is causing more overhead that it is worth
by adding the burden of one more service while not really removing
anything for the original one, apart from the ability to serve
administrative tasks. If there were more incentives like having the
tilerator service be a job runner without actually listening to
requests, this would be more worthy.
Also revert the tilerator daemonOnly change

This reverts commit e675b56d23260a60697f8bc3634513c1a4fb8075.
and commit 9c60bf386e32c5f01d13fd8a9d6d7b433103ad9e.

Bug: T116062
Change-Id: I353301db22d2493b80274d164a8d7da1b9414ddb
---
M manifests/role/maps.pp
M modules/tilerator/manifests/init.pp
D modules/tilerator/manifests/ui.pp
M modules/tilerator/templates/config.yaml.erb
D modules/tilerator/templates/config_ui.yaml.erb
M templates/maps/grants.cql.erb
M templates/maps/grants.sql.erb
7 files changed, 1 insertion(+), 53 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/97/249697/1

diff --git a/manifests/role/maps.pp b/manifests/role/maps.pp
index f2d2930..c043df5 100644
--- a/manifests/role/maps.pp
+++ b/manifests/role/maps.pp
@@ -69,7 +69,6 @@
     # Grants
     $kartotherian_pass = hiera('maps::postgresql_kartotherian_pass')
     $tilerator_pass = hiera('maps::postgresql_tilerator_pass')
-    $tileratorui_pass = hiera('maps::postgresql_tileratorui_pass')
     $osmimporter_pass = hiera('maps::postgresql_osmimporter_pass')
     $osmupdater_pass = hiera('maps::postgresql_osmupdater_pass')
     file { '/usr/local/bin/maps-grants.sql':
@@ -81,7 +80,6 @@
     # Cassandra grants
     $cassandra_kartotherian_pass = hiera('maps::cassandra_kartotherian_pass')
     $cassandra_tilerator_pass = hiera('maps::cassandra_tilerator_pass')
-    $cassandra_tileratorui_pass = hiera('maps::cassandra_tileratorui_pass')
     file { '/usr/local/bin/maps-grants.cql':
         owner   => 'root',
         group   => 'root',
diff --git a/modules/tilerator/manifests/init.pp 
b/modules/tilerator/manifests/init.pp
index 4da5db2..2718d3b 100644
--- a/modules/tilerator/manifests/init.pp
+++ b/modules/tilerator/manifests/init.pp
@@ -6,8 +6,7 @@
 # accomodate future tilerator needs that are not suited for the service module
 # classes as well as conform to a de-facto standard of having a module for 
every
 # service
-class tilerator {
-    include tilerator::ui
+class tilerator() {
 
     $cassandra_tilerator_user = 'tilerator'
     $cassandra_tilerator_pass = hiera('maps::cassandra_tilerator_pass')
diff --git a/modules/tilerator/manifests/ui.pp 
b/modules/tilerator/manifests/ui.pp
deleted file mode 100644
index f76f890..0000000
--- a/modules/tilerator/manifests/ui.pp
+++ /dev/null
@@ -1,23 +0,0 @@
-# Class: tilerator::ui
-#
-# This class installs and configures tilerator::ui
-#
-# While only being a thin wrapper around service::node, this class exists to
-# accomodate future tileratorui needs that are not suited for the service 
module
-# classes as well as conform to a de-facto standard of having a module for 
every
-# service
-class tilerator::ui {
-    $cassandra_tileratorui_user = 'tileratorui'
-    $cassandra_tileratorui_pass = hiera('maps::cassandra_tileratorui_pass')
-    $pgsql_tileratorui_user = 'tileratorui'
-    $pgsql_tileratorui_pass = hiera('maps::postgresql_tileratorui_pass')
-
-    # NOTE: tileratorui does not have an LVS service associated with it. It is
-    # only meant to be used through an SSH tunnel
-    service::node { 'tileratorui':
-        port       => 6535,
-        config     => template('tilerator/config_ui.yaml.erb'),
-        no_workers => 0, # 0 on purpose to only have one instance running
-        repo       => 'tilerator/deploy',
-    }
-}
diff --git a/modules/tilerator/templates/config.yaml.erb 
b/modules/tilerator/templates/config.yaml.erb
index 85bfc83..9e5e7bc 100644
--- a/modules/tilerator/templates/config.yaml.erb
+++ b/modules/tilerator/templates/config.yaml.erb
@@ -9,6 +9,3 @@
   cassandra-pswd: '<%= @cassandra_tilerator_pass %>'
 
 sources: sources.prod.yaml
-
-# Do not expose admin UI or handle job handling web requests
-daemonOnly: true
diff --git a/modules/tilerator/templates/config_ui.yaml.erb 
b/modules/tilerator/templates/config_ui.yaml.erb
deleted file mode 100644
index 5d1ae61..0000000
--- a/modules/tilerator/templates/config_ui.yaml.erb
+++ /dev/null
@@ -1,12 +0,0 @@
-# tileratorui-specific settings
-
-redis: redis://maps-test2001.codfw.wmnet
-
-variables:
-  osmdb-user: '<%= @pgsql_tileratorui_user %>'
-  osmdb-pswd: '<%= @pgsql_tileratorui_pass %>'
-  cassandra-user: '<%= @cassandra_tileratorui_user %>'
-  cassandra-pswd: '<%= @cassandra_tileratorui_pass %>'
-
-sources: sources.prod.yaml
-uiOnly: true
diff --git a/templates/maps/grants.cql.erb b/templates/maps/grants.cql.erb
index 8a6128e..532bc3a 100644
--- a/templates/maps/grants.cql.erb
+++ b/templates/maps/grants.cql.erb
@@ -1,24 +1,17 @@
 -- Cassandra grants for maps
 CREATE USER kartotherian  WITH PASSWORD '<%= @cassandra_kartotherian_pass %>';
 CREATE USER tilerator  WITH PASSWORD '<%= @cassandra_tilerator_pass %>';
-CREATE USER tileratorui  WITH PASSWORD '<%= @cassandra_tileratorui_pass %>';
 -- Also alter the roles to ensure password consistency
 ALTER USER kartotherian  WITH PASSWORD '<%= @cassandra_kartotherian_pass %>';
 ALTER USER tilerator  WITH PASSWORD '<%= @cassandra_tilerator_pass %>';
-ALTER USER tileratorui  WITH PASSWORD '<%= @cassandra_tileratorui_pass %>';
 
 -- First revoking all permissions to maintain consistency
 REVOKE ALL PERMISSIONS ON ALL KEYSPACES FROM kartotherian;
 REVOKE ALL PERMISSIONS ON ALL KEYSPACES FROM tilerator;
-REVOKE ALL PERMISSIONS ON ALL KEYSPACES FROM tileratorui;
 -- kartotherian read only
 GRANT SELECT ON ALL KEYSPACES to kartotherian;
 -- tilerator should be able to update tiles
 GRANT SELECT ON ALL KEYSPACES to tilerator;
 GRANT MODIFY ON ALL KEYSPACES to tilerator;
 GRANT CREATE ON ALL KEYSPACES to tilerator;
--- tileratorui should be able to update tiles
-GRANT SELECT ON ALL KEYSPACES to tileratorui;
-GRANT MODIFY ON ALL KEYSPACES to tileratorui;
-GRANT CREATE ON ALL KEYSPACES to tileratorui;
 -- TODO: Admin account to create indexes, alter tables?
diff --git a/templates/maps/grants.sql.erb b/templates/maps/grants.sql.erb
index 1ab8f4e..2205881 100644
--- a/templates/maps/grants.sql.erb
+++ b/templates/maps/grants.sql.erb
@@ -1,14 +1,10 @@
 CREATE ROLE kartotherian  WITH LOGIN PASSWORD '<%= @kartotherian_pass %>';
 CREATE ROLE tilerator  WITH LOGIN PASSWORD '<%= @tilerator_pass %>';
-CREATE ROLE tileratorui  WITH LOGIN PASSWORD '<%= @tileratorui_pass %>';
-
 CREATE ROLE osmupdater WITH LOGIN PASSWORD '<%= @osmupdater_pass %>';
 CREATE ROLE osmimporter WITH LOGIN PASSWORD '<%= @osmimporter_pass %>';
 
 GRANT SELECT ON ALL TABLES IN SCHEMA public TO kartotherian;
 GRANT SELECT ON ALL TABLES IN SCHEMA public TO tilerator;
-GRANT SELECT ON ALL TABLES IN SCHEMA public TO tileratorui;
-
 GRANT SELECT,INSERT,UPDATE,DELETE ON ALL TABLES IN SCHEMA public TO osmupdater;
 GRANT SELECT,INSERT,UPDATE,DELETE ON ALL TABLES IN SCHEMA public TO 
osmimporter;
 GRANT CREATE,TEMPORARY ON DATABASE gis TO osmimporter;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I353301db22d2493b80274d164a8d7da1b9414ddb
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