Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Puppet 8 compatibility #178

Merged
merged 32 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ba0b5e0
Puppet 8 compatibility
tuxmea Feb 16, 2024
589677c
use Gemfile from voxpupuli
tuxmea May 22, 2024
a111ad3
Update github workflows (based on puppet-gitlab)
tuxmea Jun 3, 2024
8bca4a8
Ad dmore test files from puppet-gitlab
tuxmea Jun 3, 2024
de188b8
lint fixes
tuxmea Jun 3, 2024
2a66dc4
lint updates
tuxmea Jun 3, 2024
160f6e5
MD fixes
tuxmea Jun 3, 2024
4c1733a
refactor spec tests
tuxmea Jun 3, 2024
ff1f4b9
update REFERENCE
tuxmea Jun 3, 2024
875241b
use on_supported_os instead of self assigen os names
tuxmea Jun 3, 2024
99eee5b
rubocop
tuxmea Jun 3, 2024
f892695
revert new os tests to allow merge of puppet 8
tuxmea Jun 7, 2024
22e46d0
enable puppet 8 tests
tuxmea Jun 7, 2024
a929f74
Merge remote-tracking branch 'voxpupuli/master' into puppet8
tuxmea Jun 7, 2024
35fa0a6
rebase after modulesync
tuxmea Jun 7, 2024
e1fd394
remove ruby-lsp artefact
tuxmea Jun 7, 2024
c821684
rubocop cleanup
tuxmea Jun 7, 2024
2aa5800
remove outdated os add migrastion note, add badges
tuxmea Jun 7, 2024
e03dec5
remove old test suite
tuxmea Jun 7, 2024
3a75a20
no need to install modules on your own
tuxmea Jun 7, 2024
6b6cd7e
add missing configure_beaker
tuxmea Jun 7, 2024
e4c6eac
rubocop
tuxmea Jun 7, 2024
8636f3e
update module dependencies
tuxmea Jun 7, 2024
f453425
update module dependencies
tuxmea Jun 7, 2024
ba2e4f8
add missing directories to acceptance test
tuxmea Jun 7, 2024
e79827c
typo in dir name
tuxmea Jun 7, 2024
f830987
nfs::server::export needs strict dependenc to nfs::server:servcie class
tuxmea Jun 7, 2024
137bfc9
adopt acceptance test to local tests
tuxmea Jun 8, 2024
e8c8f95
disable serverspec tests for services
tuxmea Jun 9, 2024
8592a2f
rubocop
tuxmea Jun 9, 2024
9a7607c
remove unneeded files
tuxmea Jun 9, 2024
013b898
Merge branch 'master' into puppet8
tuxmea Jun 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@ fixtures:
concat: "https://github.com/puppetlabs/puppetlabs-concat.git"
augeasproviders_core: "https://github.com/voxpupuli/puppet-augeasproviders_core.git"
augeasproviders_shellvar: "https://github.com/voxpupuli/puppet-augeasproviders_shellvar.git"
augeas_core:
repo: "https://github.com/puppetlabs/puppetlabs-augeas_core.git"
puppet_version: ">= 6.0.0"
mount_core:
repo: "https://github.com/puppetlabs/puppetlabs-mount_core.git"
puppet_version: ">= 6.0.0"
augeas_core: "https://github.com/puppetlabs/puppetlabs-augeas_core.git"
mount_core: "https://github.com/puppetlabs/puppetlabs-mount_core.git"
transition: "https://github.com/puppetlabs/puppetlabs-transition.git"
symlinks:
"nfs": "#{source_dir}"
127 changes: 0 additions & 127 deletions .github/workflows/test-suite.yaml

This file was deleted.

8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
- ignore export root when bindmount is disabled
- use BEAKER_PUPPET_COLLECTION in all beaker tests
- do not include class by absolute name
- revert use of File without defined()
- revert use of File without defined()
- update rvm to 2.4.1 for PUPPET_VERSION 4.10.0

## 2019-02-12 - Release 2.1.2
### Summary

#### Features
- herculesteam-augeasprovides_shellvar has been updated to 3.0.0
- herculesteam-augeasprovides_shellvar has been updated to 3.0.0

## 2019-02-12 - Release 2.1.1
### Summary
Expand Down Expand Up @@ -130,7 +130,7 @@
- set $nfs_v4_idmap_domain to 'example.org' when $::domain is undef
- add client service rpcbind.socket for RedHat 7
- set client service rpcbind.service for RedHat 7 to enable => false
- fix service parameters for Debian 7
- fix service parameters for Debian 7

#### Features
- update rubocop rules and fix ruby code style
Expand All @@ -149,7 +149,7 @@
- add install locales on ubuntu-1604 docker for acceptance tests
- add missing documentation for client_services_enable
- reenable client_services_enable for CentOS/Redhat 7
- remove rpc.idmapd from $client_nfsv4_services for Archlinux
- remove rpc.idmapd from $client_nfsv4_services for Archlinux
- rename rpc.idmapd to nfs-idmapd in $server_nfsv4_servicehelper for archlinux
- update adn fix spec tests

Expand Down
61 changes: 35 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
# nfs

[![Build Status](https://github.com/voxpupuli/puppet-nfs/workflows/CI/badge.svg)](https://github.com/voxpupuli/puppet-nfs/actions?query=workflow%3ACI)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you pull the README.md cleanup into it's own PR? It's not really related to the puppet 8 implementation

[![Code Coverage](https://coveralls.io/repos/github/voxpupuli/puppet-nfs/badge.svg?branch=master)](https://coveralls.io/github/voxpupuli/puppet-nfs)
[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/nfs.svg)](https://forge.puppetlabs.com/puppet/nfs)
[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/nfs.svg)](https://forge.puppetlabs.com/puppet/nfs)
[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/nfs.svg)](https://forge.puppetlabs.com/puppet/nfs)
[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/nfs.svg)](https://forge.puppetlabs.com/puppet/nfs)

This module was migrated from Daniel Klockenkaemper <[email protected]> to Vox Pupuli.

#### Table of Contents
1. [Module Description - What the module does and why it is useful](#module-description)
2. [Setup - The basics of getting started with derdanne-nfs](#setup)
* [What derdanne-nfs affects](#what-derdanne-nfs-affects)
2. [Setup - The basics of getting started with puppet-nfs](#setup)
* [What puppet-nfs affects](#what-puppet-nfs-affects)
* [Setup requirements](#setup-requirements)
* [Beginning with derdanne-nfs](#beginning-with-derdanne-nfs)
* [Beginning with puppet-nfs](#beginning-with-puppet-nfs)
3. [Usage - Configuration options and additional functionality](#usage)
4. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
5. [Limitations - OS compatibility, etc.](#limitations)
Expand All @@ -24,10 +33,10 @@ and 'client_enabled'. It also has some dependencies on newer stdlib functions li

It supports the OS Families Ubuntu, Debian, Redhat, SUSE, Gentoo and Archlinux. It supports also Strict Variables, so if you pass all
OS specific parameters correctly it should work on your preferred OS too. Feedback, bugreports,
and feature requests are always welcome, visit https://github.com/derdanne/puppet-nfs or send me an email.
and feature requests are always welcome, visit https://github.com/voxpupuli/puppet-nfs or send me an email.

When you are using a puppet version 3.x like it is shipped with Redhat Satellite 6, please use a version 1.x.x from puppet forge
or the branch puppet3 when cloning directly from Github. (Note: https://github.com/derdanne/puppet-nfs/pull/49#issuecomment-285091678).
When you are using a puppet version 3.x like it is shipped with Redhat Satellite 6, please use a version 1.x.x from puppet forge
or the branch puppet3 when cloning directly from Github. (Note: https://github.com/voxpupuli/puppet-nfs/pull/49#issuecomment-285091678).
I'll recommend using puppet >= 4.6.1, puppet versions up until 4.6.0 had various issues.

If you want to contribute, please do a fork on github, create a branch "feature name" with your
Expand All @@ -40,18 +49,18 @@ Warning: I've introduced new dependencies with version 2.1.0 which were needed t

## Setup

### What derdanne-nfs affects
### What puppet-nfs affects

This module can be used to configure your nfs client and/or server, it could export
nfs mount resources via storeconfigs or simply mount nfs shares on a client. You can
This module can be used to configure your nfs client and/or server, it could export
nfs mount resources via storeconfigs or simply mount nfs shares on a client. You can
also easily use the create_resources function when you store your exports i.e. via hiera.

### Setup requirements

This Module depends on puppetlabs-stdlib >= 4.5.0 and puppetlabs-concat >= 1.1.2, you need to
have these modules installed to use derdanne-nfs module.
have these modules installed to use puppet-nfs module.

### Beginning with derdanne-nfs
### Beginning with puppet-nfs

On a nfs server the following code is sufficient to get all packages installed and services
running to use nfs:
Expand Down Expand Up @@ -110,7 +119,7 @@ This will mount /data on client in /share/data.
nfs_v4_client => true,
nfs_v4_idmap_domain => $::domain,
}

nfs::client::mount { '/share/data':
server => '192.168.0.1',
share => 'data',
Expand Down Expand Up @@ -368,26 +377,26 @@ This will mount /data on client in /share/data.
**Puppet:**

```puppet

node server {
hiera_include('classes')
$nfs_exports_global = hiera_hash('nfs::nfs_exports_global', false)

$defaults_nfs_exports = {
ensure => 'mounted',
clients => '192.168.0.0/24(rw,insecure,no_subtree_check,async,no_root_squash)',
nfstag => $::fqdn,
}

if $nfs_exports_global {
create_resources('::nfs::server::export', $nfs_exports_global, $defaults_nfs_exports)
}
}

node client {
hiera_include('classes')
$nfs_server = hiera('nfs::nfs_server', false)

if $nfs_server {
Nfs::Client::Mount <<| nfstag == $nfs_server |>>
}
Expand Down Expand Up @@ -611,7 +620,7 @@ This will mount /data on client in /share/data.
String. 'Nobody-User' option for idmapd. Defaults to <tt>nobody</tt>.

##### `nfs_v4_idmap_nobody_group`
String. 'Nobody-Group' option for idmapd. Defaults to <tt>nobody</tt> or <tt>nogroup</tt>.
String. 'Nobody-Group' option for idmapd. Defaults to <tt>nobody</tt> or <tt>nogroup</tt>.

##### `client_rpcbind_config`
String. It defines the location of the file with the rpcbind config.
Expand Down Expand Up @@ -681,18 +690,18 @@ This will mount /data on client in /share/data.
##### `bind`
String. Sets the bind options setted in /etc/fstab for the bindmounts created.
Defaults to <tt>rbind</tt>. When you have any submounts in your exported folders,
the rbind option will submount them in the bindmount folder. You have to set the
the rbind option will submount them in the bindmount folder. You have to set the
 `crossmnt` option in your nfs export to have the submounts from rbind available
on your client. Your export should look like this:

```puppet
node client {
nfs::server::export { '/home':
ensure => 'mounted',
clients => '*(rw,insecure,no_subtree_check,async,no_root_squash,crossmnt)',
}
}
```
```

##### `ensure`
String. If enabled the mount will be created. Defaults to <tt>mounted</tt>
Expand Down Expand Up @@ -746,19 +755,19 @@ puppet > 3.2.0
augeas

## Limitations
If you want to have specific package versions installed you may manage the needed packages outside of this
If you want to have specific package versions installed you may manage the needed packages outside of this
module (use manage_packages => false). It is only tested to use 'present', 'installed', 'absent',
'purged', 'held' and 'latest' as argument for the parameters server_package_ensure and client_package_ensure.

## Development

Derdanne modules are open projects. So if you want to make this module even better,
you can contribute to this module on [Github](https://github.com/derdanne/puppet-nfs).
you can contribute to this module on [Github](https://github.com/voxpupuli/puppet-nfs).

Before pushing PRs to Github i would recommend you to test your work locally. So you can ensure all test builds
on Travis CI were passing. I have prepared an easy way to test your code locally with the help of Docker.
on Travis CI were passing. I have prepared an easy way to test your code locally with the help of Docker.

For running the complete static code analysis, it is sufficient to run a `make test-all`.
For running the complete static code analysis, it is sufficient to run a `make test-all`.

### Default settings

Expand Down Expand Up @@ -790,7 +799,7 @@ You can run the following commands to setup and run the testsuite on your local

#### `make build`

Build a docker image with a Ruby version which is not available on Docker hub. Check out
Build a docker image with a Ruby version which is not available on Docker hub. Check out
`https://hub.docker.com/r/derdanne/rvm/` to see if i have already prepared a rvm build for the ruby version
you want to test. Take a look at the Dockerfile located in `spec/local-testing` if you want to customize
your builds.
Expand Down
Loading