Skip to content

Commit

Permalink
(SIMP-2971) Add $simp_options::package_ensure (#13)
Browse files Browse the repository at this point in the history
SIMP-2971 #comment update tuned
  • Loading branch information
Nick Miller authored and lnemsick-simp committed Oct 15, 2018
1 parent 4577cea commit 28f265b
Show file tree
Hide file tree
Showing 14 changed files with 171 additions and 60 deletions.
4 changes: 2 additions & 2 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
fixtures:
repositories:
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
simplib: "https://github.com/simp/pupmod-simp-simplib.git"
stdlib: https://github.com/puppetlabs/puppetlabs-stdlib.git
simplib: https://github.com/simp/pupmod-simp-simplib.git
symlinks:
tuned: "#{source_dir}"
4 changes: 0 additions & 4 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
--log-format="%{path}:%{line}:%{check}:%{KIND}:%{message}"
--relative
--no-class_inherits_from_params_class-check
--no-140chars-check
--no-trailing_comma-check
# This is here because the code can't handle lookups in parameters and we have
# a LOT of those
--no-parameter_order-check
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ before_install:
jobs:
include:
- stage: check
rvm: 2.4.1
rvm: 2.4.4
env: STRICT_VARIABLES=yes TRUSTED_NODE_DATA=yes PUPPET_VERSION="~> 5"
script:
- bundle exec rake check:dot_underscore
Expand All @@ -37,7 +37,7 @@ jobs:
- bundle exec puppet module build

- stage: spec
rvm: 2.4.1
rvm: 2.4.4
env: STRICT_VARIABLES=yes TRUSTED_NODE_DATA=yes PUPPET_VERSION="~> 5.0"
script:
- bundle exec rake spec
Expand All @@ -49,7 +49,7 @@ jobs:
- bundle exec rake spec

- stage: deploy
rvm: 2.4.1
rvm: 2.4.4
script:
- true
before_deploy:
Expand All @@ -69,5 +69,4 @@ jobs:
secure: "AdSG+4L1HbJBTdEry4ldAvdfdicqzQPcgO23lePoPyovdkfrondNNcGAS8kRI9nBzdjEPX/OmiINmJaC9pWgItchOsjvI2HdrW4Eap8rZaheGN8jhzhGUd7a9/mjLACBYmCupneLFn8/ckogejXFEQfquaHOEuK4LDxZ++0txf6LrImbFxkdHwW2W1bt7cT52yiGxTycB9MXxYGWX5cTH5aJeVDteVBVaTmhSRJy+zb5/rB+GR0Xv6T3/GF05sP1HC0FyPy5Z1QoB9AjdUU5f0ti0WGOScPHVXFQduOKRnvWZFrD/rRXGfozQbkkkEy/sxWGNeWhVJyeSufIQKUEbRJXg5GHdv1X+jDmCwY4Zvu2EGvTeLv1hXfnfuIs7ieLYYJIHTGR1I22cRVla4JR7QZpi0IKi+1lku0hLzAC7zOblZxHXzS0lB+u74heasa3GKY4ohX2Ap7yND9ZLmGxOdxLyDdEaw6ORi37c0wxy7Ek09E4OCLZs1Nw2iXczR1Geph41JkELzY0iaSuqD9iSnfYqhGH1iNYRTScsTPeJFmyfX139jOE4l7vNt8+cMPdjsi62SqTmAOM91tIDxp/md4nTkKOh5Jyh54VdeKB3co5ikcuLFkb1pOIMUZX+lonWbyrziknQXkAs/xheg+S0X0KfDtoiR5g5bZ99CzZ6kI="
on:
tags: true
rvm: 2.4.1
condition: '($SKIP_FORGE_PUBLISH != true)'
9 changes: 7 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
* Thu Sep 13 2018 Nicholas Markowski <[email protected]> - 0.0.3-0
* Fri Oct 12 2018 Nick Miller <[email protected]> - 0.1.0-0
- Added $package_ensure parameter
- Changed the package from 'latest' to 'installed'
- It will also respect `simp_options::package_ensure`

* Thu Sep 13 2018 Nicholas Markowski <[email protected]> - 0.1.0-0
- Added support for Puppet 5 and OEL

* Fri Sep 07 2018 Liz Nemsick <[email protected]> - 0.0.3-0
* Fri Sep 07 2018 Liz Nemsick <[email protected]> - 0.1.0-0
- Drop Hiera 4 support

* Thu Jul 06 2017 Liz Nemsick <[email protected]> - 0.0.2-0
Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTORS

This file was deleted.

3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ group :test do
gem 'puppet-strings'
gem 'puppet-lint-empty_string-check', :require => false
gem 'puppet-lint-trailing_comma-check', :require => false
gem 'simp-rspec-puppet-facts', ENV.fetch('SIMP_RSPEC_PUPPET_FACTS_VERSION', '~> 2.0')
gem 'simp-rspec-puppet-facts', ENV.fetch('SIMP_RSPEC_PUPPET_FACTS_VERSION', '~> 2.1')
gem 'simp-rake-helpers', ENV.fetch('SIMP_RAKE_HELPERS_VERSION', ['>= 5.2', '< 6.0'])
gem 'danger', :require => false
end

group :development do
gem 'puppet-blacksmith'
gem 'pry'
gem 'pry-byebug'
gem 'pry-doc'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ tuned::io_scheduler: cfq
## Reference
Please refer to the inline documentation within each source file, or to the module's generated YARD documentation for reference material.
Please refer to [REFERENCE.md](REFERENCE.md)
## Limitations
Expand Down
140 changes: 140 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# Reference
<!-- DO NOT EDIT: This document was generated by Puppet Strings -->

## Table of Contents

**Classes**

* [`tuned`](#tuned): Manages the activation of tuned The following options only affect 'tuned'

## Classes

### tuned

Manages the activation of tuned

The following options only affect 'tuned'

#### Parameters

The following parameters are available in the `tuned` class.

##### `use_sysctl`

Data type: `Boolean`

This is the custom sysctl configuration file. Set to false to
use only the ktune settings.

Default value: `true`

##### `use_sysctl_post`

Data type: `Boolean`

This is the ktune sysctl file. Any settings in this file will be applied
after custom settings, overriding them. Comment this out to not use ktune
settings.

Default value: `false`

##### `io_scheduler`

Data type: `Tuned::IoSchedule`

This is the I/O scheduler ktune will use. This will *not* override
anything explicitly set on the kernel command line, nor will it change
the scheduler for any block device that is using a non-default scheduler
when ktune starts. You should probably leave this on "deadline", but
"as", "cfq", and "noop" are also legal values.

Default value: 'deadline'

##### `elevator_tune_devs`

Data type: `Array[String]`

These are the devices, that should be tuned with the ELEVATOR

Default value: ['hd','sd','cciss']

##### `tuning_interval`

Data type: `Integer`

The number of seconds between tuning runs.

Default value: 10

##### `diskmonitor_enable`

Data type: `Boolean`

Enable the disk monitoring plugin.

Default value: `true`

##### `disktuning_enable`

Data type: `Boolean`

Enable the disk tuning plugin.

Default value: `true`

##### `disktuning_hdparm`

Data type: `Boolean`

Use 'hdparm' for disk tuning.

Default value: `true`

##### `disktuning_alpm`

Data type: `Boolean`

Use 'ALPM' when disk tuning.

Default value: `true`

##### `netmonitor_enable`

Data type: `Boolean`

Enable the network monitoring plugin.

Default value: `true`

##### `nettuning_enable`

Data type: `Boolean`

Enable the network tuning plugin.

Default value: `true`

##### `cpumonitor_enable`

Data type: `Boolean`

Enable the CPU monitoring plugin.

Default value: `true`

##### `cputuning_enable`

Data type: `Boolean`

Enable the CPU tuning plugin.

Default value: `true`

##### `package_ensure`

Data type: `String`

The ensure status of the tuned package

Default value: simplib::lookup('simp_options::package_ensure', { 'default_value' => 'installed' })

5 changes: 0 additions & 5 deletions build/rpm_metadata/requires

This file was deleted.

30 changes: 16 additions & 14 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,23 @@
# Enable the CPU monitoring plugin.
# @param cputuning_enable
# Enable the CPU tuning plugin.
# @param package_ensure The ensure status of the tuned package
#
class tuned (
Tuned::IoSchedule $io_scheduler = 'deadline',
Array[String] $elevator_tune_devs = ['hd','sd','cciss'],
Boolean $use_sysctl = true,
Boolean $use_sysctl_post = false,
Integer $tuning_interval = 10,
Boolean $diskmonitor_enable = true,
Boolean $disktuning_enable = true,
Boolean $disktuning_hdparm = true,
Boolean $disktuning_alpm = true,
Boolean $netmonitor_enable = true,
Boolean $nettuning_enable = true,
Boolean $cpumonitor_enable = true,
Boolean $cputuning_enable = true
Tuned::IoSchedule $io_scheduler = 'deadline',
Array[String] $elevator_tune_devs = ['hd','sd','cciss'],
Boolean $use_sysctl = true,
Boolean $use_sysctl_post = false,
Integer $tuning_interval = 10,
Boolean $diskmonitor_enable = true,
Boolean $disktuning_enable = true,
Boolean $disktuning_hdparm = true,
Boolean $disktuning_alpm = true,
Boolean $netmonitor_enable = true,
Boolean $nettuning_enable = true,
Boolean $cpumonitor_enable = true,
Boolean $cputuning_enable = true,
String $package_ensure = simplib::lookup('simp_options::package_ensure', { 'default_value' => 'installed' }),
) {

$ktune_name = 'tuned'
Expand Down Expand Up @@ -77,7 +79,7 @@
}

package { $ktune_name:
ensure => 'latest'
ensure => $package_ensure
}

service { $ktune_name:
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simp-tuned",
"version": "0.0.3",
"version": "0.1.0",
"author": "SIMP Team",
"summary": "A SIMP Puppet module for managing tuned/ktune",
"license": "Apache-2.0",
Expand Down
22 changes: 0 additions & 22 deletions spec/acceptance/nodesets/centos-combined-x64.yaml

This file was deleted.

1 change: 0 additions & 1 deletion spec/acceptance/nodesets/default.yaml

This file was deleted.

1 change: 0 additions & 1 deletion spec/acceptance/suites/default/nodesets

This file was deleted.

0 comments on commit 28f265b

Please sign in to comment.