Configuration

config.yaml

The default configuration file for spicerack is expected to be found at /etc/spicerack/config.yaml. Its path can be changed in the CLI via the command-line switch --config-file PATH. A commented example configuration is available in the source code at doc/examples/config.yaml and included here below:

# Base path of the cookbooks. It's usually a checkout of a different repository that has all the cookbooks.
# Multiple paths can be specified and relative paths to the user's home are also accepted (e.g. ~/cookbooks).
cookbooks_base_dirs:
  - /path/to/cookbooks/checkout
  - /path/to/other/cookbooks
# Base directory for cookbook's logs, relative paths to the user's home are also accepted (e.g. ~/logs/cookbooks).
logs_base_dir: /var/log/spicerack
# [optional] Hostname and port to use for the special IRC logging using tcpircbot.
tcpircbot_host: tcpircbot.example.com
tcpircbot_port: 1234
# [optional] A directory where there are importable Python modules that can be imported within Spicerack and Cookbooks
# Relative paths to the user's home are also accepted (e.g. ~/spicerack_external_modules)
external_modules_dir: /path/to/custom/spicerack/external_modules

# [optional] Key-value hash of additional parameters to pass to the Spicerack constructor. All keys are optional.
instance_params:
  cumin_config: /etc/cumin/config.yaml  # Cumin's YAML configuration file.
  conftool_config: /etc/conftool/config.yaml  # Conftool's YAML configuration file.
  conftool_schema: /etc/conftool/schema.yaml  # Conftool's YAML schema file.
  debmonitor_config: /etc/debmonitor.conf  # Debmonitor's INI configuration file.
  # etcd YAML configuration file to pass to an etcd client. Set to empty string to disable the locking mechanism.
  etcd_config: /etc/etcd/etcdrc
  spicerack_config_dir: /etc/spicerack  # Path to the modules and cookbooks specific configuration files.
  http_proxy: http://proxy.example.com:8080  # HTTP/HTTPS proxy scheme://url:port to use for external calls.
  # The qualified name of the Python class that inherits from `spicerack.SpicerackExtenderBase` to be used in
  # conjunction with the the `external_modules_dir` to inject additional accessors in the Spicerack instance.
  extender_class: mypackage.mymodule.MyLoaderClass

The example file is also shipped, depending on the installation method, to:

  • $VENV_PATH/share/doc/spicerack/examples/config.yaml when installed in a Python virtualenv via pip.

  • /usr/local/share/doc/spicerack/examples/config.yaml when installed globally via pip.

  • /usr/share/doc/spicerack/examples/config.yaml when installed via the Debian package.