diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 00000000..602f324b --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,104 @@ +This module has grown over time based on a range of contributions from +people using it. If you follow these contributing guidelines your patch +will likely make it into a release a little quicker. + +## Contributing + +Please note that this project is released with a Contributor Code of Conduct. +By participating in this project you agree to abide by its terms. +[Contributor Code of Conduct](https://voxpupuli.org/coc/). + +1. Fork the repo. + +1. Create a separate branch for your change. + +1. Run the tests. We only take pull requests with passing tests, and + documentation. + +1. Add a test for your change. Only refactoring and documentation + changes require no new tests. If you are adding functionality + or fixing a bug, please add a test. + +1. Squash your commits down into logical components. Make sure to rebase + against the current master. + +1. Push the branch to your fork and submit a pull request. + +Please be prepared to repeat some of these steps as our contributors review +your code. + +## Dependencies + +The testing and development tools have a bunch of dependencies, +all managed by [bundler](http://bundler.io/) according to the +[Puppet support matrix](http://docs.puppetlabs.com/guides/platforms.html#ruby-versions). + +By default the tests use a baseline version of Puppet. + +If you have Ruby 2.x or want a specific version of Puppet, +you must set an environment variable such as: + + export PUPPET_VERSION="~> 4.2.0" + +Install the dependencies like so... + + bundle install + +## Syntax and style + +The test suite will run [Puppet Lint](http://puppet-lint.com/) and +[Puppet Syntax](https://github.com/gds-operations/puppet-syntax) to +check various syntax and style things. You can run these locally with: + + bundle exec rake lint + bundle exec rake validate + +It will also run some [Rubocop](http://batsov.com/rubocop/) tests +against it. You can run those locally ahead of time with: + + bundle exec rake rubocop + +## Running the unit tests + +The unit test suite covers most of the code, as mentioned above please +add tests if you're adding new functionality. If you've not used +[rspec-puppet](http://rspec-puppet.com/) before then feel free to ask +about how best to test your new feature. + +To run your all the unit tests + + bundle exec rake spec SPEC_OPTS='--format documentation' + +To run a specific spec test set the `SPEC` variable: + + bundle exec rake spec SPEC=spec/foo_spec.rb + +To run the linter, the syntax checker and the unit tests: + + bundle exec rake test + +## Integration tests + +The unit tests just check the code runs, not that it does exactly what +we want on a real machine. For that we're using +[beaker](https://github.com/puppetlabs/beaker). + +This fires up a new virtual machine (using vagrant) and runs a series of +simple tests against it after applying the module. You can run this +with: + + bundle exec rake acceptance + +This will run the tests on an Ubuntu 12.04 virtual machine. You can also +run the integration tests against Centos 6.6 with. + + BEAKER_set=centos-66-x64 bundle exec rake acceptances + +If you don't want to have to recreate the virtual machine every time you +can use `BEAKER_DESTROY=no` and `BEAKER_PROVISION=no`. On the first run you will +at least need `BEAKER_PROVISION` set to yes (the default). The Vagrantfile +for the created virtual machines will be in `.vagrant/beaker_vagrant_fies`. + +The easiest way to debug in a docker container is to open a shell: + + docker exec -it -u root ${container_id_or_name} bash diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..593e7aa8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,26 @@ + + +## Affected Puppet, Ruby, OS and module versions/distributions + +- Puppet: +- Ruby: +- Distribution: +- Module version: + +## How to reproduce (e.g Puppet code you use) + +## What are you seeing + +## What behaviour did you expect instead + +## Output log + +## Any additional information you'd like to impart diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..66f80444 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ + diff --git a/.gitignore b/.gitignore index 35438dbb..e9b3cf4b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,21 +1,20 @@ +pkg/ +Gemfile.lock +Gemfile.local +vendor/ +.vendor/ +spec/fixtures/manifests/ +spec/fixtures/modules/ +.vagrant/ .bundle/ +.ruby-version coverage/ -doc/ -Gemfile.lock +log/ .idea/ -*.iml +.dependencies/ .librarian/ -log/ -pkg/ -.project Puppetfile.lock -spec/fixtures/ -*.swn -*.swo -*.swp -.vagrant/ -vagrant/modules/ -vendor/ +*.iml +.*.sw? .yardoc/ -/.vagrant/ -/vagrant/modules/ +Guardfile diff --git a/.msync.yml b/.msync.yml new file mode 100644 index 00000000..0a4a57db --- /dev/null +++ b/.msync.yml @@ -0,0 +1 @@ +modulesync_config_version: '1.1.0' diff --git a/.overcommit.yml b/.overcommit.yml new file mode 100644 index 00000000..31699e74 --- /dev/null +++ b/.overcommit.yml @@ -0,0 +1,63 @@ +# Managed by https://github.com/voxpupuli/modulesync_configs +# +# Hooks are only enabled if you take action. +# +# To enable the hooks run: +# +# ``` +# bundle exec overcommit --install +# # ensure .overcommit.yml does not harm to you and then +# bundle exec overcommit --sign +# ``` +# +# (it will manage the .git/hooks directory): +# +# Examples howto skip a test for a commit or push: +# +# ``` +# SKIP=RuboCop git commit +# SKIP=PuppetLint git commit +# SKIP=RakeTask git push +# ``` +# +# Don't invoke overcommit at all: +# +# ``` +# OVERCOMMIT_DISABLE=1 git commit +# ``` +# +# Read more about overcommit: https://github.com/brigade/overcommit +# +# To manage this config yourself in your module add +# +# ``` +# .overcommit.yml: +# unmanaged: true +# ``` +# +# to your modules .sync.yml config +--- +PreCommit: + RuboCop: + enabled: true + description: 'Runs rubocop on modified files only' + command: ['bundle', 'exec', 'rubocop'] + PuppetLint: + enabled: true + description: 'Runs puppet-lint on modified files only' + command: ['bundle', 'exec', 'puppet-lint'] + YamlSyntax: + enabled: true + JsonSyntax: + enabled: true + TrailingWhitespace: + enabled: true + +PrePush: + RakeTarget: + enabled: true + description: 'Run rake targets' + targets: + - 'test' + - 'rubocop' + command: [ 'bundle', 'exec', 'rake' ] diff --git a/.pmtignore b/.pmtignore new file mode 100644 index 00000000..fb589575 --- /dev/null +++ b/.pmtignore @@ -0,0 +1,20 @@ +docs/ +pkg/ +Gemfile.lock +Gemfile.local +vendor/ +.vendor/ +spec/fixtures/manifests/ +spec/fixtures/modules/ +.vagrant/ +.bundle/ +.ruby-version +coverage/ +log/ +.idea/ +.dependencies/ +.librarian/ +Puppetfile.lock +*.iml +.*.sw? +.yardoc/ diff --git a/.rspec b/.rspec new file mode 100644 index 00000000..8c18f1ab --- /dev/null +++ b/.rspec @@ -0,0 +1,2 @@ +--format documentation +--color diff --git a/.rspec_parallel b/.rspec_parallel new file mode 100644 index 00000000..e4d136b7 --- /dev/null +++ b/.rspec_parallel @@ -0,0 +1 @@ +--format progress diff --git a/.rubocop.yml b/.rubocop.yml index c9c7f487..f3baf112 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,15 +1,536 @@ ---- +require: rubocop-rspec AllCops: + TargetRubyVersion: 1.9 + Include: + - ./**/*.rb Exclude: - - 'vagrant/modules/*/Gemfile' - - 'vagrant/modules/*/Rakefile' - - 'vagrant/modules/**/*' - - 'vendor/**/*' + - files/**/* + - vendor/**/* + - .vendor/**/* + - pkg/**/* + - spec/fixtures/**/* + - Gemfile + - Rakefile + - Guardfile +Lint/ConditionPosition: + Enabled: True + +Lint/ElseLayout: + Enabled: True + +Lint/UnreachableCode: + Enabled: True + +Lint/UselessComparison: + Enabled: True + +Lint/EnsureReturn: + Enabled: True + +Lint/HandleExceptions: + Enabled: True + +Lint/LiteralInCondition: + Enabled: True + +Lint/ShadowingOuterLocalVariable: + Enabled: True + +Lint/LiteralInInterpolation: + Enabled: True + +Style/HashSyntax: + Enabled: True + +Style/RedundantReturn: + Enabled: True + +Lint/AmbiguousOperator: + Enabled: True + +Lint/AssignmentInCondition: + Enabled: True + +Layout/SpaceBeforeComment: + Enabled: True + +Style/AndOr: + Enabled: True + +Style/RedundantSelf: + Enabled: True + Metrics/BlockLength: - Enabled: false + Enabled: False + +# Method length is not necessarily an indicator of code quality +Metrics/MethodLength: + Enabled: False + +# Module length is not necessarily an indicator of code quality +Metrics/ModuleLength: + Enabled: False + +Style/WhileUntilModifier: + Enabled: True + +Lint/AmbiguousRegexpLiteral: + Enabled: True + +Security/Eval: + Enabled: True + +Lint/BlockAlignment: + Enabled: True + +Lint/DefEndAlignment: + Enabled: True + +Lint/EndAlignment: + Enabled: True + +Lint/DeprecatedClassMethods: + Enabled: True + +Lint/Loop: + Enabled: True + +Lint/ParenthesesAsGroupedExpression: + Enabled: True + +Lint/RescueException: + Enabled: True + +Lint/StringConversionInInterpolation: + Enabled: True + +Lint/UnusedBlockArgument: + Enabled: True + +Lint/UnusedMethodArgument: + Enabled: True + +Lint/UselessAccessModifier: + Enabled: True + +Lint/UselessAssignment: + Enabled: True + +Lint/Void: + Enabled: True + +Layout/AccessModifierIndentation: + Enabled: True + +Style/AccessorMethodName: + Enabled: True + +Style/Alias: + Enabled: True + +Layout/AlignArray: + Enabled: True + +Layout/AlignHash: + Enabled: True + +Layout/AlignParameters: + Enabled: True + +Metrics/BlockNesting: + Enabled: True + +Style/AsciiComments: + Enabled: True + +Style/Attr: + Enabled: True + +Style/BracesAroundHashParameters: + Enabled: True + +Style/CaseEquality: + Enabled: True + +Layout/CaseIndentation: + Enabled: True + +Style/CharacterLiteral: + Enabled: True + +Style/ClassAndModuleCamelCase: + Enabled: True + +Style/ClassAndModuleChildren: + Enabled: False + +Style/ClassCheck: + Enabled: True + +# Class length is not necessarily an indicator of code quality Metrics/ClassLength: - Enabled: false + Enabled: False + +Style/ClassMethods: + Enabled: True + +Style/ClassVars: + Enabled: True + +Style/WhenThen: + Enabled: True + +Style/WordArray: + Enabled: True + +Style/UnneededPercentQ: + Enabled: True + +Layout/Tab: + Enabled: True + +Layout/SpaceBeforeSemicolon: + Enabled: True + +Layout/TrailingBlankLines: + Enabled: True + +Layout/SpaceInsideBlockBraces: + Enabled: True + +Layout/SpaceInsideBrackets: + Enabled: True + +Layout/SpaceInsideHashLiteralBraces: + Enabled: True + +Layout/SpaceInsideParens: + Enabled: True + +Layout/LeadingCommentSpace: + Enabled: True + +Layout/SpaceBeforeFirstArg: + Enabled: True + +Layout/SpaceAfterColon: + Enabled: True + +Layout/SpaceAfterComma: + Enabled: True + +Layout/SpaceAfterMethodName: + Enabled: True + +Layout/SpaceAfterNot: + Enabled: True + +Layout/SpaceAfterSemicolon: + Enabled: True + +Layout/SpaceAroundEqualsInParameterDefault: + Enabled: True + +Layout/SpaceAroundOperators: + Enabled: True + +Layout/SpaceBeforeBlockBraces: + Enabled: True + +Layout/SpaceBeforeComma: + Enabled: True + +Style/CollectionMethods: + Enabled: True + +Layout/CommentIndentation: + Enabled: True + +Style/ColonMethodCall: + Enabled: True + +Style/CommentAnnotation: + Enabled: True + +# 'Complexity' is very relative +Metrics/CyclomaticComplexity: + Enabled: False + +Style/ConstantName: + Enabled: True + +Style/Documentation: + Enabled: False + +Style/DefWithParentheses: + Enabled: True + +Style/PreferredHashMethods: + Enabled: True + +Layout/DotPosition: + EnforcedStyle: trailing + +Style/DoubleNegation: + Enabled: True + +Style/EachWithObject: + Enabled: True + +Layout/EmptyLineBetweenDefs: + Enabled: True + +Layout/IndentArray: + Enabled: True + +Layout/IndentHash: + Enabled: True + +Layout/IndentationConsistency: + Enabled: True + +Layout/IndentationWidth: + Enabled: True + +Layout/EmptyLines: + Enabled: True + +Layout/EmptyLinesAroundAccessModifier: + Enabled: True + +Style/EmptyLiteral: + Enabled: True + +# Configuration parameters: AllowURI, URISchemes. Metrics/LineLength: + Enabled: False + +Style/MethodCallWithoutArgsParentheses: + Enabled: True + +Style/MethodDefParentheses: + Enabled: True + +Style/LineEndConcatenation: + Enabled: True + +Layout/TrailingWhitespace: + Enabled: True + +Style/StringLiterals: + Enabled: True + +Style/TrailingCommaInArguments: + Enabled: True + +Style/TrailingCommaInLiteral: + Enabled: True + +Style/GlobalVars: + Enabled: True + +Style/GuardClause: + Enabled: True + +Style/IfUnlessModifier: + Enabled: True + +Style/MultilineIfThen: + Enabled: True + +Style/NegatedIf: + Enabled: True + +Style/NegatedWhile: + Enabled: True + +Style/Next: + Enabled: True + +Style/SingleLineBlockParams: + Enabled: True + +Style/SingleLineMethods: + Enabled: True + +Style/SpecialGlobalVars: + Enabled: True + +Style/TrivialAccessors: + Enabled: True + +Style/UnlessElse: + Enabled: True + +Style/VariableInterpolation: + Enabled: True + +Style/VariableName: + Enabled: True + +Style/WhileUntilDo: + Enabled: True + +Style/EvenOdd: + Enabled: True + +Style/FileName: + Enabled: True + +Style/For: + Enabled: True + +Style/Lambda: + Enabled: True + +Style/MethodName: + Enabled: True + +Style/MultilineTernaryOperator: + Enabled: True + +Style/NestedTernaryOperator: + Enabled: True + +Style/NilComparison: + Enabled: True + +Style/FormatString: + Enabled: True + +Style/MultilineBlockChain: + Enabled: True + +Style/Semicolon: + Enabled: True + +Style/SignalException: + Enabled: True + +Style/NonNilCheck: + Enabled: True + +Style/Not: + Enabled: True + +Style/NumericLiterals: + Enabled: True + +Style/OneLineConditional: + Enabled: True + +Style/OpMethod: + Enabled: True + +Style/ParenthesesAroundCondition: + Enabled: True + +Style/PercentLiteralDelimiters: + Enabled: True + +Style/PerlBackrefs: + Enabled: True + +Style/PredicateName: + Enabled: True + +Style/RedundantException: + Enabled: True + +Style/SelfAssignment: + Enabled: True + +Style/Proc: + Enabled: True + +Style/RaiseArgs: + Enabled: True + +Style/RedundantBegin: + Enabled: True + +Style/RescueModifier: + Enabled: True + +# based on https://github.com/voxpupuli/modulesync_config/issues/168 +Style/RegexpLiteral: + EnforcedStyle: percent_r + Enabled: True + +Lint/UnderscorePrefixedVariableName: + Enabled: True + +Metrics/ParameterLists: + Enabled: False + +Lint/RequireParentheses: + Enabled: True + +Style/ModuleFunction: + Enabled: True + +Lint/Debugger: + Enabled: True + +Style/IfWithSemicolon: + Enabled: True + +Style/Encoding: + Enabled: True + +Style/BlockDelimiters: + Enabled: True + +Layout/MultilineBlockLayout: + Enabled: True + +# 'Complexity' is very relative +Metrics/AbcSize: + Enabled: False + +# 'Complexity' is very relative +Metrics/PerceivedComplexity: + Enabled: False + +Lint/UselessAssignment: + Enabled: True + +Layout/ClosingParenthesisIndentation: + Enabled: True + +# RSpec + +RSpec/BeforeAfterAll: + Exclude: + - spec/acceptance/**/* + +# We don't use rspec in this way +RSpec/DescribeClass: + Enabled: False + +# Example length is not necessarily an indicator of code quality +RSpec/ExampleLength: + Enabled: False + +RSpec/NamedSubject: + Enabled: False + +# disabled for now since they cause a lot of issues +# these issues aren't easy to fix +RSpec/RepeatedDescription: + Enabled: False + +RSpec/NestedGroups: + Enabled: False + +# this is broken on ruby1.9 +Layout/IndentHeredoc: + Enabled: False + +# disable Yaml safe_load. This is needed to support ruby2.0.0 development envs +Security/YAMLLoad: Enabled: false -Metrics/MethodLength: + +# This affects hiera interpolation, as well as some configs that we push. +Style/FormatStringToken: Enabled: false diff --git a/.sync.yml b/.sync.yml new file mode 100644 index 00000000..9468f8cd --- /dev/null +++ b/.sync.yml @@ -0,0 +1,3 @@ +--- +.travis.yml: + secret: "I/IK9bG88UOVll0hpuxluGp6IY5gicLaDHug/jGwfuWlN4R3coPAqWO/sGOyaEMbc9V5/Fw0H0ThQdYY3eI3rW5M4a1r9TSg/Z9d46JximPat/XvcpLvUc0G+QxCVhTRmYqD7u0wuX5VSric0PQU6KSjH84ZbKgAA8l04NGObgUI6ugjaNBhkaoIP3glYcHY1fgn5vwER2T/iiXZ5q3qDtYboR2GWLUODLWSpXWZRy7oYvp/RGTSe1fKjDwkbtrZiFvRoyzQvDhEAr+0MFDxJiOLdoKJFeBs6BrF2lyUJ6udlOmEYV94DfKoxEhhlZbxkPCh4SedT79i3c3xkKlf9wfAsEyGSTfc9OtyYBfoHcE9GMRZIvLf2Jn2mpHMO2694Fil4d7JdhLYQ/9Gv9VgFrYosQdVlDh+RxE2CXzrO39LhA1GeOY/n1r+DdvuCJs1fZfBZ1ORb7eQNp1BknurJ8FoYCKlEgihS223IJEnGueDdYkchMSRjS6C3a/HIzBz0RvEDGXD3WgrY5edRIaGziSoSr5eXzumK7N1FFBlpfY/7j38zI1ibWN4PRakmZppeeWOb1xiuVS5JkngCLoYerxLJEEjt8+klXhwnqqJukFuObaVsyprSWp+aAu/UHD/4w/6/lC6Elv+VzccLpITOR5b7VdAuCttQ5PGse6fits=" diff --git a/.travis.yml b/.travis.yml index a33cd3ed..3e421370 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,30 +1,46 @@ --- -env: - - "PUPPET_VERSION='~> 4.5' BEAKER_set=centos6_2" - - "PUPPET_VERSION='~> 4.5' BEAKER_set=centos6_3" - - "PUPPET_VERSION='~> 4.5' BEAKER_set=centos7" - - "PUPPET_VERSION='~> 4.5' BEAKER_set=debian7" - - "PUPPET_VERSION='~> 4.5' BEAKER_set=debian8" - - "PUPPET_VERSION='~> 4.5' BEAKER_set=ubuntu1204" - - "PUPPET_VERSION='~> 4.5' BEAKER_set=ubuntu1404" - - "PUPPET_VERSION='~> 4.5' BEAKER_set=ubuntu1604" +sudo: false +dist: trusty language: ruby -rvm: - - 2.3.1 cache: bundler -before_install: rm Gemfile.lock || true -bundler_args: --without development -dist: trusty -sudo: required -script: - - "bundle exec puppet --version" - - "bundle exec rake metadata_lint" - - "bundle exec rubocop" - - "bundle exec rake lint" - - "bundle exec rake validate" - - "bundle exec rake spec SPEC_OPTS='--format documentation'" - - "bundle exec rake acceptance" -notifications: - email: false +before_install: + - bundle -v + - rm Gemfile.lock || true + - gem update --system + - gem update bundler + - gem --version + - bundle -v +script: + - 'bundle exec rake $CHECK' matrix: fast_finish: true + include: + - rvm: 2.1.9 + bundler_args: --without system_tests development + env: PUPPET_VERSION="~> 4.0" CHECK=test + - rvm: 2.4.1 + bundler_args: --without system_tests development + env: PUPPET_VERSION="~> 5.0" CHECK=test_with_coveralls + - rvm: 2.4.1 + bundler_args: --without system_tests development + env: PUPPET_VERSION="~> 5.0" CHECK=rubocop + - rvm: 2.4.1 + bundler_args: --without system_tests development + env: PUPPET_VERSION="~> 5.0" CHECK=build DEPLOY_TO_FORGE=yes +branches: + only: + - master + - /^v\d/ +notifications: + email: false +deploy: + provider: puppetforge + user: puppet + password: + secure: "" + on: + tags: true + # all_branches is required to use tags + all_branches: true + # Only publish the build marked with "DEPLOY_TO_FORGE" + condition: "$DEPLOY_TO_FORGE = yes" diff --git a/.yardopts b/.yardopts index b6bedde3..3687f518 100644 --- a/.yardopts +++ b/.yardopts @@ -1,4 +1,2 @@ --markup markdown ---tag caveats:"Caveats:" ---tag resolution:"Resolution:" -- CONTRIBUTING.md LICENSE README.md +--output-dir docs/ diff --git a/CHANGELOG.md b/CHANGELOG.md index ce5680da..55e86b25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,36 @@ -# Change Log for Puppet Module locp-cassandra +# Change Log -##2017-04-24 - Release 2.4.1 ([diff](https://github.com/locp/cassandra/compare/2.4.0...2.4.1)) +## [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) + +**Fixed bugs:** + +- Unit and acceptance tests are failing that have been successful in the past. [\#397](https://github.com/locp/cassandra/issues/397) + +**Merged pull requests:** + +- Implement apache_repo for RedHat [\#396](https://github.com/locp/cassandra/pull/396) ([stijnvdb](https://github.com/stijnvdb)) + +## [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) + +**Implemented enhancements:** + +- Integration with github\_changelog\_generator [\#389](https://github.com/locp/cassandra/pull/389) ([dallinb](https://github.com/dallinb)) + +**Fixed bugs:** + +- Tests failing for CentOS 6 on "Create schema for 2.1" [\#392](https://github.com/locp/cassandra/issues/392) + +**Closed issues:** + +- Rubocop failing tests since upgrade from 0.48.1 to 0.49.0 [\#391](https://github.com/locp/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)) + +## 2017-04-24 - Release 2.4.1 ([diff](https://github.com/locp/cassandra/compare/2.4.0...2.4.1)) ### Summary @@ -11,7 +41,7 @@ A non-functional release of 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)) +## 2017-03-30 - Release 2.4.0 ([diff](https://github.com/locp/cassandra/compare/2.3.0...2.4.0)) ### Summary @@ -19,13 +49,13 @@ A non-functional release of improvements. * 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)) +## 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)) +## 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: @@ -37,7 +67,7 @@ New defined types: * `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)) +## 2016-12-08 - Release 2.2.1 ([diff](https://github.com/locp/cassandra/compare/2.2.0...2.2.1)) ### Summary @@ -51,7 +81,7 @@ Non-functional improvements and some documentation fixes. * 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)) +## 2016-12-01 - Release 2.2.0 ([diff](https://github.com/locp/cassandra/compare/2.1.2...2.2.0)) ### Summary @@ -70,14 +100,14 @@ build the project. * 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)) +## 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)) +## 2016-11-19 - Release 1.26.1 ([diff](https://github.com/locp/cassandra/compare/1.26.0...1.26.1)) ### Summary @@ -88,7 +118,7 @@ Retro-fitted a bug that was fixed in 2.1.1 into the 1.X.Y version of the module. * 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)) +## 2016-11-02 - Release 2.1.1 ([diff](https://github.com/locp/cassandra/compare/2.1.0...2.1.1)) ### Summary @@ -100,7 +130,7 @@ module. * 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)) +## 2016-10-29 - Release 2.1.0 ([diff](https://github.com/locp/cassandra/compare/2.0.2...2.1.0)) ### Summary @@ -139,7 +169,7 @@ plugin against the code to improve the code quality. * 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)) +## 2016-10-12 - Release 2.0.2 ([diff](https://github.com/locp/cassandra/compare/2.0.1...2.0.2)) ### Summary @@ -157,7 +187,7 @@ bugs and makes some improvements in our testing framework. * 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)) +## 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. @@ -165,7 +195,7 @@ bugs and makes some improvements in our testing framework. # 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)) +## 2016-10-01 - Release 2.0.1 ([diff](https://github.com/locp/cassandra/compare/2.0.0...2.0.1)) ### Summary @@ -177,7 +207,7 @@ A non-functional release containing some improvements and documentation correcti * 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)) +## 2016-09-29 - Release 2.0.0 ([diff](https://github.com/locp/cassandra/compare/1.26.0...2.0.0)) ### Summary @@ -191,7 +221,7 @@ section of the README for further details. * 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)) +## 2016-09-03 - Release 1.25.2 ([diff](https://github.com/locp/cassandra/compare/1.25.1...1.25.2)) ### Summary @@ -199,14 +229,14 @@ 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)) +## 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)) +## 2016-07-17 - Release 1.25.0 ([diff](https://github.com/locp/cassandra/compare/1.24.3...1.25.0)) ### Summary @@ -216,7 +246,7 @@ A feature release. * 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)) +## 2016-06-26 - Release 1.24.3 ([diff](https://github.com/locp/cassandra/compare/1.24.2...1.24.3)) ### Summary @@ -227,7 +257,7 @@ A couple of non-functional bug fixes. * 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)) +## 2016-06-20 - Release 1.24.2 ([diff](https://github.com/locp/cassandra/compare/1.24.1...1.24.2)) ### Summary @@ -237,7 +267,7 @@ A non-functional bug fix. * 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)) +## 2016-06-18 - Release 1.24.1 ([diff](https://github.com/locp/cassandra/compare/1.24.0...1.24.1)) ### Summary @@ -248,7 +278,7 @@ not require the systemd file to be installed. * 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)) +## 2015-05-25 - Release 1.24.0 ([diff](https://github.com/locp/cassandra/compare/1.23.1...1.24.0)) ### Summary @@ -272,7 +302,7 @@ A Debian-centric release. Debian 8 is now supported and a workaround for * 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)) +## 2016-05-10 - Release 1.23.1 ([diff](https://github.com/locp/cassandra/compare/1.23.0...1.23.1)) ### Summary @@ -283,7 +313,7 @@ not users of the module. * 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)) +## 2016-05-07 - Release 1.23.0 ([diff](https://github.com/locp/cassandra/compare/1.22.1...1.23.0)) ### Summary @@ -304,7 +334,7 @@ A couple of new features, a non-functional improvement and a bugfix. * 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)) +## 2016-05-03 - Release 1.22.1 ([diff](https://github.com/locp/cassandra/compare/1.22.0...1.22.1)) ### Summary @@ -320,7 +350,7 @@ A non-functional release for a minor improvement and a bug fix. * 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)) +## 2016-04-25 - Release 1.22.0 ([diff](https://github.com/locp/cassandra/compare/1.21.0...1.22.0)) ### Summary @@ -334,7 +364,7 @@ Two new features. * 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)) +## 2016-04-20 - Release 1.21.0 ([diff](https://github.com/locp/cassandra/compare/1.20.0...1.21.0)) ### Summary @@ -359,7 +389,7 @@ acceptance tests to be run against Cassandra 3. * 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)) +## 2016-04-13 - Release 1.20.0 ([diff](https://github.com/locp/cassandra/compare/1.19.0...1.20.0)) ### Summary @@ -370,7 +400,7 @@ A minor release for client requirements. * 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)) +## 2016-04-06 - Release 1.19.0 ([diff](https://github.com/locp/cassandra/compare/1.18.1...1.19.0)) ### Summary @@ -388,7 +418,7 @@ A new template attribute and a couple of bug fixes. 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)) +## 2016-03-27 - Release 1.18.1 ([diff](https://github.com/locp/cassandra/compare/1.18.0...1.18.1)) ### Summary @@ -406,7 +436,7 @@ Bug fixes and some minor and non-functional improvements. * 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)) +## 2016-03-26 - Release 1.18.0 ([diff](https://github.com/locp/cassandra/compare/1.17.0...1.18.0)) ### Summary @@ -445,7 +475,7 @@ and pipe-line improvements and a couple of bug fixes. 2.0.0. -##2016-03-22 - Release 1.17.0 ([diff](https://github.com/locp/cassandra/compare/1.16.0...1.17.0)) +## 2016-03-22 - Release 1.17.0 ([diff](https://github.com/locp/cassandra/compare/1.16.0...1.17.0)) ### Summary @@ -455,7 +485,7 @@ Another small change that is an emergency requirement for a client. * 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)) +## 2016-03-15 - Release 1.16.0 ([diff](https://github.com/locp/cassandra/compare/1.15.1...1.16.0)) ### Summary @@ -469,7 +499,7 @@ A smaller release than usual, but containing changes required for a client. * 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)) +## 2016-03-11 - Release 1.15.1 ([diff](https://github.com/locp/cassandra/compare/1.15.0...1.15.1)) ### Summary @@ -479,7 +509,7 @@ A small improvement. * 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)) +## 2016-03-10 - Release 1.15.0 ([diff](https://github.com/locp/cassandra/compare/1.14.2...1.15.0)) ### Summary @@ -520,7 +550,7 @@ pipeline and new features. * 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)) +## 2016-02-29 - Release 1.14.2 ([diff](https://github.com/locp/cassandra/compare/1.14.1...1.14.2)) ### Summary @@ -530,7 +560,7 @@ A small bugfix release. * 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)) +## 2016-02-27 - Release 1.14.1 ([diff](https://github.com/locp/cassandra/compare/1.14.0...1.14.1)) ### Summary @@ -553,7 +583,7 @@ A non-functional release of improvements and a bugfix. * 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)) +## 2016-02-19 - Release 1.14.0 ([diff](https://github.com/locp/cassandra/compare/1.13.0...1.14.0)) ### Summary @@ -571,7 +601,7 @@ A minor release with one of each of a feature, bug fix and improvement. * 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)) +## 2016-02-14 - Release 1.13.0 ([diff](https://github.com/locp/cassandra/compare/1.12.2...1.13.0)) ### Summary @@ -605,7 +635,7 @@ bug fixes and some non-functional improvements. 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)) +## 2016-02-12 - Release 1.12.2 ([diff](https://github.com/locp/cassandra/compare/1.12.1...1.12.2)) ### Summary @@ -617,7 +647,7 @@ More bug fixes. 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)) +## 2016-02-08 - Release 1.12.1 ([diff](https://github.com/locp/cassandra/compare/1.12.0...1.12.1)) ### Summary @@ -635,7 +665,7 @@ This is a non-functional release. Some bug fixes and release 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)) +## 2016-01-27 - Release 1.12.0 ([diff](https://github.com/locp/cassandra/compare/1.11.0...1.12.0)) ### Summary @@ -654,7 +684,7 @@ A new feature in the cassandra::datastax_agent class, a minor bug fix and integr * 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)) +## 2016-01-01 - Release 1.11.0 ([diff](https://github.com/locp/cassandra/compare/1.10.0...1.11.0)) ### Summary @@ -673,7 +703,7 @@ New features added to the main class. Also some non-functional improvements. * 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)) +## 2015-12-19 - Release 1.10.0 ([diff](https://github.com/locp/cassandra/compare/1.9.2...1.10.0)) ### Summary @@ -697,7 +727,7 @@ A feature release with minor improvements. 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)) +## 2015-11-21 - Release 1.9.2 ([diff](https://github.com/locp/cassandra/compare/1.9.1...1.9.2)) ### Summary @@ -709,7 +739,7 @@ A bug fix release that deals with some problems with Cassandra 3. 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)) +## 2015-11-09 - Release 1.9.1 ([diff](https://github.com/locp/cassandra/compare/1.9.0...1.9.1)) ### Summary @@ -720,7 +750,7 @@ A bug fix release. * 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)) +## 2015-10-25 - Release 1.9.0 ([diff](https://github.com/locp/cassandra/compare/1.8.1...1.9.0)) ### Summary @@ -763,7 +793,7 @@ change log documentation. 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)) +## 2015-10-14 - Release 1.8.1 ([diff](https://github.com/locp/cassandra/compare/1.8.0...1.8.1)) ### Summary @@ -774,7 +804,7 @@ A minor bug fix. * 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)) +## 2015-10-06 - Release 1.8.0 ([diff](https://github.com/locp/cassandra/compare/1.7.1...1.8.0)) ### Summary @@ -804,7 +834,7 @@ A minor bug fix that incorrctly gave a failed build status for the module. * 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)) +## 2015-10-01 - Release 1.7.0 ([diff](https://github.com/locp/cassandra/compare/1.6.0...1.7.0)) ### Summary @@ -840,7 +870,7 @@ The following non-functional improvements were implemented: 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)) +## 2015-09-23 - Release 1.6.0 ([diff](https://github.com/locp/cassandra/compare/1.5.0...1.6.0)) ### Summary @@ -859,7 +889,7 @@ non-functional improvements in the automated unit tests. * 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)) +## 2015-09-21 - Release 1.5.0 ([diff](https://github.com/locp/cassandra/compare/1.4.2...1.5.0)) ### Summary @@ -908,7 +938,7 @@ cassandra.yaml file. * 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)) +## 2015-09-15 - Release 1.4.2 ([diff](https://github.com/locp/cassandra/compare/1.4.1...1.4.2)) ### Summary @@ -929,7 +959,7 @@ contributed pull request. * n/a -##2015-09-15 - Release 1.4.1 ([diff](https://github.com/locp/cassandra/compare/1.4.0...1.4.1)) +## 2015-09-15 - Release 1.4.1 ([diff](https://github.com/locp/cassandra/compare/1.4.0...1.4.1)) ### Summary @@ -954,7 +984,7 @@ override the default behaviour of failing on a non-supported operating system. * 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)) +## 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. @@ -991,62 +1021,62 @@ override the default behaviour of failing on a non-supported operating system. * 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)) +## 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)) +## 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)) +## 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)) +## 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)) +## 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)) +## 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)) +## 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)) +## 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)) +## 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)) +## 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)) +## 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)) +## 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 @@ -1054,10 +1084,10 @@ Debian 7 is now supported. * 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)) +## 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)) +## 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. @@ -1065,13 +1095,13 @@ Debian 7 is now supported. * 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)) +## 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)) +## 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 @@ -1083,7 +1113,7 @@ Debian 7 is now supported. 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)) +## 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 @@ -1095,7 +1125,7 @@ Debian 7 is now supported. * 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)) +## 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: @@ -1103,15 +1133,18 @@ A non-functional change to change the following: * 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)) +## 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)) +## 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 +## 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)* diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4c62d555..3c6d6936 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -128,6 +128,7 @@ bundle exec rake beaker:ubuntu1604 **Release** | **PR/Issue** | **Contributer** ------------|-----------------------------------------------------|---------------------------------------------------- +2.6.0 | [Adding Red Hat OS](https://github.com/locp/cassandra/pull/396) | [@stijnvdb](https://github.com/stijnvdb) 2.3.0 | [Hiera documentation](https://github.com/locp/cassandra/pull/329) | [@tibers](https://github.com/tibers) 2.1.1 | [Correct cql_types conditional in cassandra::schema class](https://github.com/locp/cassandra/pull/325)| [@aaron-miller](https://github.com/aaron-miller) 2.0.2 | [locp/cassandra 2.0 example has two cassandra declarations](https://github.com/locp/cassandra/issues/291)| [@ericy-jana](https://github.com/ericy-jana) diff --git a/Gemfile b/Gemfile index beb1e2b6..483f05a9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,43 +1,73 @@ -source ENV['GEM_SOURCE'] || 'https://rubygems.org' -puppetversion = ENV.key?('PUPPET_VERSION') ? ENV['PUPPET_VERSION'] : ['>= 3.8'] +source ENV['GEM_SOURCE'] || "https://rubygems.org" -group :test do - gem 'coveralls', require: false - gem 'facter', '>= 1.7.0' - gem 'git', '1.3.0' - gem 'hiera', require: false - gem 'httparty', require: false - gem 'metadata-json-lint', require: false - gem 'puppet', puppetversion - gem 'puppet-blacksmith', require: false - gem 'puppet-lint', require: false - gem 'puppet-strings', require: false - gem 'puppetlabs_spec_helper', require: false - gem 'rspec-puppet', '>= 2.3.2' - gem 'rspec-puppet-utils', require: false - gem 'rspec_junit_formatter', require: false - gem 'rubocop-rspec', '1.4.1' if RUBY_VERSION < '2.2.0' - gem 'travis', require: false - gem 'travis-lint', require: false - gem 'yard', require: false +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 :acceptance do - gem 'beaker' - gem 'beaker-puppet_install_helper' - gem 'beaker-rspec' - gem 'pry' +group :test do + gem 'puppetlabs_spec_helper', '~> 2.2.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 'puppet-blacksmith', :require => false + gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem' + gem 'puppet-strings', '~> 1.0', :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 'github_changelog_generator', '~> 1.13.0', :require => false if RUBY_VERSION < '2.2.2' + gem 'rack', '~> 1.0', :require => false if RUBY_VERSION < '2.2.2' + gem 'github_changelog_generator', :require => false if RUBY_VERSION >= '2.2.2' + gem 'parallel_tests', :require => false end group :development do - gem 'notes', '~> 0.1.2' + 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) + 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 -# rspec must be v2 for ruby 1.8.7 -if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9' - gem 'rake', '~> 10.0' - gem 'rspec', '~> 2.0' + + +if facterversion = ENV['FACTER_GEM_VERSION'] + gem 'facter', facterversion.to_s, :require => false, :groups => [:test] else - # rubocop requires ruby >= 1.9 - gem 'rubocop' + 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 new file mode 100644 index 00000000..506d15d1 --- /dev/null +++ b/HISTORY.md @@ -0,0 +1,1115 @@ +## 2017-04-24 - Release 2.4.1 ([diff](https://github.com/locp/cassandra/compare/2.4.0...2.4.1)) + +### 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)) + +### 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/README.md b/README.md index 53defc18..e1eb0b03 100644 --- a/README.md +++ b/README.md @@ -648,8 +648,9 @@ 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. -* Currently Apache Cassandra only provides binary packages for Debian so -the `cassandra::apache_repo` is not of much use to Red Hat family users. +* 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 diff --git a/Rakefile b/Rakefile index d543e7ce..174c72a1 100644 --- a/Rakefile +++ b/Rakefile @@ -1,22 +1,56 @@ -require 'metadata-json-lint/rake_task' +require 'puppetlabs_spec_helper/rake_tasks' require 'puppet_blacksmith/rake_tasks' +require 'voxpupuli/release/rake_tasks' require 'puppet-strings/tasks' -require 'puppetlabs_spec_helper/rake_tasks' -require 'rubocop/rake_task' if RUBY_VERSION >= '2.0.0' -require 'rubygems' -# TravisCI does not require the extra module tasks. -require_relative 'rake/rake_tasks' +PuppetLint.configuration.log_format = '%{path}:%{line}:%{check}:%{KIND}:%{message}' +PuppetLint.configuration.fail_on_warnings = true +PuppetLint.configuration.send('relative') +PuppetLint.configuration.send('disable_140chars') +PuppetLint.configuration.send('disable_class_inherits_from_params_class') +PuppetLint.configuration.send('disable_documentation') +PuppetLint.configuration.send('disable_single_quote_string_with_variables') + +exclude_paths = %w( + pkg/**/* + vendor/**/* + .vendor/**/* + spec/**/* +) +PuppetLint.configuration.ignore_paths = exclude_paths +PuppetSyntax.exclude_paths = exclude_paths -# Use a custom pattern with git tag. %s is replaced with the version number. -Blacksmith::RakeTask.new do |t| - t.tag_pattern = '%s' +desc 'Run acceptance tests' +RSpec::Core::RakeTask.new(:acceptance) do |t| + t.pattern = 'spec/acceptance' end -exclude_paths = [ - 'vagrant/**/*', - 'vendor/bundle/**/*' +desc 'Run tests metadata_lint, release_checks' +task test: [ + :metadata_lint, + :release_checks, ] -PuppetLint.configuration.ignore_paths = exclude_paths -PuppetSyntax.exclude_paths = exclude_paths +desc "Run main 'test' task and report merged results to coveralls" +task test_with_coveralls: [:test] do + if Dir.exist?(File.expand_path('../lib', __FILE__)) + require 'coveralls/rake/task' + Coveralls::RakeTask.new + Rake::Task['coveralls:push'].invoke + else + puts 'Skipping reporting to coveralls. Module has no lib dir' + end +end + +begin + require 'github_changelog_generator/task' + GitHubChangelogGenerator::RakeTask.new :changelog do |config| + version = (Blacksmith::Modulefile.new).version + config.future_release = "v#{version}" if version =~ /^\d+\.\d+.\d+$/ + config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file.\nEach new release typically also includes the latest modulesync defaults.\nThese should not affect the functionality of the module." + config.exclude_labels = %w{duplicate question invalid wontfix wont-fix modulesync skip-changelog} + config.user = 'voxpupuli' + end +rescue LoadError +end +# vim: syntax=ruby diff --git a/manifests/apache_repo.pp b/manifests/apache_repo.pp index f79678f3..0f1be423 100644 --- a/manifests/apache_repo.pp +++ b/manifests/apache_repo.pp @@ -1,9 +1,5 @@ # An optional class that will allow a suitable repository to be configured -# from which packages for Apache Cassandra can be downloaded. Changing -# the defaults will allow any Debian Apt repository to be configured. -# Currently Apache only provide a Debian repository -# (http://cassandra.apache.org/download/) mentions of Yum are for wishful -# thinking. +# from which packages for Apache Cassandra can be downloaded. # @param descr [string] 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. @@ -12,15 +8,18 @@ # ignored. # @param key_url [string] On the Debian family, this is passed as the # `source` attribute to an `apt::key` resource. On the Red Hat family, -# it is ignored. -# @param pkg_url [string] 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 +# it is set to the `gpgkey` attribute on the `yumrepo` resource. +# @param pkg_url [string] 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'. # @param release [string] On the Debian family, this is passed as the `release` -# attribute to an `apt::source` resource. On the Red Hat family, it is -# ignored. +# 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') class cassandra::apache_repo ( $descr = 'Repo for Apache Cassandra', $key_id = 'A26E528B271F19B9E5D8E19EA278B781FE4B2BDA', @@ -29,6 +28,23 @@ $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 @@ -66,4 +82,4 @@ warning("OS family ${::osfamily} not supported") } } -} \ No newline at end of file +} diff --git a/manifests/schema/user.pp b/manifests/schema/user.pp index cf04f9d2..00a4ce61 100644 --- a/manifests/schema/user.pp +++ b/manifests/schema/user.pp @@ -5,6 +5,7 @@ # ensure a user is created, or **absent** to remove the user if it exists. # @param password [string] A password for the user. # @param superuser [boolean] If the user is to be a super-user on the system. +# @param login [boolean] Allows the role to log in. # @param user_name [string] The name of the user. # @example # cassandra::schema::user { 'akers': @@ -17,27 +18,75 @@ # } define cassandra::schema::user ( $ensure = present, + $login = true, $password = undef, $superuser = false, $user_name = $title, ){ include 'cassandra::schema' - $read_script = 'LIST USERS' + + 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 { - $create_script1 = "CREATE USER IF NOT EXISTS ${user_name}" + 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 $password != undef { + $create_script2 = "${create_script1} WITH PASSWORD = '${password}'" + } else { + $create_script2 = $create_script1 + } - if $superuser { - $create_script = "${create_script2} SUPERUSER" + 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_script = "${create_script2} NOSUPERUSER" + $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}" @@ -48,7 +97,11 @@ require => Exec['::cassandra::schema connection test'], } } elsif $ensure == absent { - $delete_script = "DROP USER ${user_name}" + 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})": diff --git a/metadata.json b/metadata.json index 394ba290..6b5f3316 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "locp-cassandra", - "version": "2.4.1", + "version": "2.6.0", "author": "locp", "summary": "Installs Cassandra & DataStax Agent on RHEL/Ubuntu/Debian.", "license": "Apache-2.0", diff --git a/spec/acceptance/bootstrap_spec.rb b/spec/acceptance/bootstrap_spec.rb index b887d4ab..c92fd61d 100644 --- a/spec/acceptance/bootstrap_spec.rb +++ b/spec/acceptance/bootstrap_spec.rb @@ -2,7 +2,7 @@ osfamily = fact('osfamily') roles = hosts[0]['roles'] -t = TestManifests.new(roles, 0) +t = TestManifests.new(roles, 0, 0) bootstrap_pp = t.bootstrap_pp() describe 'Test Entry Criteria' do diff --git a/spec/acceptance/cassandra_spec.rb b/spec/acceptance/cassandra_spec.rb index 7cff55f0..14ec230a 100644 --- a/spec/acceptance/cassandra_spec.rb +++ b/spec/acceptance/cassandra_spec.rb @@ -8,7 +8,7 @@ versions.push(3.0) if roles.include? 'cassandra3' versions.each do |version| - t = TestManifests.new(roles, version) + t = TestManifests.new(roles, version, fact('operatingsystemmajrelease')) describe "Cassandra #{version} installation." do # firewall_pp = t.firewall_pp() diff --git a/spec/acceptance/nodesets/archlinux-2-x64.yml b/spec/acceptance/nodesets/archlinux-2-x64.yml new file mode 100644 index 00000000..89b63003 --- /dev/null +++ b/spec/acceptance/nodesets/archlinux-2-x64.yml @@ -0,0 +1,13 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + archlinux-2-x64: + roles: + - master + platform: archlinux-2-x64 + box: archlinux/archlinux + hypervisor: vagrant +CONFIG: + type: foss diff --git a/spec/acceptance/nodesets/centos-511-x64.yml b/spec/acceptance/nodesets/centos-511-x64.yml new file mode 100644 index 00000000..089d646a --- /dev/null +++ b/spec/acceptance/nodesets/centos-511-x64.yml @@ -0,0 +1,15 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + centos-511-x64: + roles: + - master + platform: el-5-x86_64 + box: puppetlabs/centos-5.11-64-nocm + hypervisor: vagrant +CONFIG: + type: foss +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/centos-6-x64.yml b/spec/acceptance/nodesets/centos-6-x64.yml new file mode 100644 index 00000000..16abc8f1 --- /dev/null +++ b/spec/acceptance/nodesets/centos-6-x64.yml @@ -0,0 +1,15 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + centos-6-x64: + roles: + - master + platform: el-6-x86_64 + box: centos/6 + hypervisor: vagrant +CONFIG: + type: aio +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/centos-66-x64-pe.yml b/spec/acceptance/nodesets/centos-66-x64-pe.yml new file mode 100644 index 00000000..1e7aea6d --- /dev/null +++ b/spec/acceptance/nodesets/centos-66-x64-pe.yml @@ -0,0 +1,17 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + centos-66-x64: + roles: + - master + - database + - dashboard + platform: el-6-x86_64 + box: puppetlabs/centos-6.6-64-puppet-enterprise + hypervisor: vagrant +CONFIG: + type: pe +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/centos-7-x64.yml b/spec/acceptance/nodesets/centos-7-x64.yml new file mode 100644 index 00000000..e05a3ae1 --- /dev/null +++ b/spec/acceptance/nodesets/centos-7-x64.yml @@ -0,0 +1,15 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + centos-7-x64: + roles: + - master + platform: el-7-x86_64 + box: centos/7 + hypervisor: vagrant +CONFIG: + type: aio +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/debian-78-x64.yml b/spec/acceptance/nodesets/debian-78-x64.yml new file mode 100644 index 00000000..6ef6de8c --- /dev/null +++ b/spec/acceptance/nodesets/debian-78-x64.yml @@ -0,0 +1,15 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + debian-78-x64: + roles: + - master + platform: debian-7-amd64 + box: puppetlabs/debian-7.8-64-nocm + hypervisor: vagrant +CONFIG: + type: foss +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/debian-82-x64.yml b/spec/acceptance/nodesets/debian-82-x64.yml new file mode 100644 index 00000000..9897a8fc --- /dev/null +++ b/spec/acceptance/nodesets/debian-82-x64.yml @@ -0,0 +1,15 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + debian-82-x64: + roles: + - master + platform: debian-8-amd64 + box: puppetlabs/debian-8.2-64-nocm + hypervisor: vagrant +CONFIG: + type: foss +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/debian7.yml b/spec/acceptance/nodesets/debian7.yml index a832f440..42e728f1 100644 --- a/spec/acceptance/nodesets/debian7.yml +++ b/spec/acceptance/nodesets/debian7.yml @@ -1,15 +1,14 @@ ---- -CONFIG: +--- +CONFIG: log_level: notice type: foss -HOSTS: - debian7: - docker_image_commands: +HOSTS: + debian7: + docker_image_commands: - "apt-get install -y wget" hypervisor: docker image: "debian:7" platform: debian-7-amd64 - roles: + roles: - cassandra2 - - cassandra3 - firewall diff --git a/spec/acceptance/nodesets/docker/centos-5.yml b/spec/acceptance/nodesets/docker/centos-5.yml new file mode 100644 index 00000000..c17bc3d0 --- /dev/null +++ b/spec/acceptance/nodesets/docker/centos-5.yml @@ -0,0 +1,19 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + centos-5-x64: + platform: el-5-x86_64 + hypervisor: docker + image: centos:5 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'yum install -y crontabs initscripts iproute openssl sysvinit-tools tar wget which' + - 'sed -i -e "/mingetty/d" /etc/inittab' +CONFIG: + trace_limit: 200 + masterless: true +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/docker/centos-6.yml b/spec/acceptance/nodesets/docker/centos-6.yml new file mode 100644 index 00000000..d93f884c --- /dev/null +++ b/spec/acceptance/nodesets/docker/centos-6.yml @@ -0,0 +1,20 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + centos-6-x64: + platform: el-6-x86_64 + hypervisor: docker + image: centos:6 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'rm -rf /var/run/network/*' + - 'yum install -y crontabs initscripts iproute openssl sysvinit-tools tar wget which' + - 'rm /etc/init/tty.conf' +CONFIG: + trace_limit: 200 + masterless: true +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/docker/centos-7.yml b/spec/acceptance/nodesets/docker/centos-7.yml new file mode 100644 index 00000000..41e924b5 --- /dev/null +++ b/spec/acceptance/nodesets/docker/centos-7.yml @@ -0,0 +1,19 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + centos-7-x64: + platform: el-7-x86_64 + hypervisor: docker + image: centos:7 + docker_preserve_image: true + docker_cmd: '["/usr/sbin/init"]' + docker_image_commands: + - 'yum install -y crontabs initscripts iproute openssl sysvinit-tools tar wget which ss' + - 'systemctl mask getty@tty1.service' +CONFIG: + trace_limit: 200 + masterless: true +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/docker/debian-7.yml b/spec/acceptance/nodesets/docker/debian-7.yml new file mode 100644 index 00000000..071acbf9 --- /dev/null +++ b/spec/acceptance/nodesets/docker/debian-7.yml @@ -0,0 +1,19 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + debian-7-x64: + platform: debian-7-amd64 + hypervisor: docker + image: debian:7 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'echo deb http://ftp.debian.org/debian wheezy-backports main >> /etc/apt/sources.list' + - 'apt-get update && apt-get install -y cron locales-all net-tools wget' +CONFIG: + trace_limit: 200 + masterless: true +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/docker/debian-8.yml b/spec/acceptance/nodesets/docker/debian-8.yml new file mode 100644 index 00000000..7a1f35c3 --- /dev/null +++ b/spec/acceptance/nodesets/docker/debian-8.yml @@ -0,0 +1,21 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + debian-8-x64: + platform: debian-8-amd64 + hypervisor: docker + image: debian:8 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'echo deb http://ftp.debian.org/debian jessie-backports main >> /etc/apt/sources.list' + - 'apt-get update && apt-get install -y cron locales-all net-tools wget' + - 'rm -f /usr/sbin/policy-rc.d' + - 'systemctl mask getty@tty1.service getty-static.service' +CONFIG: + trace_limit: 200 + masterless: true +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/docker/ubuntu-12.04.yml b/spec/acceptance/nodesets/docker/ubuntu-12.04.yml new file mode 100644 index 00000000..ab77cda4 --- /dev/null +++ b/spec/acceptance/nodesets/docker/ubuntu-12.04.yml @@ -0,0 +1,19 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + ubuntu-1204-x64: + platform: ubuntu-12.04-amd64 + hypervisor: docker + image: ubuntu:12.04 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'apt-get install -y net-tools wget' + - 'locale-gen en_US.UTF-8' +CONFIG: + trace_limit: 200 + masterless: true +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/docker/ubuntu-14.04.yml b/spec/acceptance/nodesets/docker/ubuntu-14.04.yml new file mode 100644 index 00000000..ae453044 --- /dev/null +++ b/spec/acceptance/nodesets/docker/ubuntu-14.04.yml @@ -0,0 +1,21 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + ubuntu-1404-x64: + platform: ubuntu-14.04-amd64 + hypervisor: docker + image: ubuntu:14.04 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'rm /usr/sbin/policy-rc.d' + - 'rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl' + - 'apt-get install -y net-tools wget apt-transport-https' + - 'locale-gen en_US.UTF-8' +CONFIG: + trace_limit: 200 + masterless: true +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/docker/ubuntu-16.04.yml b/spec/acceptance/nodesets/docker/ubuntu-16.04.yml new file mode 100644 index 00000000..2d173c5b --- /dev/null +++ b/spec/acceptance/nodesets/docker/ubuntu-16.04.yml @@ -0,0 +1,19 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + ubuntu-1604-x64: + platform: ubuntu-16.04-amd64 + hypervisor: docker + image: ubuntu:16.04 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'apt-get install -y net-tools wget locales apt-transport-https' + - 'locale-gen en_US.UTF-8' +CONFIG: + trace_limit: 200 + masterless: true +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/ec2/amazonlinux-2016091.yml b/spec/acceptance/nodesets/ec2/amazonlinux-2016091.yml new file mode 100644 index 00000000..19dd43ed --- /dev/null +++ b/spec/acceptance/nodesets/ec2/amazonlinux-2016091.yml @@ -0,0 +1,31 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +# +# Additional ~/.fog config file with AWS EC2 credentials +# required. +# +# see: https://github.com/puppetlabs/beaker/blob/master/docs/how_to/hypervisors/ec2.md +# +# Amazon Linux is not a RHEL clone. +# +HOSTS: + amazonlinux-2016091-x64: + roles: + - master + platform: centos-6-x86_64 + hypervisor: ec2 + # refers to image_tempaltes.yaml AMI[vmname] entry: + vmname: amazonlinux-2016091-eu-central-1 + # refers to image_tempaltes.yaml entry inside AMI[vmname][:image]: + snapshot: aio + # t2.micro is free tier eligible (https://aws.amazon.com/en/free/): + amisize: t2.micro + # required so that beaker sanitizes sshd_config and root authorized_keys: + user: ec2-user +CONFIG: + type: aio + :ec2_yaml: spec/acceptance/nodesets/ec2/image_templates.yaml +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/ec2/image_templates.yaml b/spec/acceptance/nodesets/ec2/image_templates.yaml new file mode 100644 index 00000000..e50593ee --- /dev/null +++ b/spec/acceptance/nodesets/ec2/image_templates.yaml @@ -0,0 +1,34 @@ +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +# +# see also: https://github.com/puppetlabs/beaker/blob/master/docs/how_to/hypervisors/ec2.md +# +# Hint: image IDs (ami-*) for the same image are different per location. +# +AMI: + # Amazon Linux AMI 2016.09.1 (HVM), SSD Volume Type + amazonlinux-2016091-eu-central-1: + :image: + :aio: ami-af0fc0c0 + :region: eu-central-1 + # Red Hat Enterprise Linux 7.3 (HVM), SSD Volume Type + rhel-73-eu-central-1: + :image: + :aio: ami-e4c63e8b + :region: eu-central-1 + # SUSE Linux Enterprise Server 12 SP2 (HVM), SSD Volume Type + sles-12sp2-eu-central-1: + :image: + :aio: ami-c425e4ab + :region: eu-central-1 + # Ubuntu Server 16.04 LTS (HVM), SSD Volume Type + ubuntu-1604-eu-central-1: + :image: + :aio: ami-fe408091 + :region: eu-central-1 + # Microsoft Windows Server 2016 Base + windows-2016-base-eu-central-1: + :image: + :aio: ami-88ec20e7 + :region: eu-central-1 diff --git a/spec/acceptance/nodesets/ec2/rhel-73-x64.yml b/spec/acceptance/nodesets/ec2/rhel-73-x64.yml new file mode 100644 index 00000000..7fac8236 --- /dev/null +++ b/spec/acceptance/nodesets/ec2/rhel-73-x64.yml @@ -0,0 +1,29 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +# +# Additional ~/.fog config file with AWS EC2 credentials +# required. +# +# see: https://github.com/puppetlabs/beaker/blob/master/docs/how_to/hypervisors/ec2.md +# +HOSTS: + rhel-73-x64: + roles: + - master + platform: el-7-x86_64 + hypervisor: ec2 + # refers to image_tempaltes.yaml AMI[vmname] entry: + vmname: rhel-73-eu-central-1 + # refers to image_tempaltes.yaml entry inside AMI[vmname][:image]: + snapshot: aio + # t2.micro is free tier eligible (https://aws.amazon.com/en/free/): + amisize: t2.micro + # required so that beaker sanitizes sshd_config and root authorized_keys: + user: ec2-user +CONFIG: + type: aio + :ec2_yaml: spec/acceptance/nodesets/ec2/image_templates.yaml +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/ec2/sles-12sp2-x64.yml b/spec/acceptance/nodesets/ec2/sles-12sp2-x64.yml new file mode 100644 index 00000000..8542154d --- /dev/null +++ b/spec/acceptance/nodesets/ec2/sles-12sp2-x64.yml @@ -0,0 +1,29 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +# +# Additional ~/.fog config file with AWS EC2 credentials +# required. +# +# see: https://github.com/puppetlabs/beaker/blob/master/docs/how_to/hypervisors/ec2.md +# +HOSTS: + sles-12sp2-x64: + roles: + - master + platform: sles-12-x86_64 + hypervisor: ec2 + # refers to image_tempaltes.yaml AMI[vmname] entry: + vmname: sles-12sp2-eu-central-1 + # refers to image_tempaltes.yaml entry inside AMI[vmname][:image]: + snapshot: aio + # t2.micro is free tier eligible (https://aws.amazon.com/en/free/): + amisize: t2.micro + # required so that beaker sanitizes sshd_config and root authorized_keys: + user: ec2-user +CONFIG: + type: aio + :ec2_yaml: spec/acceptance/nodesets/ec2/image_templates.yaml +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/ec2/ubuntu-1604-x64.yml b/spec/acceptance/nodesets/ec2/ubuntu-1604-x64.yml new file mode 100644 index 00000000..9cf59d59 --- /dev/null +++ b/spec/acceptance/nodesets/ec2/ubuntu-1604-x64.yml @@ -0,0 +1,29 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +# +# Additional ~/.fog config file with AWS EC2 credentials +# required. +# +# see: https://github.com/puppetlabs/beaker/blob/master/docs/how_to/hypervisors/ec2.md +# +HOSTS: + ubuntu-1604-x64: + roles: + - master + platform: ubuntu-16.04-amd64 + hypervisor: ec2 + # refers to image_tempaltes.yaml AMI[vmname] entry: + vmname: ubuntu-1604-eu-central-1 + # refers to image_tempaltes.yaml entry inside AMI[vmname][:image]: + snapshot: aio + # t2.micro is free tier eligible (https://aws.amazon.com/en/free/): + amisize: t2.micro + # required so that beaker sanitizes sshd_config and root authorized_keys: + user: ubuntu +CONFIG: + type: aio + :ec2_yaml: spec/acceptance/nodesets/ec2/image_templates.yaml +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/ec2/windows-2016-base-x64.yml b/spec/acceptance/nodesets/ec2/windows-2016-base-x64.yml new file mode 100644 index 00000000..0932e29c --- /dev/null +++ b/spec/acceptance/nodesets/ec2/windows-2016-base-x64.yml @@ -0,0 +1,29 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +# +# Additional ~/.fog config file with AWS EC2 credentials +# required. +# +# see: https://github.com/puppetlabs/beaker/blob/master/docs/how_to/hypervisors/ec2.md +# +HOSTS: + windows-2016-base-x64: + roles: + - master + platform: windows-2016-64 + hypervisor: ec2 + # refers to image_tempaltes.yaml AMI[vmname] entry: + vmname: windows-2016-base-eu-central-1 + # refers to image_tempaltes.yaml entry inside AMI[vmname][:image]: + snapshot: aio + # t2.micro is free tier eligible (https://aws.amazon.com/en/free/): + amisize: t2.micro + # required so that beaker sanitizes sshd_config and root authorized_keys: + user: ec2-user +CONFIG: + type: aio + :ec2_yaml: spec/acceptance/nodesets/ec2/image_templates.yaml +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/fedora-24-x64.yml b/spec/acceptance/nodesets/fedora-24-x64.yml new file mode 100644 index 00000000..820b62d2 --- /dev/null +++ b/spec/acceptance/nodesets/fedora-24-x64.yml @@ -0,0 +1,15 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + fedora-24-x64: + roles: + - master + platform: fedora-24-x86_64 + box: fedora/24-cloud-base + hypervisor: vagrant +CONFIG: + type: aio +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/fedora-25-x64.yml b/spec/acceptance/nodesets/fedora-25-x64.yml new file mode 100644 index 00000000..60ae0117 --- /dev/null +++ b/spec/acceptance/nodesets/fedora-25-x64.yml @@ -0,0 +1,18 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +# +# platform is fedora 24 because there is no +# puppet-agent for fedora 25 by 2016-12-30 +HOSTS: + fedora-25-x64: + roles: + - master + platform: fedora-25-x86_64 + box: fedora/25-cloud-base + hypervisor: vagrant +CONFIG: + type: aio +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/ubuntu-server-1204-x64.yml b/spec/acceptance/nodesets/ubuntu-server-1204-x64.yml new file mode 100644 index 00000000..29102c56 --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-server-1204-x64.yml @@ -0,0 +1,15 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + ubuntu-server-1204-x64: + roles: + - master + platform: ubuntu-12.04-amd64 + box: puppetlabs/ubuntu-12.04-64-nocm + hypervisor: vagrant +CONFIG: + type: foss +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml b/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml new file mode 100644 index 00000000..054e6588 --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml @@ -0,0 +1,15 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + ubuntu-server-1404-x64: + roles: + - master + platform: ubuntu-14.04-amd64 + box: puppetlabs/ubuntu-14.04-64-nocm + hypervisor: vagrant +CONFIG: + type: foss +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/ubuntu-server-1604-x64.yml b/spec/acceptance/nodesets/ubuntu-server-1604-x64.yml new file mode 100644 index 00000000..bc85e0e8 --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-server-1604-x64.yml @@ -0,0 +1,15 @@ +--- +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +HOSTS: + ubuntu-server-1604-x64: + roles: + - master + platform: ubuntu-16.04-amd64 + box: puppetlabs/ubuntu-16.04-64-nocm + hypervisor: vagrant +CONFIG: + type: foss +... +# vim: syntax=yaml diff --git a/spec/classes/apache_repo_spec.rb b/spec/classes/apache_repo_spec.rb new file mode 100644 index 00000000..7d462126 --- /dev/null +++ b/spec/classes/apache_repo_spec.rb @@ -0,0 +1,78 @@ +require 'spec_helper' +describe 'cassandra::apache_repo' do + let(:pre_condition) do + [ + 'class apt () {}', + 'class apt::update () {}', + 'define apt::key ($id, $source) {}', + 'define apt::source ($location, $comment, $release, $include) {}' + ] + end + + context 'On a RedHat OS with defaults for all parameters' do + let :facts do + { + osfamily: 'RedHat' + } + end + + let :params do + { + release: '311x' + } + end + + it do + should have_resource_count(1) + + should contain_class('cassandra::apache_repo').only_with( + 'descr' => 'Repo for Apache Cassandra', + 'key_id' => 'A26E528B271F19B9E5D8E19EA278B781FE4B2BDA', + 'key_url' => 'https://www.apache.org/dist/cassandra/KEYS', + 'release' => '311x' + ) + + should contain_yumrepo('cassandra_apache').with( + ensure: 'present', + descr: 'Repo for Apache Cassandra', + baseurl: 'http://www.apache.org/dist/cassandra/redhat/311x', + enabled: 1, + gpgcheck: 1, + gpgkey: 'https://www.apache.org/dist/cassandra/KEYS' + ) + end + end + + context 'On a Debian OS with defaults for all parameters' do + let :facts do + { + osfamily: 'Debian', + lsbdistid: 'Ubuntu', + lsbdistrelease: '14.04' + } + end + + it do + should have_resource_count(3) + should contain_class('apt') + should contain_class('apt::update') + + should contain_apt__key('apache.cassandra').with( + id: 'A26E528B271F19B9E5D8E19EA278B781FE4B2BDA', + source: 'https://www.apache.org/dist/cassandra/KEYS' + ) + + should contain_apt__source('cassandra.sources').with( + location: 'http://www.apache.org/dist/cassandra/debian', + comment: 'Repo for Apache Cassandra', + release: 'main', + include: { 'src' => false } + ).that_notifies('Exec[update-apache-cassandra-repo]') + + should contain_exec('update-apache-cassandra-repo').with( + refreshonly: true, + command: '/bin/true' + ) + end + end +end diff --git a/spec/classes/coverage_spec.rb b/spec/classes/coverage_spec.rb new file mode 100644 index 00000000..de446548 --- /dev/null +++ b/spec/classes/coverage_spec.rb @@ -0,0 +1,4 @@ +require 'rspec-puppet' + +at_exit { RSpec::Puppet::Coverage.report! } +# vim: syntax=ruby diff --git a/spec/classes/datastax_agent_spec.rb b/spec/classes/datastax_agent_spec.rb index 660181e7..199adfff 100644 --- a/spec/classes/datastax_agent_spec.rb +++ b/spec/classes/datastax_agent_spec.rb @@ -26,7 +26,6 @@ should contain_class('cassandra::datastax_agent').only_with( 'defaults_file' => '/etc/default/datastax-agent', - 'java_home' => nil, 'package_ensure' => 'present', 'package_name' => 'datastax-agent', 'service_ensure' => 'running', diff --git a/spec/classes/datastax_repo_spec.rb b/spec/classes/datastax_repo_spec.rb index 60adf73b..d45e7b43 100644 --- a/spec/classes/datastax_repo_spec.rb +++ b/spec/classes/datastax_repo_spec.rb @@ -23,7 +23,6 @@ 'descr' => 'DataStax Repo for Apache Cassandra', 'key_id' => '7E41C00F85BFC1706C4FFFB3350200F2B999A372', 'key_url' => 'http://debian.datastax.com/debian/repo_key', - 'pkg_url' => nil, 'release' => 'stable' ) diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index 9184038e..ecd65fd9 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -74,7 +74,6 @@ config_path: '/etc/cassandra/default.conf', data_file_directories_mode: '0750', dc: 'DC1', - dc_suffix: nil, fail_on_non_supported_os: true, hints_directory_mode: '0750', package_ensure: 'present', @@ -83,7 +82,6 @@ rackdc_tmpl: 'cassandra/cassandra-rackdc.properties.erb', saved_caches_directory_mode: '0750', service_enable: true, - # service_ensure: nil, service_name: 'cassandra', service_provider: nil, service_refresh: true, @@ -140,7 +138,7 @@ unless: '/sbin/chkconfig --list cassandra' ) .that_requires('Package[cassandra]') - .that_comes_before('Service[cassandra]') + .that_comes_before('Service[cassandra]') end end diff --git a/spec/classes/schema_spec.rb b/spec/classes/schema_spec.rb index 5d9867fb..9d8bbd45 100644 --- a/spec/classes/schema_spec.rb +++ b/spec/classes/schema_spec.rb @@ -28,8 +28,7 @@ cqlsh_host: 'localhost', cqlsh_password: nil, cqlsh_port: 9042, - cqlsh_user: 'cassandra', - keyspaces: []) + cqlsh_user: 'cassandra') read_command = '/usr/bin/cqlsh -e \'DESC KEYSPACES\' localhost 9042' diff --git a/spec/default_facts.yml b/spec/default_facts.yml new file mode 100644 index 00000000..13c41657 --- /dev/null +++ b/spec/default_facts.yml @@ -0,0 +1,14 @@ +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config +# +# use default_module_facts.yaml for module specific +# facts. +# +# Hint if using with rspec-puppet-facts ("on_supported_os.each"): +# if a same named fact exists in facterdb it will be overridden. +--- +concat_basedir: "/tmp" +ipaddress: "172.16.254.254" +is_pe: false +macaddress: "AA:AA:AA:AA:AA:AA" diff --git a/spec/defines/schema/user_spec.rb b/spec/defines/schema/user_spec.rb index 15037128..e50fbe03 100644 --- a/spec/defines/schema/user_spec.rb +++ b/spec/defines/schema/user_spec.rb @@ -12,11 +12,12 @@ ] end - context 'Create a user' do + context 'Create a supper user on cassandrarelease undef' do let :facts do { operatingsystemmajrelease: 7, - osfamily: 'RedHat' + osfamily: 'RedHat', + cassandrarelease: nil } end @@ -37,11 +38,140 @@ end end - context 'Drop a user' do + context 'Create a supper user in cassandrarelease < 2.2' do let :facts do { operatingsystemmajrelease: 7, - osfamily: 'RedHat' + osfamily: 'RedHat', + cassandrarelease: '2.0.1' + } + end + + let(:title) { 'akers' } + + let(:params) do + { + password: 'Niner2', + superuser: true + } + end + + it do + should contain_cassandra__schema__user('akers').with_ensure('present') + should contain_exec('Create user (akers)').with( + command: '/usr/bin/cqlsh -e "CREATE USER IF NOT EXISTS akers WITH PASSWORD \'Niner2\' SUPERUSER" localhost 9042' + ) + end + end + + context 'Create a user in cassandrarelease < 2.2' do + let :facts do + { + operatingsystemmajrelease: 7, + osfamily: 'RedHat', + cassandrarelease: '2.0.1' + } + end + + let(:title) { 'akers' } + + let(:params) do + { + password: 'Niner2' + } + end + + it do + should contain_cassandra__schema__user('akers').with_ensure('present') + should contain_exec('Create user (akers)').with( + command: '/usr/bin/cqlsh -e "CREATE USER IF NOT EXISTS akers WITH PASSWORD \'Niner2\' NOSUPERUSER" localhost 9042' + ) + end + end + + context 'Create a supper user with login in cassandrarelease > 2.2' do + let :facts do + { + operatingsystemmajrelease: 7, + osfamily: 'RedHat', + cassandrarelease: '3.0.9' + } + end + + let(:title) { 'akers' } + + let(:params) do + { + password: 'Niner2', + superuser: true + } + end + + it do + should contain_cassandra__schema__user('akers').with_ensure('present') + should contain_exec('Create user (akers)').with( + command: '/usr/bin/cqlsh -e "CREATE ROLE IF NOT EXISTS akers WITH PASSWORD = \'Niner2\' AND SUPERUSER = true AND LOGIN = true" localhost 9042' + ) + end + end + + context 'Create a user without login in cassandrarelease > 2.2' do + let :facts do + { + operatingsystemmajrelease: 7, + osfamily: 'RedHat', + cassandrarelease: '3.0.9' + } + end + + let(:title) { 'bob' } + + let(:params) do + { + password: 'kaZe89a', + login: false + } + end + + it do + should contain_cassandra__schema__user('bob').with_ensure('present') + should contain_exec('Create user (bob)').with( + command: '/usr/bin/cqlsh -e "CREATE ROLE IF NOT EXISTS bob WITH PASSWORD = \'kaZe89a\'" localhost 9042' + ) + end + end + + context 'Drop a user in cassandrarelease > 2.2' do + let :facts do + { + operatingsystemmajrelease: 7, + osfamily: 'RedHat', + cassandrarelease: '3.0.9' + } + end + + let(:title) { 'akers' } + + let(:params) do + { + password: 'Niner2', + ensure: 'absent' + } + end + + it do + should contain_exec('Delete user (akers)').with( + command: '/usr/bin/cqlsh -e "DROP ROLE akers" localhost 9042' + ) + end + end + + context 'Drop a user in cassandrarelease < 2.2' do + let :facts do + { + operatingsystemmajrelease: 7, + osfamily: 'RedHat', + cassandrarelease: '2.0.2' } end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 674fe088..cdd49359 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,160 +1,31 @@ -require 'rubygems' -require 'rspec-puppet' -require 'rspec-puppet-utils' require 'puppetlabs_spec_helper/module_spec_helper' -require 'simplecov' -require 'coveralls' unless ENV['TRAVIS'] == 'true' - -Coveralls.wear! unless ENV['TRAVIS'] == 'true' -fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures')) - -RSpec.configure do |config| - config.module_path = File.join(fixture_path, 'modules') - config.manifest_dir = File.join(fixture_path, 'manifests') - config.tty = true - config.mock_with :rspec - config.raise_errors_for_deprecations! - - config.before(:each) do - MockFunction.new('concat') do |f| - f.stubbed.returns([8888, 22]) - f.stubbed.with([], '/etc/cassandra') - .returns(['/etc/cassandra']) - f.stubbed.with([], '/etc/cassandra/default.conf') - .returns(['/etc/cassandra/default.conf']) - f.stubbed.with(['/etc/cassandra'], '/etc/cassandra/default.conf') - .returns(['/etc/cassandra', '/etc/cassandra/default.conf']) - end - - MockFunction.new('count') do |f| - f.stubbed.with( - [ - 'COMPACT STORAGE', - 'ID=\'5a1c395e-b41f-11e5-9f22-ba0be0483c18\'' - ] - ).returns(2) - end - - MockFunction.new('create_ini_settings', type: :statement) do |f| - end - - MockFunction.new('delete') do |f| - f.stubbed.with( - { - 'keyspace_class' => 'NetworkTopologyStrategy', - 'dc1' => '3', - 'dc2' => '2' - }, - 'keyspace_class' - ).returns('dc1' => '3', 'dc2' => '2') - f.stubbed.with('userid text, username FROZEN, emails set, top_scores list, todo map, COLLECTION-TYPE tuple, PRIMARY KEY (userid)', 'COLLECTION-TYPE ').returns('userid text, username FROZEN, emails set, top_scores list, todo map, tuple, PRIMARY KEY (userid)') - end - - MockFunction.new('is_array') do |f| - f.stubbed.with('').returns(false) - f.stubbed.with(['/var/lib/cassandra/data']).returns(true) - end - - MockFunction.new('is_hash') do |f| - f.stubbed.with('').returns(false) - end - - MockFunction.new('join') do |f| - f.stubbed.with(['firstname text', 'lastname text'], ', ') - .returns('firstname text, lastname text') - f.stubbed.with( - { - '\'dc1\': ' => '3', - '\'dc2\': ' => '2' - }, - ', ' - ).returns('\'dc1\': 3, \'dc2\': 2') - f.stubbed.with( - [ - 'COMPACT STORAGE', 'ID=\'5a1c395e-b41f-11e5-9f22-ba0be0483c18\'' - ], ' AND ' - ).returns("COMPACT STORAGE AND ID='5a1c395e-b41f-11e5-9f22-ba0be0483c18'") - f.stubbed.with( - [ - 'userid text', 'username FROZEN', 'emails set', - 'top_scores list', 'todo map', - 'COLLECTION-TYPE tuple', 'PRIMARY KEY (userid)' - ], ', ' - ).returns('userid text, username FROZEN, emails set, top_scores list, todo map, COLLECTION-TYPE tuple, PRIMARY KEY (userid)') - end - - MockFunction.new('join_keys_to_values') do |f| - f.stubbed.with({ 'firstname' => 'text', 'lastname' => 'text' }, ' ') - .returns(['firstname text', 'lastname text']) - f.stubbed.with( - { - '\'dc1' => '3', - '\'dc2' => '2' - }, - '\': ' - ).returns('\'dc1\': ' => '3', '\'dc2\': ' => '2') - f.stubbed.with( - { - 'userid' => 'text', 'username' => 'FROZEN', - 'emails' => 'set', 'top_scores' => 'list', - 'todo' => 'map', - 'COLLECTION-TYPE' => 'tuple', - 'PRIMARY KEY' => '(userid)' - }, ' ' - ).returns( - [ - 'userid text', 'username FROZEN', 'emails set', - 'top_scores list', 'todo map', - 'COLLECTION-TYPE tuple', 'PRIMARY KEY (userid)' - ] - ) - end - - MockFunction.new('merge') do |f| - end - - MockFunction.new('prefix') do |f| - f.stubbed.with(['0.0.0.0/0'], - '200_Public_').returns('200_Public_0.0.0.0/0') - f.stubbed.with(['0.0.0.0/0'], - '210_InterNode_').returns('210_InterNode__0.0.0.0/0') - f.stubbed.with(['0.0.0.0/0'], - '220_Client_').returns('220_Client__0.0.0.0/0') - f.stubbed.with( - { - 'dc1' => '3', - 'dc2' => '2' - }, '\'' - ).returns('\'dc1' => '3', '\'dc2' => '2') - end - - MockFunction.new('upcase') do |f| - f.stubbed.with('ALL').returns('ALL') - f.stubbed.with('ALTER').returns('ALTER') - f.stubbed.with('AUTHORIZE').returns('AUTHORIZE') - f.stubbed.with('CREATE').returns('CREATE') - f.stubbed.with('DROP').returns('DROP') - f.stubbed.with('MODIFY').returns('MODIFY') - f.stubbed.with('SELECT').returns('SELECT') - f.stubbed.with('field').returns('FIELD') - f.stubbed.with('forty9ers').returns('FORTY9ERS') - f.stubbed.with('ravens').returns('ravens') - end - - MockFunction.new('size') do |f| - f.stubbed.returns(42) - end - - MockFunction.new('strftime') do |f| - f.stubbed.with('/var/lib/cassandra-%F') - .returns('/var/lib/cassandra-YYYY-MM-DD') - end - - MockFunction.new('validate_hash', type: :statement) do |f| - end +require 'rspec-puppet-facts' +include RspecPuppetFacts + +if Dir.exist?(File.expand_path('../../lib', __FILE__)) + require 'coveralls' + require 'simplecov' + require 'simplecov-console' + SimpleCov.formatters = [ + SimpleCov::Formatter::HTMLFormatter, + SimpleCov::Formatter::Console + ] + SimpleCov.start do + track_files 'lib/**/*.rb' + add_filter '/spec' + add_filter '/vendor' + add_filter '/.vendor' end +end - config.after(:suite) do - exit(1) if RSpec::Puppet::Coverage.report!(100) - end +RSpec.configure do |c| + default_facts = { + puppetversion: Puppet.version, + facterversion: Facter.version + } + default_facts.merge!(YAML.load(File.read(File.expand_path('../default_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_facts.yml', __FILE__)) + default_facts.merge!(YAML.load(File.read(File.expand_path('../default_module_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_module_facts.yml', __FILE__)) + c.default_facts = default_facts end + +# vim: syntax=ruby diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 29961094..2f975154 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -2,7 +2,7 @@ require 'pry' class TestManifests - def initialize(roles, version) + def initialize(roles, version, operatingsystemmajrelease) # Instance variables @roles = roles @version = version @@ -12,13 +12,13 @@ def initialize(roles, version) elsif version == 2.2 init22 elsif version == 3.0 - init30 + init30(operatingsystemmajrelease) end end def init21 @debian_release = '21x' - @debian_package_ensure = '2.1.17' + @debian_package_ensure = '2.1.18' @redhat_package_ensure = '2.1.15-1' @cassandra_optutils_package = 'cassandra21-tools' @cassandra_package = 'cassandra21' @@ -26,18 +26,27 @@ def init21 def init22 @debian_release = '22x' - @debian_package_ensure = '2.2.9' + @debian_package_ensure = '2.2.10' @redhat_package_ensure = '2.2.8-1' @cassandra_optutils_package = 'cassandra22-tools' @cassandra_package = 'cassandra22' end - def init30 + def init30(operatingsystemmajrelease) @debian_release = '30x' - @debian_package_ensure = '3.0.13' - @redhat_package_ensure = '3.0.9-1' - @cassandra_optutils_package = 'cassandra30-tools' - @cassandra_package = 'cassandra30' + @debian_package_ensure = '3.0.14' + print "operatingsystemmajrelease := #{operatingsystemmajrelease}" + + if operatingsystemmajrelease == '6' + @redhat_package_ensure = '3.0.9-1' + @cassandra_optutils_package = 'cassandra30-tools' + @cassandra_package = 'cassandra30' + else + @redhat_release = '30x' + @redhat_package_ensure = '3.0.14-1' + @cassandra_optutils_package = 'cassandra-tools' + @cassandra_package = 'cassandra' + end end def bootstrap_pp @@ -53,7 +62,7 @@ def bootstrap_pp logoutput => true, } - notify { "${::operatingsystem}-${::operatingsystemmajrelease}": } + notify { "${::hostname}:${::operatingsystem}-${::operatingsystemmajrelease}": } file { '/etc/dse': ensure => directory, @@ -67,7 +76,10 @@ def bootstrap_pp 'centos-6': { package { ['gcc', 'tar', 'yum-utils', 'centos-release-scl']: } -> exec { 'yum-config-manager --enable rhel-server-rhscl-7-rpms': } -> - package { ['ruby200', 'python27']: } -> + package { 'ruby200': } -> + package { 'python27-python': + ensure => '2.7.8-18.el6', + } -> exec { 'cp /opt/rh/python27/enable /etc/profile.d/python.sh': } -> exec { 'echo "\n" >> /etc/profile.d/python.sh': } -> exec { 'echo "export PYTHONPATH=/usr/lib/python2.7/site-packages" >> /etc/profile.d/python.sh': } -> @@ -118,9 +130,20 @@ class { 'cassandra::apache_repo': $cassandra_package = 'cassandra' $cassandra_optutils_package = 'cassandra-tools' } else { - class { 'cassandra::datastax_repo': - before => Class['cassandra', 'cassandra::optutils'], + if #{@version} >= 3.0 and $::operatingsystemmajrelease >= 7 { + yumrepo { 'datastax': + ensure => absent, + } -> + class { 'cassandra::apache_repo': + release => '#{@redhat_release}', + before => Class['cassandra', 'cassandra::optutils'], + } + } else { + class { 'cassandra::datastax_repo': + before => Class['cassandra', 'cassandra::optutils'], + } } + $package_ensure = '#{@redhat_package_ensure}' $cassandra_package = '#{@cassandra_package}' $cassandra_optutils_package = '#{@cassandra_optutils_package}' @@ -153,16 +176,6 @@ class { 'cassandra': } } - ## No longer required now using Apache Cassandra - # if $::lsbdistid == 'Ubuntu' { - # if $::operatingsystemmajrelease >= 16 { - # # Workarounds for amonst other things CASSANDRA-11850 - # Exec { - # environment => [ 'CQLSH_NO_BUNDLED=TRUE' ] - # } - # } - # } - class { 'cassandra::optutils': package_ensure => $package_ensure, package_name => $cassandra_optutils_package, @@ -371,6 +384,15 @@ class { 'cassandra::schema': 'spillman' => { password => 'Niner27', }, + 'bob' => { + password => 'kaZe89a', + login => false, + }, + 'john' => { + superuser => true, + password => 'kaZe89a', + login => true, + }, }, } EOS diff --git a/spec/unit/facter/cassandracmsheapnewsize_spec.rb b/spec/unit/facter/cassandracmsheapnewsize_spec.rb index 710d0206..a77b58ba 100644 --- a/spec/unit/facter/cassandracmsheapnewsize_spec.rb +++ b/spec/unit/facter/cassandracmsheapnewsize_spec.rb @@ -9,7 +9,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('2.1.11.969') + .and_return('2.1.11.969') expect(Facter.fact(:cassandrarelease).value).to eql('2.1.11') expect(Facter.fact(:cassandramajorversion).value).to eql(2) expect(Facter.fact(:cassandraminorversion).value).to eql(1) @@ -21,7 +21,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('3.0.1') + .and_return('3.0.1') expect(Facter.fact(:cassandrarelease).value).to eql('3.0.1') expect(Facter.fact(:cassandramajorversion).value).to eql(3) expect(Facter.fact(:cassandraminorversion).value).to eql(0) @@ -33,7 +33,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('') + .and_return('') expect(Facter.fact(:cassandrarelease).value).to eql(nil) expect(Facter.fact(:cassandramajorversion).value).to eql(nil) expect(Facter.fact(:cassandraminorversion).value).to eql(nil) diff --git a/spec/unit/facter/cassandracmsmaxheapsize_spec.rb b/spec/unit/facter/cassandracmsmaxheapsize_spec.rb index 710d0206..a77b58ba 100644 --- a/spec/unit/facter/cassandracmsmaxheapsize_spec.rb +++ b/spec/unit/facter/cassandracmsmaxheapsize_spec.rb @@ -9,7 +9,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('2.1.11.969') + .and_return('2.1.11.969') expect(Facter.fact(:cassandrarelease).value).to eql('2.1.11') expect(Facter.fact(:cassandramajorversion).value).to eql(2) expect(Facter.fact(:cassandraminorversion).value).to eql(1) @@ -21,7 +21,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('3.0.1') + .and_return('3.0.1') expect(Facter.fact(:cassandrarelease).value).to eql('3.0.1') expect(Facter.fact(:cassandramajorversion).value).to eql(3) expect(Facter.fact(:cassandraminorversion).value).to eql(0) @@ -33,7 +33,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('') + .and_return('') expect(Facter.fact(:cassandrarelease).value).to eql(nil) expect(Facter.fact(:cassandramajorversion).value).to eql(nil) expect(Facter.fact(:cassandraminorversion).value).to eql(nil) diff --git a/spec/unit/facter/cassandraheapnewsize_spec.rb b/spec/unit/facter/cassandraheapnewsize_spec.rb index 710d0206..a77b58ba 100644 --- a/spec/unit/facter/cassandraheapnewsize_spec.rb +++ b/spec/unit/facter/cassandraheapnewsize_spec.rb @@ -9,7 +9,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('2.1.11.969') + .and_return('2.1.11.969') expect(Facter.fact(:cassandrarelease).value).to eql('2.1.11') expect(Facter.fact(:cassandramajorversion).value).to eql(2) expect(Facter.fact(:cassandraminorversion).value).to eql(1) @@ -21,7 +21,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('3.0.1') + .and_return('3.0.1') expect(Facter.fact(:cassandrarelease).value).to eql('3.0.1') expect(Facter.fact(:cassandramajorversion).value).to eql(3) expect(Facter.fact(:cassandraminorversion).value).to eql(0) @@ -33,7 +33,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('') + .and_return('') expect(Facter.fact(:cassandrarelease).value).to eql(nil) expect(Facter.fact(:cassandramajorversion).value).to eql(nil) expect(Facter.fact(:cassandraminorversion).value).to eql(nil) diff --git a/spec/unit/facter/cassandramajorversion_spec.rb b/spec/unit/facter/cassandramajorversion_spec.rb index 1db4160d..8e07b9b3 100644 --- a/spec/unit/facter/cassandramajorversion_spec.rb +++ b/spec/unit/facter/cassandramajorversion_spec.rb @@ -9,7 +9,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('2.1.11.969') + .and_return('2.1.11.969') expect(Facter.fact(:cassandrarelease).value).to eql('2.1.11') expect(Facter.fact(:cassandramajorversion).value).to eql(2) expect(Facter.fact(:cassandraminorversion).value).to eql(1) @@ -21,7 +21,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('3.0.1') + .and_return('3.0.1') expect(Facter.fact(:cassandrarelease).value).to eql('3.0.1') expect(Facter.fact(:cassandramajorversion).value).to eql(3) expect(Facter.fact(:cassandraminorversion).value).to eql(0) @@ -33,7 +33,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('') + .and_return('') expect(Facter.fact(:cassandrarelease).value).to eql(nil) expect(Facter.fact(:cassandramajorversion).value).to eql(nil) expect(Facter.fact(:cassandraminorversion).value).to eql(nil) diff --git a/spec/unit/facter/cassandramaxheapsize_spec.rb b/spec/unit/facter/cassandramaxheapsize_spec.rb index 710d0206..a77b58ba 100644 --- a/spec/unit/facter/cassandramaxheapsize_spec.rb +++ b/spec/unit/facter/cassandramaxheapsize_spec.rb @@ -9,7 +9,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('2.1.11.969') + .and_return('2.1.11.969') expect(Facter.fact(:cassandrarelease).value).to eql('2.1.11') expect(Facter.fact(:cassandramajorversion).value).to eql(2) expect(Facter.fact(:cassandraminorversion).value).to eql(1) @@ -21,7 +21,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('3.0.1') + .and_return('3.0.1') expect(Facter.fact(:cassandrarelease).value).to eql('3.0.1') expect(Facter.fact(:cassandramajorversion).value).to eql(3) expect(Facter.fact(:cassandraminorversion).value).to eql(0) @@ -33,7 +33,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('') + .and_return('') expect(Facter.fact(:cassandrarelease).value).to eql(nil) expect(Facter.fact(:cassandramajorversion).value).to eql(nil) expect(Facter.fact(:cassandraminorversion).value).to eql(nil) diff --git a/spec/unit/facter/cassandraminorversion_spec.rb b/spec/unit/facter/cassandraminorversion_spec.rb index 1db4160d..8e07b9b3 100644 --- a/spec/unit/facter/cassandraminorversion_spec.rb +++ b/spec/unit/facter/cassandraminorversion_spec.rb @@ -9,7 +9,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('2.1.11.969') + .and_return('2.1.11.969') expect(Facter.fact(:cassandrarelease).value).to eql('2.1.11') expect(Facter.fact(:cassandramajorversion).value).to eql(2) expect(Facter.fact(:cassandraminorversion).value).to eql(1) @@ -21,7 +21,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('3.0.1') + .and_return('3.0.1') expect(Facter.fact(:cassandrarelease).value).to eql('3.0.1') expect(Facter.fact(:cassandramajorversion).value).to eql(3) expect(Facter.fact(:cassandraminorversion).value).to eql(0) @@ -33,7 +33,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('') + .and_return('') expect(Facter.fact(:cassandrarelease).value).to eql(nil) expect(Facter.fact(:cassandramajorversion).value).to eql(nil) expect(Facter.fact(:cassandraminorversion).value).to eql(nil) diff --git a/spec/unit/facter/cassandrapatchversion_spec.rb b/spec/unit/facter/cassandrapatchversion_spec.rb index 1db4160d..8e07b9b3 100644 --- a/spec/unit/facter/cassandrapatchversion_spec.rb +++ b/spec/unit/facter/cassandrapatchversion_spec.rb @@ -9,7 +9,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('2.1.11.969') + .and_return('2.1.11.969') expect(Facter.fact(:cassandrarelease).value).to eql('2.1.11') expect(Facter.fact(:cassandramajorversion).value).to eql(2) expect(Facter.fact(:cassandraminorversion).value).to eql(1) @@ -21,7 +21,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('3.0.1') + .and_return('3.0.1') expect(Facter.fact(:cassandrarelease).value).to eql('3.0.1') expect(Facter.fact(:cassandramajorversion).value).to eql(3) expect(Facter.fact(:cassandraminorversion).value).to eql(0) @@ -33,7 +33,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('') + .and_return('') expect(Facter.fact(:cassandrarelease).value).to eql(nil) expect(Facter.fact(:cassandramajorversion).value).to eql(nil) expect(Facter.fact(:cassandraminorversion).value).to eql(nil) diff --git a/spec/unit/facter/cassandrarelease_spec.rb b/spec/unit/facter/cassandrarelease_spec.rb index 1db4160d..8e07b9b3 100644 --- a/spec/unit/facter/cassandrarelease_spec.rb +++ b/spec/unit/facter/cassandrarelease_spec.rb @@ -9,7 +9,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('2.1.11.969') + .and_return('2.1.11.969') expect(Facter.fact(:cassandrarelease).value).to eql('2.1.11') expect(Facter.fact(:cassandramajorversion).value).to eql(2) expect(Facter.fact(:cassandraminorversion).value).to eql(1) @@ -21,7 +21,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('3.0.1') + .and_return('3.0.1') expect(Facter.fact(:cassandrarelease).value).to eql('3.0.1') expect(Facter.fact(:cassandramajorversion).value).to eql(3) expect(Facter.fact(:cassandraminorversion).value).to eql(0) @@ -33,7 +33,7 @@ it do allow(Facter::Util::Resolution) .to receive(:exec).with('nodetool version') - .and_return('') + .and_return('') expect(Facter.fact(:cassandrarelease).value).to eql(nil) expect(Facter.fact(:cassandramajorversion).value).to eql(nil) expect(Facter.fact(:cassandraminorversion).value).to eql(nil)