nhc

pdk
NHC Puppet module

Trey Dockendorf

treydock

6,594 downloads

1,833 latest version

5.0 quality score

Version information

  • 2.0.3 (latest)
  • 2.0.0
  • 1.1.0
  • 1.0.2
  • 1.0.1
  • 1.0.0
released Dec 16th 2019
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x
  • Puppet >= 5.0.0 < 7.0.0
  • RedHat
    ,
    CentOS
    ,
    Scientific

Start using this module

Documentation

treydock/nhc — version 2.0.3 Dec 16th 2019

puppet-module-nhc

Puppet Forge Build Status

Table of Contents

  1. Overview
  2. Usage - Configuration options
  3. Reference - Parameter and detailed reference to all options
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Overview

This module manages the installation and configuration of LBNL Node Health CHeck (NHC).

Usage

Class: nhc

Configure a host with NHC.

include ::nhc

This is an example of using Hiera to define the default checks installed with NHC.

nhc::checks:
  - 'check_fs_mount_rw /tmp'
  - 'check_fs_mount_rw /'
  - 'check_fs_mount_rw /dev/pts '/(none|devpts)/' devpts'
  - 'check_ps_daemon sshd root'
  - 'check_ps_daemon provisiond root'
  - 'check_ps_daemon wulfd root'
  - 'check_ps_unauth_users log syslog'
  - 'check_ps_userproc_lineage log syslog'
  - 'check_ps_kswapd 1800000 100 log syslog'
  - 'check_hw_cpuinfo 2 8 8'
  - 'check_hw_physmem 1024 1073741824'
  - 'check_hw_swap 1 1073741824'
  - 'check_hw_mem 1024 1073741824'
  - 'check_hw_physmem_free 1'
  - 'check_hw_swap_free 1'
  - 'check_hw_mem_free 1'
  - 'check_hw_ib 40'
  - 'check_hw_gm myri0'
  - 'check_hw_eth eth1'

A Hash can also be used to define checks

nhc::checks:
  '*':
    - 'check_fs_mount_rw /tmp'
    - 'check_fs_mount_rw /'
    - 'check_fs_mount_rw /dev/pts '/(none|devpts)/' devpts'
  'foo.baz':
    - 'check_ps_daemon sshd root'
    - 'check_ps_daemon provisiond root'
    - 'check_ps_daemon wulfd root'
    - 'check_ps_unauth_users log syslog'
    - 'check_ps_userproc_lineage log syslog'
    - 'check_ps_kswapd 1800000 100 log syslog'
  'foo.bar':
    - 'check_hw_cpuinfo 2 8 8'
    - 'check_hw_physmem 1024 1073741824'
    - 'check_hw_swap 1 1073741824'
    - 'check_hw_mem 1024 1073741824'
    - 'check_hw_physmem_free 1'
    - 'check_hw_swap_free 1'
    - 'check_hw_mem_free 1'
    - 'check_hw_ib 40'
    - 'check_hw_gm myri0'
    - 'check_hw_eth eth1'

Defining settings that are for all hosts and a specific host:

nhc::settings:
  DF_FLAGS: '"-Tkal -xgpfs -xfuse"'
  DFI_FLAGS: '"-Tkal -xgpfs -xfuse"'
  MAX_SYS_UID: '999'
  NHC_RM: 'slurm'
nhc::settings_host:
  'c0001':
    PATH: '"$PATH:/some/other/sbin"'

This is an example of using a local yum repository to install NHC.

nhc::install_method: repo
nhc::repo_name: local-repo

This is an other example of using a custom package URL.

nhc::install_method: package
nhc::package_url: "https://example.com/lbnl-nhc-1.4.2-1.el7.custom.noarch.rpm"
nhc::package_name: "lbnl-nhc-1.4.2-1.el7.custom.noarch.rpm"

It's possible to install from source:

nhc::install_method: source

Reference

http://treydock.github.io/puppet-module-nhc/

Limitations

This module has been tested on:

  • CentOS/RedHat 6 x86_64
  • CentOS/RedHat 7 x86_64

Development

Testing

Testing requires the following dependencies:

  • rake
  • bundler

Install gem dependencies

bundle install

Run unit tests

bundle exec rake spec

If you have Vagrant >= 1.2.0 installed you can run system tests

bundle exec rake beaker