Giuseppe Lavagetto has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/370199 )

Change subject: puppetdb: move more things to the module
......................................................................

puppetdb: move more things to the module

Bug: T150456
Change-Id: Ibf991297c784ce73609fbfed7a1ed158e04ed4a3
---
M modules/puppetdb/manifests/app.pp
R modules/puppetdb/manifests/config.pp
D modules/puppetmaster/templates/initscripts/puppetdb.systemd.erb
3 files changed, 7 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/99/370199/1

diff --git a/modules/puppetdb/manifests/app.pp 
b/modules/puppetdb/manifests/app.pp
index 1e5baa2..15b01c5 100644
--- a/modules/puppetdb/manifests/app.pp
+++ b/modules/puppetdb/manifests/app.pp
@@ -65,7 +65,7 @@
         $db_settings = $default_db_settings
     }
 
-    puppetmaster::puppetdb::config { 'database':
+    puppetdb::config { 'database':
         settings => $db_settings,
     }
 
@@ -75,19 +75,19 @@
             $default_db_settings,
             {'subname' => "//${db_ro_host}:5432/puppetdb?ssl=true"}
         )
-        puppetmaster::puppetdb::config { 'read-database':
+        puppetdb::config { 'read-database':
             settings => $read_db_settings,
         }
     }
 
-    puppetmaster::puppetdb::config { 'global':
+    puppetdb::config { 'global':
         settings => {
             'vardir'         => '/var/lib/puppetdb',
             'logging-config' => '/etc/puppetdb/logback.xml',
         },
     }
 
-    puppetmaster::puppetdb::config { 'repl':
+    puppetdb::config { 'repl':
         settings => {'enabled' => false},
     }
 
@@ -99,7 +99,7 @@
 
     }
 
-    puppetmaster::puppetdb::config { 'jetty':
+    puppetdb::config { 'jetty':
         settings => {
             'port'        => 8080,
             'ssl-port'    => 8081,
diff --git a/modules/puppetmaster/manifests/puppetdb/config.pp 
b/modules/puppetdb/manifests/config.pp
similarity index 76%
rename from modules/puppetmaster/manifests/puppetdb/config.pp
rename to modules/puppetdb/manifests/config.pp
index a6f4882..5680fd6 100644
--- a/modules/puppetmaster/manifests/puppetdb/config.pp
+++ b/modules/puppetdb/manifests/config.pp
@@ -1,7 +1,7 @@
 # === Define puppetmaster::puppetdb::config
 #
 # Defines one ini file and its contents.
-define puppetmaster::puppetdb::config($settings) {
+define puppetdb::config($settings) {
     $ini = {"${title}" => $settings}
     $config_dir = '/etc/puppetdb/conf.d'
 
@@ -10,7 +10,7 @@
         owner   => 'puppetdb',
         group   => 'root',
         mode    => '0640',
-        before  => Base::Service_unit['puppetdb'],
+        before  => Service['puppetdb'],
     }
 
 }
diff --git a/modules/puppetmaster/templates/initscripts/puppetdb.systemd.erb 
b/modules/puppetmaster/templates/initscripts/puppetdb.systemd.erb
deleted file mode 100644
index cef26bd..0000000
--- a/modules/puppetmaster/templates/initscripts/puppetdb.systemd.erb
+++ /dev/null
@@ -1,18 +0,0 @@
-[Unit]
-Description="puppetDB centralized storage daemon"
-
-[Service]
-User=puppetdb
-Group=puppetdb
-Environment=CONFIG=/etc/puppetdb/conf.d
-ExecStartPre=/bin/bash -c "test -e /var/log/puppetdb/puppetdb-oom.hprof && mv 
/var/log/puppetdb/puppetdb-oom.hprof /var/log/puppetdb/puppetdb-oom.hprof.prev 
|| exit 0"
-ExecStart=/usr/bin/java -Xmx<%= @heap_size %> -XX:+ExitOnOutOfMemoryError \
--XX:+HeapDumpOnOutOfMemoryError 
-XX:HeapDumpPath=/var/log/puppetdb/puppetdb-oom.hprof 
-Djava.security.egd=file:/dev/urandom \
--cp /usr/share/puppetdb/puppetdb.jar clojure.main -m 
com.puppetlabs.puppetdb.core services -c ${CONFIG}
-ExecReload=/bin/kill -HUP $MAINPID
-Restart=always
-RestartSec=10s
-SyslogIdentifier=puppetdb
-
-[Install]
-WantedBy=multi-user.target

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf991297c784ce73609fbfed7a1ed158e04ed4a3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <glavage...@wikimedia.org>

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

Reply via email to