Dzahn has uploaded a new change for review.
https://gerrit.wikimedia.org/r/249059
Change subject: (WIP) maps: move roles into autoloader layout
......................................................................
(WIP) maps: move roles into autoloader layout
ERROR: role::maps not in autoload module layout on line 4
ERROR: role::maps::master not in autoload module layout on line 45
ERROR: role::maps::slave not in autoload module layout on line 90
How do i move "role::maps"? Wouldn't that be init.pp?
But that doesn't seem correct yet.
Change-Id: I2a44ee9c026d4290b932d8ccac15410fb6d4b00e
---
D manifests/role/maps.pp
A modules/role/manifests/maps/init.pp
A modules/role/manifests/maps/master.pp
A modules/role/manifests/maps/slave.pp
4 files changed, 102 insertions(+), 101 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/59/249059/1
diff --git a/manifests/role/maps.pp b/manifests/role/maps.pp
deleted file mode 100644
index a396176..0000000
--- a/manifests/role/maps.pp
+++ /dev/null
@@ -1,101 +0,0 @@
-@monitoring::group { 'maps_eqiad': description => 'eqiad maps servers' }
-@monitoring::group { 'maps_codfw': description => 'codfw maps servers' }
-
-# This role class sets up a maps server with
-# the services kartotherian and tilerator
-class role::maps {
- include standard
- include ::postgresql::postgis
- include ::cassandra
- include ::kartotherian
- include ::tilerator
-
- system::role { 'role::maps':
- description => 'A vector and raster map tile generation service',
- }
-
- ganglia::plugin::python { 'diskstat': }
-
- if $::realm == 'production' {
- include lvs::realserver
- }
-
- # Tuning
- file { '/etc/postgresql/9.4/main/tuning.conf':
- ensure => 'present',
- owner => 'root',
- group => 'root',
- mode => '0444',
- source => 'puppet:///modules/postgres/tuning.conf',
- }
- sysctl::parameters { 'postgres_shmem':
- values => {
- # That is derived after tuning postgresql, deriving automatically
is
- # not the safest idea yet.
- 'kernel.shmmax' => 8388608000,
- },
- }
- # TODO: Figure out a better way to do this
- # Ensure postgresql logs as maps-admin to allow maps-admin to read them
- # Rely on logrotate's copytruncate policy for postgres for the rest of the
- # log file
- file { '/var/log/postgresql/postgresql-9.4-main.log':
- group => 'maps-admins',
- }
-}
-
-# Sets up a maps server master
-class role::maps::master {
- include ::postgresql::master
- include ::osm
- include ::osm::import_waterlines
- include ::redis
-
- system::role { 'role::maps::master':
- ensure => 'present',
- description => 'Maps Postgres master',
- }
-
- postgresql::spatialdb { 'gis':
- require => Class['::postgresql::postgis'],
- }
-
- # PostgreSQL Replication
- $postgres_slaves = hiera('maps::postgres_slaves', undef)
- if $postgres_slaves {
- create_resources(postgresql::user, $postgres_slaves)
- }
-
- # 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':
- owner => 'root',
- group => 'root',
- mode => '0400',
- content => template('maps/grants.sql.erb'),
- }
- # 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',
- mode => '0400',
- content => template('maps/grants.cql.erb'),
- }
-}
-
-# Sets up a maps server slave
-class role::maps::slave {
- include ::postgresql::slave
-
- system::role { 'role::maps::slave':
- ensure => 'present',
- description => 'Maps Postgres slave',
- }
-}
diff --git a/modules/role/manifests/maps/init.pp
b/modules/role/manifests/maps/init.pp
new file mode 100644
index 0000000..0d48193
--- /dev/null
+++ b/modules/role/manifests/maps/init.pp
@@ -0,0 +1,46 @@
+@monitoring::group { 'maps_eqiad': description => 'eqiad maps servers' }
+@monitoring::group { 'maps_codfw': description => 'codfw maps servers' }
+
+# This role class sets up a maps server with
+# the services kartotherian and tilerator
+class role::maps {
+ include standard
+ include ::postgresql::postgis
+ include ::cassandra
+ include ::kartotherian
+ include ::tilerator
+
+ system::role { 'role::maps':
+ description => 'A vector and raster map tile generation service',
+ }
+
+ ganglia::plugin::python { 'diskstat': }
+
+ if $::realm == 'production' {
+ include lvs::realserver
+ }
+
+ # Tuning
+ file { '/etc/postgresql/9.4/main/tuning.conf':
+ ensure => 'present',
+ owner => 'root',
+ group => 'root',
+ mode => '0444',
+ source => 'puppet:///modules/postgres/tuning.conf',
+ }
+ sysctl::parameters { 'postgres_shmem':
+ values => {
+ # That is derived after tuning postgresql, deriving automatically
is
+ # not the safest idea yet.
+ 'kernel.shmmax' => 8388608000,
+ },
+ }
+ # TODO: Figure out a better way to do this
+ # Ensure postgresql logs as maps-admin to allow maps-admin to read them
+ # Rely on logrotate's copytruncate policy for postgres for the rest of the
+ # log file
+ file { '/var/log/postgresql/postgresql-9.4-main.log':
+ group => 'maps-admins',
+ }
+}
+
diff --git a/modules/role/manifests/maps/master.pp
b/modules/role/manifests/maps/master.pp
new file mode 100644
index 0000000..52d19bf
--- /dev/null
+++ b/modules/role/manifests/maps/master.pp
@@ -0,0 +1,46 @@
+# Sets up a maps server master
+class role::maps::master {
+ include ::postgresql::master
+ include ::osm
+ include ::osm::import_waterlines
+ include ::redis
+
+ system::role { 'role::maps::master':
+ ensure => 'present',
+ description => 'Maps Postgres master',
+ }
+
+ postgresql::spatialdb { 'gis':
+ require => Class['::postgresql::postgis'],
+ }
+
+ # PostgreSQL Replication
+ $postgres_slaves = hiera('maps::postgres_slaves', undef)
+ if $postgres_slaves {
+ create_resources(postgresql::user, $postgres_slaves)
+ }
+
+ # 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':
+ owner => 'root',
+ group => 'root',
+ mode => '0400',
+ content => template('maps/grants.sql.erb'),
+ }
+ # 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',
+ mode => '0400',
+ content => template('maps/grants.cql.erb'),
+ }
+}
+
diff --git a/modules/role/manifests/maps/slave.pp
b/modules/role/manifests/maps/slave.pp
new file mode 100644
index 0000000..5ac2869
--- /dev/null
+++ b/modules/role/manifests/maps/slave.pp
@@ -0,0 +1,10 @@
+# Sets up a maps server slave
+class role::maps::slave {
+ include ::postgresql::slave
+
+ system::role { 'role::maps::slave':
+ ensure => 'present',
+ description => 'Maps Postgres slave',
+ }
+}
+
--
To view, visit https://gerrit.wikimedia.org/r/249059
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a44ee9c026d4290b932d8ccac15410fb6d4b00e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits