 (ns com.puppetlabs.puppetdb.config
+  "Centralized place for reading a user-defined config INI file, validating,
+   defaulting and converting into a format that can startup a PuppetDB instance.
+
+   The schemas in this file define what is expected to be present in the INI file
+   and the format expected by the rest of the application."
   (:import [java.security KeyStore])
   (:require [clojure.tools.logging :as log]
             [puppetlabs.kitchensink.ssl :as ssl]

                     (assoc-when :event-query-limit 20000)
                     (assoc-when :update-server "http://updates.puppetlabs.com/check-for-updates"))))))

(defn parse-config
  "Parses the given config file/directory and configures its various
  subcomponents.

                             (int)
                             (max 1))]
    (update-in config [:command-processing :threads] #(or % default-nthreads))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Jetty config

(defn configure-web-server-ssl-from-pems
  "Configures the web server's SSL settings based on Puppet PEM files, rather than
