使用 Puppet 部署 Grafana Mimir
Puppet 模块由社区维护,用于部署 Grafana Mimir。该模块使用 deb 或 rpm 包来安装 Grafana Mimir。
开始使用此模块
将此模块添加到您的 Puppetfile
mod 'ovhcloud-mimir', '1.0.0'
安装和配置 Mimir
在 Puppet manifest 中像这样调用模块的主类
class{'mimir': }
如果这样调用,此模块将使用 Mimir 的默认配置参数,并因此以独立模式启动 mimir。
要自定义配置,只需像这样添加一个包含相应配置键的哈希
class {'mimir':
config_hash => {
target => 'querier',
},
}
配置参数
# Mimir version under the form X.X.X or one of the supported puppet values
# as 'present', 'latest', ...
[package_ensure: <string> | default = "present"]
# Boolean to specify if module should manage mimir user
[manage_user: <boolean> | default = false]
# Home directory for the managed user
# Only if manage_user is set to true
[user_home: <string> | default = "/var/lib/mimir"]
# Binary to use as shell for managed user
# Only if manage_user is set to true
[user_shell: <string> | default = "/sbin/nologin"]
# Additionnal groups the managed user should be connected to
# Only if manage_user is set to true
[user_extra_groups: <array> | default = []]
# Directory to store the mimir configuration
[config_dir: <string> | default = "/etc/mimir"]
# Group to use for configuration resources
[config_group: <string> | default = "mimir"]
# Hash containing the configuration keys to override
[config_hash: <hash> | default = {}]
# Owner to use for configuration resources
[config_owner: <string> | default = "mimir"]
# Additional arguments to set to the mimir process
[custom_args: <array> | default = []]
# Directory to store mimir logs if log to file is enabled
# Only if log_to_file is set to true
[log_dir_path: <string> | default = "/var/log/mimir"]
# Mode of the directory used to store logs
# Only if log_to_file is set to true
[log_dir_mode: <string> | default = "0700"]
# Filename to store mimir logs if log to file is enabled
# Only if log_to_file is set to true
[log_file_path: <string> | default = "mimir.log"]
# Mode of the file used to store logs
# Only if log_to_file is set to true
[log_file_mode: <string> | default = "0600"]
# Group to use for log resources
# Only if log_to_file is set to true
[log_group: <string> | default = "root"]
# Log level to use for process mimir
[log_level: <string> | default = "info"]
# Owner to use for log resources
# Only if log_to_file is set to true
[log_owner: <string> | default = "root"]
# Should log be kept in journald or sent to a dedicated file
[log_to_file: <boolean> | default = false]
# Command use to validate configuration
[validate_cmd: <string> | default = "/usr/local/bin/mimir --modules=true"]
# Command use to restart/reload process
[restart_cmd: <string> | default = "/bin/systemctl reload mimir"]
# Should the process be restarted on configuration changes
[restart_on_change: <boolean> | default = false]
# List of systemd parameters to override
[systemd_overrides: <hash> | default = {'Service' => {'LimitNOFILE' => '1048576'}}]