Puppet Class: profile::eventlogging::analytics::server

Defined in:
modules/profile/manifests/eventlogging/analytics/server.pp

Overview

Class profile::eventlogging::analytics::server

Common profile class that all other eventlogging analytics profile classes should include.

Parameters:

  • kafka_cluster (Any) (defaults to: lookup('profile::eventlogging::analytics::server::kafka_cluster'))


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'modules/profile/manifests/eventlogging/analytics/server.pp', line 5

class profile::eventlogging::analytics::server(
    $kafka_cluster = lookup('profile::eventlogging::analytics::server::kafka_cluster'),
) {

    scap::target { 'eventlogging/analytics':
        deploy_user => 'eventlogging',
        manage_user => false,
    }

    # Needed because scap::target doesn't manage_user.
    ssh::userkey { 'eventlogging':
        ensure  => 'present',
        content => secret('keyholder/eventlogging.pub'),
    }

    class { 'eventlogging::server':
        eventlogging_path => '/srv/deployment/eventlogging/analytics',
        log_dir           => '/srv/log/eventlogging/systemd',
    }

    # Get the Kafka configuration
    $kafka_config = kafka_config($kafka_cluster)
    $kafka_brokers_string = $kafka_config['brokers']['string']

    # Using kafka-confluent as a consumer is not currently supported by this puppet module,
    # but is implemented in eventlogging.  Hardcode the scheme for consumers for now.
    $kafka_consumer_scheme = 'kafka://'

    # Commonly used Kafka input URIs.
    $kafka_mixed_uri = "${kafka_consumer_scheme}/${kafka_brokers_string}?topic=eventlogging-valid-mixed&auto_offset_reset=earliest"
    $kafka_client_side_raw_uri = "${kafka_consumer_scheme}/${kafka_brokers_string}?topic=eventlogging-client-side&auto_offset_reset=earliest"

    eventlogging::plugin { 'plugins':
        source => 'puppet:///modules/eventlogging/plugins.py',
    }

    # make sure any defined eventlogging services are running
    class { '::eventlogging::monitoring::jobs': }
}