Puppet Class: cassandra::config

Defined in:
manifests/config.pp

Overview

Parameters:

  • config_path (Any)
  • max_heap_size (Any)
  • heap_newsize (Any)
  • jmx_port (Any)
  • additional_jvm_opts (Any)
  • cluster_name (Any)
  • start_native_transport (Any)
  • start_rpc (Any)
  • listen_address (Any)
  • broadcast_address (Any)
  • rpc_address (Any)
  • rpc_port (Any)
  • rpc_server_type (Any)
  • native_transport_port (Any)
  • storage_port (Any)
  • partitioner (Any)
  • data_file_directories (Any)
  • commitlog_directory (Any)
  • saved_caches_directory (Any)
  • initial_token (Any)
  • num_tokens (Any)
  • seeds (Any)
  • concurrent_reads (Any)
  • concurrent_writes (Any)
  • incremental_backups (Any)
  • snapshot_before_compaction (Any)
  • auto_snapshot (Any)
  • multithreaded_compaction (Any)
  • endpoint_snitch (Any)
  • internode_compression (Any)
  • disk_failure_policy (Any)
  • thread_stack_size (Any)


1
2
3
4
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'manifests/config.pp', line 1

class cassandra::config(
    $config_path,
    $max_heap_size,
    $heap_newsize,
    $jmx_port,
    $additional_jvm_opts,
    $cluster_name,
    $start_native_transport,
    $start_rpc,
    $listen_address,
    $broadcast_address,
    $rpc_address,
    $rpc_port,
    $rpc_server_type,
    $native_transport_port,
    $storage_port,
    $partitioner,
    $data_file_directories,
    $commitlog_directory,
    $saved_caches_directory,
    $initial_token,
    $num_tokens,
    $seeds,
    $concurrent_reads,
    $concurrent_writes,
    $incremental_backups,
    $snapshot_before_compaction,
    $auto_snapshot,
    $multithreaded_compaction,
    $endpoint_snitch,
    $internode_compression,
    $disk_failure_policy,
    $thread_stack_size,
) {
    group { 'cassandra':
        ensure  => present,
        require => Class['cassandra::install'],
    }

    user { 'cassandra':
        ensure  => present,
        require => Group['cassandra'],
    }

    File {
        owner   => 'cassandra',
        group   => 'cassandra',
        mode    => '0644',
        require => Class['cassandra::install'],
    }

    file { $data_file_directories:
        ensure  => directory,
    }

    file { "${config_path}/cassandra-env.sh":
        ensure  => file,
        content => template("${module_name}/cassandra-env.sh.erb"),
    }

    $version_config = regsubst($cassandra::version, '\..*$', '')
    notice("cassandra will use the configuration for version ${version_config}")
    file { "${config_path}/cassandra.yaml":
        ensure  => file,
        content => template("${module_name}/cassandra${version_config}.yaml.erb"),
    }

}