Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
- Puppet >= 7.0.0 < 9.0.0
- , ,
Start using this module
Add this module to your Puppetfile:
mod 'treydock-mofed', '5.0.1'
Learn more about managing modules with a PuppetfileDocumentation
puppet-module-mofed
Table of Contents
- Overview
- Usage - Configuration options
- Reference - Parameter and detailed reference to all options
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
- TODO
- Additional Information
Overview
The MOFED Puppet module manages Mellanox OFED for Linux.
Usage
mofed
Install and configure MOFED from site specific yum repo server.
class { 'mofed':
repo_baseurl => 'http://example.com/mlnx/$releasever/3.4-2.0.0.0-rhel7.3/'
repo_gpgkey => 'http://example.com/mlnx/$releasever/3.4-2.0.0.0-rhel7.3/RPM-GPG-KEY-Mellanox',
}
mofed::interface
Add IPoIB interface
mofed::interface { 'ib0':
ensure => 'present',
ipaddr => '10.0.0.1',
netmask => '255.255.0.0',
connected_mode => 'no',
}
The same interface can be defined in Hiera if the mofed class is included
mofed::interfaces:
ib0:
ensure: 'present'
ipaddr: '10.0.0.1'
netmask: '255.255.0.0'
connected_mode: 'no'
mofed::opensm
Add opensm that is set for 2 ports.
class { 'mofed::opensm':
ports => ['mlx4_1 1', 'mlx4_1 2'],
}
mofed::srp
Add srp for 2 ports.
class { 'mofed::srp':
ports => ['mlx4_1 1', 'mlx4_1 2'],
}
Reference
http://treydock.github.io/puppet-module-mofed/
Facts
has_mellanox_infiniband
This boolean fact will return true
if the system has a Mellanox Infiniband card.
mellanox_ofed_version
Returns the Mellanox OFED version that is installed
infiniband_hcas
Moved to treydock/infiniband module
infiniband_hca_port_guids
Moved to treydock/infiniband module
Limitations
This module has been tested on:
- RedHat 7 x86_64
Development
Testing
Testing requires the following dependencies:
- rake
- bundler
Install gem dependencies
bundle install
Run unit tests
bundle exec rake test
If you have Vagrant >= 1.2.0 installed you can run system tests
bundle exec rake beaker
TODO
Further Information
Reference
Table of Contents
Classes
Public Classes
mofed
: Manage Mellanox OFEDmofed::opensm
: Manage OpenSMmofed::srp
: Manage SRP
Private Classes
mofed::config
mofed::install
mofed::repo
mofed::service
Defined types
mofed::interface
: Manage IPoIB interface
Classes
mofed
Manage Mellanox OFED
Examples
Basic usage using local yum repo for MOFED
class { 'mofed':
repo_baseurl => 'http://example.com/mlnx/$releasever/3.4-2.0.0.0-rhel7.3/'
repo_gpgkey => 'http://example.com/mlnx/$releasever/3.4-2.0.0.0-rhel7.3/RPM-GPG-KEY-Mellanox',
}
Parameters
The following parameters are available in the mofed
class:
manage_repo
repo_baseurl
repo_gpgcheck
repo_gpgkey
repo_exclude
repo_priority
manage_packages
package_ensure
package_name
extra_packages
extra_packages_hiera_merge
manage_service
restart_service
openibd_service_name
openibd_service_ensure
openibd_service_enable
openibd_service_hasstatus
openibd_service_hasrestart
manage_config
openib_config_path
openib_shellvars
interfaces
manage_repo
Data type: Boolean
Boolean to set if MOFED repo should be managed
Default value: true
repo_baseurl
Data type: Optional[String]
The baseurl of the yumrepo resource
Default value: undef
repo_gpgcheck
Data type: Enum['1','0']
The gpgcheck of the yumrepo resource
Default value: '1'
repo_gpgkey
Data type: Optional[String]
The gpgkey of the yumrepo resource
Default value: undef
repo_exclude
Data type: Optional[String]
The exclude of the yumrepo resource
Default value: undef
repo_priority
Data type: Optional[String]
The priority of the yumrepo resource
Default value: undef
manage_packages
Data type: Boolean
Boolean to determine if packages should be managed
Default value: true
package_ensure
Data type: String
The package ensure property
Default value: 'present'
package_name
Data type: String
The MOFED package name to install
Default value: 'mlnx-ofed-basic'
extra_packages
Data type: Optional[Array]
An array of additional packages to install
Default value: undef
extra_packages_hiera_merge
Data type: Boolean
Boolean that sets if extra_packages should have values merged from hiera
Default value: false
manage_service
Data type: Boolean
Boolean that determines if the openibd service should be managed
Default value: true
restart_service
Data type: Boolean
Boolean that sets of openibd should be restarted
Default value: false
openibd_service_name
Data type: String
Name of the openibd service
Default value: 'openibd'
openibd_service_ensure
Data type: String
openibd service ensure property
Default value: 'running'
openibd_service_enable
Data type: Boolean
openibd service enable property
Default value: true
openibd_service_hasstatus
Data type: Boolean
openibd service hasstatus property
Default value: true
openibd_service_hasrestart
Data type: Boolean
openibd service hasrestart property
Default value: true
manage_config
Data type: Boolean
Boolean that sets if configs should be managed
Default value: true
openib_config_path
Data type: Stdlib::Absolutepath
Path to openib.conf
Default value: '/etc/infiniband/openib.conf'
openib_shellvars
Data type: Hash
Hash of shellvar resources
Default value: {}
interfaces
Data type: Hash
Hash of mofed::interface resources
Default value: {}
mofed::opensm
Manage OpenSM
Examples
Manage OpenSM on two specific ports
class { 'mofed::opensm':
ports => ['mlx4_1 1', 'mlx4_1 2'],
}
Parameters
The following parameters are available in the mofed::opensm
class:
ensure
Data type: Enum['present', 'absent', 'disabled']
State of opensm. present
will run opensm.
disabled
will install and configure opensm but disable services.
absent
will remove opensm.
Default value: 'present'
ports
Data type: Array
Ports used by opensm
Default value: []
sweep
Data type: Integer
Value passsed to opensm -s
argument.
Default value: 10
mofed::srp
Manage SRP
Examples
Manage SRP for specific ports
class { 'mofed::srp':
ports => ['mlx4_1 1', 'mlx4_1 2'],
}
Parameters
The following parameters are available in the mofed::srp
class:
ensure
Data type: Enum['present', 'absent', 'disabled']
State of srp. present
will run opensm.
disabled
will install and configure opensm but disable services.
absent
will remove opensm.
Default value: 'present'
ports
Data type: Array
Ports used by srp daemon.
Default value: []
srp_daemon_config
Data type: Optional[Variant[String, Array]]
Define lines in srp_daemon.conf
Default value: undef
ib_srp_options
Data type: Optional[Hash[String, Variant[String,Integer], 1]]
Options passed to ib_srp kernel module
Default value: undef
Defined types
mofed::interface
Manage IPoIB interface
Examples
Add IPoIB interface
mofed::interface { 'ib0':
ensure => 'present',
ipaddr => '10.0.0.1',
netmask => '255.255.0.0',
connected_mode => 'no',
}
Parameters
The following parameters are available in the mofed::interface
defined type:
ipaddr
netmask
gateway
ensure
enable
nm_controlled
connected_mode
mtu
bonding
bonding_slaves
bonding_opts
ipaddr
Data type: Optional[Stdlib::IP::Address]
IP address, required when ensure=present
Default value: undef
netmask
Data type: Optional[Stdlib::IP::Address]
Netmask address, required when ensure=present
Default value: undef
gateway
Data type: Optional[Stdlib::IP::Address]
Gateway address.
Default value: undef
ensure
Data type: Enum['present', 'absent']
Interface ensure value.
Default value: 'present'
enable
Data type: Boolean
Boolean of whether to enable the interface at boot.
Default value: true
nm_controlled
Data type: Optional[Enum['yes','no']]
Value for nm_controlled on interface
Default value: undef
connected_mode
Data type: Enum['yes', 'no']
The value for setting interface to connected mode.
Default value: 'yes'
mtu
Data type: Optional[Integer]
The MTU of the interface.
Default value: undef
bonding
Data type: Boolean
If this interface is a bonding interface
Default value: false
bonding_slaves
Data type: Array[String]
Array of interfaces that should be enslaved in the bonding interface
Default value: []
bonding_opts
Data type: String
The bonding options to use for this bonding interface
Default value: 'mode=active-backup miimon=100'
Change log
All notable changes to this project will be documented in this file. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
v5.0.1 (2024-10-22)
Fixed
v5.0.0 (2024-10-22)
Changed
v4.0.0 (2024-10-07)
Changed
- Use puppet/network for network interface dependency #26 (treydock)
- Major updates - read description #25 (treydock)
v3.1.0 (2022-04-07)
Added
v3.0.0 (2021-05-19)
Changed
Added
v2.3.1 (2020-12-03)
Fixed
v2.3.0 (2020-12-02)
Added
v2.2.0 (2020-04-29)
Added
v2.1.0 (2020-04-03)
Added
v2.0.0 (2019-12-11)
Changed
Added
1.5.0 (2019-04-26)
Added
- Support only Puppet 5 and 6 and update module dependency ranges #10 (treydock)
- Move some infiniband facts to infiniband module #9 (treydock)
1.4.2 (2018-07-31)
Fixed
1.4.1 (2018-07-31)
Added
Fixed
1.4.0 (2018-07-18)
Added
1.3.0 (2018-05-18)
Added
Fixed
1.2.0 (2017-11-13)
Added
1.1.0 (2017-11-02)
Added
1.0.0 (2017-10-26)
0.0.1 (2017-10-26)
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/stdlib (>= 9.0.0 <10.0.0)
- puppet/augeasproviders_shellvar (>= 5.0.0 <7.0.0)
- puppet/systemd (>= 0.3.0 <8.0.0)
- saz/rsyslog (>= 3.5.0 <6.0.0)
- puppet/network (>= 2.1.0 <4.0.0)
Copyright (C) 2017 Trey Dockendorf treydock@gmail.com Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.