Skip to content

ComputeCanada/puppet-tuned

 
 

Repository files navigation

Puppet Tuned module

This module installs, configures and starts Tuned.

Requirements

Module has been tested on:

  • Puppet 5.5
  • RHEL/CentOS 6, 7

Required modules:

Quick Start

Setup

include tuned

Full configuration options:

class { 'tuned':
  enabled             => true|false,  # enable state
  profile             => '...',       # active profile
  dynamic_tuning      => true|false,  # enable dynamic tuning
  sleep_interval      => ...,         # check interval for new commands
  update_interval     => ...,         # update interval for dynamic tuning
  majversion          => ...,         # override detected tuned major version
  main_conf           => '...',       # override absolute path to tuned-main.conf
  profiles_path       => '...',       # override absolute path to custom profiles
  active_profile_conf => '...',       # override filename with active profile
  packages            => [...],       # override list of packages to install
  services            => [...],       # override list of services to start
}

Custom profile:

tuned::profile { 'name':
  ensure  => present|absent, # ensure state
  data    => {...},          # hash of hashes for tuned.conf
  scripts => {...},          # hash of scripts content into profile dir.
}

Data hash format is following:

{
  'section1' => {
    'key1' => 'value1',
    'key2' => 'value2'
  },
  'section2' => {
    'key1' => 'value1',
    'key2' => 'value2'
  },
  ...
}

Scripts hash format is following:

{
  'script_name1' => 'script content1',
  'script_name2' => 'script content2',
  ...
}

Example:

class { 'tuned':
  profile        => 'virtual-host-cfq',
  dynamic_tuning => false,
}

tuned::profile { 'virtual-host-cfq':
  ensure  => present,
  data    => {
    'main'   => { 'include'  => 'virtual-host', },
    'disk'   => { 'elevator' => 'cfq', },
    'script' => { 'script'   => 'dummy.sh', },
  },
  scripts => {
    'dummy.sh' => "#!/bin/bash\n/bin/true",
  },
}

Facts

tuned_version

Tries to detect installed Tuned version. E.g.:

"2.4.1"

or for versions 0.x

"unknown"

tuned_profile

Returns current active profile. E.g.:

"virtual-host-cfq"

tuned_profiles

Returns list of available profiles. E.g.:

["balanced", "desktop", "latency-performance", "network-latency",
 "network-throughput", "powersave", "throughput-performance",
 "virtual-guest", "virtual-host"]

Contributors


CERIT Scientific Cloud, [email protected]

About

Puppet module for Tuned

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 53.8%
  • Puppet 46.2%