]> Frank Brehm's Git Trees - config/berta/etc.git/commitdiff
committing changes in /etc after emerge run
authorFrank Brehm <frank@brehm-online.com>
Thu, 29 Dec 2016 14:13:09 +0000 (15:13 +0100)
committerFrank Brehm <frank@brehm-online.com>
Thu, 29 Dec 2016 14:13:09 +0000 (15:13 +0100)
Package changes:
+app-admin/puppetdb-4.3.0-r1

.etckeeper
conf.d/puppetdb [new file with mode: 0644]
init.d/puppetdb [new file with mode: 0755]
logrotate.d/puppetdb [new file with mode: 0644]
puppetlabs/puppetdb/bootstrap.cfg [new file with mode: 0644]
puppetlabs/puppetdb/conf.d/config.ini [new file with mode: 0644]
puppetlabs/puppetdb/conf.d/database.ini [new file with mode: 0644]
puppetlabs/puppetdb/conf.d/jetty.ini [new file with mode: 0644]
puppetlabs/puppetdb/conf.d/repl.ini [new file with mode: 0644]
puppetlabs/puppetdb/logback.xml [new file with mode: 0644]
puppetlabs/puppetdb/request-logging.xml [new file with mode: 0644]

index c614e637d49357eb383d6f24eebbb3d9047e6d50..7c862578679fcc65f81bccb2c5d2a82bfa2964dc 100755 (executable)
@@ -129,6 +129,7 @@ maybe chmod 0644 'conf.d/net-online'
 maybe chmod 0644 'conf.d/netmount'
 maybe chmod 0644 'conf.d/pciparm'
 maybe chmod 0644 'conf.d/php-fpm'
+maybe chmod 0644 'conf.d/puppetdb'
 maybe chmod 0644 'conf.d/puppetmaster'
 maybe chmod 0644 'conf.d/pydoc-2.7'
 maybe chmod 0644 'conf.d/pydoc-3.4'
@@ -435,6 +436,7 @@ maybe chmod 0755 'init.d/pciparm'
 maybe chmod 0755 'init.d/php-fpm'
 maybe chmod 0755 'init.d/procfs'
 maybe chmod 0755 'init.d/puppet'
+maybe chmod 0755 'init.d/puppetdb'
 maybe chmod 0755 'init.d/puppetmaster'
 maybe chmod 0755 'init.d/pwcheck'
 maybe chmod 0755 'init.d/pydoc-2.7'
@@ -513,6 +515,7 @@ maybe chmod 0644 'logrotate.d/.keep_app-admin_logrotate-0'
 maybe chmod 0644 'logrotate.d/apache2'
 maybe chmod 0644 'logrotate.d/elog-save-summary'
 maybe chmod 0644 'logrotate.d/openrc'
+maybe chmod 0644 'logrotate.d/puppetdb'
 maybe chmod 0644 'logrotate.d/rsyncd'
 maybe chmod 0644 'logrotate.d/rsyslog'
 maybe chmod 0755 'lvm'
@@ -775,6 +778,15 @@ maybe chmod 0755 'puppetlabs/puppet/ssl/public_keys'
 maybe chown 'puppet' 'puppetlabs/puppet/ssl/public_keys/berta.pixelpark.com.pem'
 maybe chgrp 'puppet' 'puppetlabs/puppet/ssl/public_keys/berta.pixelpark.com.pem'
 maybe chmod 0644 'puppetlabs/puppet/ssl/public_keys/berta.pixelpark.com.pem'
+maybe chmod 0755 'puppetlabs/puppetdb'
+maybe chmod 0644 'puppetlabs/puppetdb/bootstrap.cfg'
+maybe chmod 0755 'puppetlabs/puppetdb/conf.d'
+maybe chmod 0644 'puppetlabs/puppetdb/conf.d/config.ini'
+maybe chmod 0644 'puppetlabs/puppetdb/conf.d/database.ini'
+maybe chmod 0644 'puppetlabs/puppetdb/conf.d/jetty.ini'
+maybe chmod 0644 'puppetlabs/puppetdb/conf.d/repl.ini'
+maybe chmod 0644 'puppetlabs/puppetdb/logback.xml'
+maybe chmod 0644 'puppetlabs/puppetdb/request-logging.xml'
 maybe chmod 0644 'rc.conf'
 maybe chmod 0644 'resolv.conf'
 maybe chmod 0644 'resolv.conf.bak'
diff --git a/conf.d/puppetdb b/conf.d/puppetdb
new file mode 100644 (file)
index 0000000..54f22c6
--- /dev/null
@@ -0,0 +1,34 @@
+###########################################
+# Init settings for puppetdb
+###########################################
+
+# Location of your Java binary (version 7 or higher)
+JAVA_BIN="/usr/bin/java"
+
+# Modify this if you'd like to change the memory allocation, enable JMX, etc
+JAVA_ARGS="-Xmx192m"
+
+# These normally shouldn't need to be edited if using OS packages
+USER="puppetdb"
+GROUP="puppetdb"
+INSTALL_DIR="/opt/puppetlabs/server/apps/puppetdb"
+CONFIG="/etc/puppetlabs/puppetdb/conf.d"
+
+# Bootstrap path
+BOOTSTRAP_CONFIG="/etc/puppetlabs/puppetdb/bootstrap.cfg"
+
+# SERVICE_STOP_RETRIES can be set here to alter the default stop timeout in
+# seconds.  For systemd, the shorter of this setting or 'TimeoutStopSec' in
+# the systemd.service definition will effectively be the timeout which is used.
+SERVICE_STOP_RETRIES=60
+
+# START_TIMEOUT can be set here to alter the default startup timeout in
+# seconds.  For systemd, the shorter of this setting or 'TimeoutStartSec'
+# in the service's systemd.service configuration file will effectively be the
+# timeout which is used.
+START_TIMEOUT=300
+
+
+# Maximum number of seconds that can expire for a service reload attempt before
+# the result of the attempt is interpreted as a failure.
+RELOAD_TIMEOUT=120
diff --git a/init.d/puppetdb b/init.d/puppetdb
new file mode 100755 (executable)
index 0000000..1863cea
--- /dev/null
@@ -0,0 +1,65 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_commands="checkconfig"
+
+LOGDIR="/var/log/puppetlabs/puppetdb"
+RUNDIR="/run/puppetlabs/puppetdb"
+
+checkconfig() {
+    if [ ! -x $JAVA_BIN ]; then
+        eerror "Missing JAVA_BIN."
+        eend 1
+    fi
+    if [ ! -d $INSTALL_DIR ]; then
+        eerror "Missing INSTALL_DIR."
+        eend 1
+    fi
+    if [ ! -e $BOOTSTRAP_CONFIG ]; then
+        eerror "Missing BOOTSTRAP_CONFIG."
+        eend 1
+    fi
+    if [ ! -e $CONFIG ]; then
+        eerror "Missing CONFIG."
+        eend 1
+    fi
+    if [ ! -n $USER ]; then
+        eerror "Missing USER."
+        eend 1
+    fi
+    if [ ! -n $GROUP ]; then
+        eerror "Missing GROUP."
+        eend 1
+    fi
+
+    checkpath -d -m 0755 "${LOGDIR%/*}"
+    checkpath -d -m 0755 "${RUNDIR%/*}"
+    checkpath -d -m 0700 -o "${USER}:${GROUP}" "${LOGDIR}"
+    checkpath -d -m 0755 -o "${USER}:${GROUP}" "${RUNDIR}"
+
+    JAVA_ARGS="${JAVA_ARGS} -cp '${INSTALL_DIR}/puppetdb.jar' clojure.main -m puppetlabs.puppetdb.main --config ${CONFIG} -b '${BOOTSTRAP_CONFIG}'"
+    EXEC="${JAVA_BIN} -XX:OnOutOfMemoryError=\"kill -9 %p\" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/puppetlabs/puppetdb -Djava.security.egd=/dev/urandom ${JAVA_ARGS}"
+}
+
+start() {
+    checkconfig || return 1
+
+    ebegin "Starting PuppetDB"
+    start-stop-daemon --start -u "${USER}" -g "${GROUP}" \
+        -m --pidfile "${RUNDIR}/puppetdb.pid" \
+        -b --exec "/bin/bash" \
+        -- -c "exec ${EXEC} >> ${LOGDIR}/daemon.log 2>&1"
+    local retval=$?
+    if [ $retval -ne 0 ]; then
+        ewarn "Error starting puppetdb."
+    fi
+    eend $retval
+}
+
+stop() {
+    ebegin "Stopping PuppetDB"
+    start-stop-daemon --stop --pidfile "${RUNDIR}/puppetdb.pid"
+    eend $?
+}
diff --git a/logrotate.d/puppetdb b/logrotate.d/puppetdb
new file mode 100644 (file)
index 0000000..dd05cbf
--- /dev/null
@@ -0,0 +1,10 @@
+/var/log/puppetlabs/puppetdb/*.log {
+    weekly
+    missingok
+    rotate 12
+    compress
+    copytruncate
+    notifempty
+    su puppetdb puppetdb
+    create 640 puppetdb puppetdb
+}
diff --git a/puppetlabs/puppetdb/bootstrap.cfg b/puppetlabs/puppetdb/bootstrap.cfg
new file mode 100644 (file)
index 0000000..e1a0e5c
--- /dev/null
@@ -0,0 +1,27 @@
+# This file is used by the application framework (trapperkeeper) to
+# determine what services should be loaded at boot time.
+# For more info, see:
+#  https://github.com/puppetlabs/trapperkeeper/wiki/Bootstrapping
+
+# Web Server
+puppetlabs.trapperkeeper.services.webserver.jetty9-service/jetty9-service
+
+# Webrouting
+puppetlabs.trapperkeeper.services.webrouting.webrouting-service/webrouting-service
+
+# TK status
+puppetlabs.trapperkeeper.services.metrics.metrics-service/metrics-webservice
+puppetlabs.trapperkeeper.services.status.status-service/status-service
+
+# PuppetDB Services
+puppetlabs.puppetdb.cli.services/puppetdb-service
+puppetlabs.puppetdb.command/command-service
+puppetlabs.puppetdb.pdb-routing/maint-mode-service
+puppetlabs.puppetdb.pdb-routing/pdb-routing-service
+puppetlabs.puppetdb.config/config-service
+
+# NREPL
+puppetlabs.trapperkeeper.services.nrepl.nrepl-service/nrepl-service
+
+# Dashboard redirect: remove to disable
+puppetlabs.puppetdb.dashboard/dashboard-redirect-service
diff --git a/puppetlabs/puppetdb/conf.d/config.ini b/puppetlabs/puppetdb/conf.d/config.ini
new file mode 100644 (file)
index 0000000..4a32adf
--- /dev/null
@@ -0,0 +1,16 @@
+# See README.md for more thorough explanations of each section and
+# option.
+
+[global]
+# Store mq/db data in a custom directory
+vardir = /opt/puppetlabs/server/data/puppetdb
+
+# Use an external logback config file
+logging-config = /etc/puppetlabs/puppetdb/logback.xml
+
+[command-processing]
+# How many command-processing threads to use, defaults to (CPUs / 2)
+# threads = 4
+
+# How many threads can write to disk at once, defaults to min(CPUs / 2, 4)
+# concurrent-writes = 4
diff --git a/puppetlabs/puppetdb/conf.d/database.ini b/puppetlabs/puppetdb/conf.d/database.ini
new file mode 100644 (file)
index 0000000..929b7f3
--- /dev/null
@@ -0,0 +1,19 @@
+[database]
+#classname = org.postgresql.Driver
+#subprotocol = postgresql
+
+# The database address, i.e. //HOST:PORT/DATABASE_NAME
+# subname = //localhost:5432/puppetdb
+
+# Connect as a specific user
+# username = foobar
+
+# Use a specific password
+# password = foobar
+
+# How often (in minutes) to compact the database
+# gc-interval = 60
+
+# Number of seconds before any SQL query is considered 'slow'; offending
+# queries will not be interrupted, but will be logged at the WARN log level.
+log-slow-statements = 10
diff --git a/puppetlabs/puppetdb/conf.d/jetty.ini b/puppetlabs/puppetdb/conf.d/jetty.ini
new file mode 100644 (file)
index 0000000..46693fb
--- /dev/null
@@ -0,0 +1,33 @@
+[jetty]
+# IP address or hostname to listen for clear-text HTTP. To avoid resolution
+# issues, IP addresses are recommended over hostnames.
+# Default is `localhost`.
+# host = <host>
+
+# Port to listen on for clear-text HTTP.
+port = 8080
+
+# The following are SSL specific settings. They can be configured
+# automatically with the tool `puppetdb ssl-setup`, which is normally
+# ran during package installation.
+
+# IP address to listen on for HTTPS connections. Hostnames can also be used
+# but are not recommended to avoid DNS resolution issues. To listen on all
+# interfaces, use `0.0.0.0`.
+# ssl-host = <host>
+
+# The port to listen on for HTTPS connections
+# ssl-port = <port>
+
+# Private key path
+# ssl-key = <private_key_path>
+
+# Public certificate path
+# ssl-cert = <public_cert_path>
+
+# Certificate authority path
+# ssl-ca-cert = <ca_cert_path>
+
+# Access logging configuration path. To turn off access logging
+# comment out the line with `access-log-config=...`
+access-log-config = /etc/puppetlabs/puppetdb/request-logging.xml
diff --git a/puppetlabs/puppetdb/conf.d/repl.ini b/puppetlabs/puppetdb/conf.d/repl.ini
new file mode 100644 (file)
index 0000000..e073316
--- /dev/null
@@ -0,0 +1,9 @@
+[nrepl]
+# Set to true to enable the remote REPL
+enabled = false
+
+# What port the REPL should listen on
+port = 8082
+
+# IP address to listen on
+host = 127.0.0.1
diff --git a/puppetlabs/puppetdb/logback.xml b/puppetlabs/puppetdb/logback.xml
new file mode 100644 (file)
index 0000000..361b3fa
--- /dev/null
@@ -0,0 +1,59 @@
+<configuration scan="true">
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>%d %-5p [%c{2}] %m%n</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="F1" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>/var/log/puppetlabs/puppetdb/puppetdb.log</file>
+        <append>true</append>
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>/var/log/puppetlabs/puppetdb/puppetdb-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
+            <!-- each file should be at most 200MB, keep 90 days worth of history, but at most 1GB total-->
+            <maxFileSize>200MB</maxFileSize>
+            <maxHistory>90</maxHistory>
+            <totalSizeCap>1GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>%d %-5p [%c{2}] %m%n</pattern>
+        </encoder>
+    </appender>
+
+    <!-- Supress internal ActiveMQ logging -->
+    <logger name="org.apache.activemq" level="warn"/>
+
+    <!-- Supress internal Spring Framework logging -->
+    <logger name="org.springframework.jms.connection" level="warn"/>
+
+    <!-- Lower the log level for ActiveMQ KahaDB MessageDatabase -->
+    <logger name="org.apache.activemq.store.kahadb.MessageDatabase"
+        level="info"/>
+
+    <appender name="STATUS" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>/var/log/puppetlabs/puppetdb/puppetdb-status.log</file>
+        <append>true</append>
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <!-- rollover daily -->
+            <fileNamePattern>/var/log/puppetlabs/puppetdb/puppetdb-status-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
+            <!-- each file should be at most 200MB, keep 90 days worth of history, but at most 1GB total-->
+            <maxFileSize>200MB</maxFileSize>
+            <maxHistory>90</maxHistory>
+            <totalSizeCap>1GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <!-- note that this will only log the JSON message (%m) and a newline (%n)-->
+            <pattern>%m%n</pattern>
+        </encoder>
+    </appender>
+
+    <!-- without additivity="false", the status log messages will be sent to every other appender as well-->
+    <logger name="puppetlabs.trapperkeeper.services.status.status-debug-logging" additivity="false">
+        <appender-ref ref="STATUS"/>
+    </logger>
+
+    <root level="info">
+        <appender-ref ref="${logappender:-DUMMY}" />
+        <appender-ref ref="F1" />
+    </root>
+</configuration>
diff --git a/puppetlabs/puppetdb/request-logging.xml b/puppetlabs/puppetdb/request-logging.xml
new file mode 100644 (file)
index 0000000..a8301fb
--- /dev/null
@@ -0,0 +1,17 @@
+<configuration debug="false">
+    <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>/var/log/puppetlabs/puppetdb/puppetdb-access.log</file>
+        <append>true</append>
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>/var/log/puppetlabs/puppetdb/puppetdb-access-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
+            <!-- each file should be at most 200MB, keep 90 days worth of history, but at most 1GB total-->
+            <maxFileSize>200MB</maxFileSize>
+            <maxHistory>90</maxHistory>
+            <totalSizeCap>1GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>%h %l %u [%t] "%r" %s %b "%i{Referer}" "%i{User-Agent}" %D</pattern>
+        </encoder>
+    </appender>
+    <appender-ref ref="FILE" />
+</configuration>