Version information
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 4.0.0 < 8.0.0
- , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'jpveldhuizen-cerebro', '0.4.9'
Learn more about managing modules with a PuppetfileDocumentation
Cerebro Puppet Module
Table of Contents
- Description
- Setup - The basics of getting started with Cerebro
- Advanced usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
This is a basic Puppet module to install and set up cerebro.
Cerebro is an open source elasticsearch web admin tool built using Scala, Play Framework, AngularJS, and Bootstrap. Cerebro is the follow up project to Kopf- a popular elasticsearch web admin plugin.
Setup
Setup requirements
Cerebro >= 0.9.0 requires Java 11. This module does not attempt to install Java for you.
Beginning with Cerebro
This will install OpenJDK 11 and Cerebro version 0.9.4 with default settings.
# install java
package { 'openjdk-11-jdk-headless':
ensure => present,
}
# install Cerebro with default values
class { 'cerebro': }
Advanced usage
Connecting to multiple pre-configured clusters
You can provide specific targets to connect to with an array of hashes:
class { 'cerebro':
targets => [ { name => 'Production Cluster',
host => 'http://prod:9200',
},
{ name => 'Dev Cluster',
host => 'http://dev:9200',
}, ]
}
Or, through Hiera and Automatic Parameter Lookup:
cerebro::targets:
- name: 'Production Cluster'
host: 'http://prod:9200'
- name: 'Dev Cluster'
host: 'http://dev:9200'
Proxyserver settings
You can provide a proxyserver url and type to download the original package.
class { 'cerebro':
proxy_server => 'http://proxy.localnet:8080',
proxy_type => 'https',
}
Limiting access with basic or LDAP authentication
You can require login with a basic challenge:
class { 'cerebro':
basic_auth_settings => {
username => 'admin',
password => '1234',
}
}
Or through LDAP:
class { 'cerebro':
ldap_auth_settings => {
url => 'ldap://ldapserver.localnet:389', # can also be 'ldaps://ldapserver.localnet:636' for example.
base-dn => 'ou=active,ou=Employee,dc=example,dc=com',
method => 'simple', # can be 'simple' ,'simple_tls' or 'start_tls'
user-template => '%s@example.com',
bind-dn => 'cn=ldap_reader,ou=active,ou=Employee,dc=example,dc=com',
bind-pw => 'T0ps3cr3t!',
}
ldap_group_search_settings => {
base-dn => "ou=active,ou=Employee,dc=example,dc=com",
user-attr => "uid",
user-attr-template => "%s",
group => "(&(objectClass=user)(memberOf=cn=Admins,ou=Security Groups,ou=Employee,dc=example,dc=com))",
}
}
Reference
Parameters
Class: cerebro
version
: Specify Cerebro version. Defaults to 0.9.4.service_ensure
: Determines whether the cerebro service should be running. Defaults to running.service_enable
: Determines whether the cerebro service should be enabled when the system is booted. Defaults to enabled.secret
: Specify secret string. Defaults to a random 32 bits string.hosts
: Specify a list of known hosts. None by default.basepath
: Specify application base path.shell
: Specify a shell for cerebro user.manage_user
: Specify whether creating user that cerebro process is executed as. Defaults to enabled.cerebro_user
: Specify the user that cerebro process is executed as. Defaults to 'cerebro'.package_url
: Specify a package location wher to download from. Defaults to "https://github.com/lmenezes/cerebro/releases/download/v${version}/cerebro-${version}.tgz".java_opts
: SpecifyJAVA_OPTS
variables.java_home
: SpecifyJAVA_HOME
path.basic_auth_settings
: Specify basic authentication settings.ldap_auth_settings
: Specify LDAP authentication settings.ldap_group_search_settings
: Specify additional groupmembership filtering for LDAP.address
: Specify IP address cerebro listening on. Defaults to none, listening on all available interfaces.port
: Specify TCP port (1024-49151) Cerebro listening on. Defaults to port 9000.proxy_server
: Full address with portnumber for the proxyserver to use. Defaults to none.proxy_type
: type of proxyserver to use, can be one of "none", "http", "https" or "ftp". Defaults to none.
Limitations
This module has been tested on:
- Ubuntu 20.04
Development
Bug reports and pull requests are welcome on GitHub at https://github.com/jpveldhuizen/puppet-cerebro.
Dependencies
- puppetlabs/stdlib (>= 5.0.0 <= 7.1.0)
- puppet/archive (>= 3.0.0 < 6.0.0)
- puppet/extlib (>= 3.0.0)
- puppet/systemd (>= 3.5.0)
MIT License Copyright (c) 2021 J.P. Veldhuizen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.