Skip to content

Commit

Permalink
v1.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
attachmentgenie committed Aug 31, 2021
1 parent 6ff467c commit 0030f36
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 16 deletions.
14 changes: 11 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
55 changes: 46 additions & 9 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -104,12 +131,6 @@ Data type: `Boolean`



##### <a name="manage_user"></a>`manage_user`

Data type: `Boolean`



##### <a name="package_name"></a>`package_name`

Data type: `String[1]`
Expand Down Expand Up @@ -228,6 +249,22 @@ Data type: `Optional[Hash]`

Default value: ``undef``

##### <a name="manage_user"></a>`manage_user`

Data type: `Boolean`



Default value: `$install_method`

##### <a name="manage_unit_file"></a>`manage_unit_file`

Data type: `Boolean`



Default value: `$install_method`

##### <a name="querier_config_hash"></a>`querier_config_hash`

Data type: `Optional[Hash]`
Expand Down
34 changes: 30 additions & 4 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,41 @@
#
# 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,
Stdlib::Absolutepath $data_dir,
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,
Expand All @@ -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,
Expand Down

0 comments on commit 0030f36

Please sign in to comment.