{"id":17623414,"url":"https://github.com/voxpupuli/puppet-cassandra","last_synced_at":"2025-04-06T16:14:42.279Z","repository":{"id":32629046,"uuid":"36215083","full_name":"voxpupuli/puppet-cassandra","owner":"voxpupuli","description":"Installs Cassandra \u0026 DataStax Agent on RHEL/Ubuntu/Debian.","archived":false,"fork":false,"pushed_at":"2024-09-16T18:18:46.000Z","size":2512,"stargazers_count":13,"open_issues_count":10,"forks_count":65,"subscribers_count":40,"default_branch":"master","last_synced_at":"2024-10-29T14:22:33.513Z","etag":null,"topics":["centos-puppet-module","debian-puppet-module","hacktoberfest","linux-puppet-module","oraclelinux-puppet-module","puppet","redhat-puppet-module","scientific-puppet-module","ubuntu-puppet-module"],"latest_commit_sha":null,"homepage":"https://forge.puppetlabs.com/puppet/cassandra","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voxpupuli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"vox-pupuli","github":"voxpupuli"}},"created_at":"2015-05-25T06:51:46.000Z","updated_at":"2023-12-19T17:37:47.000Z","dependencies_parsed_at":"2024-02-27T00:43:45.683Z","dependency_job_id":"c0468eab-d7d8-43c7-bff7-c6bfc6ef1d52","html_url":"https://github.com/voxpupuli/puppet-cassandra","commit_stats":{"total_commits":1554,"total_committers":34,"mean_commits":"45.705882352941174","dds":"0.13256113256113256","last_synced_commit":"a17cdf9679713ec7646da9806425373759757d6e"},"previous_names":[],"tags_count":84,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-cassandra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-cassandra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-cassandra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-cassandra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpupuli","download_url":"https://codeload.github.com/voxpupuli/puppet-cassandra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247236671,"owners_count":20906173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["centos-puppet-module","debian-puppet-module","hacktoberfest","linux-puppet-module","oraclelinux-puppet-module","puppet","redhat-puppet-module","scientific-puppet-module","ubuntu-puppet-module"],"created_at":"2024-10-22T21:09:10.793Z","updated_at":"2025-04-06T16:14:42.258Z","avatar_url":"https://github.com/voxpupuli.png","language":"Ruby","funding_links":["https://opencollective.com/vox-pupuli","https://github.com/sponsors/voxpupuli"],"categories":[],"sub_categories":[],"readme":"# Cassandra\n[![Build Status](https://travis-ci.org/voxpupuli/puppet-cassandra.png?branch=master)](https://travis-ci.org/voxpupuli/puppet-cassandra)\n\n## Table of Contents\n\n1. [Overview](#overview)\n1. [Setup - The basics of getting started with Cassandra](#setup)\n    * [What Cassandra affects](#what-cassandra-affects)\n    * [Upgrading](#upgrading)\n    * [Beginning with Cassandra](#beginning-with-cassandra)\n1. [Usage - Configuration options and additional functionality](#usage)\n    * [Setup a keyspace and users](#setup-a-keyspace-and-users)\n    * [Create a Cluster in a Single Data Center](#create-a-cluster-in-a-single-data-center)\n    * [Create a Cluster in Multiple Data Centers](#create-a-cluster-in-multiple-data-centers)\n    * [DataStax Enterprise](#datastax-enterprise)\n    * [Apache Cassandra](#apache-cassandra)\n1. [Reference](#reference)\n1. [Limitations - OS compatibility, etc.](#limitations)\n1. [Development](#development)\n\n## Overview\n\nA Puppet module to install and manage Cassandra, DataStax Agent \u0026 OpsCenter\n\n## Setup\n\n### What Cassandra affects\n\n#### What the Cassandra class affects\n\n* Installs the Cassandra package (default **cassandra22** on Red Hat and\n  **cassandra** on Debian).\n* Configures settings in `${config_path}/cassandra.yaml`.\n* On CentOS 7 if the `init` service provider is used, then cassandra\n  is added as a system service.\n* Optionally ensures that the Cassandra service is enabled and running.\n* On Debian systems:\n  * Optionally replace ```/etc/init.d/cassandra``` with a workaround for\n  [CASSANDRA-9822](https://issues.apache.org/jira/browse/CASSANDRA-9822).\n\n#### What the cassandra::datastax_agent class affects\n\n* Optionally installs the DataStax agent.\n* Optionally sets JAVA_HOME in **/etc/default/datastax-agent**.\n\n#### What the cassandra::datastax_repo class affects\n\n* Optionally configures a Yum repository to install the Cassandra packages\n  from (on Red Hat).\n* Optionally configures an Apt repository to install the Cassandra packages\n  from (on Debian).\n\n#### What the cassandra::dse class affects\n\n* Optionally configures files in the `/etc/dse` directory if one is using\n  DataStax Enterprise.\n\n#### What the cassandra::firewall_ports class affects\n\n* Optionally configures the firewall for the Cassandra related network\n  ports.\n\n#### What the cassandra::java class affects\n\n* Optionally installs a JRE/JDK package (e.g. java-1.7.0-openjdk) and the\n  Java Native Access (JNA).\n\n#### What the cassandra::optutils class affects\n\n* Optionally installs the Cassandra support tools (e.g. cassandra22-tools).\n\n### Upgrading\n\nWe follow [SemVer Versioning](http://semver.org/) and an update of the major\nrelease (i.e. from 1.*Y*.*Z* to 2.*Y*.*Z*) will indicate a significant change\nto the API which will most probably require a change to your manifest.\n\n#### Changes in 2.0.0\n\nThis is a major change to the API and you will more than likely need to\nchange your manifest to accomodate these changes.\n\nThe `service_ensure` attribute of the cassandra class now defaults to\n*undef*, users who do want to manage service status in Puppet can still set\nit to true.  If leaving the value at the default and setting\n`service_refresh` and `service_enable` to false will mean that the\nuser and not Puppet running will control the running state of\nCassandra.  This currently works OK on the Red Hat family, but\nhas issues on Debian due to\n[CASSANDRA-2356](https://issues.apache.org/jira/browse/CASSANDRA-2356)\nduring an initial install or package upgrade.\n\nAll the functionality relating to OpsCenter has been divested to the\n[locp/opscenter](https://forge.puppet.com/locp/opscenter) module on\nPuppet Forge.\n\nIt should also be noted that the module no longer creates directories for\nthe `data`, `commitlog`, `saved_caches` and for Cassandra 3 the `hints`\ndirectory.  These resources will now need to be defined in your\nmanifest/profile.\n\nFor a list of features that have been deprecated in this release, please see\nhttps://github.com/voxpupuli/puppet-cassandra/wiki/Deprecations\n\nFor details on migrating from the version 1.X.X attributes to the `settings`\nhash, see\n(https://github.com/voxpupuli/puppet-cassandra/wiki/Suggested-Baseline-Settings)\n\nPlease also see the notes for 2.0.0 in the\n[CHANGELOG](./CHANGELOG.md).\n\n#### Changes in 1.19.0\n\nThe hints_directory documentation will cause a change in the cassandra.yaml\nfile regardless of the value you set it to.  If you do not wish this to\nresult in a refesh of the Cassandra service, please set service_refresh to\nfalse.\n\n#### Changes in 1.9.2\n\nNow that Cassandra 3 is available from the DataStax repositories, there is\na problem (especially on Debian) with the operating system package manager\nattempting to install Cassandra 3.  This can be mitigated against using\nsomething similar to the code in this modules acceptance test.  Please note\nthat the default Cassandra package name has now been changed from 'dsc'.  See\nthe documentation for cassandra::package_name below for details.\n\n```puppet\n if $::osfamily == 'RedHat' {\n   $version = '2.2.4-1'\n } else {\n   $version = '2.2.4'\n }\n\n class { 'cassandra':\n   package_ensure =\u003e $version,\n }\n```\n\n#### Changes in 1.8.0\n\nA somewhat embarrassing correction to the spelling of the\ncassandra::fail_on_non_suppoted_os to cassandra::fail_on_non_supported_os.\n\n#### Issues when Upgrading to 1.4.0\n\nUnfortunately both releases 1.3.7 and 1.4.0 have subsequently been found to\ncall a refresh service even when no changes had been made to the underlying\nconfiguration.  In release 1.8.0 (somewhat belatedly) the service_refresh\nflag has been introduced to mitigate against similar problems.\n\n#### Issues When Upgrading to 1.3.7\n\n* Please see the notes for 1.4.0.\n\n#### Changes in 1.0.0\n\n* cassandra::cassandra_package_ensure has been renamed to\n  cassandra::package_ensure.\n* cassandra::cassandra_package_name has been renamed to\n  cassandra::package_name.\n\n#### Changes in 0.4.0\n\nThere is now a cassandra::datastax_agent class, therefore:\n\n* cassandra::datastax_agent_package_ensure has now been replaced with\n  cassandra::datastax_agent::package_ensure.\n* cassandra::datastax_agent_service_enable has now been replaced with\n  cassandra::datastax_agent::service_enable.\n* cassandra::datastax_agent_service_ensure has now been replaced with\n  cassandra::datastax_agent::service_ensure.\n* cassandra::datastax_agent_package_name has now been replaced with\n  cassandra::datastax_agent::package_name.\n* cassandra::datastax_agent_service_name has now been replaced with\n  cassandra::datastax_agent::service_name.\n\nLikewise now there is a new class for handling the installation of Java:\n\n* cassandra::java_package_ensure has now been replaced with\n  cassandra::java::ensure.\n* cassandra::java_package_name has now been replaced with\n  cassandra::java::package_name.\n\nAlso there is now a class for installing the optional utilities:\n\n* cassandra::cassandra_opt_package_ensure has now been replaced with\n  cassandra::optutils:ensure.\n* cassandra::cassandra_opt_package_name has now been replaced with\n  cassandra::optutils:package_name.\n\n#### Changes in 0.3.0\n\n* cassandra_opt_package_ensure changed from 'present' to undef.\n\n* The manage_service option has been replaced with service_enable and\n  service_ensure.\n\n### Beginning with Cassandra\n\nCreate a Cassandra 2.X cluster called MyCassandraCluster which uses the\nGossipingPropertyFileSnitch and password authentication.  In this very\nbasic example the node itself becomes a seed for the cluster and the\ncredentials will default to a user called cassandra with a password\ncalled of cassandra.\n\n```puppet\n# Cassandra pre-requisites\ninclude cassandra::datastax_repo\ninclude cassandra::java\n\nclass { 'cassandra':\n  settings =\u003e {\n    'authenticator'               =\u003e 'PasswordAuthenticator',\n    'cluster_name'                =\u003e 'MyCassandraCluster',\n    'commitlog_directory'         =\u003e '/var/lib/cassandra/commitlog',\n    'commitlog_sync'              =\u003e 'periodic',\n    'commitlog_sync_period_in_ms' =\u003e 10000,\n    'data_file_directories'       =\u003e ['/var/lib/cassandra/data'],\n    'endpoint_snitch'             =\u003e 'GossipingPropertyFileSnitch',\n    'listen_address'              =\u003e $::ipaddress,\n    'partitioner'                 =\u003e 'org.apache.cassandra.dht.Murmur3Partitioner',\n    'saved_caches_directory'      =\u003e '/var/lib/cassandra/saved_caches',\n    'seed_provider'               =\u003e [\n      {\n        'class_name' =\u003e 'org.apache.cassandra.locator.SimpleSeedProvider',\n        'parameters' =\u003e [\n          {\n            'seeds' =\u003e $::ipaddress,\n          },\n        ],\n      },\n    ],\n    'start_native_transport'      =\u003e true,\n  },\n  require  =\u003e Class['cassandra::datastax_repo', 'cassandra::java'],\n}\n```\nHowever, **PLEASE** note that this is the **ABSOLUTE MINIMUM** configuration\nto get Cassandra up and running but will probably give you a rather badly\nconfigured node.  Please see\n[Suggested Baseline Settings](https://github.com/voxpupuli/puppet-cassandra/wiki/Suggested-Baseline-Settings)\nfor details on making your configuration a lot more robust.\n\nFor this code to run with version 3.X of Cassandra, the `hints_directory` will\nalso need to be specified:\n\n```puppet\n...\n\nclass { 'cassandra':\n  settings =\u003e {\n    ...\n    'hints_directory'             =\u003e '/var/lib/cassandra/hints',\n    ...\n  },\n  require  =\u003e Class['cassandra::datastax_repo', 'cassandra::java'],\n}\n```\n\n### Hiera\n\nIn your top level node classification (usually `common.yaml`), add the\nsettings hash and all the tweaks you want all the clusters to use:\n\n```YAML\ncassandra::baseline_settings:\n  authenticator: AllowAllAuthenticator\n  authorizer: AllowAllAuthorizer\n  auto_bootstrap: true\n  auto_snapshot: true\n  ...\n```\n\nThen, in the individual node classification add the parts which define\nthe cluster:\n\n```YAML\ncassandra::settings:\n  cluster_name: developer playground cassandra cluster\ncassandra::dc: Onsite1\ncassandra::rack: RAC1\ncassandra::package_ensure: 3.0.5-1\ncassandra::package_name: cassandra30\n```\n\n## Usage\n\n### Setup a keyspace and users\n\nWe assume that authentication has been enabled for the cassandra\ncluster and we are connecting with the default user name and password\n('cassandra/cassandra').\n\nIn this example, we create a keyspace (mykeyspace) with a table called\n'users' and an index called 'users_lname_idx'.\n\nWe also add three users (to Cassandra, not the mykeyspace.users\ntable) called spillman, akers and boone while ensuring that a user\ncalled lucan is absent.\n\n```puppet\nclass { 'cassandra':\n  ...\n}\n\nclass { 'cassandra::schema':\n  cqlsh_password =\u003e 'cassandra',\n  cqlsh_user     =\u003e 'cassandra',\n  cqlsh_host     =\u003e $::ipaddress,\n  indexes        =\u003e {\n    'users_lname_idx' =\u003e {\n      table    =\u003e 'users',\n      keys     =\u003e 'lname',\n      keyspace =\u003e 'mykeyspace',\n    },\n  },\n  keyspaces      =\u003e {\n    'mykeyspace' =\u003e {\n      durable_writes  =\u003e false,\n      replication_map =\u003e {\n        keyspace_class     =\u003e 'SimpleStrategy',\n        replication_factor =\u003e 1,\n      },\n    }\n  },\n  permissions    =\u003e {\n    'Grant select permissions to spillman to all keyspaces' =\u003e {\n      permission_name =\u003e 'SELECT',\n      user_name       =\u003e 'spillman',\n    },\n    'Grant modify to to keyspace mykeyspace to akers'       =\u003e {\n      keyspace_name   =\u003e 'mykeyspace',\n      permission_name =\u003e 'MODIFY',\n      user_name       =\u003e 'akers',\n    },\n    'Grant alter permissions to mykeyspace to boone'        =\u003e {\n      keyspace_name   =\u003e 'mykeyspace',\n      permission_name =\u003e 'ALTER',\n      user_name       =\u003e 'boone',\n    },\n    'Grant ALL permissions to mykeyspace.users to gbennet'  =\u003e {\n      keyspace_name   =\u003e 'mykeyspace',\n      permission_name =\u003e 'ALTER',\n      table_name      =\u003e 'users',\n      user_name       =\u003e 'gbennet',\n    },\n  },\n  tables         =\u003e {\n    'users' =\u003e {\n      columns  =\u003e {\n        user_id       =\u003e 'int',\n        fname         =\u003e 'text',\n        lname         =\u003e 'text',\n        'PRIMARY KEY' =\u003e '(user_id)',\n      },\n      keyspace =\u003e 'mykeyspace',\n    },\n  },\n  users          =\u003e {\n    'spillman' =\u003e {\n      password =\u003e 'Niner27',\n    },\n    'akers'    =\u003e {\n      password  =\u003e 'Niner2',\n      superuser =\u003e true,\n    },\n    'boone'    =\u003e {\n      password =\u003e 'Niner75',\n    },\n    'gbennet'  =\u003e {\n      'password' =\u003e 'foobar',\n    },\n    'lucan'    =\u003e {\n      'ensure' =\u003e absent\n    },\n  },\n}\n```\n\n### Create a Cluster in a Single Data Center\n\nIn the DataStax documentation _Initializing a multiple node cluster (single\ndata center)_\n\u003chttp://docs.datastax.com/en/cassandra/2.2/cassandra/initialize/initSingleDS.html\u003e\nthere is a basic example of a six node cluster with two seeds to be created in\na single data center spanning two racks.  The nodes in the cluster are:\n\n**Node Name**  | **IP Address** |\n---------------|----------------|\nnode0 (seed 1) | 110.82.155.0   |\nnode1          | 110.82.155.1   |\nnode2          | 110.82.155.2   |\nnode3 (seed 2) | 110.82.156.3   |\nnode4          | 110.82.156.4   |\nnode5          | 110.82.156.5   |\n\nEach node is configured to use the GossipingPropertyFileSnitch and 256 virtual\nnodes (vnodes).  The name of the cluster is _MyCassandraCluster_.  Also,\nwhile building the initial cluster, we are setting the auto_bootstrap\nto false.\n\nIn this initial example, we are going to expand the example by:\n\n* Ensuring that the software is installed via the DataStax Community\n  repository by including `cassandra::datastax_repo`.  This needs to be\n  executed before the Cassandra package is installed.\n* That a suitable Java Runtime environment (JRE) is installed with Java Native\n  Access (JNA) by including `cassandra::java`.  This need to be executed\n  before the Cassandra service is started.\n\n```puppet\nnode /^node\\d+$/ {\n  class { 'cassandra::datastax_repo':\n    before =\u003e Class['cassandra']\n  }\n\n  class { 'cassandra::java':\n    before =\u003e Class['cassandra']\n  }\n\n  class { 'cassandra':\n    settings       =\u003e {\n      'authenticator'               =\u003e 'AllowAllAuthenticator',\n      'auto_bootstrap'              =\u003e false,\n      'cluster_name'                =\u003e 'MyCassandraCluster',\n      'commitlog_directory'         =\u003e '/var/lib/cassandra/commitlog',\n      'commitlog_sync'              =\u003e 'periodic',\n      'commitlog_sync_period_in_ms' =\u003e 10000,\n      'data_file_directories'       =\u003e ['/var/lib/cassandra/data'],\n      'endpoint_snitch'             =\u003e 'GossipingPropertyFileSnitch',\n      'hints_directory'             =\u003e '/var/lib/cassandra/hints',\n      'listen_interface'            =\u003e 'eth1',\n      'num_tokens'                  =\u003e 256,\n      'partitioner'                 =\u003e 'org.apache.cassandra.dht.Murmur3Partitioner',\n      'saved_caches_directory'      =\u003e '/var/lib/cassandra/saved_caches',\n      'seed_provider'               =\u003e [\n        {\n          'class_name' =\u003e 'org.apache.cassandra.locator.SimpleSeedProvider',\n          'parameters' =\u003e [\n            {\n              'seeds' =\u003e '110.82.155.0,110.82.156.3',\n            },\n          ],\n        },\n      ],\n      'start_native_transport'      =\u003e true,\n    },\n  }\n}\n```\n\nThe default value for the num_tokens is already 256, but it is\nincluded in the example for clarity.  Do not forget to either\nset auto_bootstrap to true or not set the attribute at all\nafter initializing the cluster.\n\n### Create a Cluster in Multiple Data Centers\n\nTo continue with the examples provided by DataStax, we look at the example\nfor a cluster across multiple data centers\n\u003chttp://docs.datastax.com/en/cassandra/2.2/cassandra/initialize/initMultipleDS.html\u003e.\n\n**Node Name**  | **IP Address** | **Data Center** | **Rack** |\n---------------|----------------|-----------------|----------|\nnode0 (seed 1) | 10.168.66.41   | DC1             | RAC1     |\nnode1          | 10.176.43.66   | DC1             | RAC1     |\nnode2          | 10.168.247.41  | DC1             | RAC1     |\nnode3 (seed 2) | 10.176.170.59  | DC2             | RAC1     |\nnode4          | 10.169.61.170  | DC2             | RAC1     |\nnode5          | 10.169.30.138  | DC2             | RAC1     |\n\nFor the sake of simplicity, we will confine this example to the nodes:\n\n```puppet\nnode /^node[012]$/ {\n  class { 'cassandra':\n    dc             =\u003e 'DC1',\n    settings       =\u003e {\n      'authenticator'               =\u003e 'AllowAllAuthenticator',\n      'auto_bootstrap'              =\u003e false,\n      'cluster_name'                =\u003e 'MyCassandraCluster',\n      'commitlog_directory'         =\u003e '/var/lib/cassandra/commitlog',\n      'commitlog_sync'              =\u003e 'periodic',\n      'commitlog_sync_period_in_ms' =\u003e 10000,\n      'data_file_directories'       =\u003e ['/var/lib/cassandra/data'],\n      'endpoint_snitch'             =\u003e 'GossipingPropertyFileSnitch',\n      'hints_directory'             =\u003e '/var/lib/cassandra/hints',\n      'listen_interface'            =\u003e 'eth1',\n      'num_tokens'                  =\u003e 256,\n      'partitioner'                 =\u003e 'org.apache.cassandra.dht.Murmur3Partitioner',\n      'saved_caches_directory'      =\u003e '/var/lib/cassandra/saved_caches',\n      'seed_provider'               =\u003e [\n        {\n          'class_name' =\u003e 'org.apache.cassandra.locator.SimpleSeedProvider',\n          'parameters' =\u003e [\n            {\n              'seeds' =\u003e '110.82.155.0,110.82.156.3',\n            },\n          ],\n        },\n      ],\n      'start_native_transport'      =\u003e true,\n    },\n  }\n}\n\nnode /^node[345]$/ {\n  class { 'cassandra':\n    dc             =\u003e 'DC2',\n    settings       =\u003e {\n      'authenticator'               =\u003e 'AllowAllAuthenticator',\n      'auto_bootstrap'              =\u003e false,\n      'cluster_name'                =\u003e 'MyCassandraCluster',\n      'commitlog_directory'         =\u003e '/var/lib/cassandra/commitlog',\n      'commitlog_sync'              =\u003e 'periodic',\n      'commitlog_sync_period_in_ms' =\u003e 10000,\n      'data_file_directories'       =\u003e ['/var/lib/cassandra/data'],\n      'endpoint_snitch'             =\u003e 'GossipingPropertyFileSnitch',\n      'hints_directory'             =\u003e '/var/lib/cassandra/hints',\n      'listen_interface'            =\u003e 'eth1',\n      'num_tokens'                  =\u003e 256,\n      'partitioner'                 =\u003e 'org.apache.cassandra.dht.Murmur3Partitioner',\n      'saved_caches_directory'      =\u003e '/var/lib/cassandra/saved_caches',\n      'seed_provider'               =\u003e [\n        {\n          'class_name' =\u003e 'org.apache.cassandra.locator.SimpleSeedProvider',\n          'parameters' =\u003e [\n            {\n              'seeds' =\u003e '110.82.155.0,110.82.156.3',\n            },\n          ],\n        },\n      ],\n      'start_native_transport'      =\u003e true,\n    },\n  }\n}\n```\n\nWe don't need to specify the rack name (with the rack attribute) as RAC1 is\nthe default value.  Again, do not forget to either set auto_bootstrap to\ntrue or not set the attribute at all after initializing the cluster.\n\n### DataStax Enterprise\n\nAfter configuring the relevant repository, the following snippet works on\nCentOS 7 to install DSE Cassandra 4.7.0, set the HADOOP_LOG_DIR, set the\nDSE_HOME and configure DataStax Enterprise to use LDAP for authentication:\n\n```puppet\nclass { 'cassandra::datastax_repo':\n  descr   =\u003e 'DataStax Repo for DataStax Enterprise',\n  pkg_url =\u003e 'https://username:password@rpm.datastax.com/enterprise',\n  before  =\u003e Class['cassandra'],\n}\n\nclass { 'cassandra':\n  cluster_name    =\u003e 'MyCassandraCluster',\n  config_path     =\u003e '/etc/dse/cassandra',\n  package_ensure  =\u003e '4.7.0-1',\n  package_name    =\u003e 'dse-full',\n  service_name    =\u003e 'dse',\n  ...\n}\n\nclass { 'cassandra::dse':\n  file_lines =\u003e {\n    'Set HADOOP_LOG_DIR directory' =\u003e {\n      ensure =\u003e present,\n      path   =\u003e '/etc/dse/dse-env.sh',\n      line   =\u003e 'export HADOOP_LOG_DIR=/var/log/hadoop',\n      match  =\u003e '^# export HADOOP_LOG_DIR=\u003clog_dir\u003e',\n    },\n    'Set DSE_HOME'                 =\u003e {\n      ensure =\u003e present,\n      path   =\u003e '/etc/dse/dse-env.sh',\n      line   =\u003e 'export DSE_HOME=/usr/share/dse',\n      match  =\u003e '^#export DSE_HOME',\n    },\n  },\n  settings   =\u003e {\n    ldap_options =\u003e {\n      server_host                =\u003e localhost,\n      server_port                =\u003e 389,\n      search_dn                  =\u003e 'cn=Admin',\n      search_password            =\u003e secret,\n      use_ssl                    =\u003e false,\n      use_tls                    =\u003e false,\n      truststore_type            =\u003e jks,\n      user_search_base           =\u003e 'ou=users,dc=example,dc=com',\n      user_search_filter         =\u003e '(uid={0})',\n      credentials_validity_in_ms =\u003e 0,\n      connection_pool            =\u003e {\n        max_active =\u003e 8,\n        max_idle   =\u003e 8,\n      }\n    }\n  }\n}\n```\n\n### Apache Cassandra\nDataStax announced in late October 2016 that it was no longer supporting\nthe community edition of Cassandra or DSC as it was known (see\n*[Take a bow Planet\nCassandra]*(http://www.datastax.com/2016/10/take-a-bow-planet-cassandra)\nfor details).  However, the following snippet of code running on Ubuntu\n14.04 worked fine without having to change any of the `::cassandra` class\nsettings:\n\n```puppet\nrequire cassandra::java\ninclude cassandra::optutils\n\nclass { 'cassandra::apache_repo':\n  release =\u003e '310x',\n  before  =\u003e Class['cassandra', 'cassandra::optutils'],\n}\n\nclass { 'cassandra':\n  ...\n}\n```\n\n## Reference\n\nThe reference documentation is generated using the\n[puppet-strings](https://github.com/puppetlabs/puppet-strings) tool.  To see\nall of it, please go to\n[http://voxpupuli.github.io/puppet-cassandra](http://voxpupuli.github.io/puppet-cassandra/_index.html).\n\n## Limitations\n\n* When using a Ruby version before 1.9.0, the contents of the Cassandra\nconfiguration file may change order of elements due to a problem with\nto_yaml in earlier versions of Ruby.\n* When creating key spaces, indexes, cql_types and users the settings will only\nbe used to create a new resource if it does not currently exist.  If a change\nis made to the Puppet manifest but the resource already exits, this change\nwill not be reflected.\n* At the moment the `cassandra::system::transparent_hugepage` does not\npersist between reboots.\n* Acceptance for Debian 7 are confined to Cassandra 2.1 and 2.2.  There is\na conflict between the GLIBC on Debian 7 and the newer releases of Cassandra\n3.X.\n\n## Development\n\nContributions will be gratefully accepted.  Please go to the project page,\nfork the project, make your changes locally and then raise a pull request.\nDetails on how to do this are available at\nhttps://guides.github.com/activities/contributing-to-open-source.\n\nPlease also see the\n[CONTRIBUTING.md](./CONTRIBUTING.md)\npage for project specific requirements.\n\n### Additional Contributers\n\nFor a list of contributers see\n[CONTRIBUTING.md](./CONTRIBUTING.md)\nand https://github.com/voxpupuli/puppet-cassandra/graphs/contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-cassandra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpupuli%2Fpuppet-cassandra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-cassandra/lists"}