diff --git a/CHANGELOG.md b/CHANGELOG.md index 55e86b2..1cf838e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,1150 +1,1189 @@ -# Change Log +# Changelog -## [2.6.0](https://github.com/locp/cassandra/tree/2.6.0) (2017-09-11) -[Full Changelog](https://github.com/locp/cassandra/compare/2.5.0...2.6.0) +All notable changes to this project will be documented in this file. +Each new release typically also includes the latest modulesync defaults. +These should not affect the functionality of the module. -**Fixed bugs:** +## [v2.7.0](https://github.com/voxpupuli/puppet-cassandra/tree/v2.7.0) (2018-01-04) + +[Full Changelog](https://github.com/voxpupuli/puppet-cassandra/compare/2.6.0...v2.7.0) + +**Implemented enhancements:** + +- migrate to voxpupuli [\#394](https://github.com/voxpupuli/puppet-cassandra/issues/394) +- adding paramter to define whether or not to manage the config file at… [\#411](https://github.com/voxpupuli/puppet-cassandra/pull/411) ([zmarois](https://github.com/zmarois)) -- Unit and acceptance tests are failing that have been successful in the past. [\#397](https://github.com/locp/cassandra/issues/397) +**Closed issues:** + +- Review metadata.json and README.md [\#410](https://github.com/voxpupuli/puppet-cassandra/issues/410) **Merged pull requests:** -- Implement apache_repo for RedHat [\#396](https://github.com/locp/cassandra/pull/396) ([stijnvdb](https://github.com/stijnvdb)) +- replace validate\_hash with assert\_type [\#415](https://github.com/voxpupuli/puppet-cassandra/pull/415) ([bastelfreak](https://github.com/bastelfreak)) +- regenerate puppet-strings docs [\#414](https://github.com/voxpupuli/puppet-cassandra/pull/414) ([bastelfreak](https://github.com/bastelfreak)) +- Changes towards \#410 \(Review metadata.json and README.md\) [\#412](https://github.com/voxpupuli/puppet-cassandra/pull/412) ([dallinb](https://github.com/dallinb)) +- This project no longer uses CircleCI. [\#408](https://github.com/voxpupuli/puppet-cassandra/pull/408) ([dallinb](https://github.com/dallinb)) +- Fix merge conflicts for PR \#404 [\#405](https://github.com/voxpupuli/puppet-cassandra/pull/405) ([dallinb](https://github.com/dallinb)) +- Release 2.6.0 [\#403](https://github.com/voxpupuli/puppet-cassandra/pull/403) ([dallinb](https://github.com/dallinb)) +- Release 2.6.0 [\#402](https://github.com/voxpupuli/puppet-cassandra/pull/402) ([dallinb](https://github.com/dallinb)) + +## [2.6.0](https://github.com/voxpupuli/puppet-cassandra/tree/2.6.0) (2017-09-11) -## [2.5.0](https://github.com/locp/cassandra/tree/2.5.0) (2017-05-31) -[Full Changelog](https://github.com/locp/cassandra/compare/2.4.1...2.5.0) +[Full Changelog](https://github.com/voxpupuli/puppet-cassandra/compare/2.5.0...2.6.0) **Implemented enhancements:** -- Integration with github\_changelog\_generator [\#389](https://github.com/locp/cassandra/pull/389) ([dallinb](https://github.com/dallinb)) +- Implement apache\_repo for RedHat [\#395](https://github.com/voxpupuli/puppet-cassandra/issues/395) +- \#395 Adding Red Hat OS [\#396](https://github.com/voxpupuli/puppet-cassandra/pull/396) ([stijnvdb](https://github.com/stijnvdb)) **Fixed bugs:** -- Tests failing for CentOS 6 on "Create schema for 2.1" [\#392](https://github.com/locp/cassandra/issues/392) +- Unit and acceptance tests are failing that have been successful in the past. [\#397](https://github.com/voxpupuli/puppet-cassandra/issues/397) + +**Closed issues:** + +- Release 2.6.0 [\#401](https://github.com/voxpupuli/puppet-cassandra/issues/401) + +**Merged pull requests:** + +- Implement apache\_repo for RedHat [\#400](https://github.com/voxpupuli/puppet-cassandra/pull/400) ([dallinb](https://github.com/dallinb)) +- Cassandra 3.X and Debian 7 clash over GLIBC version. [\#399](https://github.com/voxpupuli/puppet-cassandra/pull/399) ([dallinb](https://github.com/dallinb)) +- Bugfix 397 - Spec tests not working. [\#398](https://github.com/voxpupuli/puppet-cassandra/pull/398) ([dallinb](https://github.com/dallinb)) +- Release 2.5.0 [\#390](https://github.com/voxpupuli/puppet-cassandra/pull/390) ([dallinb](https://github.com/dallinb)) + +## [2.5.0](https://github.com/voxpupuli/puppet-cassandra/tree/2.5.0) (2017-05-31) + +[Full Changelog](https://github.com/voxpupuli/puppet-cassandra/compare/2.4.1...2.5.0) + +**Implemented enhancements:** + +- Integration with github\_changelog\_generator [\#389](https://github.com/voxpupuli/puppet-cassandra/pull/389) ([dallinb](https://github.com/dallinb)) **Closed issues:** -- Rubocop failing tests since upgrade from 0.48.1 to 0.49.0 [\#391](https://github.com/locp/cassandra/issues/391) +- Tests failing for CentOS 6 on "Create schema for 2.1" [\#392](https://github.com/voxpupuli/puppet-cassandra/issues/392) +- Rubocop failing tests since upgrade from 0.48.1 to 0.49.0 [\#391](https://github.com/voxpupuli/puppet-cassandra/issues/391) **Merged pull requests:** -- Switch to role management instead of user one [\#388](https://github.com/locp/cassandra/pull/388) ([SergK](https://github.com/SergK)) +- Release 2.5.0 [\#393](https://github.com/voxpupuli/puppet-cassandra/pull/393) ([dallinb](https://github.com/dallinb)) +- Switch to role management instead of user one [\#388](https://github.com/voxpupuli/puppet-cassandra/pull/388) ([SergK](https://github.com/SergK)) -## 2017-04-24 - Release 2.4.1 ([diff](https://github.com/locp/cassandra/compare/2.4.0...2.4.1)) +## [2.4.1](https://github.com/voxpupuli/puppet-cassandra/compare/2.4.0...2.4.1) (2017-04-24) ### Summary A non-functional release of improvements. ### Improvements * A refactoring and extension of the acceptance tests. * Migrated from version 1.0 to 2.0 of the CircleCI API. -## 2017-03-30 - Release 2.4.0 ([diff](https://github.com/locp/cassandra/compare/2.3.0...2.4.0)) +## [2.4.0](https://github.com/voxpupuli/puppet-cassandra/compare/2.3.0...2.4.0) (2017-03-30) ### Summary * Added the `cassandra::dse` class to 2.X.Y of the module. * Added the new `cassandra::apache_repo` class. * Minor bug fixes and improvements. ## 2017-02-28 - Release 1.27.0 ([diff](https://github.com/locp/cassandra/compare/1.26.1...1.27.0)) ### Summary Add the `cassandra::dse` class. ## 2017-01-21 - Release 2.3.0 ([diff](https://github.com/locp/cassandra/compare/2.2.1...2.3.0)) New attribute to `::cassandra` class: * `baseline_settings` New defined types: * `cassandra::system::swapoff` * `cassandra::system::sysctl` * `cassandra::system::transparent_hugepage` ## 2016-12-08 - Release 2.2.1 ([diff](https://github.com/locp/cassandra/compare/2.2.0...2.2.1)) ### Summary Non-functional improvements and some documentation fixes. ### Improvements * All beaker spec tests have been migrated from AWS/EC2 to Docker. * Installed Python 2.7 onto the CentOS 6 docker image allowing the full test suite to be run against that operating system. * Some documentation improvements and fixed some typos. * The spec tests will now fail if there is not 100% coverage. ## 2016-12-01 - Release 2.2.0 ([diff](https://github.com/locp/cassandra/compare/2.1.2...2.2.0)) ### Summary At long last we have a defined type for handling permissions (something that we have been promising since May). Added some more facts for assisting in JVM tuning. Also fixed an error that was happening when attempting to build the project. ### Features * Added the `permissions` attribute to the `cassandra::schema` class. * Added the `cassandra::schema::permission` ### Bugfixes * Some refactoring of the ruby code since the release of Rubocop 0.46.0 which was failing code that previously had passed OK. ## 2016-11-02 - Release 2.1.2 ([diff](https://github.com/locp/cassandra/compare/2.1.1...2.1.2)) ### Summary Basically a non-functional release to reduce some of the technical debt from the 2.0.0 release. Also some minor improvements to the documentation. ## 2016-11-19 - Release 1.26.1 ([diff](https://github.com/locp/cassandra/compare/1.26.0...1.26.1)) ### Summary Retro-fitted a bug that was fixed in 2.1.1 into the 1.X.Y version of the module. ### Bugfixes * A hotfix for a bug in `cassandra::schema` that has been around since version 1.18.0 of this module. ## 2016-11-02 - Release 2.1.1 ([diff](https://github.com/locp/cassandra/compare/2.1.0...2.1.1)) ### Summary A hotfix for a bug in `cassandra::schema` that has been around since version 1.18.0 of this module. ### Bugfixes * Fixed a bug where cql_types would not be created unless keyspaces were also provided. * Fixed a minor typo in the README. ## 2016-10-29 - Release 2.1.0 ([diff](https://github.com/locp/cassandra/compare/2.0.2...2.1.0)) ### Summary A mixture of new features, a new style of documentation and other improvements. Also ran the [Sonar-Puppet](https://github.com/iwarapter/sonar-puppet) plugin against the code to improve the code quality. ### Features * The following facts are now available: * cassandramajorversion * cassandraminorversion * cassandrapatchversion * cassandrarelease * The following attributes are now available: * cassandra::commitlog_directory * cassandra::commitlog_directory_mode * cassandra::data_file_directories * cassandra::data_file_directories_mode * cassandra::hints_directory * cassandra::hints_directory_mode * cassandra::saved_caches_directory * cassandra::saved_caches_directory_mode * cassandra::systemctl ### Bugfixes * Resolved all issues identified by Sonar-Puppet from 38 (2 major, 36 minor). In doing so, this reduced the technical debt ration from 0.9% to 0.0%. ### Improvements * The reference documentation is now processed via http://locp.github.io/cassandra * Made a start on refactoring the spec/unit tests so that there is less duplication of code. ## 2016-10-12 - Release 2.0.2 ([diff](https://github.com/locp/cassandra/compare/2.0.1...2.0.2)) ### Summary This is a non-functional patch release that fixes some issues in documentation, and fixes some bugs and makes some improvements in our testing framework. ### Improvements * Ensure there is a framework for supporting the legacy 1.X.Y. module until the end of 2016. * A more obvious test rig for the beaker/acceptance tests on TravisCI. ### Bugfixes * Corrected misleading documentation. * Ensure legacy test builds still work against Ruby 1.9.3. * Corrected deprecated tags in the module metadata. ## 2016-10-08 - Release 1.26.0 ([diff](https://github.com/locp/cassandra/compare/1.25.2...1.26.0)) ### Improvements * The `cassandra::seeds` paramater can now be provided as an array or as a string. # Bugfixes * Ensure legacy builds still work on TravisCI. ## 2016-10-01 - Release 2.0.1 ([diff](https://github.com/locp/cassandra/compare/2.0.0...2.0.1)) ### Summary A non-functional release containing some improvements and documentation corrections. ### Improvements * Corrected some out of date documentation. * Removed some deprecated files. * Regained 100% spec test coverage. ## 2016-09-29 - Release 2.0.0 ([diff](https://github.com/locp/cassandra/compare/1.26.0...2.0.0)) ### Summary This is a major release and will more than likely break your existing manifest until you alter your code. Please see the [Upgrading](https://github.com/locp/cassandra/tree/release/274/v2.0.0#upgrading) section of the README for further details. * The method of passing parameters to Cassandra has been made more flexible. * Support for Ubuntu 16.04. * Changes to how `service_ensure` is handled. * `cassandra::file` is now a define, not a class (as it should have been). ## 2016-09-03 - Release 1.25.2 ([diff](https://github.com/locp/cassandra/compare/1.25.1...1.25.2)) ### Summary The `service_systemd` attribute is now deprecated for the `cassandra`, `cassandra::datastax_agent` and `cassandra::opscenter` classes. See https://github.com/locp/cassandra/wiki/DEP-020 for more details. ## 2016-08-14 - Release 1.25.1 ([diff](https://github.com/locp/cassandra/compare/1.25.0...1.25.1)) ### Summary Bugfix to ensure that the name of the PID file for the DataStax Agent service matches with the service name. ## 2016-07-17 - Release 1.25.0 ([diff](https://github.com/locp/cassandra/compare/1.24.3...1.25.0)) ### Summary A feature release. ### Features * The `cassandra` class now has a `disk_access_mode` attribute. ## 2016-06-26 - Release 1.24.3 ([diff](https://github.com/locp/cassandra/compare/1.24.2...1.24.3)) ### Summary A couple of non-functional bug fixes. ### Bugfixes * The new version of RuboCop flagged code changes required in the Vagrantfile. * The new version of Puppet Lint flagged code changes required in cassandra::java. ## 2016-06-20 - Release 1.24.2 ([diff](https://github.com/locp/cassandra/compare/1.24.1...1.24.2)) ### Summary A non-functional bug fix. ### Bugfixes * The release of the specinfra gem (2.59.1) caused problems with our build. Pinned now to 2.59.0. ## 2016-06-18 - Release 1.24.1 ([diff](https://github.com/locp/cassandra/compare/1.24.0...1.24.1)) ### Summary Really only affects CentOS 7 as all the other supported operating systems do not require the systemd file to be installed. ### Bugfixes * Change the way that systemd shuts Cassandra down. ## 2015-05-25 - Release 1.24.0 ([diff](https://github.com/locp/cassandra/compare/1.23.1...1.24.0)) ### Summary A Debian-centric release. Debian 8 is now supported and a workaround for [CASSANDRA-2356](https://issues.apache.org/jira/browse/CASSANDRA-2356) (which only affects Debian. ### Features * New attributes to the `::cassandra` class are: * cassandra_2356_sleep_seconds * config_path_parents * rackdc_tmpl ### Bugfixes * CASSANDRA-2356 ### Improvements * Debian 8 is now part of the acceptance testing release process. ## 2016-05-10 - Release 1.23.1 ([diff](https://github.com/locp/cassandra/compare/1.23.0...1.23.1)) ### Summary A minor bugfix that fixes a problem that would only affect module developers, not users of the module. ### Bugfixes * Rubocop 0.4.0 is stricter so implemented changes that were flagged by it. ## 2016-05-07 - Release 1.23.0 ([diff](https://github.com/locp/cassandra/compare/1.22.1...1.23.0)) ### Summary A couple of new features, a non-functional improvement and a bugfix. ### Features * Added the cassandra::file class. * Added the following attributes to the cassandra::schema class: * cqlsh_client_tmpl * cqlsh_client_config ### Bugfixes * Fixed a daft error that stopped beaker tests running on CentOS 7. ### Improvements * Improved how fast the beaker/acceptance tests are run from TravisCI. ## 2016-05-03 - Release 1.22.1 ([diff](https://github.com/locp/cassandra/compare/1.22.0...1.22.1)) ### Summary A non-functional release for a minor improvement and a bug fix. ### Bugfixes * Fixes a problem with resource ordering if the service_refresh attribute is set to false. ### Improvements * Test coverage in Coveralls is now back at 100% (https://coveralls.io/github/locp/cassandra). ## 2016-04-25 - Release 1.22.0 ([diff](https://github.com/locp/cassandra/compare/1.21.0...1.22.0)) ### Summary Two new features. ### Features * Allow the creation and dropping of users with the following: * A new defined type cassandra::schema::user * The new attribute cassandra::schema::users * Allow the manipulation of the environment file with the new class cassandra::env. ## 2016-04-20 - Release 1.21.0 ([diff](https://github.com/locp/cassandra/compare/1.20.0...1.21.0)) ### Summary Some minor bug fixes. Also some features and improvements that allow acceptance tests to be run against Cassandra 3. ### Features * Added the following attributes to cassandra::java: * aptkey * aptsource * yumrepo ### Bugfixes * Corrected some errors in the README and CHANGELOG. * Fixed problems with TravisCI builds. * Fixed problems with CircleCI builds. ### Improvements * Acceptance testing of Cassandra 3. ## 2016-04-13 - Release 1.20.0 ([diff](https://github.com/locp/cassandra/compare/1.19.0...1.20.0)) ### Summary A minor release for client requirements. ### Features * Added the compaction_large_partition_warning_threshold_mb and memtable_allocation_type attributes to the cassandra class. ## 2016-04-06 - Release 1.19.0 ([diff](https://github.com/locp/cassandra/compare/1.18.1...1.19.0)) ### Summary A new template attribute and a couple of bug fixes. ### Features * The hints_directory attribute has been added to the cassandra class for placing into the template. ### Bugfixes * Some documentation errors that had been identified have been resolved. * A problem with OpsCenter and systemd has been resolved. So far only CentOS 7 from the supported operating systems has been identified as being required to use systemd. ## 2016-03-27 - Release 1.18.1 ([diff](https://github.com/locp/cassandra/compare/1.18.0...1.18.1)) ### Summary Bug fixes and some minor and non-functional improvements. ### Bugfixes * Resource ordering clarified in the cassandra::schema class. * The cqlsh command now attempts to connect to rpc_address, not the listen_address. ### Improvements * Optimised the CircleCI build process. * Made some changes to the documentation to better reflect the new functionality delivered in 1.18.0. ## 2016-03-26 - Release 1.18.0 ([diff](https://github.com/locp/cassandra/compare/1.17.0...1.18.0)) ### Summary Some more functionality and sub-classes for cassandra::schema. Also some code and pipe-line improvements and a couple of bug fixes. ### Features * The cassandra::schema class now has the following additional attributes: * cql_types * indexes * tables There are also corresponting defined types for those attributes: * cassandra::schema::cql_type * cassandra::schema::index * cassandra::schema::table * The cassandra::opscenter class now has a new attribute called ldap_group_search_filter_with_dn. ### Bugfixes * In the firewalls class, an OpsCenter server also needs to connect to the Cassandra node it is monitoring as a client. The ports have been adjusted to allow this to happen. * rspec-puppet version 2.4.0 was breaking our builds so pegged ourselves to 2.3.2. ### Improvements * Some minor and non-functional improvements to the build pipe-line. * Carried out an audit using the Puppet plugin for SonarQube. The number of issues has been reduced from 227 (13 major, 214 minor) to 4 major issues of which 2 are false positives. The remaining issues will be resolved in 2.0.0. ## 2016-03-22 - Release 1.17.0 ([diff](https://github.com/locp/cassandra/compare/1.16.0...1.17.0)) ### Summary Another small change that is an emergency requirement for a client. ### Features * Added the `storage_keyspace` attribute to the cassandra::datastax_agent class. ## 2016-03-15 - Release 1.16.0 ([diff](https://github.com/locp/cassandra/compare/1.15.1...1.16.0)) ### Summary A smaller release than usual, but containing changes required for a client. ### Features * Added the `hosts` attribute to the cassandra::datastax_agent class. ### Bugfixes * The **address.yaml** file for the DataStax agent is now owned by the cassandra user. ## 2016-03-11 - Release 1.15.1 ([diff](https://github.com/locp/cassandra/compare/1.15.0...1.15.1)) ### Summary A small improvement. ### Improvements * Clarified CQL and Python versions. ## 2016-03-10 - Release 1.15.0 ([diff](https://github.com/locp/cassandra/compare/1.14.2...1.15.0)) ### Summary A rather large release. Minor (non-functional) fixes to the production pipeline and new features. ### Features * A new class `cassandra::schema` allows the creation and dropping of keyspaces. * Added the `additional_lines` attribute to the `cassandra` class. * Added the `service_systemd` attribute to the `cassandra::opscenter` class. * Allow the systemd template sources to be specified by the user. This is with the `service_systemd_tmpl` attribute to the following classes: * cassandra * cassandra::datastax_agent * cassandra::opscenter * Added another template file for `cassandra` => `service_systemd_tmpl` that is suitable for Cassandra 2.0. ### Bugfixes * Worked around a problem with rake-11 in the Gemfile. * Fixed a problem in the CircleCI configuration. ### Improvements * Renamed the `ensure` attribute to `package_ensure` so that it is more in line with how it's called in other modules. This was done on the the following classes: * cassandra::optutils * cassandra::opscenter * cassandra::opscenter::pycrypto * cassandra::java * Updated the AWS AMI for the TravisCI/AWS acceptance testing to hopefully speed up builds a bit. ## 2016-02-29 - Release 1.14.2 ([diff](https://github.com/locp/cassandra/compare/1.14.1...1.14.2)) ### Summary A small bugfix release. ### Bugfixes * Removed `Restart=always` from the Systemd configuration files. ## 2016-02-27 - Release 1.14.1 ([diff](https://github.com/locp/cassandra/compare/1.14.0...1.14.1)) ### Summary A non-functional release of improvements and a bugfix. ### Bugfixes * If a systemd service file is created or updated, then systemctl daemon-reload is now be executed. ### Improvements * The workflow for building the module has been improved to include: * Automatic integration of improvements and bugfixes into release candidates. * Testing of release candidates includes acceptance (beaker) as well as unit (spec) tests. * The refactoring of the majority of the Ruby code used to test and build this module so that it is hopefully more readable and easier to maintain. * The automation of what had previously been manual steps when building a release. ## 2016-02-19 - Release 1.14.0 ([diff](https://github.com/locp/cassandra/compare/1.13.0...1.14.0)) ### Summary A minor release with one of each of a feature, bug fix and improvement. ### Features * Added the orbited_longpoll attribute to the cassandra::opscenter class. ### Bugfixes * Fixed a problem with the DataStax agent and systemd. ### Improvements * Refactored the contributors section of the README. ## 2016-02-14 - Release 1.13.0 ([diff](https://github.com/locp/cassandra/compare/1.12.2...1.13.0)) ### Summary A mixed back of new features in the shape of attributes for the cassandra, cassandra::datastax_agent and cassandra::opscenter classes. A couple of bug fixes and some non-functional improvements. ### Features * Added the thrift_framed_transport_size_in_mb attribute to ::cassandra. * Added the following attributes to ::cassandra::datastax_agent: * async_pool_size * async_queue_size * service_systemd * Added the config_purge attribute to ::cassandra::opscenter. ### Bugfixes * Removed incorrect puppet code from the README examples. * Fixed a problem with the beaker 2.34.0 gem which was causing problems during automated acceptance testing. ### Improvements * Changed the AWS instance type used by the TravisCI triggered acceptance tests from a c3.xlarge to c4.xlarge. * Merged the acceptance tests virtual nodes into family specific node sets. * Refactored the Gemfile. * Changed references in the documentation to parameters to refer to attributes as that is more Puppet-like. * Changed the format of the contributers section. ## 2016-02-12 - Release 1.12.2 ([diff](https://github.com/locp/cassandra/compare/1.12.1...1.12.2)) ### Summary More bug fixes. ### Bugfixes * Fixed a problem with the Red Hat family and systemd not starting the service and reporting all service stops as failures, regardless of if they were or not. ## 2016-02-08 - Release 1.12.1 ([diff](https://github.com/locp/cassandra/compare/1.12.0...1.12.1)) ### Summary This is a non-functional release. Some bug fixes and release improvements. ### Bugfixes * Completed documentation for attributes. This was missing for the `inter_dc_stream_throughput_outbound_megabits_per_sec` and `stream_throughput_outbound_megabits_per_sec` options. * Corrected the ownership and directories for the OpsCenter configuration. ### Improvements * Nightly build created so that issues similar to those found in issues #136 and #157 can be caught quicker. ## 2016-01-27 - Release 1.12.0 ([diff](https://github.com/locp/cassandra/compare/1.11.0...1.12.0)) ### Summary A new feature in the cassandra::datastax_agent class, a minor bug fix and integration with CircleCI. ### Features * There is now an agent_alias attribute for the cassandra::datastax_agent class. ### Bugfixes * Unit tests were failing due to problems with the puppet-3.8.5 gem. ### Improvements * In addition to TravisCI, the build process is now integrated with [CircleCI](https://circleci.com/gh/locp/cassandra). ## 2016-01-01 - Release 1.11.0 ([diff](https://github.com/locp/cassandra/compare/1.10.0...1.11.0)) ### Summary New features added to the main class. Also some non-functional improvements. ### Features * The addition of the listen_interface and rpc_interface attributes to the main class. ### Improvements * Added more detail to the attributes to the main class in the README. * Improved the module metadata. * Clarified private defined types with the private subclass. * The test coverage in release 1.10.0 dropped to 99.09%. Got it back to 100% in this release. ## 2015-12-19 - Release 1.10.0 ([diff](https://github.com/locp/cassandra/compare/1.9.2...1.10.0)) ### Summary A feature release with minor improvements. ### Features * Added the ability to allow setting the local_interface for the DataStax agent configuration. * Allow the service provider to be specified for the Cassandra, DataStax agent and OpsCenter services with the service_provider attribute. * Optionally allow a systemd system file be inserted with the cassandra::service_systemd attribute. ### Improvements * Allow the files resources specified with in the cassandra attributes: * commitlog_directory * data_file_directories * saved_caches_directory To co-exist with file resources with the same name. ## 2015-11-21 - Release 1.9.2 ([diff](https://github.com/locp/cassandra/compare/1.9.1...1.9.2)) ### Summary A bug fix release that deals with some problems with Cassandra 3. ### Bugfixes * Attempt to mitigate against problems with Debian attempting to install Cassandra 3 when installing the dsc22 package. * Also reverted the project home to the GitHub project page. ## 2015-11-09 - Release 1.9.1 ([diff](https://github.com/locp/cassandra/compare/1.9.0...1.9.1)) ### Summary A bug fix release. ### Bugfixes * The default value for the permissions mode of the Cassandra configuration file were far too open. Changed from 0666 to 0644. ## 2015-10-25 - Release 1.9.0 ([diff](https://github.com/locp/cassandra/compare/1.8.1...1.9.0)) ### Summary Added more features for the configuration of Cassandra, some improvements to the testing carried out before a release and a minor correction to the change log documentation. ### Features * The following attributes have been added to the ::cassandra class to be configured into the configuration file: * client_encryption_algorithm * client_encryption_cipher_suites * client_encryption_protocol * client_encryption_require_client_auth * client_encryption_store_type * client_encryption_truststore * client_encryption_truststore_password * counter_cache_size_in_mb * index_summary_capacity_in_mb * key_cache_save_period * key_cache_keys_to_save * seed_provider_class_name * server_encryption_algorithm * server_encryption_cipher_suites * server_encryption_protocol * server_encryption_require_client_auth * server_encryption_store_type Please see the README file for more details. ### Bugfixes * Corrected an incorrect date (typo) in this document. ### Improvements * There is now an automated test to mitigate the risk of unnecessarily refreshes of the Cassandra service due to non-functional changes to the configuration file. ## 2015-10-14 - Release 1.8.1 ([diff](https://github.com/locp/cassandra/compare/1.8.0...1.8.1)) ### Summary A minor bug fix. ### Bugfixes * Fixed an edge case issue concerning users that may have been using the fail_on_non_supported_os before it was fixed in 1.8.0. ## 2015-10-06 - Release 1.8.0 ([diff](https://github.com/locp/cassandra/compare/1.7.1...1.8.0)) ### Summary Some new features a minor bug fix and some non-functional improvements. ### Features * Added the service_refresh and config_file_mode attributes to the Cassandra class. ### Bugfixes * The name of the fail_on_non_supported_os attribute has been corrected. ### Improvements * Automated acceptance tests in preparation for a release now run faster. ##1015-10-01 - Release 1.7.1 ([diff](https://github.com/locp/cassandra/compare/1.7.0...1.7.1)) ### Summary A minor bug fix that incorrctly gave a failed build status for the module. ### Bugfixes * Fixed a problem that was showing the status of the module build as an error since the release of the fog-google gem version 0.1.1. ## 2015-10-01 - Release 1.7.0 ([diff](https://github.com/locp/cassandra/compare/1.6.0...1.7.0)) ### Summary * Corrected a bug in how commitlog_sync has handled by Cassandra. * Some non-functional improvements * Additional features for the cassandra::datastax_repo class. ### Features * Added the commitlog_segment_size_in_mb attribute to the cassandra class. * Added the following fields to the cassandra::datastax_repo class: * descr * key_id * key_url * pkg_url * release This should make the configuring of repositories more flexible. ### Bugfixes * Fixed a bug in how the commitlog_sync and the attributes that are associated with it are handled ### Improvements The following non-functional improvements were implemented: * Added tags to the module metadata. * Migrated the acceptance tests from Vagrant to Docker. The associated improvements to performance means that more rigorous acceptance tests can be applied in a shorter time. For the first time as well, they are visible on Travis. ## 2015-09-23 - Release 1.6.0 ([diff](https://github.com/locp/cassandra/compare/1.5.0...1.6.0)) ### Summary More attributes for ::cassandra and ::cassandra::datastax_agent. Also some non-functional improvements in the automated unit tests. ### Features * The JAVA_HOME can now be set for the datastax_agent (see the cassandra::datastax_agent => java_home attribute). * The file mode for the directories can now be specified for the commitlog_directory, data_file_directories and the saved_caches_directory in the cassandra class. ### Improvements * Uncovered resources in the unit testing are now tested. ## 2015-09-21 - Release 1.5.0 ([diff](https://github.com/locp/cassandra/compare/1.4.2...1.5.0)) ### Summary More attributes have been added that can be configured into the cassandra.yaml file. ### Features * The following attributes to the cassandra class can be configured into the cassandra configuration: * broadcast_address * broadcast_rpc_address * commitlog_sync * commitlog_sync_batch_window_in_ms * commitlog_total_space_in_mb * concurrent_compactors * counter_cache_keys_to_save * file_cache_size_in_mb * initial_token * inter_dc_stream_throughput_outbound_megabits_per_sec * internode_authenticator * internode_recv_buff_size_in_bytes * internode_send_buff_size_in_bytes * memory_allocator * memtable_cleanup_threshold * memtable_flush_writers * memtable_heap_space_in_mb * memtable_offheap_space_in_mb * native_transport_max_concurrent_connections * native_transport_max_concurrent_connections_per_ip * native_transport_max_frame_size_in_mb * native_transport_max_threads * permissions_update_interval_in_ms * phi_convict_threshold * request_scheduler_options_default_weight * request_scheduler_options_throttle_limit * row_cache_keys_to_save * rpc_max_threads * rpc_min_threads * rpc_recv_buff_size_in_bytes * rpc_send_buff_size_in_bytes * streaming_socket_timeout_in_ms * stream_throughput_outbound_megabits_per_sec ### Improvements * Clarity of changes per release in the change log (this document). ## 2015-09-15 - Release 1.4.2 ([diff](https://github.com/locp/cassandra/compare/1.4.1...1.4.2)) ### Summary Fixed a problem identified whilst releasing 1.4.1 and a bug fixed by a contributed pull request. ### Features * n/a ### Bugfixes * Fixed a problem with the acceptance tests. * The datastax-agent service is restarted if the package is updated. ### Improvements * n/a ## 2015-09-15 - Release 1.4.1 ([diff](https://github.com/locp/cassandra/compare/1.4.0...1.4.1)) ### Summary This release fixes a minor bug (possibly better described as a typing mistake) and makes some non-functional improvements. It also allows the user to override the default behaviour of failing on a non-supported operating system. ### Features * A new flag called `fail_on_non_suppoted_os` has been added to the `cassandra` class and can be set to **false** so that an attempt can be made to use this module on an operating system that is not in the Debian or Red Hat families. ### Bugfixes * Changed the default value for the `package_name` of the `cassandra::optutils` class from `'undef'` to *undef*. ### Improvements * Clarified the expectations of submitted contributions. * Unit test improvements. ## 2015-09-10 - Release 1.4.0 ([diff](https://github.com/locp/cassandra/compare/1.3.7...1.4.0)) * Ensured that directories specified in the directory attributes are controlled with file resources. * Added the following attributes to the cassandra.yml file: * batchlog_replay_throttle_in_kb * cas_contention_timeout_in_ms * column_index_size_in_kb * commit_failure_policy * compaction_throughput_mb_per_sec * counter_cache_save_period * counter_write_request_timeout_in_ms * cross_node_timeout * dynamic_snitch_badness_threshold * dynamic_snitch_reset_interval_in_ms * dynamic_snitch_update_interval_in_ms * hinted_handoff_throttle_in_kb * index_summary_resize_interval_in_minutes * inter_dc_tcp_nodelay * max_hints_delivery_threads * max_hint_window_in_ms * permissions_validity_in_ms * range_request_timeout_in_ms * read_request_timeout_in_ms * request_scheduler * request_timeout_in_ms * row_cache_save_period * row_cache_size_in_mb * sstable_preemptive_open_interval_in_mb * tombstone_failure_threshold * tombstone_warn_threshold * trickle_fsync * trickle_fsync_interval_in_kb * truncate_request_timeout_in_ms * write_request_timeout_in_ms ## 2015-09-08 - Release 1.3.7 ([diff](https://github.com/locp/cassandra/compare/1.3.6...1.3.7)) * Made the auto_bootstrap attribute available. ## 2015-09-03 - Release 1.3.6 ([diff](https://github.com/locp/cassandra/compare/1.3.5...1.3.6)) * Fixed a bug, now allowing the user to set the enabled state of the Cassandra service. * More cleaning up of the README and more links in that file to allow faster navigation. ## 2015-09-01 - Release 1.3.5 ([diff](https://github.com/locp/cassandra/compare/1.3.4...1.3.5)) * Fixed a bug, now allowing the user to set the running state of the Cassandra service. * More automated testing with spec tests. * A refactoring of the README. ## 2015-08-28 - Release 1.3.4 ([diff](https://github.com/locp/cassandra/compare/1.3.3...1.3.4)) * Minor corrections to the README. * The addition of the storage_cassandra_seed_hosts attribute to cassandra::opscenter::cluster_name which is part of a bigger part of work but is urgently require by a client. ## 2015-08-27 - Release 1.3.3 ([diff](https://github.com/locp/cassandra/compare/1.3.2...1.3.3)) * Corrected dependency version for puppetlabs-apt. ## 2015-08-26 - Release 1.3.2 ([diff](https://github.com/locp/cassandra/compare/1.3.1...1.3.2)) * Fixed bug in cassandra::opscenter::cluster_name. * Fixed code in cassandra::firewall_ports::rule to avoid deprecation warnings concerning the use of puppetlabs-firewall => port. * Added more examples to the README ## 2015-08-22 - Release 1.3.1 ([diff](https://github.com/locp/cassandra/compare/1.3.0...1.3.1)) This was mainly a non-functional change. The biggest thing to say is that Debian 7 is now supported. ## 2015-08-19 - Release 1.3.0 ([diff](https://github.com/locp/cassandra/compare/1.2.0...1.3.0)) * Allow additional TCP ports to be specified for the host based firewall. * Fixed a problem where the client subnets were ignored by the firewall. * Added more automated testing. * Continued work on an ongoing improvement of the documentation. * Added the ability to set the DC and RACK in the snitch properties. ## 2015-08-10 - Release 1.2.0 ([diff](https://github.com/locp/cassandra/compare/1.1.0...1.2.0)) * Added the installation of Java Native Access (JNA) to cassandra::java * For DataStax Enterprise, allow the remote storage of metric data with cassandra::opscenter::cluster_name. ## 2015-08-03 - Release 1.1.0 ([diff](https://github.com/locp/cassandra/compare/1.0.1...1.1.0)) * Provided the cassandra::firewall_ports class. * All OpsCenter options are now configurable in opscenterd.conf. * ssl_storage_port is now configurable. ## 2015-07-27 - Release 1.0.1 ([diff](https://github.com/locp/cassandra/compare/1.0.0...1.0.1)) * Provided a workaround for [CASSANDRA-9822](https://issues.apache.org/jira/browse/CASSANDRA-9822). ## 2015-07-25 - Release 1.0.0 ([diff](https://github.com/locp/cassandra/compare/0.4.3...1.0.0)) * Changed the default installation from Cassandra 2.1 to 2.2. * Fixed a bug that arose when the cassandra config_path was set. * Created a workaround for [PUP-3829](https://tickets.puppetlabs.com/browse/PUP-3829). * Minor changes to the API (see the Upgrading section of the README). * Allow a basic installation of OpsCenter. ## 2015-07-18 - Release 0.4.3 ([diff](https://github.com/locp/cassandra/compare/0.4.2...0.4.3)) * Module dependency metadata was too strict. ## 2015-07-16 - Release 0.4.2 ([diff](https://github.com/locp/cassandra/compare/0.4.1...0.4.2)) * Some minor documentation changes. * Fixed a problem with the module metadata that caused Puppetfile issues. * Integrated with Coveralls (https://coveralls.io/github/locp/cassandra). * Removed the deprecated config and install classes. These were private so there is no change to the API. ## 2015-07-14 - Release 0.4.1 ([diff](https://github.com/locp/cassandra/compare/0.4.0...0.4.1)) * Fixed a resource ordering problem in the cassandra::datastax class. * Tidied up the documentation a bit. * Some refactoring of the spec tests. ## 2015-07-12 - Release 0.4.0 ([diff](https://github.com/locp/cassandra/compare/0.3.0...0.4.0)) ### Summary * Some major changes to the API on how Java, the optional Cassandra tools and the DataStax agent are installed. See the Upgrading section of the README file. * Allowed the setting of the *stomp_interface* for the DataStax agent. * Non-functionally, we have integrated with Travis CI (see https://travis-ci.org/locp/cassandra for details) and thanks to those guys for providing such a neat service. * More spec tests. ## 2015-06-27 - Release 0.3.0 ([diff](https://github.com/locp/cassandra/compare/0.2.2...0.3.0)) ### Summary * Slight changes to the API. See the Upgrading section of the README file for full details. * Allow for the installation of the DataStax Agent. * Improved automated testing (and fixed some bugs along the way). * Confirmed Ubuntu 12.04 works OK with this module. * A Cassandra 1.X template has been provided. * Some smarter handling of the differences between Ubuntu/Debian and RedHat derivatives. ## 2015-06-17 - Release 0.2.2 ([diff](https://github.com/locp/cassandra/compare/0.2.1...0.2.2)) ### Summary A non-functional change to change the following: * Split the single manifest into multiple files. * Implement automated testing. * Test on additional operating systems. ## 2015-05-28 - Release 0.2.1 ([diff](https://github.com/locp/cassandra/compare/0.2.0...0.2.1)) ### Summary A non-functional change to fix puppet-lint problems identified by Puppet Forge. ## 2015-05-28 - Release 0.2.0 ([diff](https://github.com/locp/cassandra/compare/0.1.0...0.2.0)) ### Summary Added more attributes and improved the module metadata. ## 2015-05-26 - Release 0.1.0 ### Summary An initial release with **VERY** limited options. -\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* +\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file diff --git a/Gemfile b/Gemfile index 666c75d..1f8d9a8 100644 --- a/Gemfile +++ b/Gemfile @@ -1,77 +1,77 @@ source ENV['GEM_SOURCE'] || "https://rubygems.org" def location_for(place, fake_version = nil) if place =~ /^(git[:@][^#]*)#(.*)/ [fake_version, { :git => $1, :branch => $2, :require => false }].compact elsif place =~ /^file:\/\/(.*)/ ['>= 0', { :path => File.expand_path($1), :require => false }] else [place, { :require => false }] end end group :test do gem 'puppetlabs_spec_helper', '~> 2.5.0', :require => false gem 'rspec-puppet', '~> 2.5', :require => false gem 'rspec-puppet-facts', :require => false gem 'rspec-puppet-utils', :require => false gem 'puppet-lint-leading_zero-check', :require => false gem 'puppet-lint-trailing_comma-check', :require => false gem 'puppet-lint-version_comparison-check', :require => false gem 'puppet-lint-classes_and_types_beginning_with_digits-check', :require => false gem 'puppet-lint-unquoted_string-check', :require => false gem 'puppet-lint-variable_contains_upcase', :require => false gem 'metadata-json-lint', :require => false gem 'redcarpet', :require => false gem 'rubocop', '~> 0.49.1', :require => false if RUBY_VERSION >= '2.3.0' gem 'rubocop-rspec', '~> 1.15.0', :require => false if RUBY_VERSION >= '2.3.0' gem 'mocha', '>= 1.2.1', :require => false gem 'coveralls', :require => false gem 'simplecov-console', :require => false gem 'rack', '~> 1.0', :require => false if RUBY_VERSION < '2.2.2' gem 'parallel_tests', :require => false end group :development do gem 'travis', :require => false gem 'travis-lint', :require => false gem 'guard-rake', :require => false gem 'overcommit', '>= 0.39.1', :require => false end group :system_tests do gem 'winrm', :require => false if beaker_version = ENV['BEAKER_VERSION'] gem 'beaker', *location_for(beaker_version) else gem 'beaker', '>= 3.9.0', :require => false end if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION'] gem 'beaker-rspec', *location_for(beaker_rspec_version) else gem 'beaker-rspec', :require => false end gem 'serverspec', :require => false gem 'beaker-puppet_install_helper', :require => false gem 'beaker-module_install_helper', :require => false end group :release do - gem 'github_changelog_generator', :require => false if RUBY_VERSION >= '2.2.2' + gem 'github_changelog_generator', :require => false, :git => 'https://github.com/skywinder/github-changelog-generator' gem 'puppet-blacksmith', :require => false gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem' gem 'puppet-strings', '~> 1.0', :require => false end if facterversion = ENV['FACTER_GEM_VERSION'] gem 'facter', facterversion.to_s, :require => false, :groups => [:test] else gem 'facter', :require => false, :groups => [:test] end ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 5.0' : puppetversion = ENV['PUPPET_VERSION'].to_s gem 'puppet', puppetversion, :require => false, :groups => [:test] # vim: syntax=ruby diff --git a/HISTORY.md b/HISTORY.md index 506d15d..07141d3 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,1115 +1,1115 @@ -## 2017-04-24 - Release 2.4.1 ([diff](https://github.com/locp/cassandra/compare/2.4.0...2.4.1)) +## [2.4.1](https://github.com/voxpupuli/puppet-cassandra/compare/2.4.0...2.4.1) (2017-04-24) ### Summary A non-functional release of improvements. ### Improvements * A refactoring and extension of the acceptance tests. * Migrated from version 1.0 to 2.0 of the CircleCI API. -## 2017-03-30 - Release 2.4.0 ([diff](https://github.com/locp/cassandra/compare/2.3.0...2.4.0)) +## [2.4.0](https://github.com/voxpupuli/puppet-cassandra/compare/2.3.0...2.4.0) (2017-03-30) ### Summary * Added the `cassandra::dse` class to 2.X.Y of the module. * Added the new `cassandra::apache_repo` class. * Minor bug fixes and improvements. ## 2017-02-28 - Release 1.27.0 ([diff](https://github.com/locp/cassandra/compare/1.26.1...1.27.0)) ### Summary Add the `cassandra::dse` class. ## 2017-01-21 - Release 2.3.0 ([diff](https://github.com/locp/cassandra/compare/2.2.1...2.3.0)) New attribute to `::cassandra` class: * `baseline_settings` New defined types: * `cassandra::system::swapoff` * `cassandra::system::sysctl` * `cassandra::system::transparent_hugepage` ## 2016-12-08 - Release 2.2.1 ([diff](https://github.com/locp/cassandra/compare/2.2.0...2.2.1)) ### Summary Non-functional improvements and some documentation fixes. ### Improvements * All beaker spec tests have been migrated from AWS/EC2 to Docker. * Installed Python 2.7 onto the CentOS 6 docker image allowing the full test suite to be run against that operating system. * Some documentation improvements and fixed some typos. * The spec tests will now fail if there is not 100% coverage. ## 2016-12-01 - Release 2.2.0 ([diff](https://github.com/locp/cassandra/compare/2.1.2...2.2.0)) ### Summary At long last we have a defined type for handling permissions (something that we have been promising since May). Added some more facts for assisting in JVM tuning. Also fixed an error that was happening when attempting to build the project. ### Features * Added the `permissions` attribute to the `cassandra::schema` class. * Added the `cassandra::schema::permission` ### Bugfixes * Some refactoring of the ruby code since the release of Rubocop 0.46.0 which was failing code that previously had passed OK. ## 2016-11-02 - Release 2.1.2 ([diff](https://github.com/locp/cassandra/compare/2.1.1...2.1.2)) ### Summary Basically a non-functional release to reduce some of the technical debt from the 2.0.0 release. Also some minor improvements to the documentation. ## 2016-11-19 - Release 1.26.1 ([diff](https://github.com/locp/cassandra/compare/1.26.0...1.26.1)) ### Summary Retro-fitted a bug that was fixed in 2.1.1 into the 1.X.Y version of the module. ### Bugfixes * A hotfix for a bug in `cassandra::schema` that has been around since version 1.18.0 of this module. ## 2016-11-02 - Release 2.1.1 ([diff](https://github.com/locp/cassandra/compare/2.1.0...2.1.1)) ### Summary A hotfix for a bug in `cassandra::schema` that has been around since version 1.18.0 of this module. ### Bugfixes * Fixed a bug where cql_types would not be created unless keyspaces were also provided. * Fixed a minor typo in the README. ## 2016-10-29 - Release 2.1.0 ([diff](https://github.com/locp/cassandra/compare/2.0.2...2.1.0)) ### Summary A mixture of new features, a new style of documentation and other improvements. Also ran the [Sonar-Puppet](https://github.com/iwarapter/sonar-puppet) plugin against the code to improve the code quality. ### Features * The following facts are now available: * cassandramajorversion * cassandraminorversion * cassandrapatchversion * cassandrarelease * The following attributes are now available: * cassandra::commitlog_directory * cassandra::commitlog_directory_mode * cassandra::data_file_directories * cassandra::data_file_directories_mode * cassandra::hints_directory * cassandra::hints_directory_mode * cassandra::saved_caches_directory * cassandra::saved_caches_directory_mode * cassandra::systemctl ### Bugfixes * Resolved all issues identified by Sonar-Puppet from 38 (2 major, 36 minor). In doing so, this reduced the technical debt ration from 0.9% to 0.0%. ### Improvements * The reference documentation is now processed via http://locp.github.io/cassandra * Made a start on refactoring the spec/unit tests so that there is less duplication of code. ## 2016-10-12 - Release 2.0.2 ([diff](https://github.com/locp/cassandra/compare/2.0.1...2.0.2)) ### Summary This is a non-functional patch release that fixes some issues in documentation, and fixes some bugs and makes some improvements in our testing framework. ### Improvements * Ensure there is a framework for supporting the legacy 1.X.Y. module until the end of 2016. * A more obvious test rig for the beaker/acceptance tests on TravisCI. ### Bugfixes * Corrected misleading documentation. * Ensure legacy test builds still work against Ruby 1.9.3. * Corrected deprecated tags in the module metadata. ## 2016-10-08 - Release 1.26.0 ([diff](https://github.com/locp/cassandra/compare/1.25.2...1.26.0)) ### Improvements * The `cassandra::seeds` paramater can now be provided as an array or as a string. # Bugfixes * Ensure legacy builds still work on TravisCI. ## 2016-10-01 - Release 2.0.1 ([diff](https://github.com/locp/cassandra/compare/2.0.0...2.0.1)) ### Summary A non-functional release containing some improvements and documentation corrections. ### Improvements * Corrected some out of date documentation. * Removed some deprecated files. * Regained 100% spec test coverage. ## 2016-09-29 - Release 2.0.0 ([diff](https://github.com/locp/cassandra/compare/1.26.0...2.0.0)) ### Summary This is a major release and will more than likely break your existing manifest until you alter your code. Please see the [Upgrading](https://github.com/locp/cassandra/tree/release/274/v2.0.0#upgrading) section of the README for further details. * The method of passing parameters to Cassandra has been made more flexible. * Support for Ubuntu 16.04. * Changes to how `service_ensure` is handled. * `cassandra::file` is now a define, not a class (as it should have been). ## 2016-09-03 - Release 1.25.2 ([diff](https://github.com/locp/cassandra/compare/1.25.1...1.25.2)) ### Summary The `service_systemd` attribute is now deprecated for the `cassandra`, `cassandra::datastax_agent` and `cassandra::opscenter` classes. See https://github.com/locp/cassandra/wiki/DEP-020 for more details. ## 2016-08-14 - Release 1.25.1 ([diff](https://github.com/locp/cassandra/compare/1.25.0...1.25.1)) ### Summary Bugfix to ensure that the name of the PID file for the DataStax Agent service matches with the service name. ## 2016-07-17 - Release 1.25.0 ([diff](https://github.com/locp/cassandra/compare/1.24.3...1.25.0)) ### Summary A feature release. ### Features * The `cassandra` class now has a `disk_access_mode` attribute. ## 2016-06-26 - Release 1.24.3 ([diff](https://github.com/locp/cassandra/compare/1.24.2...1.24.3)) ### Summary A couple of non-functional bug fixes. ### Bugfixes * The new version of RuboCop flagged code changes required in the Vagrantfile. * The new version of Puppet Lint flagged code changes required in cassandra::java. ## 2016-06-20 - Release 1.24.2 ([diff](https://github.com/locp/cassandra/compare/1.24.1...1.24.2)) ### Summary A non-functional bug fix. ### Bugfixes * The release of the specinfra gem (2.59.1) caused problems with our build. Pinned now to 2.59.0. ## 2016-06-18 - Release 1.24.1 ([diff](https://github.com/locp/cassandra/compare/1.24.0...1.24.1)) ### Summary Really only affects CentOS 7 as all the other supported operating systems do not require the systemd file to be installed. ### Bugfixes * Change the way that systemd shuts Cassandra down. ## 2015-05-25 - Release 1.24.0 ([diff](https://github.com/locp/cassandra/compare/1.23.1...1.24.0)) ### Summary A Debian-centric release. Debian 8 is now supported and a workaround for [CASSANDRA-2356](https://issues.apache.org/jira/browse/CASSANDRA-2356) (which only affects Debian. ### Features * New attributes to the `::cassandra` class are: * cassandra_2356_sleep_seconds * config_path_parents * rackdc_tmpl ### Bugfixes * CASSANDRA-2356 ### Improvements * Debian 8 is now part of the acceptance testing release process. ## 2016-05-10 - Release 1.23.1 ([diff](https://github.com/locp/cassandra/compare/1.23.0...1.23.1)) ### Summary A minor bugfix that fixes a problem that would only affect module developers, not users of the module. ### Bugfixes * Rubocop 0.4.0 is stricter so implemented changes that were flagged by it. ## 2016-05-07 - Release 1.23.0 ([diff](https://github.com/locp/cassandra/compare/1.22.1...1.23.0)) ### Summary A couple of new features, a non-functional improvement and a bugfix. ### Features * Added the cassandra::file class. * Added the following attributes to the cassandra::schema class: * cqlsh_client_tmpl * cqlsh_client_config ### Bugfixes * Fixed a daft error that stopped beaker tests running on CentOS 7. ### Improvements * Improved how fast the beaker/acceptance tests are run from TravisCI. ## 2016-05-03 - Release 1.22.1 ([diff](https://github.com/locp/cassandra/compare/1.22.0...1.22.1)) ### Summary A non-functional release for a minor improvement and a bug fix. ### Bugfixes * Fixes a problem with resource ordering if the service_refresh attribute is set to false. ### Improvements * Test coverage in Coveralls is now back at 100% (https://coveralls.io/github/locp/cassandra). ## 2016-04-25 - Release 1.22.0 ([diff](https://github.com/locp/cassandra/compare/1.21.0...1.22.0)) ### Summary Two new features. ### Features * Allow the creation and dropping of users with the following: * A new defined type cassandra::schema::user * The new attribute cassandra::schema::users * Allow the manipulation of the environment file with the new class cassandra::env. ## 2016-04-20 - Release 1.21.0 ([diff](https://github.com/locp/cassandra/compare/1.20.0...1.21.0)) ### Summary Some minor bug fixes. Also some features and improvements that allow acceptance tests to be run against Cassandra 3. ### Features * Added the following attributes to cassandra::java: * aptkey * aptsource * yumrepo ### Bugfixes * Corrected some errors in the README and CHANGELOG. * Fixed problems with TravisCI builds. * Fixed problems with CircleCI builds. ### Improvements * Acceptance testing of Cassandra 3. ## 2016-04-13 - Release 1.20.0 ([diff](https://github.com/locp/cassandra/compare/1.19.0...1.20.0)) ### Summary A minor release for client requirements. ### Features * Added the compaction_large_partition_warning_threshold_mb and memtable_allocation_type attributes to the cassandra class. ## 2016-04-06 - Release 1.19.0 ([diff](https://github.com/locp/cassandra/compare/1.18.1...1.19.0)) ### Summary A new template attribute and a couple of bug fixes. ### Features * The hints_directory attribute has been added to the cassandra class for placing into the template. ### Bugfixes * Some documentation errors that had been identified have been resolved. * A problem with OpsCenter and systemd has been resolved. So far only CentOS 7 from the supported operating systems has been identified as being required to use systemd. ## 2016-03-27 - Release 1.18.1 ([diff](https://github.com/locp/cassandra/compare/1.18.0...1.18.1)) ### Summary Bug fixes and some minor and non-functional improvements. ### Bugfixes * Resource ordering clarified in the cassandra::schema class. * The cqlsh command now attempts to connect to rpc_address, not the listen_address. ### Improvements * Optimised the CircleCI build process. * Made some changes to the documentation to better reflect the new functionality delivered in 1.18.0. ## 2016-03-26 - Release 1.18.0 ([diff](https://github.com/locp/cassandra/compare/1.17.0...1.18.0)) ### Summary Some more functionality and sub-classes for cassandra::schema. Also some code and pipe-line improvements and a couple of bug fixes. ### Features * The cassandra::schema class now has the following additional attributes: * cql_types * indexes * tables There are also corresponting defined types for those attributes: * cassandra::schema::cql_type * cassandra::schema::index * cassandra::schema::table * The cassandra::opscenter class now has a new attribute called ldap_group_search_filter_with_dn. ### Bugfixes * In the firewalls class, an OpsCenter server also needs to connect to the Cassandra node it is monitoring as a client. The ports have been adjusted to allow this to happen. * rspec-puppet version 2.4.0 was breaking our builds so pegged ourselves to 2.3.2. ### Improvements * Some minor and non-functional improvements to the build pipe-line. * Carried out an audit using the Puppet plugin for SonarQube. The number of issues has been reduced from 227 (13 major, 214 minor) to 4 major issues of which 2 are false positives. The remaining issues will be resolved in 2.0.0. ## 2016-03-22 - Release 1.17.0 ([diff](https://github.com/locp/cassandra/compare/1.16.0...1.17.0)) ### Summary Another small change that is an emergency requirement for a client. ### Features * Added the `storage_keyspace` attribute to the cassandra::datastax_agent class. ## 2016-03-15 - Release 1.16.0 ([diff](https://github.com/locp/cassandra/compare/1.15.1...1.16.0)) ### Summary A smaller release than usual, but containing changes required for a client. ### Features * Added the `hosts` attribute to the cassandra::datastax_agent class. ### Bugfixes * The **address.yaml** file for the DataStax agent is now owned by the cassandra user. ## 2016-03-11 - Release 1.15.1 ([diff](https://github.com/locp/cassandra/compare/1.15.0...1.15.1)) ### Summary A small improvement. ### Improvements * Clarified CQL and Python versions. ## 2016-03-10 - Release 1.15.0 ([diff](https://github.com/locp/cassandra/compare/1.14.2...1.15.0)) ### Summary A rather large release. Minor (non-functional) fixes to the production pipeline and new features. ### Features * A new class `cassandra::schema` allows the creation and dropping of keyspaces. * Added the `additional_lines` attribute to the `cassandra` class. * Added the `service_systemd` attribute to the `cassandra::opscenter` class. * Allow the systemd template sources to be specified by the user. This is with the `service_systemd_tmpl` attribute to the following classes: * cassandra * cassandra::datastax_agent * cassandra::opscenter * Added another template file for `cassandra` => `service_systemd_tmpl` that is suitable for Cassandra 2.0. ### Bugfixes * Worked around a problem with rake-11 in the Gemfile. * Fixed a problem in the CircleCI configuration. ### Improvements * Renamed the `ensure` attribute to `package_ensure` so that it is more in line with how it's called in other modules. This was done on the the following classes: * cassandra::optutils * cassandra::opscenter * cassandra::opscenter::pycrypto * cassandra::java * Updated the AWS AMI for the TravisCI/AWS acceptance testing to hopefully speed up builds a bit. ## 2016-02-29 - Release 1.14.2 ([diff](https://github.com/locp/cassandra/compare/1.14.1...1.14.2)) ### Summary A small bugfix release. ### Bugfixes * Removed `Restart=always` from the Systemd configuration files. ## 2016-02-27 - Release 1.14.1 ([diff](https://github.com/locp/cassandra/compare/1.14.0...1.14.1)) ### Summary A non-functional release of improvements and a bugfix. ### Bugfixes * If a systemd service file is created or updated, then systemctl daemon-reload is now be executed. ### Improvements * The workflow for building the module has been improved to include: * Automatic integration of improvements and bugfixes into release candidates. * Testing of release candidates includes acceptance (beaker) as well as unit (spec) tests. * The refactoring of the majority of the Ruby code used to test and build this module so that it is hopefully more readable and easier to maintain. * The automation of what had previously been manual steps when building a release. ## 2016-02-19 - Release 1.14.0 ([diff](https://github.com/locp/cassandra/compare/1.13.0...1.14.0)) ### Summary A minor release with one of each of a feature, bug fix and improvement. ### Features * Added the orbited_longpoll attribute to the cassandra::opscenter class. ### Bugfixes * Fixed a problem with the DataStax agent and systemd. ### Improvements * Refactored the contributors section of the README. ## 2016-02-14 - Release 1.13.0 ([diff](https://github.com/locp/cassandra/compare/1.12.2...1.13.0)) ### Summary A mixed back of new features in the shape of attributes for the cassandra, cassandra::datastax_agent and cassandra::opscenter classes. A couple of bug fixes and some non-functional improvements. ### Features * Added the thrift_framed_transport_size_in_mb attribute to ::cassandra. * Added the following attributes to ::cassandra::datastax_agent: * async_pool_size * async_queue_size * service_systemd * Added the config_purge attribute to ::cassandra::opscenter. ### Bugfixes * Removed incorrect puppet code from the README examples. * Fixed a problem with the beaker 2.34.0 gem which was causing problems during automated acceptance testing. ### Improvements * Changed the AWS instance type used by the TravisCI triggered acceptance tests from a c3.xlarge to c4.xlarge. * Merged the acceptance tests virtual nodes into family specific node sets. * Refactored the Gemfile. * Changed references in the documentation to parameters to refer to attributes as that is more Puppet-like. * Changed the format of the contributers section. ## 2016-02-12 - Release 1.12.2 ([diff](https://github.com/locp/cassandra/compare/1.12.1...1.12.2)) ### Summary More bug fixes. ### Bugfixes * Fixed a problem with the Red Hat family and systemd not starting the service and reporting all service stops as failures, regardless of if they were or not. ## 2016-02-08 - Release 1.12.1 ([diff](https://github.com/locp/cassandra/compare/1.12.0...1.12.1)) ### Summary This is a non-functional release. Some bug fixes and release improvements. ### Bugfixes * Completed documentation for attributes. This was missing for the `inter_dc_stream_throughput_outbound_megabits_per_sec` and `stream_throughput_outbound_megabits_per_sec` options. * Corrected the ownership and directories for the OpsCenter configuration. ### Improvements * Nightly build created so that issues similar to those found in issues #136 and #157 can be caught quicker. ## 2016-01-27 - Release 1.12.0 ([diff](https://github.com/locp/cassandra/compare/1.11.0...1.12.0)) ### Summary A new feature in the cassandra::datastax_agent class, a minor bug fix and integration with CircleCI. ### Features * There is now an agent_alias attribute for the cassandra::datastax_agent class. ### Bugfixes * Unit tests were failing due to problems with the puppet-3.8.5 gem. ### Improvements * In addition to TravisCI, the build process is now integrated with [CircleCI](https://circleci.com/gh/locp/cassandra). ## 2016-01-01 - Release 1.11.0 ([diff](https://github.com/locp/cassandra/compare/1.10.0...1.11.0)) ### Summary New features added to the main class. Also some non-functional improvements. ### Features * The addition of the listen_interface and rpc_interface attributes to the main class. ### Improvements * Added more detail to the attributes to the main class in the README. * Improved the module metadata. * Clarified private defined types with the private subclass. * The test coverage in release 1.10.0 dropped to 99.09%. Got it back to 100% in this release. ## 2015-12-19 - Release 1.10.0 ([diff](https://github.com/locp/cassandra/compare/1.9.2...1.10.0)) ### Summary A feature release with minor improvements. ### Features * Added the ability to allow setting the local_interface for the DataStax agent configuration. * Allow the service provider to be specified for the Cassandra, DataStax agent and OpsCenter services with the service_provider attribute. * Optionally allow a systemd system file be inserted with the cassandra::service_systemd attribute. ### Improvements * Allow the files resources specified with in the cassandra attributes: * commitlog_directory * data_file_directories * saved_caches_directory To co-exist with file resources with the same name. ## 2015-11-21 - Release 1.9.2 ([diff](https://github.com/locp/cassandra/compare/1.9.1...1.9.2)) ### Summary A bug fix release that deals with some problems with Cassandra 3. ### Bugfixes * Attempt to mitigate against problems with Debian attempting to install Cassandra 3 when installing the dsc22 package. * Also reverted the project home to the GitHub project page. ## 2015-11-09 - Release 1.9.1 ([diff](https://github.com/locp/cassandra/compare/1.9.0...1.9.1)) ### Summary A bug fix release. ### Bugfixes * The default value for the permissions mode of the Cassandra configuration file were far too open. Changed from 0666 to 0644. ## 2015-10-25 - Release 1.9.0 ([diff](https://github.com/locp/cassandra/compare/1.8.1...1.9.0)) ### Summary Added more features for the configuration of Cassandra, some improvements to the testing carried out before a release and a minor correction to the change log documentation. ### Features * The following attributes have been added to the ::cassandra class to be configured into the configuration file: * client_encryption_algorithm * client_encryption_cipher_suites * client_encryption_protocol * client_encryption_require_client_auth * client_encryption_store_type * client_encryption_truststore * client_encryption_truststore_password * counter_cache_size_in_mb * index_summary_capacity_in_mb * key_cache_save_period * key_cache_keys_to_save * seed_provider_class_name * server_encryption_algorithm * server_encryption_cipher_suites * server_encryption_protocol * server_encryption_require_client_auth * server_encryption_store_type Please see the README file for more details. ### Bugfixes * Corrected an incorrect date (typo) in this document. ### Improvements * There is now an automated test to mitigate the risk of unnecessarily refreshes of the Cassandra service due to non-functional changes to the configuration file. ## 2015-10-14 - Release 1.8.1 ([diff](https://github.com/locp/cassandra/compare/1.8.0...1.8.1)) ### Summary A minor bug fix. ### Bugfixes * Fixed an edge case issue concerning users that may have been using the fail_on_non_supported_os before it was fixed in 1.8.0. ## 2015-10-06 - Release 1.8.0 ([diff](https://github.com/locp/cassandra/compare/1.7.1...1.8.0)) ### Summary Some new features a minor bug fix and some non-functional improvements. ### Features * Added the service_refresh and config_file_mode attributes to the Cassandra class. ### Bugfixes * The name of the fail_on_non_supported_os attribute has been corrected. ### Improvements * Automated acceptance tests in preparation for a release now run faster. ##1015-10-01 - Release 1.7.1 ([diff](https://github.com/locp/cassandra/compare/1.7.0...1.7.1)) ### Summary A minor bug fix that incorrctly gave a failed build status for the module. ### Bugfixes * Fixed a problem that was showing the status of the module build as an error since the release of the fog-google gem version 0.1.1. ## 2015-10-01 - Release 1.7.0 ([diff](https://github.com/locp/cassandra/compare/1.6.0...1.7.0)) ### Summary * Corrected a bug in how commitlog_sync has handled by Cassandra. * Some non-functional improvements * Additional features for the cassandra::datastax_repo class. ### Features * Added the commitlog_segment_size_in_mb attribute to the cassandra class. * Added the following fields to the cassandra::datastax_repo class: * descr * key_id * key_url * pkg_url * release This should make the configuring of repositories more flexible. ### Bugfixes * Fixed a bug in how the commitlog_sync and the attributes that are associated with it are handled ### Improvements The following non-functional improvements were implemented: * Added tags to the module metadata. * Migrated the acceptance tests from Vagrant to Docker. The associated improvements to performance means that more rigorous acceptance tests can be applied in a shorter time. For the first time as well, they are visible on Travis. ## 2015-09-23 - Release 1.6.0 ([diff](https://github.com/locp/cassandra/compare/1.5.0...1.6.0)) ### Summary More attributes for ::cassandra and ::cassandra::datastax_agent. Also some non-functional improvements in the automated unit tests. ### Features * The JAVA_HOME can now be set for the datastax_agent (see the cassandra::datastax_agent => java_home attribute). * The file mode for the directories can now be specified for the commitlog_directory, data_file_directories and the saved_caches_directory in the cassandra class. ### Improvements * Uncovered resources in the unit testing are now tested. ## 2015-09-21 - Release 1.5.0 ([diff](https://github.com/locp/cassandra/compare/1.4.2...1.5.0)) ### Summary More attributes have been added that can be configured into the cassandra.yaml file. ### Features * The following attributes to the cassandra class can be configured into the cassandra configuration: * broadcast_address * broadcast_rpc_address * commitlog_sync * commitlog_sync_batch_window_in_ms * commitlog_total_space_in_mb * concurrent_compactors * counter_cache_keys_to_save * file_cache_size_in_mb * initial_token * inter_dc_stream_throughput_outbound_megabits_per_sec * internode_authenticator * internode_recv_buff_size_in_bytes * internode_send_buff_size_in_bytes * memory_allocator * memtable_cleanup_threshold * memtable_flush_writers * memtable_heap_space_in_mb * memtable_offheap_space_in_mb * native_transport_max_concurrent_connections * native_transport_max_concurrent_connections_per_ip * native_transport_max_frame_size_in_mb * native_transport_max_threads * permissions_update_interval_in_ms * phi_convict_threshold * request_scheduler_options_default_weight * request_scheduler_options_throttle_limit * row_cache_keys_to_save * rpc_max_threads * rpc_min_threads * rpc_recv_buff_size_in_bytes * rpc_send_buff_size_in_bytes * streaming_socket_timeout_in_ms * stream_throughput_outbound_megabits_per_sec ### Improvements * Clarity of changes per release in the change log (this document). ## 2015-09-15 - Release 1.4.2 ([diff](https://github.com/locp/cassandra/compare/1.4.1...1.4.2)) ### Summary Fixed a problem identified whilst releasing 1.4.1 and a bug fixed by a contributed pull request. ### Features * n/a ### Bugfixes * Fixed a problem with the acceptance tests. * The datastax-agent service is restarted if the package is updated. ### Improvements * n/a ## 2015-09-15 - Release 1.4.1 ([diff](https://github.com/locp/cassandra/compare/1.4.0...1.4.1)) ### Summary This release fixes a minor bug (possibly better described as a typing mistake) and makes some non-functional improvements. It also allows the user to override the default behaviour of failing on a non-supported operating system. ### Features * A new flag called `fail_on_non_suppoted_os` has been added to the `cassandra` class and can be set to **false** so that an attempt can be made to use this module on an operating system that is not in the Debian or Red Hat families. ### Bugfixes * Changed the default value for the `package_name` of the `cassandra::optutils` class from `'undef'` to *undef*. ### Improvements * Clarified the expectations of submitted contributions. * Unit test improvements. ## 2015-09-10 - Release 1.4.0 ([diff](https://github.com/locp/cassandra/compare/1.3.7...1.4.0)) * Ensured that directories specified in the directory attributes are controlled with file resources. * Added the following attributes to the cassandra.yml file: * batchlog_replay_throttle_in_kb * cas_contention_timeout_in_ms * column_index_size_in_kb * commit_failure_policy * compaction_throughput_mb_per_sec * counter_cache_save_period * counter_write_request_timeout_in_ms * cross_node_timeout * dynamic_snitch_badness_threshold * dynamic_snitch_reset_interval_in_ms * dynamic_snitch_update_interval_in_ms * hinted_handoff_throttle_in_kb * index_summary_resize_interval_in_minutes * inter_dc_tcp_nodelay * max_hints_delivery_threads * max_hint_window_in_ms * permissions_validity_in_ms * range_request_timeout_in_ms * read_request_timeout_in_ms * request_scheduler * request_timeout_in_ms * row_cache_save_period * row_cache_size_in_mb * sstable_preemptive_open_interval_in_mb * tombstone_failure_threshold * tombstone_warn_threshold * trickle_fsync * trickle_fsync_interval_in_kb * truncate_request_timeout_in_ms * write_request_timeout_in_ms ## 2015-09-08 - Release 1.3.7 ([diff](https://github.com/locp/cassandra/compare/1.3.6...1.3.7)) * Made the auto_bootstrap attribute available. ## 2015-09-03 - Release 1.3.6 ([diff](https://github.com/locp/cassandra/compare/1.3.5...1.3.6)) * Fixed a bug, now allowing the user to set the enabled state of the Cassandra service. * More cleaning up of the README and more links in that file to allow faster navigation. ## 2015-09-01 - Release 1.3.5 ([diff](https://github.com/locp/cassandra/compare/1.3.4...1.3.5)) * Fixed a bug, now allowing the user to set the running state of the Cassandra service. * More automated testing with spec tests. * A refactoring of the README. ## 2015-08-28 - Release 1.3.4 ([diff](https://github.com/locp/cassandra/compare/1.3.3...1.3.4)) * Minor corrections to the README. * The addition of the storage_cassandra_seed_hosts attribute to cassandra::opscenter::cluster_name which is part of a bigger part of work but is urgently require by a client. ## 2015-08-27 - Release 1.3.3 ([diff](https://github.com/locp/cassandra/compare/1.3.2...1.3.3)) * Corrected dependency version for puppetlabs-apt. ## 2015-08-26 - Release 1.3.2 ([diff](https://github.com/locp/cassandra/compare/1.3.1...1.3.2)) * Fixed bug in cassandra::opscenter::cluster_name. * Fixed code in cassandra::firewall_ports::rule to avoid deprecation warnings concerning the use of puppetlabs-firewall => port. * Added more examples to the README ## 2015-08-22 - Release 1.3.1 ([diff](https://github.com/locp/cassandra/compare/1.3.0...1.3.1)) This was mainly a non-functional change. The biggest thing to say is that Debian 7 is now supported. ## 2015-08-19 - Release 1.3.0 ([diff](https://github.com/locp/cassandra/compare/1.2.0...1.3.0)) * Allow additional TCP ports to be specified for the host based firewall. * Fixed a problem where the client subnets were ignored by the firewall. * Added more automated testing. * Continued work on an ongoing improvement of the documentation. * Added the ability to set the DC and RACK in the snitch properties. ## 2015-08-10 - Release 1.2.0 ([diff](https://github.com/locp/cassandra/compare/1.1.0...1.2.0)) * Added the installation of Java Native Access (JNA) to cassandra::java * For DataStax Enterprise, allow the remote storage of metric data with cassandra::opscenter::cluster_name. ## 2015-08-03 - Release 1.1.0 ([diff](https://github.com/locp/cassandra/compare/1.0.1...1.1.0)) * Provided the cassandra::firewall_ports class. * All OpsCenter options are now configurable in opscenterd.conf. * ssl_storage_port is now configurable. ## 2015-07-27 - Release 1.0.1 ([diff](https://github.com/locp/cassandra/compare/1.0.0...1.0.1)) * Provided a workaround for [CASSANDRA-9822](https://issues.apache.org/jira/browse/CASSANDRA-9822). ## 2015-07-25 - Release 1.0.0 ([diff](https://github.com/locp/cassandra/compare/0.4.3...1.0.0)) * Changed the default installation from Cassandra 2.1 to 2.2. * Fixed a bug that arose when the cassandra config_path was set. * Created a workaround for [PUP-3829](https://tickets.puppetlabs.com/browse/PUP-3829). * Minor changes to the API (see the Upgrading section of the README). * Allow a basic installation of OpsCenter. ## 2015-07-18 - Release 0.4.3 ([diff](https://github.com/locp/cassandra/compare/0.4.2...0.4.3)) * Module dependency metadata was too strict. ## 2015-07-16 - Release 0.4.2 ([diff](https://github.com/locp/cassandra/compare/0.4.1...0.4.2)) * Some minor documentation changes. * Fixed a problem with the module metadata that caused Puppetfile issues. * Integrated with Coveralls (https://coveralls.io/github/locp/cassandra). * Removed the deprecated config and install classes. These were private so there is no change to the API. ## 2015-07-14 - Release 0.4.1 ([diff](https://github.com/locp/cassandra/compare/0.4.0...0.4.1)) * Fixed a resource ordering problem in the cassandra::datastax class. * Tidied up the documentation a bit. * Some refactoring of the spec tests. ## 2015-07-12 - Release 0.4.0 ([diff](https://github.com/locp/cassandra/compare/0.3.0...0.4.0)) ### Summary * Some major changes to the API on how Java, the optional Cassandra tools and the DataStax agent are installed. See the Upgrading section of the README file. * Allowed the setting of the *stomp_interface* for the DataStax agent. * Non-functionally, we have integrated with Travis CI (see https://travis-ci.org/locp/cassandra for details) and thanks to those guys for providing such a neat service. * More spec tests. ## 2015-06-27 - Release 0.3.0 ([diff](https://github.com/locp/cassandra/compare/0.2.2...0.3.0)) ### Summary * Slight changes to the API. See the Upgrading section of the README file for full details. * Allow for the installation of the DataStax Agent. * Improved automated testing (and fixed some bugs along the way). * Confirmed Ubuntu 12.04 works OK with this module. * A Cassandra 1.X template has been provided. * Some smarter handling of the differences between Ubuntu/Debian and RedHat derivatives. ## 2015-06-17 - Release 0.2.2 ([diff](https://github.com/locp/cassandra/compare/0.2.1...0.2.2)) ### Summary A non-functional change to change the following: * Split the single manifest into multiple files. * Implement automated testing. * Test on additional operating systems. ## 2015-05-28 - Release 0.2.1 ([diff](https://github.com/locp/cassandra/compare/0.2.0...0.2.1)) ### Summary A non-functional change to fix puppet-lint problems identified by Puppet Forge. ## 2015-05-28 - Release 0.2.0 ([diff](https://github.com/locp/cassandra/compare/0.1.0...0.2.0)) ### Summary Added more attributes and improved the module metadata. ## 2015-05-26 - Release 0.1.0 ### Summary An initial release with **VERY** limited options. diff --git a/docs/_index.html b/docs/_index.html index dc32417..c4ad788 100644 --- a/docs/_index.html +++ b/docs/_index.html @@ -1,229 +1,229 @@ - Documentation by YARD 0.9.10 + Documentation by YARD 0.9.12
-

Documentation by YARD 0.9.10

+
\ No newline at end of file diff --git a/docs/css/style.css b/docs/css/style.css index f682a69..57e8f9d 100644 --- a/docs/css/style.css +++ b/docs/css/style.css @@ -1,492 +1,499 @@ html { width: 100%; height: 100%; } body { font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; font-size: 13px; width: 100%; margin: 0; padding: 0; display: flex; display: -webkit-flex; display: -ms-flexbox; } #nav { position: relative; width: 100%; height: 100%; border: 0; border-right: 1px dotted #eee; overflow: auto; } .nav_wrap { margin: 0; padding: 0; width: 20%; height: 100%; position: relative; display: flex; display: -webkit-flex; display: -ms-flexbox; flex-shrink: 0; -webkit-flex-shrink: 0; -ms-flex: 1 0; } #resizer { position: absolute; right: -5px; top: 0; width: 10px; height: 100%; cursor: col-resize; z-index: 9999; } #main { flex: 5 1; -webkit-flex: 5 1; -ms-flex: 5 1; outline: none; position: relative; background: #fff; padding: 1.2em; padding-top: 0.2em; } @media (max-width: 920px) { .nav_wrap { width: 100%; top: 0; right: 0; overflow: visible; position: absolute; } #resizer { display: none; } #nav { z-index: 9999; background: #fff; display: none; position: absolute; top: 40px; right: 12px; width: 500px; max-width: 80%; height: 80%; overflow-y: scroll; border: 1px solid #999; border-collapse: collapse; box-shadow: -7px 5px 25px #aaa; border-radius: 2px; } } @media (min-width: 920px) { body { height: 100%; overflow: hidden; } #main { height: 100%; overflow: auto; } #search { display: none; } } #main img { max-width: 100%; } h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; } h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; } h1.title { margin-bottom: 10px; } h1.alphaindex { margin-top: 0; font-size: 22px; } h2 { padding: 0; padding-bottom: 3px; border-bottom: 1px #aaa solid; font-size: 1.4em; margin: 1.8em 0 0.5em; position: relative; } h2 small { font-weight: normal; font-size: 0.7em; display: inline; position: absolute; right: 0; } h2 small a { display: block; height: 20px; border: 1px solid #aaa; border-bottom: 0; border-top-left-radius: 5px; background: #f8f8f8; position: relative; padding: 2px 7px; } .clear { clear: both; } .inline { display: inline; } .inline p:first-child { display: inline; } .docstring, .tags, #filecontents { font-size: 15px; line-height: 1.5145em; } .docstring p > code, .docstring p > tt, .tags p > code, .tags p > tt { color: #c7254e; background: #f9f2f4; padding: 2px 4px; font-size: 1em; border-radius: 4px; } .docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; } .docstring h1 { font-size: 1.2em; } .docstring h2 { font-size: 1.1em; } .docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; } .summary_desc .object_link a, .docstring .object_link a { font-family: monospace; font-size: 1.05em; color: #05a; background: #EDF4FA; padding: 2px 4px; font-size: 1em; border-radius: 4px; } .rdoc-term { padding-right: 25px; font-weight: bold; } .rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; } .summary_desc pre.code .object_link a, .docstring pre.code .object_link a { padding: 0px; background: inherit; color: inherit; border-radius: inherit; } /* style for */ #filecontents table, .docstring table { border-collapse: collapse; } #filecontents table th, #filecontents table td, .docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; } #filecontents table tr:nth-child(odd), .docstring table tr:nth-child(odd) { background: #eee; } #filecontents table tr:nth-child(even), .docstring table tr:nth-child(even) { background: #fff; } #filecontents table th, .docstring table th { background: #fff; } /* style for
Node Name IP Address
node0 (seed 1) 110.82.155.0
node1 110.82.155.1
node2 110.82.155.2
node3 (seed 2) 110.82.156.3
node4 110.82.156.4
node5 110.82.156.5

Each node is configured to use the GossipingPropertyFileSnitch and 256 virtual nodes (vnodes). The name of the cluster is MyCassandraCluster. Also, while building the initial cluster, we are setting the auto_bootstrap to false.

In this initial example, we are going to expand the example by:

node /^node\d+$/ {
   class { 'cassandra::datastax_repo':
     before => Class['cassandra']
   }
 
   class { 'cassandra::java':
     before => Class['cassandra']
   }
 
   class { 'cassandra':
     settings       => {
       'authenticator'               => 'AllowAllAuthenticator',
       'auto_bootstrap'              => false,
       'cluster_name'                => 'MyCassandraCluster',
       'commitlog_directory'         => '/var/lib/cassandra/commitlog',
       'commitlog_sync'              => 'periodic',
       'commitlog_sync_period_in_ms' => 10000,
       'data_file_directories'       => ['/var/lib/cassandra/data'],
       'endpoint_snitch'             => 'GossipingPropertyFileSnitch',
       'hints_directory'             => '/var/lib/cassandra/hints',
       'listen_interface'            => 'eth1',
       'num_tokens'                  => 256,
       'partitioner'                 => 'org.apache.cassandra.dht.Murmur3Partitioner',
       'saved_caches_directory'      => '/var/lib/cassandra/saved_caches',
       'seed_provider'               => [
         {
           'class_name' => 'org.apache.cassandra.locator.SimpleSeedProvider',
           'parameters' => [
             {
               'seeds' => '110.82.155.0,110.82.156.3',
             },
           ],
         },
       ],
       'start_native_transport'      => true,
     },
   }
 }
 

The default value for the num_tokens is already 256, but it is included in the example for clarity. Do not forget to either set auto_bootstrap to true or not set the attribute at all after initializing the cluster.

Create a Cluster in Multiple Data Centers

To continue with the examples provided by DataStax, we look at the example for a cluster across multiple data centers http://docs.datastax.com/en/cassandra/2.2/cassandra/initialize/initMultipleDS.html.

Node Name IP Address Data Center Rack
node0 (seed 1) 10.168.66.41 DC1 RAC1
node1 10.176.43.66 DC1 RAC1
node2 10.168.247.41 DC1 RAC1
node3 (seed 2) 10.176.170.59 DC2 RAC1
node4 10.169.61.170 DC2 RAC1
node5 10.169.30.138 DC2 RAC1

For the sake of simplicity, we will confine this example to the nodes:

node /^node[012]$/ {
   class { 'cassandra':
     dc             => 'DC1',
     settings       => {
       'authenticator'               => 'AllowAllAuthenticator',
       'auto_bootstrap'              => false,
       'cluster_name'                => 'MyCassandraCluster',
       'commitlog_directory'         => '/var/lib/cassandra/commitlog',
       'commitlog_sync'              => 'periodic',
       'commitlog_sync_period_in_ms' => 10000,
       'data_file_directories'       => ['/var/lib/cassandra/data'],
       'endpoint_snitch'             => 'GossipingPropertyFileSnitch',
       'hints_directory'             => '/var/lib/cassandra/hints',
       'listen_interface'            => 'eth1',
       'num_tokens'                  => 256,
       'partitioner'                 => 'org.apache.cassandra.dht.Murmur3Partitioner',
       'saved_caches_directory'      => '/var/lib/cassandra/saved_caches',
       'seed_provider'               => [
         {
           'class_name' => 'org.apache.cassandra.locator.SimpleSeedProvider',
           'parameters' => [
             {
               'seeds' => '110.82.155.0,110.82.156.3',
             },
           ],
         },
       ],
       'start_native_transport'      => true,
     },
   }
 }
 
 node /^node[345]$/ {
   class { 'cassandra':
     dc             => 'DC2',
     settings       => {
       'authenticator'               => 'AllowAllAuthenticator',
       'auto_bootstrap'              => false,
       'cluster_name'                => 'MyCassandraCluster',
       'commitlog_directory'         => '/var/lib/cassandra/commitlog',
       'commitlog_sync'              => 'periodic',
       'commitlog_sync_period_in_ms' => 10000,
       'data_file_directories'       => ['/var/lib/cassandra/data'],
       'endpoint_snitch'             => 'GossipingPropertyFileSnitch',
       'hints_directory'             => '/var/lib/cassandra/hints',
       'listen_interface'            => 'eth1',
       'num_tokens'                  => 256,
       'partitioner'                 => 'org.apache.cassandra.dht.Murmur3Partitioner',
       'saved_caches_directory'      => '/var/lib/cassandra/saved_caches',
       'seed_provider'               => [
         {
           'class_name' => 'org.apache.cassandra.locator.SimpleSeedProvider',
           'parameters' => [
             {
               'seeds' => '110.82.155.0,110.82.156.3',
             },
           ],
         },
       ],
       'start_native_transport'      => true,
     },
   }
 }
 

We don't need to specify the rack name (with the rack attribute) as RAC1 is the default value. Again, do not forget to either set auto_bootstrap to true or not set the attribute at all after initializing the cluster.

DataStax Enterprise

After configuring the relevant repository, the following snippet works on CentOS 7 to install DSE Cassandra 4.7.0, set the HADOOP_LOG_DIR, set the DSE_HOME and configure DataStax Enterprise to use LDAP for authentication:

class { 'cassandra::datastax_repo':
   descr   => 'DataStax Repo for DataStax Enterprise',
   pkg_url => 'https://username:password@rpm.datastax.com/enterprise',
   before  => Class['cassandra'],
 }
 
 class { 'cassandra':
   cluster_name    => 'MyCassandraCluster',
   config_path     => '/etc/dse/cassandra',
   package_ensure  => '4.7.0-1',
   package_name    => 'dse-full',
   service_name    => 'dse',
   ...
 }
 
 class { 'cassandra::dse':
   file_lines => {
     'Set HADOOP_LOG_DIR directory' => {
       ensure => present,
       path   => '/etc/dse/dse-env.sh',
       line   => 'export HADOOP_LOG_DIR=/var/log/hadoop',
       match  => '^# export HADOOP_LOG_DIR=<log_dir>',
     },
     'Set DSE_HOME'                 => {
       ensure => present,
       path   => '/etc/dse/dse-env.sh',
       line   => 'export DSE_HOME=/usr/share/dse',
       match  => '^#export DSE_HOME',
     },
   },
   settings   => {
     ldap_options => {
       server_host                => localhost,
       server_port                => 389,
       search_dn                  => 'cn=Admin',
       search_password            => secret,
       use_ssl                    => false,
       use_tls                    => false,
       truststore_type            => jks,
       user_search_base           => 'ou=users,dc=example,dc=com',
       user_search_filter         => '(uid={0})',
       credentials_validity_in_ms => 0,
       connection_pool            => {
         max_active => 8,
         max_idle   => 8,
       }
     }
   }
 }
 

Apache Cassandra

DataStax announced in late October 2016 that it was no longer supporting the community edition of Cassandra or DSC as it was known (see [Take a bow Planet Cassandra](http://www.datastax.com/2016/10/take-a-bow-planet-cassandra) for details). However, the following snippet of code running on Ubuntu 14.04 worked fine without having to change any of the ::cassandra class settings:

require cassandra::java
 include cassandra::optutils
 
 class { 'cassandra::apache_repo':
   release => '310x',
   before  => Class['cassandra', 'cassandra::optutils'],
 }
 
 class { 'cassandra':
   ...
 }
 

Reference

The reference documentation is generated using the puppet-strings tool. To see all of it, please go to http://voxpupuli.github.io/puppet-cassandra.

Limitations

Development

Contributions will be gratefully accepted. Please go to the project page, fork the project, make your changes locally and then raise a pull request. Details on how to do this are available at https://guides.github.com/activities/contributing-to-open-source.

Please also see the CONTRIBUTING.md page for project specific requirements.

Additional Contributers

For a list of contributers see CONTRIBUTING.md and https://github.com/voxpupuli/puppet-cassandra/graphs/contributors

\ No newline at end of file diff --git a/docs/frames.html b/docs/frames.html index 3f1d814..42ca6b6 100644 --- a/docs/frames.html +++ b/docs/frames.html @@ -1,17 +1,17 @@ - Documentation by YARD 0.9.10 + Documentation by YARD 0.9.12 diff --git a/docs/index.html b/docs/index.html index 67563bf..b0e91fc 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,824 +1,824 @@ File: README - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Cassandra

Build Status

Table of Contents

  1. Overview
  2. Setup - The basics of getting started with Cassandra
  3. Usage - Configuration options and additional functionality
  4. Reference
  5. Limitations - OS compatibility, etc.
  6. Development

Overview

A Puppet module to install and manage Cassandra, DataStax Agent & OpsCenter

Setup

What Cassandra affects

What the Cassandra class affects

  • Installs the Cassandra package (default cassandra22 on Red Hat and cassandra on Debian).
  • Configures settings in ${config_path}/cassandra.yaml.
  • On CentOS 7 if the init service provider is used, then cassandra is added as a system service.
  • Optionally ensures that the Cassandra service is enabled and running.
  • On Debian systems:
    • Optionally replace /etc/init.d/cassandra with a workaround for CASSANDRA-9822.

What the cassandra::datastax_agent class affects

  • Optionally installs the DataStax agent.
  • Optionally sets JAVA_HOME in /etc/default/datastax-agent.

What the cassandra::datastax_repo class affects

  • Optionally configures a Yum repository to install the Cassandra packages from (on Red Hat).
  • Optionally configures an Apt repository to install the Cassandra packages from (on Debian).

What the cassandra::dse class affects

  • Optionally configures files in the /etc/dse directory if one is using DataStax Enterprise.

What the cassandra::firewall_ports class affects

  • Optionally configures the firewall for the Cassandra related network ports.

What the cassandra::java class affects

  • Optionally installs a JRE/JDK package (e.g. java-1.7.0-openjdk) and the Java Native Access (JNA).

What the cassandra::optutils class affects

  • Optionally installs the Cassandra support tools (e.g. cassandra22-tools).

Upgrading

We follow SemVer Versioning and an update of the major release (i.e. from 1.Y.Z to 2.Y.Z) will indicate a significant change to the API which will most probably require a change to your manifest.

Changes in 2.0.0

This is a major change to the API and you will more than likely need to change your manifest to accomodate these changes.

The service_ensure attribute of the cassandra class now defaults to undef, users who do want to manage service status in Puppet can still set it to true. If leaving the value at the default and setting service_refresh and service_enable to false will mean that the user and not Puppet running will control the running state of Cassandra. This currently works OK on the Red Hat family, but has issues on Debian due to CASSANDRA-2356 during an initial install or package upgrade.

All the functionality relating to OpsCenter has been divested to the locp/opscenter module on Puppet Forge.

It should also be noted that the module no longer creates directories for the data, commitlog, saved_caches and for Cassandra 3 the hints directory. These resources will now need to be defined in your manifest/profile.

For a list of features that have been deprecated in this release, please see https://github.com/voxpupuli/puppet-cassandra/wiki/Deprecations

For details on migrating from the version 1.X.X attributes to the settings hash, see (https://github.com/voxpupuli/puppet-cassandra/wiki/Suggested-Baseline-Settings)

Please also see the notes for 2.0.0 in the CHANGELOG.

Changes in 1.19.0

The hints_directory documentation will cause a change in the cassandra.yaml file regardless of the value you set it to. If you do not wish this to result in a refesh of the Cassandra service, please set service_refresh to false.

Changes in 1.9.2

Now that Cassandra 3 is available from the DataStax repositories, there is a problem (especially on Debian) with the operating system package manager attempting to install Cassandra 3. This can be mitigated against using something similar to the code in this modules acceptance test. Please note that the default Cassandra package name has now been changed from 'dsc'. See the documentation for cassandra::package_name below for details.

 if $::osfamily == 'RedHat' {
    $version = '2.2.4-1'
  } else {
    $version = '2.2.4'
  }
 
  class { 'cassandra':
    package_ensure => $version,
  }
 

Changes in 1.8.0

A somewhat embarrassing correction to the spelling of the cassandra::fail_on_non_suppoted_os to cassandra::fail_on_non_supported_os.

Issues when Upgrading to 1.4.0

Unfortunately both releases 1.3.7 and 1.4.0 have subsequently been found to call a refresh service even when no changes had been made to the underlying configuration. In release 1.8.0 (somewhat belatedly) the service_refresh flag has been introduced to mitigate against similar problems.

Issues When Upgrading to 1.3.7

  • Please see the notes for 1.4.0.

Changes in 1.0.0

  • cassandra::cassandra_package_ensure has been renamed to cassandra::package_ensure.
  • cassandra::cassandra_package_name has been renamed to cassandra::package_name.

Changes in 0.4.0

There is now a cassandra::datastax_agent class, therefore:

  • cassandra::datastax_agent_package_ensure has now been replaced with cassandra::datastax_agent::package_ensure.
  • cassandra::datastax_agent_service_enable has now been replaced with cassandra::datastax_agent::service_enable.
  • cassandra::datastax_agent_service_ensure has now been replaced with cassandra::datastax_agent::service_ensure.
  • cassandra::datastax_agent_package_name has now been replaced with cassandra::datastax_agent::package_name.
  • cassandra::datastax_agent_service_name has now been replaced with cassandra::datastax_agent::service_name.

Likewise now there is a new class for handling the installation of Java:

  • cassandra::java_package_ensure has now been replaced with cassandra::java::ensure.
  • cassandra::java_package_name has now been replaced with cassandra::java::package_name.

Also there is now a class for installing the optional utilities:

  • cassandra::cassandra_opt_package_ensure has now been replaced with cassandra::optutils:ensure.
  • cassandra::cassandra_opt_package_name has now been replaced with cassandra::optutils:package_name.

Changes in 0.3.0

  • cassandra_opt_package_ensure changed from 'present' to undef.

  • The manage_service option has been replaced with service_enable and service_ensure.

Beginning with Cassandra

Create a Cassandra 2.X cluster called MyCassandraCluster which uses the GossipingPropertyFileSnitch and password authentication. In this very basic example the node itself becomes a seed for the cluster and the credentials will default to a user called cassandra with a password called of cassandra.

# Cassandra pre-requisites
 include cassandra::datastax_repo
 include cassandra::java
 
 class { 'cassandra':
   settings => {
     'authenticator'               => 'PasswordAuthenticator',
     'cluster_name'                => 'MyCassandraCluster',
     'commitlog_directory'         => '/var/lib/cassandra/commitlog',
     'commitlog_sync'              => 'periodic',
     'commitlog_sync_period_in_ms' => 10000,
     'data_file_directories'       => ['/var/lib/cassandra/data'],
     'endpoint_snitch'             => 'GossipingPropertyFileSnitch',
     'listen_address'              => $::ipaddress,
     'partitioner'                 => 'org.apache.cassandra.dht.Murmur3Partitioner',
     'saved_caches_directory'      => '/var/lib/cassandra/saved_caches',
     'seed_provider'               => [
       {
         'class_name' => 'org.apache.cassandra.locator.SimpleSeedProvider',
         'parameters' => [
           {
             'seeds' => $::ipaddress,
           },
         ],
       },
     ],
     'start_native_transport'      => true,
   },
   require  => Class['cassandra::datastax_repo', 'cassandra::java'],
 }
 

However, PLEASE note that this is the ABSOLUTE MINIMUM configuration to get Cassandra up and running but will probably give you a rather badly configured node. Please see Suggested Baseline Settings for details on making your configuration a lot more robust.

For this code to run with version 3.X of Cassandra, the hints_directory will also need to be specified:

...
 
 class { 'cassandra':
   settings => {
     ...
     'hints_directory'             => '/var/lib/cassandra/hints',
     ...
   },
   require  => Class['cassandra::datastax_repo', 'cassandra::java'],
 }
 

Hiera

In your top level node classification (usually common.yaml), add the settings hash and all the tweaks you want all the clusters to use:

cassandra::baseline_settings:
   authenticator: AllowAllAuthenticator
   authorizer: AllowAllAuthorizer
   auto_bootstrap: true
   auto_snapshot: true
   ...
 

Then, in the individual node classification add the parts which define the cluster:

cassandra::settings:
   cluster_name: developer playground cassandra cluster
 cassandra::dc: Onsite1
 cassandra::rack: RAC1
 cassandra::package_ensure: 3.0.5-1
 cassandra::package_name: cassandra30
 

Usage

Setup a keyspace and users

We assume that authentication has been enabled for the cassandra cluster and we are connecting with the default user name and password ('cassandra/cassandra').

In this example, we create a keyspace (mykeyspace) with a table called 'users' and an index called 'users_lname_idx'.

We also add three users (to Cassandra, not the mykeyspace.users table) called spillman, akers and boone while ensuring that a user called lucan is absent.

class { 'cassandra':
   ...
 }
 
 class { 'cassandra::schema':
   cqlsh_password => 'cassandra',
   cqlsh_user     => 'cassandra',
   cqlsh_host     => $::ipaddress,
   indexes        => {
     'users_lname_idx' => {
       table    => 'users',
       keys     => 'lname',
       keyspace => 'mykeyspace',
     },
   },
   keyspaces      => {
     'mykeyspace' => {
       durable_writes  => false,
       replication_map => {
         keyspace_class     => 'SimpleStrategy',
         replication_factor => 1,
       },
     }
   },
   permissions    => {
     'Grant select permissions to spillman to all keyspaces' => {
       permission_name => 'SELECT',
       user_name       => 'spillman',
     },
     'Grant modify to to keyspace mykeyspace to akers'       => {
       keyspace_name   => 'mykeyspace',
       permission_name => 'MODIFY',
       user_name       => 'akers',
     },
     'Grant alter permissions to mykeyspace to boone'        => {
       keyspace_name   => 'mykeyspace',
       permission_name => 'ALTER',
       user_name       => 'boone',
     },
     'Grant ALL permissions to mykeyspace.users to gbennet'  => {
       keyspace_name   => 'mykeyspace',
       permission_name => 'ALTER',
       table_name      => 'users',
       user_name       => 'gbennet',
     },
   },
   tables         => {
     'users' => {
       columns  => {
         user_id       => 'int',
         fname         => 'text',
         lname         => 'text',
         'PRIMARY KEY' => '(user_id)',
       },
       keyspace => 'mykeyspace',
     },
   },
   users          => {
     'spillman' => {
       password => 'Niner27',
     },
     'akers'    => {
       password  => 'Niner2',
       superuser => true,
     },
     'boone'    => {
       password => 'Niner75',
     },
     'gbennet'  => {
       'password' => 'foobar',
     },
     'lucan'    => {
       'ensure' => absent
     },
   },
 }
 

Create a Cluster in a Single Data Center

In the DataStax documentation Initializing a multiple node cluster (single data center) http://docs.datastax.com/en/cassandra/2.2/cassandra/initialize/initSingleDS.html there is a basic example of a six node cluster with two seeds to be created in a single data center spanning two racks. The nodes in the cluster are:

Node Name IP Address
node0 (seed 1) 110.82.155.0
node1 110.82.155.1
node2 110.82.155.2
node3 (seed 2) 110.82.156.3
node4 110.82.156.4
node5 110.82.156.5

Each node is configured to use the GossipingPropertyFileSnitch and 256 virtual nodes (vnodes). The name of the cluster is MyCassandraCluster. Also, while building the initial cluster, we are setting the auto_bootstrap to false.

In this initial example, we are going to expand the example by:

  • Ensuring that the software is installed via the DataStax Community repository by including cassandra::datastax_repo. This needs to be executed before the Cassandra package is installed.
  • That a suitable Java Runtime environment (JRE) is installed with Java Native Access (JNA) by including cassandra::java. This need to be executed before the Cassandra service is started.
node /^node\d+$/ {
   class { 'cassandra::datastax_repo':
     before => Class['cassandra']
   }
 
   class { 'cassandra::java':
     before => Class['cassandra']
   }
 
   class { 'cassandra':
     settings       => {
       'authenticator'               => 'AllowAllAuthenticator',
       'auto_bootstrap'              => false,
       'cluster_name'                => 'MyCassandraCluster',
       'commitlog_directory'         => '/var/lib/cassandra/commitlog',
       'commitlog_sync'              => 'periodic',
       'commitlog_sync_period_in_ms' => 10000,
       'data_file_directories'       => ['/var/lib/cassandra/data'],
       'endpoint_snitch'             => 'GossipingPropertyFileSnitch',
       'hints_directory'             => '/var/lib/cassandra/hints',
       'listen_interface'            => 'eth1',
       'num_tokens'                  => 256,
       'partitioner'                 => 'org.apache.cassandra.dht.Murmur3Partitioner',
       'saved_caches_directory'      => '/var/lib/cassandra/saved_caches',
       'seed_provider'               => [
         {
           'class_name' => 'org.apache.cassandra.locator.SimpleSeedProvider',
           'parameters' => [
             {
               'seeds' => '110.82.155.0,110.82.156.3',
             },
           ],
         },
       ],
       'start_native_transport'      => true,
     },
   }
 }
 

The default value for the num_tokens is already 256, but it is included in the example for clarity. Do not forget to either set auto_bootstrap to true or not set the attribute at all after initializing the cluster.

Create a Cluster in Multiple Data Centers

To continue with the examples provided by DataStax, we look at the example for a cluster across multiple data centers http://docs.datastax.com/en/cassandra/2.2/cassandra/initialize/initMultipleDS.html.

Node Name IP Address Data Center Rack
node0 (seed 1) 10.168.66.41 DC1 RAC1
node1 10.176.43.66 DC1 RAC1
node2 10.168.247.41 DC1 RAC1
node3 (seed 2) 10.176.170.59 DC2 RAC1
node4 10.169.61.170 DC2 RAC1
node5 10.169.30.138 DC2 RAC1

For the sake of simplicity, we will confine this example to the nodes:

node /^node[012]$/ {
   class { 'cassandra':
     dc             => 'DC1',
     settings       => {
       'authenticator'               => 'AllowAllAuthenticator',
       'auto_bootstrap'              => false,
       'cluster_name'                => 'MyCassandraCluster',
       'commitlog_directory'         => '/var/lib/cassandra/commitlog',
       'commitlog_sync'              => 'periodic',
       'commitlog_sync_period_in_ms' => 10000,
       'data_file_directories'       => ['/var/lib/cassandra/data'],
       'endpoint_snitch'             => 'GossipingPropertyFileSnitch',
       'hints_directory'             => '/var/lib/cassandra/hints',
       'listen_interface'            => 'eth1',
       'num_tokens'                  => 256,
       'partitioner'                 => 'org.apache.cassandra.dht.Murmur3Partitioner',
       'saved_caches_directory'      => '/var/lib/cassandra/saved_caches',
       'seed_provider'               => [
         {
           'class_name' => 'org.apache.cassandra.locator.SimpleSeedProvider',
           'parameters' => [
             {
               'seeds' => '110.82.155.0,110.82.156.3',
             },
           ],
         },
       ],
       'start_native_transport'      => true,
     },
   }
 }
 
 node /^node[345]$/ {
   class { 'cassandra':
     dc             => 'DC2',
     settings       => {
       'authenticator'               => 'AllowAllAuthenticator',
       'auto_bootstrap'              => false,
       'cluster_name'                => 'MyCassandraCluster',
       'commitlog_directory'         => '/var/lib/cassandra/commitlog',
       'commitlog_sync'              => 'periodic',
       'commitlog_sync_period_in_ms' => 10000,
       'data_file_directories'       => ['/var/lib/cassandra/data'],
       'endpoint_snitch'             => 'GossipingPropertyFileSnitch',
       'hints_directory'             => '/var/lib/cassandra/hints',
       'listen_interface'            => 'eth1',
       'num_tokens'                  => 256,
       'partitioner'                 => 'org.apache.cassandra.dht.Murmur3Partitioner',
       'saved_caches_directory'      => '/var/lib/cassandra/saved_caches',
       'seed_provider'               => [
         {
           'class_name' => 'org.apache.cassandra.locator.SimpleSeedProvider',
           'parameters' => [
             {
               'seeds' => '110.82.155.0,110.82.156.3',
             },
           ],
         },
       ],
       'start_native_transport'      => true,
     },
   }
 }
 

We don't need to specify the rack name (with the rack attribute) as RAC1 is the default value. Again, do not forget to either set auto_bootstrap to true or not set the attribute at all after initializing the cluster.

DataStax Enterprise

After configuring the relevant repository, the following snippet works on CentOS 7 to install DSE Cassandra 4.7.0, set the HADOOP_LOG_DIR, set the DSE_HOME and configure DataStax Enterprise to use LDAP for authentication:

class { 'cassandra::datastax_repo':
   descr   => 'DataStax Repo for DataStax Enterprise',
   pkg_url => 'https://username:password@rpm.datastax.com/enterprise',
   before  => Class['cassandra'],
 }
 
 class { 'cassandra':
   cluster_name    => 'MyCassandraCluster',
   config_path     => '/etc/dse/cassandra',
   package_ensure  => '4.7.0-1',
   package_name    => 'dse-full',
   service_name    => 'dse',
   ...
 }
 
 class { 'cassandra::dse':
   file_lines => {
     'Set HADOOP_LOG_DIR directory' => {
       ensure => present,
       path   => '/etc/dse/dse-env.sh',
       line   => 'export HADOOP_LOG_DIR=/var/log/hadoop',
       match  => '^# export HADOOP_LOG_DIR=<log_dir>',
     },
     'Set DSE_HOME'                 => {
       ensure => present,
       path   => '/etc/dse/dse-env.sh',
       line   => 'export DSE_HOME=/usr/share/dse',
       match  => '^#export DSE_HOME',
     },
   },
   settings   => {
     ldap_options => {
       server_host                => localhost,
       server_port                => 389,
       search_dn                  => 'cn=Admin',
       search_password            => secret,
       use_ssl                    => false,
       use_tls                    => false,
       truststore_type            => jks,
       user_search_base           => 'ou=users,dc=example,dc=com',
       user_search_filter         => '(uid={0})',
       credentials_validity_in_ms => 0,
       connection_pool            => {
         max_active => 8,
         max_idle   => 8,
       }
     }
   }
 }
 

Apache Cassandra

DataStax announced in late October 2016 that it was no longer supporting the community edition of Cassandra or DSC as it was known (see [Take a bow Planet Cassandra](http://www.datastax.com/2016/10/take-a-bow-planet-cassandra) for details). However, the following snippet of code running on Ubuntu 14.04 worked fine without having to change any of the ::cassandra class settings:

require cassandra::java
 include cassandra::optutils
 
 class { 'cassandra::apache_repo':
   release => '310x',
   before  => Class['cassandra', 'cassandra::optutils'],
 }
 
 class { 'cassandra':
   ...
 }
 

Reference

The reference documentation is generated using the puppet-strings tool. To see all of it, please go to http://voxpupuli.github.io/puppet-cassandra.

Limitations

  • When using a Ruby version before 1.9.0, the contents of the Cassandra configuration file may change order of elements due to a problem with to_yaml in earlier versions of Ruby.
  • When creating key spaces, indexes, cql_types and users the settings will only be used to create a new resource if it does not currently exist. If a change is made to the Puppet manifest but the resource already exits, this change will not be reflected.
  • At the moment the cassandra::system::transparent_hugepage does not persist between reboots.
  • Acceptance for Debian 7 are confined to Cassandra 2.1 and 2.2. There is a conflict between the GLIBC on Debian 7 and the newer releases of Cassandra 3.X.

Development

Contributions will be gratefully accepted. Please go to the project page, fork the project, make your changes locally and then raise a pull request. Details on how to do this are available at https://guides.github.com/activities/contributing-to-open-source.

Please also see the CONTRIBUTING.md page for project specific requirements.

Additional Contributers

For a list of contributers see CONTRIBUTING.md and https://github.com/voxpupuli/puppet-cassandra/graphs/contributors

\ No newline at end of file diff --git a/docs/puppet_classes/cassandra.html b/docs/puppet_classes/cassandra.html index 0cbc498..69a6339 100644 --- a/docs/puppet_classes/cassandra.html +++ b/docs/puppet_classes/cassandra.html @@ -1,1254 +1,1254 @@ Puppet Class: cassandra - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Puppet Class: cassandra

Inherits:
cassandra::params
Defined in:
manifests/init.pp

Overview

A class for installing the Cassandra package and manipulate settings in the configuration file.

Parameters:

  • baseline_settings (hash) (defaults to: {})

    If set, this is a baseline of settings that are merged with the settings hash. The values of the settings hash overriding the values in this hash. This is most useful when used with hiera.

  • cassandra_2356_sleep_seconds (boolean) (defaults to: 5)

    This will provide a workaround for CASSANDRA-2356 by sleeping for the specifed number of seconds after an event involving the Cassandra package. This option is silently ignored on the Red Hat family of operating systems as this bug only affects Debian systems.

  • cassandra_9822 (boolean) (defaults to: false)

    If set to true, this will apply a patch to the init file for the Cassandra service as a workaround for CASSANDRA-9822. This this bug only affects Debian systems.

  • cassandra_yaml_tmpl (string) (defaults to: 'cassandra/cassandra.yaml.erb')

    The path to the Puppet template for the Cassandra configuration file. This allows the user to supply their own customized template.`

  • commitlog_directory (string) (defaults to: undef)

    The path to the commitlog directory. If set, the directory will be managed as a Puppet resource. Do not specify a value here and in the settings hash as they are mutually exclusive.

  • commitlog_directory_mode (string) (defaults to: '0750')

    The mode for the commitlog_directory is ignored unless commitlog_directory is specified.

  • manage_config_file (Boolean) (defaults to: true)

    Whether or not to manage the cassandra configuration file.

  • config_file_mode (string) (defaults to: '0644')

    The permissions mode of the cassandra configuration file.

  • config_path (string) (defaults to: $::cassandra::params::config_path)

    The path to the cassandra configuration file.

  • data_file_directories (array) (defaults to: undef)

    The path(s) to the date directory or directories. If set, the directories will be managed as a Puppet resource. Do not specify a value here and in the settings hash as they are mutually exclusive.

  • data_file_directories_mode (string) (defaults to: '0750')

    The mode for the data_file_directories is ignored unless data_file_directories is specified.

  • dc (string) (defaults to: 'DC1')

    Sets the value for dc in config_path/snitch_properties_file http://docs.datastax.com/en/cassandra/2.1/cassandra/architecture/architectureSnitchesAbout_c.html for more details.

  • dc_suffix (string) (defaults to: undef)

    Sets the value for dc_suffix in config_path/snitch_properties_file see http://docs.datastax.com/en/cassandra/2.1/cassandra/architecture/architectureSnitchesAbout_c.html for more details. If the value is undef then no change will be made to the snitch properties file for this setting.

  • fail_on_non_supported_os (boolean) (defaults to: true)

    A flag that dictates if the module should fail if it is not RedHat or Debian. If you set this option to false then you must also at least set the config_path attribute as well.

  • hints_directory (string) (defaults to: undef)

    The path to the hints directory. If set, the directory will be managed as a Puppet resource. Do not specify a value here and in the settings hash as they are mutually exclusive. Do not set this option in Cassandra versions before 3.0.0.

  • hints_directory_mode (string) (defaults to: '0750')

    The mode for the hints_directory is ignored unless hints_directory is specified.

  • package_ensure (present|latest|string) (defaults to: 'present')

    The status of the package specified in package_name. Can be present, latest or a specific version number.

  • package_name (string) (defaults to: $::cassandra::params::cassandra_pkg)

    The name of the Cassandra package which must be available from a repository.

  • prefer_local (boolean) (defaults to: undef)

    Sets the value for prefer_local in config_path/snitch_properties_file see http://docs.datastax.com/en/cassandra/2.1/cassandra/architecture/architectureSnitchesAbout_c.html for more details. Valid values are true, false or undef. If the value is undef then change will be made to the snitch properties file for this setting.

  • rack (string) (defaults to: 'RAC1')

    Sets the value for rack in config_path/snitch_properties_file see http://docs.datastax.com/en/cassandra/2.1/cassandra/architecture/architectureSnitchesAbout_c.html for more details.

  • rackdc_tmpl (string) (defaults to: 'cassandra/cassandra-rackdc.properties.erb')

    The template for creating the snitch properties file.

  • saved_caches_directory (string) (defaults to: undef)

    The path to the saved caches directory. If set, the directory will be managed as a Puppet resource. Do not specify a value here and in the settings hash as they are mutually exclusive.

  • saved_caches_directory_mode (string) (defaults to: '0750')

    The mode for the saved_caches_directory is ignored unless saved_caches_directory is specified.

  • service_enable (boolean) (defaults to: true)

    enable the Cassandra service to start at boot time.

  • service_ensure (string) (defaults to: undef)

    Ensure the Cassandra service is running. Valid values are running or stopped.

  • service_name (string) (defaults to: 'cassandra')

    The name of the service that runs the Cassandra software.

  • service_provider (string) (defaults to: undef)

    The name of the provider that runs the service. If left as undef then the OS family specific default will be used, otherwise the specified value will be used instead.

  • service_refresh (boolean) (defaults to: true)

    If set to true, changes to the Cassandra config file or the data directories will ensure that Cassandra service is refreshed after the changes. Setting this flag to false will disable this behaviour, therefore allowing the changes to be made but allow the user to control when the service is restarted.

  • settings (hash) (defaults to: {})

    A hash that is passed to to_yaml which dumps the results to the Cassandra configuring file. The minimum required settings for Cassandra 2.X are as follows:

      {
         'authenticator'               => 'PasswordAuthenticator',
         'cluster_name'                => 'MyCassandraCluster',
         'commitlog_directory'         => '/var/lib/cassandra/commitlog',
         'commitlog_sync'              => 'periodic',
         'commitlog_sync_period_in_ms' => 10000,
         'data_file_directories'       => ['/var/lib/cassandra/data'],
         'endpoint_snitch'             => 'GossipingPropertyFileSnitch',
         'listen_address'              => $::ipaddress,
         'partitioner'                 => 'org.apache.cassandra.dht.Murmur3Partitioner',
         'saved_caches_directory'      => '/var/lib/cassandra/saved_caches',
         'seed_provider'               => [
           {
             'class_name' => 'org.apache.cassandra.locator.SimpleSeedProvider',
             'parameters' => [
               {
                 'seeds' => $::ipaddress,
               },
             ],
           },
         ],
         'start_native_transport'      => true,
       }
     

    For Cassandra 3.X you will also need to specify the hints_directory attribute.

  • snitch_properties_file (string) (defaults to: 'cassandra-rackdc.properties')

    The name of the snitch properties file. The full path name would be config_path/snitch_properties_file.

  • systemctl (string) (defaults to: $::cassandra::params::systemctl)

    The full path to the systemctl command. Only needed when the package is installed. Will silently continue if the executable does not exist.

 
 
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
# File 'manifests/init.pp', line 130
 
 class cassandra (
   $baseline_settings            = {},
   $cassandra_2356_sleep_seconds = 5,
   $cassandra_9822               = false,
   $cassandra_yaml_tmpl          = 'cassandra/cassandra.yaml.erb',
   $commitlog_directory          = undef,
   $commitlog_directory_mode     = '0750',
   Boolean $manage_config_file   = true,
   $config_file_mode             = '0644',
   $config_path                  = $::cassandra::params::config_path,
   $data_file_directories        = undef,
   $data_file_directories_mode   = '0750',
   $dc                           = 'DC1',
   $dc_suffix                    = undef,
   $fail_on_non_supported_os     = true,
   $hints_directory              = undef,
   $hints_directory_mode         = '0750',
   $package_ensure               = 'present',
   $package_name                 = $::cassandra::params::cassandra_pkg,
   $prefer_local                 = undef,
   $rack                         = 'RAC1',
   $rackdc_tmpl                  = 'cassandra/cassandra-rackdc.properties.erb',
   $saved_caches_directory       = undef,
   $saved_caches_directory_mode  = '0750',
   $service_enable               = true,
   $service_ensure               = undef,
   $service_name                 = 'cassandra',
   $service_provider             = undef,
   $service_refresh              = true,
   $settings                     = {},
   $snitch_properties_file       = 'cassandra-rackdc.properties',
   $systemctl                    = $::cassandra::params::systemctl,
   ) inherits cassandra::params {
   if $service_provider != undef {
     Service {
       provider => $service_provider,
     }
   }
 
   $config_file = "${config_path}/cassandra.yaml"
   $dc_rack_properties_file = "${config_path}/${snitch_properties_file}"
 
   case $::osfamily {
     'RedHat': {
       $config_file_require = Package['cassandra']
       $config_file_before  = []
       $config_path_require = Package['cassandra']
       $dc_rack_properties_file_require = Package['cassandra']
       $dc_rack_properties_file_before  = []
       $data_dir_require = Package['cassandra']
       $data_dir_before = []
 
       if $::operatingsystemmajrelease == '7' and $::cassandra::service_provider == 'init' {
         exec { "/sbin/chkconfig --add ${service_name}":
           unless  => "/sbin/chkconfig --list ${service_name}",
           require => Package['cassandra'],
           before  => Service['cassandra'],
         }
       }
     }
     'Debian': {
       $config_file_require = [ User['cassandra'], File[$config_path] ]
       $config_file_before  = Package['cassandra']
       $config_path_require = []
       $dc_rack_properties_file_require = [ User['cassandra'], File[$config_path] ]
       $dc_rack_properties_file_before  = Package['cassandra']
       $data_dir_require = File[$config_file]
       $data_dir_before = Package['cassandra']
 
       if $cassandra_9822 {
         file { '/etc/init.d/cassandra':
           source => 'puppet:///modules/cassandra/CASSANDRA-9822/cassandra',
           mode   => '0555',
           before => Package['cassandra'],
         }
       }
       # Sleep after package install and before service resource to prevent
       # possible duplicate processes arising from CASSANDRA-2356.
       exec { 'CASSANDRA-2356 sleep':
         command     => "/bin/sleep ${cassandra_2356_sleep_seconds}",
         refreshonly => true,
         user        => 'root',
         subscribe   => Package['cassandra'],
         before      => Service['cassandra'],
       }
 
       group { 'cassandra':
         ensure => present,
       }
 
       $user = 'cassandra'
 
       user { $user:
         ensure     => present,
         comment    => 'Cassandra database,,,',
         gid        => 'cassandra',
         home       => '/var/lib/cassandra',
         shell      => '/bin/false',
         managehome => true,
         require    => Group['cassandra'],
       }
       # End of CASSANDRA-2356 specific resources.
     }
     default: {
       $config_file_before  = [ Package['cassandra'] ]
       $config_file_require = []
       $config_path_require = []
       $dc_rack_properties_file_require = Package['cassandra']
       $dc_rack_properties_file_before  = []
 
       if $fail_on_non_supported_os {
         fail("OS family ${::osfamily} not supported")
       } else {
         warning("OS family ${::osfamily} not supported")
       }
     }
   }
 
   package { 'cassandra':
     ensure => $package_ensure,
     name   => $package_name,
     notify => Exec['cassandra_reload_systemctl'],
   }
 
   exec { 'cassandra_reload_systemctl':
     command     => "${systemctl} daemon-reload",
     onlyif      => "test -x ${systemctl}",
     path        => ['/usr/bin', '/bin'],
     refreshonly => true,
   }
 
   if $manage_config_file {
     file { $config_path:
       ensure  => directory,
       group   => 'cassandra',
       owner   => 'cassandra',
       mode    => '0755',
       require => $config_path_require,
     }
   }
 
   if $commitlog_directory {
     file { $commitlog_directory:
       ensure  => directory,
       owner   => 'cassandra',
       group   => 'cassandra',
       mode    => $commitlog_directory_mode,
       require => $data_dir_require,
       before  => $data_dir_before,
     }
 
     $commitlog_directory_settings = merge($settings,
       { 'commitlog_directory' => $commitlog_directory, })
   } else {
     $commitlog_directory_settings = $settings
   }
 
   if is_array($data_file_directories) {
     file { $data_file_directories:
       ensure  => directory,
       owner   => 'cassandra',
       group   => 'cassandra',
       mode    => $data_file_directories_mode,
       require => $data_dir_require,
       before  => $data_dir_before,
     }
 
     $data_file_directories_settings = merge($settings, {
       'data_file_directories' => $data_file_directories,
     })
   } else {
     $data_file_directories_settings = $settings
   }
 
   if $hints_directory {
     file { $hints_directory:
       ensure  => directory,
       owner   => 'cassandra',
       group   => 'cassandra',
       mode    => $hints_directory_mode,
       require => $data_dir_require,
       before  => $data_dir_before,
     }
 
     $hints_directory_settings = merge($settings,
       { 'hints_directory' => $hints_directory, })
   } else {
     $hints_directory_settings = $settings
   }
 
   if $saved_caches_directory {
     file { $saved_caches_directory:
       ensure  => directory,
       owner   => 'cassandra',
       group   => 'cassandra',
       mode    => $saved_caches_directory_mode,
       require => $data_dir_require,
       before  => $data_dir_before,
     }
 
     $saved_caches_directory_settings = merge($settings,
       { 'saved_caches_directory' => $saved_caches_directory, })
   } else {
     $saved_caches_directory_settings = $settings
   }
 
   $merged_settings = merge($baseline_settings, $settings,
     $commitlog_directory_settings,
     $data_file_directories_settings,
     $hints_directory_settings,
     $saved_caches_directory_settings)
 
   file { $config_file:
     ensure  => present,
     owner   => 'cassandra',
     group   => 'cassandra',
     content => template($cassandra_yaml_tmpl),
     mode    => $config_file_mode,
     require => $config_file_require,
     before  => $config_file_before,
   }
 
   file { $dc_rack_properties_file:
     ensure  => file,
     content => template($rackdc_tmpl),
     owner   => 'cassandra',
     group   => 'cassandra',
     mode    => '0644',
     require => $dc_rack_properties_file_require,
     before  => $dc_rack_properties_file_before,
   }
 
   if $package_ensure != 'absent' and $package_ensure != 'purged' {
     if $service_refresh {
       service { 'cassandra':
         ensure    => $service_ensure,
         name      => $service_name,
         enable    => $service_enable,
         subscribe => [
           File[$config_file],
           File[$dc_rack_properties_file],
           Package['cassandra'],
         ],
       }
     } else {
       service { 'cassandra':
         ensure  => $service_ensure,
         name    => $service_name,
         enable  => $service_enable,
         require => [
           File[$config_file],
           File[$dc_rack_properties_file],
           Package['cassandra'],
         ],
       }
     }
   }
 }
\ No newline at end of file diff --git a/docs/puppet_classes/cassandra_3A_3Aapache_repo.html b/docs/puppet_classes/cassandra_3A_3Aapache_repo.html index c391c89..67e7b0e 100644 --- a/docs/puppet_classes/cassandra_3A_3Aapache_repo.html +++ b/docs/puppet_classes/cassandra_3A_3Aapache_repo.html @@ -1,338 +1,338 @@ Puppet Class: cassandra::apache_repo - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Puppet Class: cassandra::apache_repo

Defined in:
manifests/apache_repo.pp

Overview

An optional class that will allow a suitable repository to be configured from which packages for Apache Cassandra can be downloaded.

Parameters:

  • descr (string) (defaults to: 'Repo for Apache Cassandra')

    On the Red Hat family, this is passed as the descr attribute to a yumrepo resource. On the Debian family, it is passed as the comment attribute to an apt::source resource.

  • key_id (string) (defaults to: 'A26E528B271F19B9E5D8E19EA278B781FE4B2BDA')

    On the Debian family, this is passed as the id attribute to an apt::key resource. On the Red Hat family, it is ignored.

  • key_url (string) (defaults to: 'https://www.apache.org/dist/cassandra/KEYS')

    On the Debian family, this is passed as the source attribute to an apt::key resource. On the Red Hat family, it is set to the gpgkey attribute on the yumrepo resource.

  • pkg_url (string) (defaults to: undef)

    On the Red Hat family, leaving this as default will set the baseurl on the yumrepo resource to 'http://www.apache.org/dist/cassandra/redhat' with whatever is set in the 'release' attribute appended. On the Debian family, leaving this as the default will set the location attribute on an apt::source to 'http://www.apache.org/dist/cassandra/debian'.

  • release (string) (defaults to: 'main')

    On the Debian family, this is passed as the release attribute to an apt::source resource. On the Red Hat family, it is the major version number of Cassandra, without dot, and with an appended 'x' (e.g. '311x')

 
 
 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
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
# File 'manifests/apache_repo.pp', line 23
 
 class cassandra::apache_repo (
   $descr   = 'Repo for Apache Cassandra',
   $key_id  = 'A26E528B271F19B9E5D8E19EA278B781FE4B2BDA',
   $key_url = 'https://www.apache.org/dist/cassandra/KEYS',
   $pkg_url = undef,
   $release = 'main',
   ) {
   case $::osfamily {
     'RedHat': {
       if $pkg_url != undef {
         $baseurl = $pkg_url
       } else {
         $url = 'http://www.apache.org/dist/cassandra/redhat'
         $baseurl = "${url}/${release}"
       }
 
       yumrepo { 'cassandra_apache':
         ensure   => present,
         descr    => $descr,
         baseurl  => $baseurl,
         enabled  => 1,
         gpgcheck => 1,
         gpgkey   => $key_url,
       }
     }
     'Debian': {
       include apt
       include apt::update
 
       apt::key {'apache.cassandra':
         id     => $key_id,
         source => $key_url,
         before => Apt::Source['cassandra.sources'],
       }
 
       if $pkg_url != undef {
         $location = $pkg_url
       } else {
         $location = 'http://www.apache.org/dist/cassandra/debian'
       }
 
       apt::source {'cassandra.sources':
         location => $location,
         comment  => $descr,
         release  => $release,
         include  => {
           'src' => false,
         },
         notify   => Exec['update-apache-cassandra-repo'],
       }
 
       # Required to wrap apt_update
       exec {'update-apache-cassandra-repo':
         refreshonly => true,
         command     => '/bin/true',
         require     => Exec['apt_update'],
       }
     }
     default: {
       warning("OS family ${::osfamily} not supported")
     }
   }
 }
\ No newline at end of file diff --git a/docs/puppet_classes/cassandra_3A_3Adatastax_agent.html b/docs/puppet_classes/cassandra_3A_3Adatastax_agent.html index d6cd47e..005cc90 100644 --- a/docs/puppet_classes/cassandra_3A_3Adatastax_agent.html +++ b/docs/puppet_classes/cassandra_3A_3Adatastax_agent.html @@ -1,477 +1,473 @@ Puppet Class: cassandra::datastax_agent - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Puppet Class: cassandra::datastax_agent

Inherits:
cassandra::params
Defined in:
manifests/datastax_agent.pp

Overview

A class for installing the DataStax Agent and to point it at an OpsCenter instance.

Examples:

Set agent_alias to foobar, stomp_interface to localhost and ensure that async_pool_size is absent from the file.

class { 'cassandra::datastax_agent':
   settings => {
     'agent_alias'     => {
       'setting' => 'agent_alias',
       'value'   => 'foobar',
     },
     'stomp_interface' => {
       'setting' => 'stomp_interface',
       'value'   => 'localhost',
     },
     'async_pool_size' => {
       'ensure' => absent,
     },
   },
 }

Parameters:

  • address_config_file (Any) (defaults to: '/var/lib/datastax-agent/conf/address.yaml')

    The full path to the address config file.

  • defaults_file (Any) (defaults to: '/etc/default/datastax-agent')

    The full path name to the file where java_home is set.

  • java_home (Any) (defaults to: undef)

    If the value of this variable is left as undef, no action is taken. Otherwise the value is set as JAVA_HOME in defaults_file.

  • package_ensure (Any) (defaults to: 'present')

    Is passed to the package reference. Valid values are present or a version number.

  • package_name (Any) (defaults to: 'datastax-agent')

    Is passed to the package reference.

  • service_ensure (Any) (defaults to: 'running')

    Is passed to the service reference.

  • service_enable (Any) (defaults to: true)

    Is passed to the service reference.

  • service_name (Any) (defaults to: 'datastax-agent')

    Is passed to the service reference.

  • service_provider (Any) (defaults to: undef)

    The name of the provider that runs the service. If left as undef then the OS family specific default will be used, otherwise the specified value will be used instead.

  • settings (Any) (defaults to: {})

    A hash that is passed to create_ini_settings with the following additional defaults:

    {
       path              => $address_config_file,
       key_val_separator => ': ',
       require           => Package[$package_name],
       notify            => Service['datastax-agent'],
     }
     
 
 
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
-120
-121
-122
+120
# File 'manifests/datastax_agent.pp', line 48
 
 class cassandra::datastax_agent (
   $address_config_file  = '/var/lib/datastax-agent/conf/address.yaml',
   $defaults_file        = '/etc/default/datastax-agent',
   $java_home            = undef,
   $package_ensure       = 'present',
   $package_name         = 'datastax-agent',
   $service_ensure       = 'running',
   $service_enable       = true,
   $service_name         = 'datastax-agent',
   $service_provider     = undef,
   $settings             = {},
   ) inherits cassandra::params {
   require '::cassandra'
 
   if $service_provider != undef {
     System {
       provider => $service_provider,
     }
   }
 
   package { $package_name:
     ensure  => $package_ensure,
     require => Class['cassandra'],
     notify  => Exec['datastax_agent_reload_systemctl'],
   }
 
   exec { 'datastax_agent_reload_systemctl':
     command     => "${::cassandra::params::systemctl} daemon-reload",
     onlyif      => "test -x ${::cassandra::params::systemctl}",
     path        => ['/usr/bin', '/bin'],
     refreshonly => true,
     notify      => Service['datastax-agent'],
   }
 
   file { $address_config_file:
     owner   => 'cassandra',
     group   => 'cassandra',
     mode    => '0644',
     require => Package[$package_name],
   }
 
   if $java_home != undef {
     ini_setting { 'java_home':
       ensure            => present,
       path              => $defaults_file,
       section           => '',
       key_val_separator => '=',
       setting           => 'JAVA_HOME',
       value             => $java_home,
       notify            => Service['datastax-agent'],
     }
   }
 
   service { 'datastax-agent':
     ensure => $service_ensure,
     enable => $service_enable,
     name   => $service_name,
   }
 
   if $settings {
     $defaults = {
       path              => $address_config_file,
       key_val_separator => ': ',
       require           => Package[$package_name],
       notify            => Service['datastax-agent'],
     }
 
     $full_settings = {
       '' => $settings,
     }
-
-    validate_hash($full_settings)
     create_ini_settings($full_settings, $defaults)
   }
 }
\ No newline at end of file diff --git a/docs/puppet_classes/cassandra_3A_3Adatastax_repo.html b/docs/puppet_classes/cassandra_3A_3Adatastax_repo.html index f607d8b..5c557e2 100644 --- a/docs/puppet_classes/cassandra_3A_3Adatastax_repo.html +++ b/docs/puppet_classes/cassandra_3A_3Adatastax_repo.html @@ -1,333 +1,333 @@ Puppet Class: cassandra::datastax_repo - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Puppet Class: cassandra::datastax_repo

Defined in:
manifests/datastax_repo.pp

Overview

An optional class that will allow a suitable repository to be configured from which packages for DataStax Community can be downloaded. Changing the defaults will allow any Debian Apt or Red Hat Yum repository to be configured.

Parameters:

  • descr (string) (defaults to: 'DataStax Repo for Apache Cassandra')

    On the Red Hat family, this is passed as the descr attribute to a yumrepo resource. On the Debian family, it is passed as the comment attribute to an apt::source resource.

  • key_id (string) (defaults to: '7E41C00F85BFC1706C4FFFB3350200F2B999A372')

    On the Debian family, this is passed as the id attribute to an apt::key resource. On the Red Hat family, it is ignored.

  • key_url (string) (defaults to: 'http://debian.datastax.com/debian/repo_key')

    On the Debian family, this is passed as the source attribute to an apt::key resource. On the Red Hat family, it is ignored.

  • pkg_url (string) (defaults to: undef)

    If left as the default, this will set the baseurl to 'http://rpm.datastax.com/community' on a yumrepo resource on the Red Hat family. On the Debian family, leaving this as the default will set the location attribute on an apt::source to 'http://debian.datastax.com/community'.

  • release (string) (defaults to: 'stable')

    On the Debian family, this is passed as the release attribute to an apt::source resource. On the Red Hat family, it is ignored.

 
 
 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
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
# File 'manifests/datastax_repo.pp', line 22
 
 class cassandra::datastax_repo (
   $descr   = 'DataStax Repo for Apache Cassandra',
   $key_id  = '7E41C00F85BFC1706C4FFFB3350200F2B999A372',
   $key_url = 'http://debian.datastax.com/debian/repo_key',
   $pkg_url = undef,
   $release = 'stable',
   ) {
   case $::osfamily {
     'RedHat': {
       if $pkg_url != undef {
         $baseurl = $pkg_url
       } else {
         $baseurl = 'http://rpm.datastax.com/community'
       }
 
       yumrepo { 'datastax':
         ensure   => present,
         descr    => $descr,
         baseurl  => $baseurl,
         enabled  => 1,
         gpgcheck => 0,
       }
     }
     'Debian': {
       include apt
       include apt::update
 
       apt::key {'datastaxkey':
         id     => $key_id,
         source => $key_url,
         before => Apt::Source['datastax'],
       }
 
       if $pkg_url != undef {
         $location = $pkg_url
       } else {
         $location = 'http://debian.datastax.com/community'
       }
 
       apt::source {'datastax':
         location => $location,
         comment  => $descr,
         release  => $release,
         include  => {
           'src' => false,
         },
         notify   => Exec['update-cassandra-repos'],
       }
 
       # Required to wrap apt_update
       exec {'update-cassandra-repos':
         refreshonly => true,
         command     => '/bin/true',
         require     => Exec['apt_update'],
       }
     }
     default: {
       warning("OS family ${::osfamily} not supported")
     }
   }
 }
\ No newline at end of file diff --git a/docs/puppet_classes/cassandra_3A_3Adse.html b/docs/puppet_classes/cassandra_3A_3Adse.html index ed509b9..b28a879 100644 --- a/docs/puppet_classes/cassandra_3A_3Adse.html +++ b/docs/puppet_classes/cassandra_3A_3Adse.html @@ -1,337 +1,337 @@ Puppet Class: cassandra::dse - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Puppet Class: cassandra::dse

Defined in:
manifests/dse.pp

Overview

A class for configuring DataStax Enterprise (DSE) specific settings.

Examples:

Configure a cluster with LDAP authentication

class { 'cassandra::dse':
   file_lines => {
     'Set HADOOP_LOG_DIR directory' => {
       ensure => present,
       path   => '/etc/dse/dse-env.sh',
       line   => 'export HADOOP_LOG_DIR=/var/log/hadoop',
       match  => '^# export HADOOP_LOG_DIR=<log_dir>',
     },
     'Set DSE_HOME'                 => {
       ensure => present,
       path   => '/etc/dse/dse-env.sh',
       line   => 'export DSE_HOME=/usr/share/dse',
       match  => '^#export DSE_HOME',
     },
   },
   settings   => {
     ldap_options => {
       server_host                => localhost,
       server_port                => 389,
       search_dn                  => 'cn=Admin',
       search_password            => secret,
       use_ssl                    => false,
       use_tls                    => false,
       truststore_type            => jks,
       user_search_base           => 'ou=users,dc=example,dc=com',
       user_search_filter         => '(uid={0})',
       credentials_validity_in_ms => 0,
       connection_pool            => {
         max_active => 8,
         max_idle   => 8,
       }
     }
   }
 }

Parameters:

  • config_file (string) (defaults to: '/etc/dse/dse.yaml')

    The full path to the DSE configuration file.

  • config_file_mode (string) (defaults to: '0644')

    The mode for the DSE configuration file.

  • dse_yaml_tmpl (string) (defaults to: 'cassandra/dse.yaml.erb')

    A path to a template for the dse.yaml file.

  • file_lines (hash) (defaults to: undef)

    A hash of values that are passed to create_resources as a file_line resource.

  • service_refresh (boolean) (defaults to: true)

    Whether or not the Cassandra service should be refreshed if the DSE configuration files are changed.

  • settings (hash) (defaults to: undef)

    Unless this attribute is set to a hash (which is then placed as YAML inside dse.yaml) then the dse.yaml is left unchanged.

 
 
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
# File 'manifests/dse.pp', line 48
 
 class cassandra::dse (
   $config_file      = '/etc/dse/dse.yaml',
   $config_file_mode = '0644',
   $dse_yaml_tmpl    = 'cassandra/dse.yaml.erb',
   $file_lines       = undef,
   $service_refresh  = true,
   $settings         = undef,
   ) {
   include cassandra
   include stdlib
 
   if $service_refresh {
     $notifications = Service['cassandra']
   } else {
     $notifications = []
   }
 
   if is_hash($file_lines) {
     $default_file_line = {
       require => Package['cassandra'],
       notify  => $notifications,
     }
 
     create_resources(file_line, $file_lines, $default_file_line)
   }
 
   if is_hash($settings) {
     file { $config_file:
       ensure  => present,
       owner   => 'cassandra',
       group   => 'cassandra',
       content => template($dse_yaml_tmpl),
       mode    => $config_file_mode,
       require => Package['cassandra'],
       notify  => $notifications,
     }
   }
 }
\ No newline at end of file diff --git a/docs/puppet_classes/cassandra_3A_3Afirewall_ports.html b/docs/puppet_classes/cassandra_3A_3Afirewall_ports.html index b6f6a4e..aec4a9b 100644 --- a/docs/puppet_classes/cassandra_3A_3Afirewall_ports.html +++ b/docs/puppet_classes/cassandra_3A_3Afirewall_ports.html @@ -1,376 +1,376 @@ Puppet Class: cassandra::firewall_ports - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Puppet Class: cassandra::firewall_ports

Defined in:
manifests/firewall_ports.pp

Overview

An optional class to configure incoming network ports on the host that are relevant to the Cassandra installation. If firewalls are being managed already, simply do not include this module in your manifest.

IMPORTANT: The full list of which ports should be configured is assessed at evaluation time of the configuration. Therefore if one is to use this class, it must be the final cassandra class included in the manifest.

Parameters:

  • client_ports (array) (defaults to: [9042, 9160])

    Only has any effect if the cassandra class is defined on the node. Allow these TCP ports to be opened for traffic coming from the client subnets.

  • client_subnets (array) (defaults to: ['0.0.0.0/0'])

    Only has any effect if the cassandra class is defined on the node. An array of the list of subnets that are to allowed connection to cassandra::native_transport_port and cassandra::rpc_port.

  • inter_node_ports (array) (defaults to: [7000, 7001, 7199])

    Only has any effect if the cassandra class is defined on the node. Allow these TCP ports to be opened for traffic between the Cassandra nodes.

  • inter_node_subnets (array) (defaults to: ['0.0.0.0/0'])

    Only has any effect if the cassandra class is defined on the node. An array of the list of subnets that are to allowed connection to cassandra::storage_port, cassandra::ssl_storage_port and port 7199 for cassandra JMX monitoring.

  • public_ports (array) (defaults to: [8888])

    Allow these TCP ports to be opened for traffic coming from public subnets the port specified in $ssh_port will be appended to this list.

  • public_subnets (array) (defaults to: ['0.0.0.0/0'])

    An array of the list of subnets that are to allowed connection to cassandra::firewall_ports::ssh_port.

  • ssh_port (integer) (defaults to: 22)

    Which port does SSH operate on.

  • opscenter_ports (array) (defaults to: [9042, 9160, 61620, 61621])

    Only has any effect if the cassandra::datastax_agent is defined. Allow these TCP ports to be opened for traffic coming to or from OpsCenter appended to this list.

  • opscenter_subnets (array) (defaults to: ['0.0.0.0/0'])

    A list of subnets that are to be allowed connection to port 61621 for nodes built with cassandra::datastax_agent.

 
 
 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
 69
 70
 71
 72
 73
 74
 75
 76
# File 'manifests/firewall_ports.pp', line 31
 
 class cassandra::firewall_ports (
   $client_ports                = [9042, 9160],
   $client_subnets              = ['0.0.0.0/0'],
   $inter_node_ports            = [7000, 7001, 7199],
   $inter_node_subnets          = ['0.0.0.0/0'],
   $public_ports                = [8888],
   $public_subnets              = ['0.0.0.0/0'],
   $ssh_port                    = 22,
   $opscenter_ports             = [9042, 9160, 61620, 61621],
   $opscenter_subnets           = ['0.0.0.0/0'],
   ) {
   # Public connections on any node.
   $public_subnets_array = prefix($public_subnets, '200_Public_')
 
   cassandra::private::firewall_ports::rule { $public_subnets_array:
     ports => concat($public_ports, [$ssh_port]),
   }
 
   # If this is a Cassandra node.
   if defined ( Class['::cassandra'] ) {
     # Inter-node connections for Cassandra
     $inter_node_subnets_array = prefix($inter_node_subnets,
       '210_InterNode_')
 
     cassandra::private::firewall_ports::rule { $inter_node_subnets_array:
       ports => $inter_node_ports,
     }
 
     # Client connections for Cassandra
     $client_subnets_array = prefix($client_subnets, '220_Client_')
 
     cassandra::private::firewall_ports::rule {$client_subnets_array:
       ports => $client_ports,
     }
   }
 
   # Connections for DataStax Agent
   if defined ( Class['::cassandra::datastax_agent'] ) or defined ( Class['::cassandra::opscenter'] ) {
     $opscenter_subnets_opc_agent = prefix($opscenter_subnets,
       '230_OpsCenter_')
 
     cassandra::private::firewall_ports::rule { $opscenter_subnets_opc_agent:
       ports => $opscenter_ports,
     }
   }
 }
\ No newline at end of file diff --git a/docs/puppet_classes/cassandra_3A_3Ajava.html b/docs/puppet_classes/cassandra_3A_3Ajava.html index e62e32d..cb6abd9 100644 --- a/docs/puppet_classes/cassandra_3A_3Ajava.html +++ b/docs/puppet_classes/cassandra_3A_3Ajava.html @@ -1,343 +1,343 @@ Puppet Class: cassandra::java - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Puppet Class: cassandra::java

Inherits:
cassandra::params
Defined in:
manifests/java.pp

Overview

A class to install Java and JNA packages.

Parameters:

  • aptkey (hash) (defaults to: undef)

    If supplied, this should be a hash of apt::key resources that will be passed to the create_resources function. This is ignored on non-Debian systems.

  • aptsource (hash) (defaults to: undef)

    If supplied, this should be a hash of apt::source resources that will be passed to the create_resources function. This is ignored on non-Red Hat`

  • jna_ensure (string) (defaults to: present)

    Is passed to the package reference for the JNA package. Valid values are present or a version number.

  • jna_package_name (string) (defaults to: $::cassandra::params::jna_package_name)

    The name of the JNA package.

  • package_ensure (string) (defaults to: present)

    Is passed to the package reference for the JRE/JDK package. Valid values are present or a version number.

  • package_name (string) (defaults to: $::cassandra::params::java_package)

    The name of the Java package to be installed.

  • yumrepo (hash) (defaults to: undef)

    If supplied, this should be a hash of yumrepo resources that will be passed to the create_resources function. This is ignored on non-Red Hat systems.

 
 
 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
# File 'manifests/java.pp', line 17
 
 class cassandra::java (
   $aptkey           = undef,
   $aptsource        = undef,
   $jna_ensure       = present,
   $jna_package_name = $::cassandra::params::jna_package_name,
   $package_ensure   = present,
   $package_name     = $::cassandra::params::java_package,
   $yumrepo          = undef,
   ) inherits cassandra::params {
   if $::osfamily == 'RedHat' and $yumrepo != undef {
     $yumrepo_defaults = {
       'before' => Package[$package_name],
     }
 
     create_resources(yumrepo, $yumrepo, $yumrepo_defaults)
   }
 
   if $::osfamily == 'Debian' {
     if $aptkey != undef {
       $aptkey_defaults = {
         'before' => Package[$package_name],
       }
 
       create_resources(apt::key, $aptkey, $aptkey_defaults)
     }
 
     if $aptsource != undef {
       exec { 'cassandra::java::apt_update':
         refreshonly => true,
         command     => '/bin/true',
         require     => Exec['apt_update'],
         before      => Package[$package_name],
       }
 
       $aptsource_defaults = {
         'notify' => Exec['cassandra::java::apt_update'],
       }
 
       create_resources(apt::source, $aptsource, $aptsource_defaults)
     }
   }
 
   package { $package_name:
     ensure => $package_ensure,
   }
 
   package { $jna_package_name:
     ensure => $jna_ensure,
   }
 }
\ No newline at end of file diff --git a/docs/puppet_classes/cassandra_3A_3Aoptutils.html b/docs/puppet_classes/cassandra_3A_3Aoptutils.html index 94bd0bc..d02a81c 100644 --- a/docs/puppet_classes/cassandra_3A_3Aoptutils.html +++ b/docs/puppet_classes/cassandra_3A_3Aoptutils.html @@ -1,174 +1,174 @@ Puppet Class: cassandra::optutils - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Puppet Class: cassandra::optutils

Inherits:
cassandra::params
Defined in:
manifests/optutils.pp

Overview

A class to install the optional Cassandra tools package.

Parameters:

  • package_ensure (string) (defaults to: 'present')

    Can be present, latest or a specific version number.

  • package_name (string) (defaults to: $::cassandra::params::optutils_package_name)

    The name of the optional utilities package to be installed.

 
 
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
# File 'manifests/optutils.pp', line 6
 
 class cassandra::optutils (
   $package_ensure = 'present',
   $package_name   = $::cassandra::params::optutils_package_name,
   ) inherits cassandra::params {
   include '::cassandra'
 
   package { $package_name:
     ensure  => $package_ensure,
     require => Class['cassandra'],
   }
 }
\ No newline at end of file diff --git a/docs/puppet_classes/cassandra_3A_3Aparams.html b/docs/puppet_classes/cassandra_3A_3Aparams.html index 87f6a1c..42b237c 100644 --- a/docs/puppet_classes/cassandra_3A_3Aparams.html +++ b/docs/puppet_classes/cassandra_3A_3Aparams.html @@ -1,227 +1,227 @@ Puppet Class: cassandra::params - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Puppet Class: cassandra::params

Overview

This class is meant to be called from the locp-cassandra module. It sets variables according to platform.

 
 
 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
# File 'manifests/params.pp', line 3
 
 class cassandra::params {
   case $::osfamily {
     'Debian': {
       case $::operatingsystemmajrelease {
         12.04: {
           $net_ipv4_tcp_rmem = '4096 87380 16777216'
           $net_ipv4_tcp_wmem = '4096 65536 16777216'
         }
         default: {
           $net_ipv4_tcp_rmem = '4096, 87380, 16777216'
           $net_ipv4_tcp_wmem = '4096, 65536, 16777216'
         }
       }
 
       $cassandra_pkg = 'cassandra'
       $config_path = '/etc/cassandra'
       $java_package = 'openjdk-7-jre-headless'
       $jna_package_name = 'libjna-java'
       $optutils_package_name = 'cassandra-tools'
       $sysctl_file = '/etc/sysctl.d/10-cassandra.conf'
       $systemctl = '/bin/systemctl'
     }
     'RedHat': {
       case $::operatingsystemmajrelease {
         6: {
           $net_ipv4_tcp_rmem = '4096 87380 16777216'
           $net_ipv4_tcp_wmem = '4096 65536 16777216'
           $sysctl_file = '/etc/sysctl.conf'
         }
         7: {
           $net_ipv4_tcp_rmem = '4096, 87380, 16777216'
           $net_ipv4_tcp_wmem = '4096, 65536, 16777216'
           $sysctl_file = '/etc/sysctl.d/10-cassandra.conf'
         }
         default: {}
       }
 
       $cassandra_pkg = 'cassandra22'
       $config_path = '/etc/cassandra/default.conf'
       $java_package = 'java-1.8.0-openjdk-headless'
       $jna_package_name = 'jna'
       $optutils_package_name = 'cassandra22-tools'
       $systemctl = '/usr/bin/systemctl'
     }
     default: {
       $config_path_parents = []
     }
   }
 }
\ No newline at end of file diff --git a/docs/puppet_classes/cassandra_3A_3Aschema.html b/docs/puppet_classes/cassandra_3A_3Aschema.html index 999b157..ac71216 100644 --- a/docs/puppet_classes/cassandra_3A_3Aschema.html +++ b/docs/puppet_classes/cassandra_3A_3Aschema.html @@ -1,593 +1,593 @@ Puppet Class: cassandra::schema - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Puppet Class: cassandra::schema

Inherits:
cassandra::params
Defined in:
manifests/schema.pp

Overview

A class to maintain the database schema. Please note that cqlsh expects Python 2.7 to be installed. This may be a problem of older distributions (CentOS 6 for example).

Parameters:

  • connection_tries (integer) (defaults to: 6)

    How many times do try to connect to Cassandra. See also connection_try_sleep.

  • connection_try_sleep (integer) (defaults to: 30)

    How much time to allow between the number of tries specified in connection_tries.

  • cql_types (hash) (defaults to: {})

    Creates new cassandra::schema::cql_type resources.

  • cqlsh_additional_options (string) (defaults to: '')

    Any additional options to be passed to the cqlsh command.

  • cqlsh_client_config (string) (defaults to: undef)

    Set this to a file name (e.g. '/root/.puppetcqlshrc') that will then be used to contain the the credentials for connecting to Cassandra. This is a more secure option than having the credentials appearing on the command line. This option is only available in Cassandra >= 2.1.

  • cqlsh_client_tmpl (string) (defaults to: 'cassandra/cqlshrc.erb')

    The location of the template for configuring the credentials for the cqlsh client. This is ignored unless cqlsh_client_config is set.

  • cqlsh_command (string) (defaults to: '/usr/bin/cqlsh')

    The full path to the cqlsh command.

  • cqlsh_host (string) (defaults to: 'localhost')

    The host for the cqlsh command to connect to. See also cqlsh_port.

  • cqlsh_password (string) (defaults to: undef)

    If credentials are require for connecting, specify the password here. See also cqlsh_user, cqlsh_client_config.

  • cqlsh_port (integer) (defaults to: 9042)

    The host for the cqlsh command to connect to. See also cqlsh_host.

  • cqlsh_user (string) (defaults to: 'cassandra')

    If credentials are required for connecting, specify the password here. See also cqlsh_password, cqlsh_client_config

  • indexes (hash) (defaults to: {})

    Creates new cassandra::schema::index resources.

  • keyspaces (hash) (defaults to: {})

    Creates new cassandra::schema::keyspace resources.

  • permissions (hash) (defaults to: {})

    Creates new cassandra::schema::permission resources.

  • tables (hash) (defaults to: {})

    Creates new cassandra::schema::table resources.

  • users (hash) (defaults to: {})

    Creates new cassandra::schema::user resources.

 
 
 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
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
# File 'manifests/schema.pp', line 35
 
 class cassandra::schema (
   $connection_tries         = 6,
   $connection_try_sleep     = 30,
   $cql_types                = {},
   $cqlsh_additional_options = '',
   $cqlsh_client_config      = undef,
   $cqlsh_client_tmpl        = 'cassandra/cqlshrc.erb',
   $cqlsh_command            = '/usr/bin/cqlsh',
   $cqlsh_host               = 'localhost',
   $cqlsh_password           = undef,
   $cqlsh_port               = 9042,
   $cqlsh_user               = 'cassandra',
   $indexes                  = {},
   $keyspaces                = {},
   $permissions              = {},
   $tables                   = {},
   $users                    = {},
   ) inherits cassandra::params {
   require '::cassandra'
 
   if $cqlsh_client_config != undef {
     file { $cqlsh_client_config :
       ensure  => file,
       group   => $::gid,
       mode    => '0600',
       owner   => $::id,
       content => template( $cqlsh_client_tmpl ),
       before  => Exec['::cassandra::schema connection test'],
     }
 
     $cmdline_login = "--cqlshrc=${cqlsh_client_config}"
   } else {
     if $cqlsh_password != undef {
       warning('You may want to consider using the cqlsh_client_config attribute')
       $cmdline_login = "-u ${cqlsh_user} -p ${cqlsh_password}"
     } else {
       $cmdline_login = ''
     }
   }
 
   $cqlsh_opts = "${cqlsh_command} ${cmdline_login} ${cqlsh_additional_options}"
   $cqlsh_conn = "${cqlsh_host} ${cqlsh_port}"
 
   # See if we can make a connection to Cassandra.  Try $connection_tries
   # number of times with $connection_try_sleep in seconds between each try.
   $connection_test = "${cqlsh_opts} -e 'DESC KEYSPACES' ${cqlsh_conn}"
   exec { '::cassandra::schema connection test':
     command   => $connection_test,
     returns   => 0,
     tries     => $connection_tries,
     try_sleep => $connection_try_sleep,
     unless    => $connection_test,
   }
 
   # manage keyspaces if present
   if $keyspaces {
     create_resources('cassandra::schema::keyspace', $keyspaces)
   }
 
   # manage cql_types if present
   if $cql_types {
     create_resources('cassandra::schema::cql_type', $cql_types)
   }
 
   # manage tables if present
   if $tables {
     create_resources('cassandra::schema::table', $tables)
   }
 
   # manage indexes if present
   if $indexes {
     create_resources('cassandra::schema::index', $indexes)
   }
 
   # manage users if present
   if $users {
     create_resources('cassandra::schema::user', $users)
   }
 
   # manage permissions if present
   if $permissions {
     create_resources('cassandra::schema::permission', $permissions)
   }
 
   # Resource Ordering
   Cassandra::Schema::Keyspace <| |> -> Cassandra::Schema::Cql_type <| |>
   Cassandra::Schema::Keyspace <| |> -> Cassandra::Schema::Table <| |>
   Cassandra::Schema::Keyspace <| |> -> Cassandra::Schema::Permission <| |>
   Cassandra::Schema::Cql_type <| |> -> Cassandra::Schema::Table <| |>
   Cassandra::Schema::Table <| |> -> Cassandra::Schema::Index <| |>
   Cassandra::Schema::Table <| |> -> Cassandra::Schema::Permission <| |>
   Cassandra::Schema::Index <| |> -> Cassandra::Schema::User <| |>
   Cassandra::Schema::User <| |> -> Cassandra::Schema::Permission <| |>
 }
\ No newline at end of file diff --git a/docs/puppet_classes/cassandra_3A_3Asystem_3A_3Aswapoff.html b/docs/puppet_classes/cassandra_3A_3Asystem_3A_3Aswapoff.html index 3a434e2..91df2de 100644 --- a/docs/puppet_classes/cassandra_3A_3Asystem_3A_3Aswapoff.html +++ b/docs/puppet_classes/cassandra_3A_3Asystem_3A_3Aswapoff.html @@ -1,210 +1,210 @@ Puppet Class: cassandra::system::swapoff - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Puppet Class: cassandra::system::swapoff

Defined in:
manifests/system/swapoff.pp

Overview

Parameters:

  • device (string) (defaults to: undef)

    If provided a mount resource will be created to ensure that the device is absent from /etc/fstab to permanently disable swap.

  • mount (string) (defaults to: 'swap')

    The name of the swap mount point. Ignored unless device has been set.

  • path (string) (defaults to: '/proc/swaps')

    The full path to the file to check if swap is enabled.

See Also:

 
 
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
# File 'manifests/system/swapoff.pp', line 9
 
 class cassandra::system::swapoff(
   $device  = undef,
   $mount   = 'swap',
   $path    = '/proc/swaps',
   ) {
   exec { 'Disable Swap':
     command => 'swapoff --all',
     onlyif  => "grep -q '^/' ${path}",
     path    => [ '/bin', '/sbin', '/usr/bin', '/usr/sbin' ],
   }
 
   if $device {
     mount { $mount:
       ensure => absent,
       device => $device,
       fstype => 'swap',
     }
   }
 }
\ No newline at end of file diff --git a/docs/puppet_classes/cassandra_3A_3Asystem_3A_3Asysctl.html b/docs/puppet_classes/cassandra_3A_3Asystem_3A_3Asysctl.html index 4fef48d..0d36765 100644 --- a/docs/puppet_classes/cassandra_3A_3Asystem_3A_3Asysctl.html +++ b/docs/puppet_classes/cassandra_3A_3Asystem_3A_3Asysctl.html @@ -1,491 +1,491 @@ Puppet Class: cassandra::system::sysctl - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Puppet Class: cassandra::system::sysctl

Inherits:
cassandra::params
Defined in:
manifests/system/sysctl.pp

Overview

Set Sysctl (kernel runtime parameters) as suggested in http://docs.datastax.com/en/landing_page/doc/landing_page/recommendedSettingsLinux.html

If any of the values is set into the target file, the sysctl command will be called with the provided file name as an argument.

Examples:

Basic requirement

require cassandra::system::sysctl

Parameters:

  • sysctl_args (string) (defaults to: '-p')

    Passed to the sysctl command

  • sysctl_file (string) (defaults to: $cassandra::params::sysctl_file)

    Path to the file to insert the settings into.

  • net_core_optmem_max (integer) (defaults to: 40960)

    The value to set for net.core.optmem_max

  • net_core_rmem_default (integer) (defaults to: 16777216)

    The value to set for net.core.rmem_default.

  • net_core_rmem_max (integer) (defaults to: 16777216)

    The value to set for net_core_rmem_max.

  • net_core_wmem_default (integer) (defaults to: 16777216)

    The value to set for net.core.wmem_default.

  • net_core_wmem_max (integer) (defaults to: 16777216)

    The value to set for net.core.wmem_max.

  • net_ipv4_tcp_rmem (string) (defaults to: $::cassandra::params::net_ipv4_tcp_rmem)

    The value to set for net.ipv4.tcp_rmem.

  • net_ipv4_tcp_wmem (string) (defaults to: $::cassandra::params::net_ipv4_tcp_wmem)

    The value to set for net.ipv4.tcp_wmem.

  • vm_max_map_count (integer) (defaults to: 1048575)

    The value to set for vm.max_map_count.

See Also:

 
 
 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
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
# File 'manifests/system/sysctl.pp', line 24
 
 class cassandra::system::sysctl(
   $sysctl_args           = '-p',
   $sysctl_file           = $cassandra::params::sysctl_file,
   $net_core_optmem_max   = 40960,
   $net_core_rmem_default = 16777216,
   $net_core_rmem_max     = 16777216,
   $net_core_wmem_default = 16777216,
   $net_core_wmem_max     = 16777216,
   $net_ipv4_tcp_rmem     = $::cassandra::params::net_ipv4_tcp_rmem,
   $net_ipv4_tcp_wmem     = $::cassandra::params::net_ipv4_tcp_wmem,
   $vm_max_map_count      = 1048575,
   ) inherits cassandra::params {
 
   ini_setting { "net.core.rmem_max = ${net_core_rmem_max}":
     ensure  => present,
     path    => $sysctl_file,
     section => '',
     setting => 'net.core.rmem_max',
     value   => $net_core_rmem_max,
     notify  => Exec['Apply sysctl changes'],
   }
 
   ini_setting { "net.core.wmem_max = ${net_core_wmem_max}":
     ensure  => present,
     path    => $sysctl_file,
     section => '',
     setting => 'net.core.wmem_max',
     value   => $net_core_wmem_max,
     notify  => Exec['Apply sysctl changes'],
   }
 
   ini_setting { "net.core.rmem_default = ${net_core_rmem_default}":
     ensure  => present,
     path    => $sysctl_file,
     section => '',
     setting => 'net.core.rmem_default',
     value   => $net_core_rmem_default,
     notify  => Exec['Apply sysctl changes'],
   }
 
   ini_setting { "net.core.wmem_default = ${net_core_wmem_default}":
     ensure  => present,
     path    => $sysctl_file,
     section => '',
     setting => 'net.core.wmem_default',
     value   => $net_core_wmem_default,
     notify  => Exec['Apply sysctl changes'],
   }
 
   ini_setting { "net.core.optmem_max = ${net_core_optmem_max}":
     ensure  => present,
     path    => $sysctl_file,
     section => '',
     setting => 'net.core.optmem_max',
     value   => $net_core_optmem_max,
     notify  => Exec['Apply sysctl changes'],
   }
 
   ini_setting { "net.ipv4.tcp_rmem = ${net_ipv4_tcp_rmem}":
     ensure  => present,
     path    => $sysctl_file,
     section => '',
     setting => 'net.ipv4.tcp_rmem',
     value   => $net_ipv4_tcp_rmem,
     notify  => Exec['Apply sysctl changes'],
   }
 
   ini_setting { "net.ipv4.tcp_wmem = ${net_ipv4_tcp_wmem}":
     ensure  => present,
     path    => $sysctl_file,
     section => '',
     setting => 'net.ipv4.tcp_wmem',
     value   => $net_ipv4_tcp_wmem,
     notify  => Exec['Apply sysctl changes'],
   }
 
   ini_setting { "vm.max_map_count = ${vm_max_map_count}":
     ensure  => present,
     path    => $sysctl_file,
     section => '',
     setting => 'vm.max_map_count',
     value   => $vm_max_map_count,
     notify  => Exec['Apply sysctl changes'],
   }
 
   exec { 'Apply sysctl changes':
     command     => "/sbin/sysctl ${sysctl_args} ${sysctl_file}",
     refreshonly => true,
   }
 }
\ No newline at end of file diff --git a/docs/puppet_classes/cassandra_3A_3Asystem_3A_3Atransparent_hugepage.html b/docs/puppet_classes/cassandra_3A_3Asystem_3A_3Atransparent_hugepage.html index e6acad4..4e01e7d 100644 --- a/docs/puppet_classes/cassandra_3A_3Asystem_3A_3Atransparent_hugepage.html +++ b/docs/puppet_classes/cassandra_3A_3Asystem_3A_3Atransparent_hugepage.html @@ -1,160 +1,160 @@ Puppet Class: cassandra::system::transparent_hugepage - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Puppet Class: cassandra::system::transparent_hugepage

Inherits:
cassandra::params
Defined in:
manifests/system/transparent_hugepage.pp

Overview

Parameters:

  • path (string) (defaults to: '/sys/kernel/mm/transparent_hugepage/defrag')

    The full path to the file for checking/setting if Transparent Hugepages is enabled.

See Also:

 
 
 6
 7
 8
 9
 10
 11
 12
 13
 14
# File 'manifests/system/transparent_hugepage.pp', line 6
 
 class cassandra::system::transparent_hugepage (
   $path = '/sys/kernel/mm/transparent_hugepage/defrag',
   ) inherits cassandra::params {
   exec { 'Disable Java Hugepages':
     command => "/bin/echo never > ${path}",
     path    => [ '/bin', '/usr/bin' ],
     unless  => "grep -q '\\[never\\]' ${path}",
   }
 }
\ No newline at end of file diff --git a/docs/puppet_defined_types/cassandra_3A_3Afile.html b/docs/puppet_defined_types/cassandra_3A_3Afile.html index 10d382e..252e65c 100644 --- a/docs/puppet_defined_types/cassandra_3A_3Afile.html +++ b/docs/puppet_defined_types/cassandra_3A_3Afile.html @@ -1,290 +1,290 @@ Defined Type: cassandra::file - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Defined Type: cassandra::file

Defined in:
manifests/file.pp

Overview

A defined type for altering files relative to the configuration directory.

Examples:

if $::memorysize_mb < 24576.0 {
   $max_heap_size_in_mb = floor($::memorysize_mb / 2)
 } elsif $::memorysize_mb < 8192.0 {
   $max_heap_size_in_mb = floor($::memorysize_mb / 4)
 } else {
   $max_heap_size_in_mb = 8192
 }
 
 $heap_new_size = $::processorcount * 100
 
 cassandra::file { "Set Java/Cassandra max heap size to ${max_heap_size_in_mb}.":
   file       => 'cassandra-env.sh',
   file_lines => {
     'MAX_HEAP_SIZE' => {
       line  => "MAX_HEAP_SIZE='${max_heap_size_in_mb}M'",
       match => '^#?MAX_HEAP_SIZE=.*',
     },
   }
 }
 
 cassandra::file { "Set Java/Cassandra heap new size to ${heap_new_size}.":
   file       => 'cassandra-env.sh',
   file_lines => {
     'HEAP_NEWSIZE'  => {
       line  => "HEAP_NEWSIZE='${heap_new_size}M'",
       match => '^#?HEAP_NEWSIZE=.*',
     }
   }
 }
 $tmpdir = '/var/lib/cassandra/tmp'
 
 file { $tmpdir:
   ensure => directory,
   owner  => 'cassandra',
   group  => 'cassandra',
 }
 
 cassandra::file { 'Set java.io.tmpdir':
   file       => 'jvm.options',
   file_lines => {
     'java.io.tmpdir' => {
       line => "-Djava.io.tmpdir=${tmpdir}",
     },
   },
   require    => File[$tmpdir],
 }

Parameters:

  • file (string) (defaults to: $title)

    The name of the file relative to the config_path.

  • config_path (string) (defaults to: $::cassandra::config_path)

    The path to the configuration directory.

  • file_lines (string) (defaults to: undef)

    If set, then the create_resources will be used to create an array of file_line resources.

  • service_refresh (boolean) (defaults to: true)

    Is the Cassandra service is to be notified if the environment file is changed.

 
 
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
# File 'manifests/file.pp', line 57
 
 define cassandra::file(
   $file             = $title,
   $config_path      = $::cassandra::config_path,
   $file_lines       = undef,
   $service_refresh  = true,
   ) {
   include cassandra
   include cassandra::params
   include stdlib
 
   $path = "${config_path}/${file}"
 
   if $file_lines != undef {
     if $service_refresh {
       $default_file_line = {
         path    => $path,
         require => Package['cassandra'],
         notify  => Service['cassandra'],
       }
     } else {
       $default_file_line = {
         path    => $path,
         require => Package['cassandra'],
       }
     }
 
     create_resources(file_line, $file_lines, $default_file_line)
   }
 }
\ No newline at end of file diff --git a/docs/puppet_defined_types/cassandra_3A_3Aprivate_3A_3Afirewall_ports_3A_3Arule.html b/docs/puppet_defined_types/cassandra_3A_3Aprivate_3A_3Afirewall_ports_3A_3Arule.html index 8fb91dc..d30ff1a 100644 --- a/docs/puppet_defined_types/cassandra_3A_3Aprivate_3A_3Afirewall_ports_3A_3Arule.html +++ b/docs/puppet_defined_types/cassandra_3A_3Aprivate_3A_3Afirewall_ports_3A_3Arule.html @@ -1,161 +1,161 @@ Defined Type: cassandra::private::firewall_ports::rule - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Defined Type: cassandra::private::firewall_ports::rule

Defined in:
manifests/private/firewall_ports/rule.pp

Overview

A defined type to be used as a macro for setting host based firewall rules. This is not intended to be used by a user (who should use the API provided by cassandra::firewall_ports instead) but is documented here for completeness.

Parameters:

  • ports (integer)

    The number(s) of the port(s) to be opened.

 
 
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
# File 'manifests/private/firewall_ports/rule.pp', line 6
 
 define cassandra::private::firewall_ports::rule(
     $ports,
   ) {
   $array_var1 = split($title, '_')
   $rule_number = $array_var1[0]
   $rule_description = $array_var1[1]
   $source = $array_var1[2]
 
   if size($ports) > 0 {
     firewall { "${rule_number} - Cassandra (${rule_description}) - ${source}":
       action => 'accept',
       dport  => $ports,
       proto  => 'tcp',
       source => $source,
     }
   }
 }
\ No newline at end of file diff --git a/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Acql_type.html b/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Acql_type.html index 2b5235b..cf2f4ec 100644 --- a/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Acql_type.html +++ b/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Acql_type.html @@ -1,249 +1,249 @@ Defined Type: cassandra::schema::cql_type - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Defined Type: cassandra::schema::cql_type

Defined in:
manifests/schema/cql_type.pp

Overview

Create or drop user defined data types within the schema.

Examples:

cassandra::schema::cql_type { 'fullname':
   keyspace => 'mykeyspace',
   fields   => {
     'fname' => 'text',
     'lname' => 'text',
   },
 }

Parameters:

  • keyspace (string)

    The name of the keyspace that the data type is to be associated with.

  • ensure (present|absent) (defaults to: present)

    ensure the data type is created, or is dropped.

  • fields (hash) (defaults to: {})

    A hash of the fields that will be components for the data type.

  • cql_type_name (string) (defaults to: $title)

    The name of the CQL type to be created.

 
 
 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 'manifests/schema/cql_type.pp', line 14
 
 define cassandra::schema::cql_type (
   $keyspace,
   $ensure = present,
   $fields = {},
   $cql_type_name = $title,
   ){
   include 'cassandra::schema'
   $read_script = "DESC TYPE ${keyspace}.${cql_type_name}"
   $read_command = "${::cassandra::schema::cqlsh_opts} -e \"${read_script}\" ${::cassandra::schema::cqlsh_conn}"
 
   if $ensure == present {
     $create_script1 = "CREATE TYPE IF NOT EXISTS ${keyspace}.${cql_type_name}"
     $create_script2 = join(join_keys_to_values($fields, ' '), ', ')
     $create_script = "${create_script1} (${create_script2})"
     $create_command = "${::cassandra::schema::cqlsh_opts} -e \"${create_script}\" ${::cassandra::schema::cqlsh_conn}"
     exec { $create_command:
       unless  => $read_command,
       require => Exec['::cassandra::schema connection test'],
     }
   } elsif $ensure == absent {
     $delete_script = "DROP type ${keyspace}.${cql_type_name}"
     $delete_command = "${::cassandra::schema::cqlsh_opts} -e \"${delete_script}\" ${::cassandra::schema::cqlsh_conn}"
     exec { $delete_command:
       onlyif  => $read_command,
       require => Exec['::cassandra::schema connection test'],
     }
   } else {
     fail("Unknown action (${ensure}) for ensure attribute.")
   }
 }
\ No newline at end of file diff --git a/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Aindex.html b/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Aindex.html index cf84b01..adebb44 100644 --- a/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Aindex.html +++ b/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Aindex.html @@ -1,337 +1,337 @@ Defined Type: cassandra::schema::index - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Defined Type: cassandra::schema::index

Defined in:
manifests/schema/index.pp

Overview

Create or drop indexes within the schema.

Parameters:

  • ensure (present|absent) (defaults to: present)

    Create or dro[ the index.

  • class_name (string) (defaults to: undef)

    The name of the class to be associated with an index when creating a custom index.

  • index (string) (defaults to: $title)

    The name of the index. Defaults to the name of the resource.

  • keys (string) (defaults to: undef)

    The columns that the index is being created on.

  • keyspace (string)

    The name the keyspace that the index is to be associated with.

  • options (string) (defaults to: undef)

    Any options to be added to the index.

  • table (string)

    The name of the table that the index is to be associated with.

 
 
 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
# File 'manifests/schema/index.pp', line 12
 
 define cassandra::schema::index(
   $keyspace,
   $table,
   $ensure     = present,
   $class_name = undef,
   $index      = $title,
   $keys       = undef,
   $options    = undef,
   ) {
   include 'cassandra::schema'
 
   # Fully qualified index name.
   $fqin = "${keyspace}.${index}"
   # Fully qualified table name.
   $fqtn = "${keyspace}.${table}"
 
   $read_script = "DESC INDEX ${fqin}"
   $read_command = "${::cassandra::schema::cqlsh_opts} -e \"${read_script}\" ${::cassandra::schema::cqlsh_conn}"
 
   if $ensure == present {
     if $class_name != undef {
       $create_part1 = "CREATE CUSTOM INDEX IF NOT EXISTS ${index} ON ${keyspace}.${table}"
     } else {
       $create_part1 = "CREATE INDEX IF NOT EXISTS ${index} ON ${keyspace}.${table}"
     }
 
     if $class_name != undef {
       $create_part2 = "${create_part1} (${keys}) USING '${class_name}'"
     } else {
       $create_part2 = "${create_part1} (${keys})"
     }
 
     if $options != undef {
       $create_script = "${create_part2} WITH OPTIONS = ${options}"
     } else {
       $create_script = $create_part2
     }
 
     $create_command = "${::cassandra::schema::cqlsh_opts} -e \"${create_script}\" ${::cassandra::schema::cqlsh_conn}"
 
     exec { $create_command:
       unless  => $read_command,
       require => Exec['::cassandra::schema connection test'],
     }
   } elsif $ensure == absent {
     $delete_script = "DROP INDEX ${fqin}"
     $delete_command = "${::cassandra::schema::cqlsh_opts} -e \"${delete_script}\" ${::cassandra::schema::cqlsh_conn}"
     exec { $delete_command:
       onlyif  => $read_command,
       require => Exec['::cassandra::schema connection test'],
     }
   } else {
     fail("Unknown action (${ensure}) for ensure attribute.")
   }
 }
\ No newline at end of file diff --git a/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Akeyspace.html b/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Akeyspace.html index 09164ad..35d4017 100644 --- a/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Akeyspace.html +++ b/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Akeyspace.html @@ -1,308 +1,308 @@ Defined Type: cassandra::schema::keyspace - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Defined Type: cassandra::schema::keyspace

Defined in:
manifests/schema/keyspace.pp

Overview

Create or drop keyspaces within the schema.

Examples:

$network_topology_strategy = {
   keyspace_class => 'NetworkTopologyStrategy',
     dc1            => 3,
     dc2            => 2
 }
cassandra::schema::keyspace { 'mykeyspace':
   replication_map => {
     keyspace_class     => 'SimpleStrategy',
     replication_factor => 1,
   },
   durable_writes  => false,
 }

Parameters:

  • ensure (present|absent) (defaults to: present)

    Create or drop the keyspace.

  • durable_writes (boolean) (defaults to: true)

    When set to false, data written to the keyspace bypasses the commit log. Be careful using this option because you risk losing data. Set this attribute to false on a keyspace using the SimpleStrategy.

  • keyspace_name (string) (defaults to: $title)

    The name of the keyspace to be created.

  • replication_map (hash) (defaults to: {})

    Needed if the keyspace is to be present. Optional if it is to be absent.

 
 
 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
 69
 70
 71
 72
 73
 74
 75
 76
# File 'manifests/schema/keyspace.pp', line 24
 
 define cassandra::schema::keyspace(
   $ensure          = present,
   $durable_writes  = true,
   $keyspace_name   = $title,
   $replication_map = {},
   ) {
   include 'cassandra::schema'
 
   $read_script = "DESC KEYSPACE ${keyspace_name}"
   $read_command = "${::cassandra::schema::cqlsh_opts} -e \"${read_script}\" ${::cassandra::schema::cqlsh_conn}"
 
   if $ensure == present {
     $keyspace_class = $replication_map[keyspace_class]
 
     case $keyspace_class {
       'SimpleStrategy': {
         $replication_factor = $replication_map[replication_factor]
         $map_str = "{ 'class' : 'SimpleStrategy', 'replication_factor' : ${replication_factor} }"
       }
       'NetworkTopologyStrategy': {
         $map_str1 = "{ 'class' : 'NetworkTopologyStrategy'"
         $new_map = prefix(delete($replication_map, 'keyspace_class'), "'")
         $map_str2 = join(join_keys_to_values($new_map, "': "), ', ')
         $map_str = "${map_str1}, ${map_str2} }"
       }
       default: {
         $msg_part1 = "Invalid or no class (${keyspace_class}) specified for"
         $msg_part2 = "keyspace ${keyspace_name}."
         fail("${msg_part1} ${msg_part2}")
       }
     }
 
     $create_script1 = "CREATE KEYSPACE IF NOT EXISTS ${keyspace_name}"
     $create_script2 = "WITH REPLICATION = ${map_str}"
     $create_script3 = "AND DURABLE_WRITES = ${durable_writes}"
     $create_script = "${create_script1} ${create_script2} ${create_script3}"
     $create_command = "${::cassandra::schema::cqlsh_opts} -e \"${create_script}\" ${::cassandra::schema::cqlsh_conn}"
 
     exec { $create_command:
       unless  => $read_command,
       require => Exec['::cassandra::schema connection test'],
     }
   } elsif $ensure == absent {
     $delete_script = "DROP KEYSPACE ${keyspace_name}"
     $delete_command = "${::cassandra::schema::cqlsh_opts} -e \"${delete_script}\" ${::cassandra::schema::cqlsh_conn}"
     exec { $delete_command:
       onlyif  => $read_command,
       require => Exec['::cassandra::schema connection test'],
     }
   } else {
     fail("Unknown action (${ensure}) for ensure attribute.")
   }
 }
\ No newline at end of file diff --git a/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Apermission.html b/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Apermission.html index 9d20673..0fb9090 100644 --- a/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Apermission.html +++ b/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Apermission.html @@ -1,412 +1,412 @@ Defined Type: cassandra::schema::permission - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Defined Type: cassandra::schema::permission

Defined in:
manifests/schema/permission.pp

Overview

Grant or revoke permissions. To use this class, a suitable authenticator (e.g. PasswordAuthenticator) and authorizer (e.g. CassandraAuthorizer) must be set in the Cassandra class.

WARNING: Specifying keyspace 'ALL' and 'ALL' for permissions at the same time is not currently supported by this module.

Parameters:

  • user_name (string)

    The name of the user who is to be granted or revoked.

  • ensure (present | absent) (defaults to: present)

    Set to present to grant a permission or absent to revoke it.

  • keyspace_name (string) (defaults to: 'ALL')

    The name of the keyspace to grant/revoke the permissions on. If set to 'ALL' then the permission will be applied to all of the keyspaces.

  • permission_name (string) (defaults to: 'ALL')

    Can be one of the following:

    • 'ALTER' - ALTER KEYSPACE, ALTER TABLE, CREATE INDEX, DROP INDEX.
    • 'AUTHORIZE' - GRANT, REVOKE.
    • 'CREATE' - CREATE KEYSPACE, CREATE TABLE.
    • 'DROP' - DROP KEYSPACE, DROP TABLE.
    • 'MODIFY' - INSERT, DELETE, UPDATE, TRUNCATE.
    • 'SELECT' - SELECT.

    If the permission_name is set to 'ALL', this will set all of the specific permissions listed.

  • table_name (string) (defaults to: undef)

    The name of a table within the specified keyspace. If left unspecified, the procedure will be applied to all tables within the keyspace.

 
 
 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
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
# File 'manifests/schema/permission.pp', line 30
 
 define cassandra::schema::permission (
   $user_name,
   $ensure           = present,
   $keyspace_name    = 'ALL',
   $permission_name  = 'ALL',
   $table_name       = undef,
   ){
   include 'cassandra::schema'
 
   if upcase($keyspace_name) == 'ALL' and upcase($permission_name) == 'ALL' {
     fail('"ALL" keyspaces AND "ALL" permissions are mutually exclusive.')
   } elsif $table_name {
     $resource = "TABLE ${keyspace_name}.${table_name}"
   } elsif upcase($keyspace_name) == 'ALL' {
     $resource = 'ALL KEYSPACES'
   } else {
     $resource = "KEYSPACE ${keyspace_name}"
   }
 
   $read_script = "LIST ALL PERMISSIONS ON ${resource}"
   $upcase_permission_name = upcase($permission_name)
   $pattern = "\s${user_name} |\s*${user_name} |\s.*\s${upcase_permission_name}$"
   $read_command = "${::cassandra::schema::cqlsh_opts} -e \"${read_script}\" ${::cassandra::schema::cqlsh_conn} | grep '${pattern}'"
 
   if upcase($permission_name) == 'ALL' {
     cassandra::schema::permission { "${title} - ALTER":
       ensure          => $ensure,
       user_name       => $user_name,
       keyspace_name   => $keyspace_name,
       permission_name => 'ALTER',
       table_name      => $table_name,
     }
 
     cassandra::schema::permission { "${title} - AUTHORIZE":
       ensure          => $ensure,
       user_name       => $user_name,
       keyspace_name   => $keyspace_name,
       permission_name => 'AUTHORIZE',
       table_name      => $table_name,
     }
 
     # The CREATE permission is not relevant to tables.
     if !$table_name {
       cassandra::schema::permission { "${title} - CREATE":
         ensure          => $ensure,
         user_name       => $user_name,
         keyspace_name   => $keyspace_name,
         permission_name => 'CREATE',
         table_name      => $table_name,
       }
     }
 
     cassandra::schema::permission { "${title} - DROP":
       ensure          => $ensure,
       user_name       => $user_name,
       keyspace_name   => $keyspace_name,
       permission_name => 'DROP',
       table_name      => $table_name,
     }
 
     cassandra::schema::permission { "${title} - MODIFY":
       ensure          => $ensure,
       user_name       => $user_name,
       keyspace_name   => $keyspace_name,
       permission_name => 'MODIFY',
       table_name      => $table_name,
     }
 
     cassandra::schema::permission { "${title} - SELECT":
       ensure          => $ensure,
       user_name       => $user_name,
       keyspace_name   => $keyspace_name,
       permission_name => 'SELECT',
       table_name      => $table_name,
     }
   } elsif $ensure == present {
     $create_script = "GRANT ${permission_name} ON ${resource} TO ${user_name}"
     $create_command = "${::cassandra::schema::cqlsh_opts} -e \"${create_script}\" ${::cassandra::schema::cqlsh_conn
 }"
 
     exec { $create_script:
       command => $create_command,
       unless  => $read_command,
       require => Exec['::cassandra::schema connection test'],
     }
   } elsif $ensure == absent {
     $delete_script = "REVOKE ${permission_name} ON ${resource} FROM ${user_name}"
     $delete_command = "${::cassandra::schema::cqlsh_opts} -e \"${delete_script}\" ${::cassandra::schema::cqlsh_conn}"
 
     exec { $delete_script:
       command => $delete_command,
       onlyif  => $read_command,
       require => Exec['::cassandra::schema connection test'],
     }
   } else {
     fail("Unknown action (${ensure}) for ensure attribute.")
   }
 }
\ No newline at end of file diff --git a/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Atable.html b/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Atable.html index 7d51b14..85f41d0 100644 --- a/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Atable.html +++ b/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Atable.html @@ -1,288 +1,288 @@ Defined Type: cassandra::schema::table - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Defined Type: cassandra::schema::table

Defined in:
manifests/schema/table.pp

Overview

Create or drop tables within the schema.

Examples:

cassandra::schema::table { 'users':
   keyspace => 'mykeyspace',
   columns  => {
     'userid'      => 'int',
     'fname'       => 'text',
     'lname'       => 'text',
     'PRIMARY KEY' => '(userid)',
   },
 }

Parameters:

  • keyspace (string)

    The name of the keyspace.

  • columns (hash) (defaults to: {})

    A hash of the columns to be placed in the table. Optional if the table is to be absent.

  • ensure (present|absent) (defaults to: present)

    Ensure a keyspace is created or dropped.

  • options (array) (defaults to: [])

    Options to be added to the table creation.

  • table (string) (defaults to: $title)

    The name of the table. Defaults to the name of the resource.

 
 
 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
# File 'manifests/schema/table.pp', line 19
 
 define cassandra::schema::table (
   $keyspace,
   $ensure  = present,
   $columns = {},
   $options = [],
   $table   = $title,
   ){
   include 'cassandra::schema'
   $read_script = "DESC TABLE ${keyspace}.${table}"
   $read_command = "${::cassandra::schema::cqlsh_opts} -e \"${read_script}\" ${::cassandra::schema::cqlsh_conn}"
 
   if $ensure == present {
     $create_script1 = "CREATE TABLE IF NOT EXISTS ${keyspace}.${table}"
     $cols_def = join(join_keys_to_values($columns, ' '), ', ')
     $cols_def_rm_collection_type = delete($cols_def, 'COLLECTION-TYPE ')
 
     if count($options) > 0 {
       $options_def = join($options, ' AND ')
       $create_script = "${create_script1} (${cols_def_rm_collection_type}) WITH ${options_def}"
     } else {
       $create_script = "${create_script1} (${cols_def_rm_collection_type})"
     }
 
     $create_command = "${::cassandra::schema::cqlsh_opts} -e \"${create_script}\" ${::cassandra::schema::cqlsh_conn}"
     exec { $create_command:
       unless  => $read_command,
       require => Exec['::cassandra::schema connection test'],
     }
   } elsif $ensure == absent {
     $delete_script = "DROP TABLE IF EXISTS ${keyspace}.${table}"
     $delete_command = "${::cassandra::schema::cqlsh_opts} -e \"${delete_script}\" ${::cassandra::schema::cqlsh_conn}"
     exec { $delete_command:
       onlyif  => $read_command,
       require => Exec['::cassandra::schema connection test'],
     }
   } else {
     fail("Unknown action (${ensure}) for ensure attribute.")
   }
 }
\ No newline at end of file diff --git a/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Auser.html b/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Auser.html index c08ec90..66c079c 100644 --- a/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Auser.html +++ b/docs/puppet_defined_types/cassandra_3A_3Aschema_3A_3Auser.html @@ -1,406 +1,406 @@ Defined Type: cassandra::schema::user - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Defined Type: cassandra::schema::user

Defined in:
manifests/schema/user.pp

Overview

Create or drop users. To use this class, a suitable authenticator (e.g. PasswordAuthenticator) must be set in the Cassandra class.

Examples:

cassandra::schema::user { 'akers':
   password  => 'Niner2',
   superuser => true,
 }
 
 cassandra::schema::user { 'lucan':
   ensure => absent,
 }

Parameters:

  • ensure (present | absent) (defaults to: present)

    Valid values can be present to ensure a user is created, or absent to remove the user if it exists.

  • password (string) (defaults to: undef)

    A password for the user.

  • superuser (boolean) (defaults to: false)

    If the user is to be a super-user on the system.

  • login (boolean) (defaults to: true)

    Allows the role to log in.

  • user_name (string) (defaults to: $title)

    The name of the user.

 
 
 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
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
# File 'manifests/schema/user.pp', line 19
 
 define cassandra::schema::user (
   $ensure    = present,
   $login     = true,
   $password  = undef,
   $superuser = false,
   $user_name = $title,
   ){
   include 'cassandra::schema'
 
   if $::cassandrarelease != undef {
     if versioncmp($::cassandrarelease, '2.2') < 0 {
       $operate_with_roles = false
     } else {
       $operate_with_roles = true
     }
   } else {
     $operate_with_roles = false
   }
 
   if $operate_with_roles {
     $read_script = 'LIST ROLES'
   } else {
     $read_script = 'LIST USERS'
   }
   $read_command = "${::cassandra::schema::cqlsh_opts} -e \"${read_script}\" ${::cassandra::schema::cqlsh_conn} | grep '\s*${user_name} |'"
 
   if $ensure == present {
     if $operate_with_roles {
       # we are running cassandra > 2.2
       $create_script1 = "CREATE ROLE IF NOT EXISTS ${user_name}"
 
       if $password != undef {
         $create_script2 = "${create_script1} WITH PASSWORD = '${password}'"
       } else {
         $create_script2 = $create_script1
       }
 
       if $superuser {
         if $password != undef {
           $create_script3 = "${create_script2} AND SUPERUSER = true"
         } else {
           $create_script3 = "${create_script2} WITH SUPERUSER = true"
         }
       } else {
         $create_script3 = $create_script2
       }
 
       if $login {
         if $superuser or $password != undef {
           $create_script = "${create_script3} AND LOGIN = true"
         }
         else {
           $create_script = "${create_script3} WITH LOGIN = true"
         }
       } else {
         $create_script = $create_script3
       }
     } else {
       $create_script1 = "CREATE USER IF NOT EXISTS ${user_name}"
 
       if $password != undef {
         $create_script2 = "${create_script1} WITH PASSWORD '${password}'"
       } else {
         $create_script2 = $create_script1
       }
 
       if $superuser {
         $create_script = "${create_script2} SUPERUSER"
       } else {
         $create_script = "${create_script2} NOSUPERUSER"
       }
     }
 
     $create_command = "${::cassandra::schema::cqlsh_opts} -e \"${create_script}\" ${::cassandra::schema::cqlsh_conn}"
 
     exec { "Create user (${user_name})":
       command => $create_command,
       unless  => $read_command,
       require => Exec['::cassandra::schema connection test'],
     }
   } elsif $ensure == absent {
     if $operate_with_roles {
       $delete_script = "DROP ROLE ${user_name}"
     } else {
       $delete_script = "DROP USER ${user_name}"
     }
     $delete_command = "${::cassandra::schema::cqlsh_opts} -e \"${delete_script}\" ${::cassandra::schema::cqlsh_conn}"
 
     exec { "Delete user (${user_name})":
       command => $delete_command,
       onlyif  => $read_command,
       require => Exec['::cassandra::schema connection test'],
     }
   } else {
     fail("Unknown action (${ensure}) for ensure attribute.")
   }
 }
\ No newline at end of file diff --git a/docs/top-level-namespace.html b/docs/top-level-namespace.html index 4fa4735..93dd641 100644 --- a/docs/top-level-namespace.html +++ b/docs/top-level-namespace.html @@ -1,900 +1,900 @@ Top Level Namespace - — Documentation by YARD 0.9.10 + — Documentation by YARD 0.9.12

Top Level Namespace

Instance Method Summary collapse

Instance Method Details

#cassandracmsheapnewsizeinteger

Returns a value (MB) that might be suitable to set the HEAP_NEWSIZE when using the Concurrent Mark Sweep (CMS) Collector. See Tuning Java resources for more details.

Returns:

  • (integer)

    min(100 times the number of cores, 1/4 CMS MAX_HEAP_SIZE)

See Also:

 
 
 11
 12
 13
 14
 15
 16
 17
 18
# File 'lib/facter/cassandracmsheapnewsize.rb', line 11
 
 Facter.add('cassandracmsheapnewsize') do
   setcode do
     maxheapsize = Facter.value(:cassandracmsmaxheapsize).to_f
     processorcount = Facter.value(:processorcount).to_f
     heapnewsize = [100 * processorcount, maxheapsize * 0.25].min
     heapnewsize.round
   end
 end

#cassandracmsmaxheapsizeinteger

Returns a value (MB) that might be suitable to set the MAX_HEAP_SIZE when using the Concurrent Mark Sweep (CMS) Collector. See Tuning Java resources for more details.

Returns:

  • (integer)

    max(min(1/2 ram, 1024), min(1/4 ram, 14336))

See Also:

 
 
 11
 12
 13
 14
 15
 16
 17
 18
 19
# File 'lib/facter/cassandracmsmaxheapsize.rb', line 11
 
 Facter.add('cassandracmsmaxheapsize') do
   setcode do
     memorysize_mb = Facter.value(:memorysize_mb).to_f
     calc1 = [memorysize_mb * 0.5, 1024].min
     calc2 = [memorysize_mb * 0.25, 14_336].min
     maxheapsize = [calc1, calc2].max
     maxheapsize.round
   end
 end

#cassandraheapnewsizeinteger

Returns a value (MB) that might be suitable to set the HEAP_NEWSIZE. See Tuning Java resources for more details.

Returns:

  • (integer)

    min(100 times the number of cores, 1/4 MAX_HEAP_SIZE)

See Also:

 
 
 10
 11
 12
 13
 14
 15
 16
 17
# File 'lib/facter/cassandraheapnewsize.rb', line 10
 
 Facter.add('cassandraheapnewsize') do
   setcode do
     maxheapsize = Facter.value(:cassandramaxheapsize).to_f
     processorcount = Facter.value(:processorcount).to_f
     heapnewsize = [100 * processorcount, maxheapsize * 0.25].min
     heapnewsize.round
   end
 end

#cassandramajorversioninteger

Extract the major version from the cassandrarelease fact.

Returns:

  • (integer)

    The major version of the Cassandra instance.

See Also:

 
 
 6
 7
 8
 9
 10
 11
# File 'lib/facter/cassandramajorversion.rb', line 6
 
 Facter.add('cassandramajorversion') do
   setcode do
     release = Facter.value(:cassandrarelease)
     release.split('.')[0].to_i if release
   end
 end

#cassandramaxheapsizeinteger

Returns a value (MB) that might be suitable to set the MAX_HEAP_SIZE. See Tuning Java resources for more details.

Returns:

  • (integer)

    max(min(1/2 ram, 1024), min(1/4 ram, 8192))

See Also:

 
 
 10
 11
 12
 13
 14
 15
 16
 17
 18
# File 'lib/facter/cassandramaxheapsize.rb', line 10
 
 Facter.add('cassandramaxheapsize') do
   setcode do
     memorysize_mb = Facter.value(:memorysize_mb).to_f
     calc1 = [memorysize_mb * 0.5, 1024].min
     calc2 = [memorysize_mb * 0.25, 8192].min
     maxheapsize = [calc1, calc2].max
     maxheapsize.round
   end
 end

#cassandraminorversioninteger

Extract the minor version from the cassandrarelease fact.

Returns:

  • (integer)

    The minor version of the Cassandra instance.

See Also:

 
 
 6
 7
 8
 9
 10
 11
# File 'lib/facter/cassandraminorversion.rb', line 6
 
 Facter.add('cassandraminorversion') do
   setcode do
     release = Facter.value(:cassandrarelease)
     release.split('.')[1].to_i if release
   end
 end

#cassandrapatchversioninteger

Extract the patch version from the cassandrarelease fact.

Returns:

  • (integer)

    The patch version of the Cassandra instance.

See Also:

 
 
 6
 7
 8
 9
 10
 11
# File 'lib/facter/cassandrapatchversion.rb', line 6
 
 Facter.add('cassandrapatchversion') do
   setcode do
     release = Facter.value(:cassandrarelease)
     release.split('.')[2].to_i if release
   end
 end

#cassandrareleasestring

Extract the release string from the running Cassandra instance.

undefined.

Returns:

  • (string)

    The version string (e.g. 3.0.1).

 
 
 9
 10
 11
 12
 13
 14
# File 'lib/facter/cassandrarelease.rb', line 9
 
 Facter.add('cassandrarelease') do
   setcode do
     version = Facter::Util::Resolution.exec('nodetool version')
     version.match(%r{\d+\.\d+\.\d+}).to_s if version && version != ''
   end
 end
\ No newline at end of file diff --git a/metadata.json b/metadata.json index e005050..d8d80e5 100644 --- a/metadata.json +++ b/metadata.json @@ -1,82 +1,88 @@ { "name": "puppet-cassandra", - "version": "2.6.0", + "version": "2.7.0", "author": "Vox Pupuli", "summary": "Installs Cassandra & DataStax Agent on RHEL/Ubuntu/Debian.", "license": "Apache-2.0", "source": "https://github.com/voxpupuli/puppet-cassandra", "project_page": "https://github.com/voxpupuli/puppet-cassandra", "issues_url": "https://github.com/voxpupuli/puppet-cassandra/issues", "tags": [ "Apache", "cassandra", "cluster", "database", "datastax", "datastax-agent", "nosql" ], "dependencies": [ { "name": "puppetlabs-apt", "version_requirement": ">= 2.0.0 < 3.0.0" }, { "name": "puppetlabs-firewall", "version_requirement": ">= 1.0.0 < 2.0.0" }, { "name": "puppetlabs-inifile", "version_requirement": ">= 1.5.0 < 2.0.0" }, { "name": "puppetlabs-stdlib", "version_requirement": ">= 3.0.0 < 5.0.0" } ], "operatingsystem_support": [ { "operatingsystem": "CentOS", "operatingsystemrelease": [ "6", "7" ] }, { "operatingsystem": "OracleLinux", "operatingsystemrelease": [ "6", "7" ] }, { "operatingsystem": "RedHat", "operatingsystemrelease": [ "6", "7" ] }, { "operatingsystem": "Debian", "operatingsystemrelease": [ "7", "8" ] }, { "operatingsystem": "Scientific", "operatingsystemrelease": [ "6", "7" ] }, { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ "12.04", "14.04", "16.04" ] } + ], + "requirements": [ + { + "name": "puppet", + "version_requirement": ">=4.7.1 <6.0.0" + } ] }