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'
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'
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'
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'
--- /dev/null
+###########################################
+# 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
--- /dev/null
+#!/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 $?
+}
--- /dev/null
+/var/log/puppetlabs/puppetdb/*.log {
+ weekly
+ missingok
+ rotate 12
+ compress
+ copytruncate
+ notifempty
+ su puppetdb puppetdb
+ create 640 puppetdb puppetdb
+}
--- /dev/null
+# 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
--- /dev/null
+# 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
--- /dev/null
+[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
--- /dev/null
+[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
--- /dev/null
+[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
--- /dev/null
+<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>
--- /dev/null
+<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>