From 0030f36085ab80eb0746289176f4485e800b5063 Mon Sep 17 00:00:00 2001 From: Bram Vogelaar Date: Tue, 31 Aug 2021 17:25:34 +0200 Subject: [PATCH] v1.0.0 release --- CHANGELOG.md | 14 +++++++++--- REFERENCE.md | 55 +++++++++++++++++++++++++++++++++++++++-------- manifests/init.pp | 34 +++++++++++++++++++++++++---- 3 files changed, 87 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c954cd..c7e0019 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,18 @@ All notable changes to this project will be documented in this file. +## Release 1.0.0 + + - added logcli support + - Adding Loki 2.* support + - Adding Loki 2.2.* support (BDelacour) + - Update to PDK 2.2 + - Set better default for managing the loki user and service file (bastelfreak) + - Adding minimal viable Example (bastelfreak) + - Adding Litmus acceptance tests for MVE. + ## Release 0.1.0 **Features** -**Bugfixes** - -**Known Issues** +Initial support for Grafan Loki 1.5.* \ No newline at end of file diff --git a/REFERENCE.md b/REFERENCE.md index bcb1101..ba2f95d 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -24,10 +24,36 @@ A description of what this class does #### Examples -##### +##### Minimal example, creates a standalone loki instance (not desinged for production). ```puppet -include loki +class{ 'loki': + auth_enabled => false, + schema_config_hash => {'schema_config' => { + 'configs' => [{ + 'from' => '2020-05-15', + 'store' => 'boltdb', + 'object_store' => 'filesystem', + 'schema' => 'v11', + 'index' => {'prefix' => 'index_', 'period' => '168h'}, + }] + }}, + storage_config_hash => {'storage_config' => { + 'boltdb' => { 'directory' => '/var/lib/loki/index'}, + 'filesystem' => {'directory' => '/var/lib/loki/chunks'}, + }}, + server_config_hash => {'server' => { + 'http_listen_port' => 3100, + 'http_listen_address' => $facts['networking']['ip']}, + }, + ingester_client_config_hash => {'ingester' => { + 'lifecycler' => { + 'interface_names' => [$facts['networking']['primary']], + 'address' => '127.0.0.1', + 'ring' => {'kvstore' =>{'store' => 'inmemory'}, 'replication_factor' => 1}, + } + }}, +} ``` #### Parameters @@ -40,7 +66,6 @@ The following parameters are available in the `loki` class: * [`group`](#group) * [`install_method`](#install_method) * [`manage_service`](#manage_service) -* [`manage_user`](#manage_user) * [`package_name`](#package_name) * [`package_version`](#package_version) * [`schema_config_hash`](#schema_config_hash) @@ -58,6 +83,8 @@ The following parameters are available in the `loki` class: * [`ingester_client_config_hash`](#ingester_client_config_hash) * [`ingester_config_hash`](#ingester_config_hash) * [`limits_config_hash`](#limits_config_hash) +* [`manage_user`](#manage_user) +* [`manage_unit_file`](#manage_unit_file) * [`querier_config_hash`](#querier_config_hash) * [`query_frontend_config_hash`](#query_frontend_config_hash) * [`queryrange_config_hash`](#queryrange_config_hash) @@ -104,12 +131,6 @@ Data type: `Boolean` -##### `manage_user` - -Data type: `Boolean` - - - ##### `package_name` Data type: `String[1]` @@ -228,6 +249,22 @@ Data type: `Optional[Hash]` Default value: ``undef`` +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `$install_method` + +##### `manage_unit_file` + +Data type: `Boolean` + + + +Default value: `$install_method` + ##### `querier_config_hash` Data type: `Optional[Hash]` diff --git a/manifests/init.pp b/manifests/init.pp index 07747bc..e4be5e7 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -2,8 +2,34 @@ # # A description of what this class does # -# @example -# include loki +# @example Minimal example, creates a standalone loki instance (not desinged for production). +# class{ 'loki': +# auth_enabled => false, +# schema_config_hash => {'schema_config' => { +# 'configs' => [{ +# 'from' => '2020-05-15', +# 'store' => 'boltdb', +# 'object_store' => 'filesystem', +# 'schema' => 'v11', +# 'index' => {'prefix' => 'index_', 'period' => '168h'}, +# }] +# }}, +# storage_config_hash => {'storage_config' => { +# 'boltdb' => { 'directory' => '/var/lib/loki/index'}, +# 'filesystem' => {'directory' => '/var/lib/loki/chunks'}, +# }}, +# server_config_hash => {'server' => { +# 'http_listen_port' => 3100, +# 'http_listen_address' => $facts['networking']['ip']}, +# }, +# ingester_client_config_hash => {'ingester' => { +# 'lifecycler' => { +# 'interface_names' => [$facts['networking']['primary']], +# 'address' => '127.0.0.1', +# 'ring' => {'kvstore' =>{'store' => 'inmemory'}, 'replication_factor' => 1}, +# } +# }}, +# } class loki ( Stdlib::Absolutepath $bin_dir, Stdlib::Absolutepath $config_dir, @@ -11,8 +37,6 @@ String[1] $group, Enum['archive','package'] $install_method, Boolean $manage_service, - Boolean $manage_user = $install_method ? { 'archive' => true, 'package' => false }, - Boolean $manage_unit_file = $install_method ? { 'archive' => true, 'package' => false }, String[1] $package_name, String[1] $package_version, Hash $schema_config_hash, @@ -30,6 +54,8 @@ Optional[Hash] $ingester_client_config_hash = undef, Optional[Hash] $ingester_config_hash = undef, Optional[Hash] $limits_config_hash = undef, + Boolean $manage_user = $install_method ? { 'archive' => true, 'package' => false }, + Boolean $manage_unit_file = $install_method ? { 'archive' => true, 'package' => false }, Optional[Hash] $querier_config_hash = undef, Optional[Hash] $query_frontend_config_hash = undef, Optional[Hash] $queryrange_config_hash = undef,