GitHub puppet-elastic_stack

Repo Checks ( 18 of 22 successfull )
Metadata Valid
No translation
passed
Correct Puppet Version Range
Supported Puppet version range is %{PUPPET_SUPPORT_RANGE}
passed
With Puppet Version Range
Puppet version range is present in requirements in metadata.json
passed
With Operatingsystem Support
No translation
passed
Operatingsystems
No translation
passed
Supports Only Current Debian
No translation
passed
Supports Latest Debian
No translation
passed
Supports Only Current Opensuse
No translation
passed
Supports Latest Opensuse
No translation
failed
Supports Only Current Redhat
No translation
passed
Supports Latest Redhat
No translation
passed
Supports Only Current Sles
No translation
passed
Supports Latest Sles
No translation
failed
Supports Only Current Ubuntu
No translation
passed
Supports Latest Ubuntu
No translation
failed
In Modulesync Repo
Is listed as a module managed using modulesync_config
passed
Synced
Has a .msync.yml file
passed
Latest Modulesync
Has been synchronized with the latest tagged version of modulesync_config
failed
Has Modulesync
Is present in voxpupuli/modulesync_config/managed_modules.yml
passed
Released
Is in modulesync_config and in forge releases.
passed
Valid Sync File
If a (optional) sync file is present, it must not contain a `.travis.yml` entry.
passed
Reference Dot Md
The repository has a REFERENCE.md. It needs to be generated / puppet-strings documentation is missing.
passed

Open Pull Requests

Add forced exec of apt-get update to debian side
tests-fail

Since the apt package doesn't force apt-get update when notified, but instead schedules it for somewhere in the run, this change forces apt-get update after adding the repository.
Without this change you sometimes need to run puppet twice, once to add the source and update (usually at end of puppet run) and again to actually install the packages.

Open PR in GitHub
support full customizable repo url
tests-fail
merge-conflicts

If you are interested I can also add documentation and spec tests. We have the problem, that for some of our customers the repo url format is of the following form, which isn't supported by this module:

https://mirror.example.com/elastic-co/packages/6.x/apt-customername

Open PR in GitHub
Make gpg key location and fingerprint configurable

For a completely internal deployment, downloading the repository key directly
from the internet is not an option. This change makes the $keysource and
$key
id variables configurable so an internal mirror can be used.

Open PR in GitHub
Make architecture configurable
merge-conflicts

This allows to set the apt architecture.

Open PR in GitHub
Add an optional key_source parameter to set up the package repository.

Our internal hosts have no access to the internet, hence no option to download GPG-KEY-elasticsearch. This tiny patch adds the option to specify the download location for the GPG file.

Open PR in GitHub
modulesync 5.4.0
modulesync

modulesync 5.4.0

Open PR in GitHub
Add elastic_stack_keystore resource to handle keystore files for both elasticsearch and kibana

Hello,

I needed to install Elasticsearch version 8 (with Kibana).
I had several problems configuring the keystore files (elasticsearch and kibana) using the puppet-elasticsearch and puppet-kibana modules.

Here are the problems encountered:
- execution of the elasticsearch_keystore resource is not indempotent. It recreates the keystore file each time it is run, whether or not there has been a change. It does not parse the contents to ensure that the file is synchronized;
- if the keystore file already exists, it tries to create it again, which generates an error;
- there is no possibility of protecting the keystore file with a password;
- diff does not allow changes to be viewed;
- the kibana module does not manage keystore files.

I thought it simpler to implement a single resource type to manage the keystore in the puppet-elastic_stack module (to be used by both the elasticsearch and kibana modules). This avoids duplicate code.
I used the elasticsearch_keystore resource to correct the problems encountered and added keystore management for Kibana. I didn't keep the notion of instances, which weren't necessarily of interest in my case.

Example of the elastic_stack_keystore resource declaration for Elasticsearch:

elastic_stack_keystore { 'elasticsearch_secrets':
service => 'elasticsearch',
purge => false,
password => Sensitive($password),
settings => { .. },
}

To manage the keystore password, there are 2 modes:
- If the keystore file is not password-protected and the password parameter is set and not empty, when the resource is executed, the keystore will be password-protected. However, it will not be possible to re-modify it by changing the password parameter (this will have to be done manually on the target).
- Possibility of managing a file containing the password on the target, enabling the password parameter to be changed without having to do so manually. To do this, declare a resource file containing the (with the backup parameter set to true).
I haven't included all the code in the elasticsearch module, just an example to illustrate.
```
unless $elasticsearch::elasticsearchkeystorepassword =~ Undef {
file { $elasticsearch::elasticsearchkeystorepasswordpath:
ensure => 'file',
group => $elasticsearch::elasticsearch
group,
owner => $elasticsearch::elasticsearchuser,
mode => '0660',
content => $
elasticsearchkeystorepassword,
backup => true,
}
}

unless $elasticsearch::secrets =~ Undef {
file { "${elasticsearch::configdir}/elasticsearch.keystore":
owner => $elasticsearch::elasticsearchuser,
}
elastic
stackkeystore { 'elasticsearchsecrets':
service => 'elasticsearch',
purge => $elasticsearch::purgesecrets,
settings => $elasticsearch::secrets,
password => $
elasticsearchkeystorepassword,
notify => $elasticsearch::notifyservice,
require => File["${elasticsearch::configdir}/elasticsearch.keystore"],
}
}
```

Example of the elastic_stack_keystore resource declaration for Kibana (kibana-keystore does not support password):

elastic_stack_keystore { 'kibana_secrets':
service => 'kibana',
purge => false,
settings => { .. },

The service parameter is the namevar and can take 2 values: elasticsearch or kibana.

Open PR in GitHub