From 1470be992a196b687aa1aa365365cccb57c38759 Mon Sep 17 00:00:00 2001 From: Trevor Vaughan Date: Tue, 2 Jul 2019 17:28:12 -0400 Subject: [PATCH] (SIMP-6796) Documentation Updates (#7) * Updated README.md * Added REFERENCE.md * Support puppetlabs-stdlib 6 * Dropped puppet 4 support SIMP-6796 #close --- .gitlab-ci.yml | 91 ++++++++++++++++---------------------------- .travis.yml | 33 ++++++---------- CHANGELOG | 8 +++- README.md | 43 ++++++++++++--------- REFERENCE.md | 44 +++++++++++++++++++++ manifests/config.pp | 2 +- manifests/init.pp | 6 +-- manifests/service.pp | 2 +- metadata.json | 6 +-- 9 files changed, 126 insertions(+), 109 deletions(-) create mode 100644 REFERENCE.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 63b2af8..2801fc0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,18 +1,15 @@ # The testing matrix considers ruby/puppet versions supported by SIMP and PE: # -# https://puppet.com/docs/pe/2019.0/component_versions_in_recent_pe_releases.html +# https://puppet.com/docs/pe/latest/overview/component_versions_in_recent_pe_releases.html # https://puppet.com/misc/puppet-enterprise-lifecycle -# https://puppet.com/docs/pe/2018.1/overview/getting_support_for_pe.html +# https://puppet.com/docs/pe/latest/overview/getting_support_for_pe.html#standard-releases-and-long-term-support-releases # ------------------------------------------------------------------------------ -# Release Puppet Ruby EOL -# SIMP 6.1 4.10.6 2.1.9 TBD -# SIMP 6.2 4.10.12 2.1.9 TBD -# SIMP 6.3 5.5.7 2.4.4 TBD*** -# PE 2018.1 5.5.8 2.4.4 2020-05 (LTS)*** +# release pup ruby eol +# SIMP 6.3 5.5.10 2.4.5 TBD*** +# PE 2018.1 5.5.8 2.4.5 2020-05 (LTS)*** # PE 2019.0 6.0 2.5.1 2019-08-31^^^ # -# *** = Modules created for SIMP 6.3+ are not required to support Puppet < 5.5 -# ^^^ = SIMP doesn't support 6 yet; tests are info-only and allowed to fail +# *** = Modules created for SIMP 6.3+ are not required to support Puppet < 4.10 --- stages: - 'sanity' @@ -65,18 +62,6 @@ variables: # Puppet Versions #----------------------------------------------------------------------- -.pup_4: &pup_4 - image: 'ruby:2.1' - variables: - PUPPET_VERSION: '~> 4.0' - MATRIX_RUBY_VERSION: '2.1' - -.pup_4_10: &pup_4_10 - image: 'ruby:2.1' - variables: - PUPPET_VERSION: '~> 4.10.4' - MATRIX_RUBY_VERSION: '2.1' - .pup_5: &pup_5 image: 'ruby:2.4' variables: @@ -84,15 +69,14 @@ variables: BEAKER_PUPPET_COLLECTION: 'puppet5' MATRIX_RUBY_VERSION: '2.4' -.pup_5_5_7: &pup_5_5_7 +.pup_5_5_10: &pup_5_5_10 image: 'ruby:2.4' variables: - PUPPET_VERSION: '5.5.7' + PUPPET_VERSION: '5.5.10' BEAKER_PUPPET_COLLECTION: 'puppet5' MATRIX_RUBY_VERSION: '2.4' .pup_6: &pup_6 - allow_failure: true image: 'ruby:2.5' variables: PUPPET_VERSION: '~> 6.0' @@ -151,10 +135,6 @@ sanity_checks: # Linting #----------------------------------------------------------------------- -pup4-lint: - <<: *pup_4 - <<: *lint_tests - pup5-lint: <<: *pup_5 <<: *lint_tests @@ -170,60 +150,55 @@ pup5-unit: <<: *pup_5 <<: *unit_tests -pup5.5.7-unit: - <<: *pup_5_5_7 - <<: *unit_tests - -pup4.10-unit: - <<: *pup_4_10 +pup5.5.10-unit: + <<: *pup_5_5_10 <<: *unit_tests pup6-unit: <<: *pup_6 <<: *unit_tests -# Acceptance Tests +# Acceptance tests # ============================================================================== -pup4.10: - <<: *pup_4_10 +pup5.5.10: + <<: *pup_5_5_10 <<: *acceptance_base script: - 'bundle exec rake beaker:suites' -pup4.10-fips: - <<: *pup_4_10 +pup5.5.10-fips: + <<: *pup_5_5_10 <<: *acceptance_base - <<: *only_with_SIMP_FULL_MATRIX script: - 'BEAKER_fips=yes bundle exec rake beaker:suites' -pup5.5.7: - <<: *pup_5_5_7 +pup5.5.10-oel-combined-x64: + <<: *pup_5_5_10 <<: *acceptance_base script: - - 'bundle exec rake beaker:suites' + - 'bundle exec rake beaker:suites[default,oel-combined-x64]' -pup5.5.7-fips: - <<: *pup_5_5_7 +pup5.5.10-oel-combined-x64-fips: + <<: *pup_5_5_10 <<: *acceptance_base + <<: *only_with_SIMP_FULL_MATRIX script: - - 'BEAKER_fips=yes bundle exec rake beaker:suites' + - 'BEAKER_fips=yes bundle exec rake beaker:suites[default,oel-combined-x64]' -pup5.5.7-oel: - <<: *pup_5_5_7 +pup6: + <<: *pup_6 <<: *acceptance_base script: - - 'bundle exec rake beaker:suites[default,oel]' + - 'bundle exec rake beaker:suites' -pup5.5.7-oel-fips: - <<: *pup_5_5_7 +pup6-fips: + <<: *pup_6 <<: *acceptance_base - <<: *only_with_SIMP_FULL_MATRIX script: - - 'BEAKER_fips=yes bundle exec rake beaker:suites[default,oel]' + - 'BEAKER_fips=yes bundle exec rake beaker:suites' -# pup5.5.7-compliance-fips: -# <<: *pup_5_5_7 -# <<: *compliance_tests -# script: -# - 'BEAKER_fips=yes bundle exec rake beaker:suites[compliance]' +pup6-compliance: + <<: *pup_6 + <<: *compliance_base + script: + - 'bundle exec rake beaker:suites[compliance]' diff --git a/.travis.yml b/.travis.yml index 4dcb309..8bdd5f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,15 +5,12 @@ # https://puppet.com/docs/pe/2018.1/overview/getting_support_for_pe.html # ------------------------------------------------------------------------------ # Release Puppet Ruby EOL -# SIMP 6.2 4.10 2.1.9 TBD -# PE 2016.4 4.10 2.1.9 2018-12-31 (LTS) -# PE 2017.3 5.3 2.4.4 2018-12-31 -# SIMP 6.3 5.5 2.4.4 TBD*** -# PE 2018.1 5.5 2.4.4 2020-05 (LTS)*** +# PE 2017.3 5.3 2.4.5 2018-12-31 +# SIMP 6.3 5.5 2.4.5 TBD*** +# PE 2018.1 5.5 2.4.5 2020-05 (LTS)*** # PE 2019.0 6.0 2.5.1 2019-08-31^^^ # # *** = Modules created for SIMP 6.3+ are not required to support Puppet < 5.5 -# ^^^ = SIMP doesn't support 6 yet; tests are info-only and allowed to fail --- language: ruby @@ -38,18 +35,16 @@ addons: before_install: - rm -f Gemfile.lock + - gem install -v '~> 1.17' bundler global: - STRICT_VARIABLES=yes jobs: - allow_failures: - - name: 'Latest Puppet 6.x (allowed to fail)' - include: - stage: check name: 'Syntax, style, and validation checks' - rvm: 2.4.4 + rvm: 2.4.5 env: PUPPET_VERSION="~> 5" script: - bundle exec rake check:dot_underscore @@ -61,22 +56,15 @@ jobs: - bundle exec rake lint - bundle exec puppet module build - - stage: spec - name: 'Puppet 4.10 (SIMP 6.2, PE 2016.4)' - rvm: 2.1.9 - env: PUPPET_VERSION="~> 4.10.0" - script: - - bundle exec rake spec - - stage: spec name: 'Puppet 5.3 (PE 2017.3)' - rvm: 2.4.4 + rvm: 2.4.5 env: PUPPET_VERSION="~> 5.3.0" script: - bundle exec rake spec - stage: spec - rvm: 2.4.4 + rvm: 2.4.5 name: 'Puppet 5.5 (SIMP 6.3, PE 2018.1)' env: PUPPET_VERSION="~> 5.5.0" script: @@ -84,25 +72,26 @@ jobs: - stage: spec name: 'Latest Puppet 5.x' - rvm: 2.4.4 + rvm: 2.4.5 env: PUPPET_VERSION="~> 5.0" script: - bundle exec rake spec - stage: spec - name: 'Latest Puppet 6.x (allowed to fail)' + name: 'Latest Puppet 6.x' rvm: 2.5.1 env: PUPPET_VERSION="~> 6.0" script: - bundle exec rake spec - stage: deploy - rvm: 2.4.4 + rvm: 2.4.5 script: - true before_deploy: - "export PUPMOD_METADATA_VERSION=`ruby -r json -e \"puts JSON.parse(File.read('metadata.json')).fetch('version')\"`" - '[[ $TRAVIS_TAG =~ ^simp-${PUPMOD_METADATA_VERSION}$|^${PUPMOD_METADATA_VERSION}$ ]]' + deploy: - provider: releases api_key: diff --git a/CHANGELOG b/CHANGELOG index c97fba2..65a25f5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,13 @@ +* Tue Jul 02 2019 Trevor Vaughan - 1.1.0-0 +- Updated README.md +- Added REFERENCE.md +- Support puppetlabs-stdlib 6 +- Dropped puppet 4 support + * Thu Mar 07 2019 Nicholas Markowski - 1.0.0-0 - Forked from cristifalcas/puppet-journald - Removed default options from API - Added SIMP assets - Updated Puppet dependency for hiera v5 support - Added inifile dependency in metadata, and updated stdlib version dependency -- Initial release +- Initial release diff --git a/README.md b/README.md index a03bcda..7b01696 100644 --- a/README.md +++ b/README.md @@ -6,25 +6,32 @@ #### Table of Contents -1. [Overview](#overview) -2. [Setup - The basics of getting started with journald](#setup) - * [Setup requirements](#setup-requirements) - * [Beginning with journald](#beginning-with-journald) -3. [Limitations - OS compatibility, etc.](#limitations) -4. [Development - Guide for contributing to the module](#development) + + +* [Overview](#overview) +* [Setup](#setup) + * [Beginning with journald](#beginning-with-journald) +* [Usage](#usage) +* [Limitations](#limitations) +* [Development](#development) + + ## Overview -systemd-journald is a system service that collects and stores logging data. -It creates and maintains structured, indexed journals based on logging information +`systemd-journald` is a system service that collects and stores logging data. + +It creates and maintains structured, indexed journals based on logging information that is received from a variety of sources: -* Kernel log messages, via kmsg -* Simple system log messages, via the libc syslog(3) call -* Structured system log messages via the native Journal API, see sd_journal_print(4) +* Kernel log messages, via `kmsg` +* Simple system log messages, via the `libc` `syslog(3)` call +* Structured system log messages via the native Journal API, see `sd_journal_print(4)` * Standard output and standard error of system services * Audit records, via the audit subsystem +See [REFERENCE.md](REFERENCE.md) for more details. + ## Setup ### Beginning with journald @@ -34,17 +41,17 @@ that is received from a variety of sources: ## Usage class {'journald': options => { - 'Compress' => 'yes', - 'ForwardToSyslog' => 'yes', - 'ForwardToKMsg' => 'yes', - 'ForwardToConsole' => 'no', - 'TTYPath' => '/dev/console', - } + 'Compress' => 'yes', + 'ForwardToSyslog' => 'yes', + 'ForwardToKMsg' => 'yes', + 'ForwardToConsole' => 'no', + 'TTYPath' => '/dev/console', + } } ## Limitations -This module is only appicable on EL7 machines +This module is only appicable on systems that run `journald` ## Development diff --git a/REFERENCE.md b/REFERENCE.md new file mode 100644 index 0000000..beeb580 --- /dev/null +++ b/REFERENCE.md @@ -0,0 +1,44 @@ +# Reference + + +## Table of Contents + +**Classes** + +* [`journald`](#journald): Manage the `journald` daemon +* [`journald::config`](#journaldconfig): Configure the `journald` service +* [`journald::service`](#journaldservice): Manage the `journald` service + +## Classes + +### journald + +Manage the `journald` daemon + +#### Parameters + +The following parameters are available in the `journald` class. + +##### `persist_log` + +Data type: `Boolean` + +By default, the journal stores log data in /run/log/journal/. +Since /run/ is volatile, log data is lost at reboot. To make the +data persistent, it is sufficient to create /var/log/journal/ +where systemd-journald will then store the data. + +##### `options` + +Data type: `Hash` + +A hash with journald parameters + +### journald::config + +Configure the `journald` service + +### journald::service + +Manage the `journald` service + diff --git a/manifests/config.pp b/manifests/config.pp index 5cb93c9..2565b3d 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,4 +1,4 @@ -# Class: journald::config +# @summary Configure the `journald` service # class journald::config { diff --git a/manifests/init.pp b/manifests/init.pp index 2d8280a..61fed74 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,8 +1,4 @@ -# Class: journald -# -# This module manages journald -# -# === Parameters: +# @summary Manage the `journald` daemon # # @param persist_log # By default, the journal stores log data in /run/log/journal/. diff --git a/manifests/service.pp b/manifests/service.pp index beebeb9..ca9a1f4 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -1,4 +1,4 @@ -# Class: journald::service +# @summary Manage the `journald` service # class journald::service { diff --git a/metadata.json b/metadata.json index e758a5e..4ddc4d8 100644 --- a/metadata.json +++ b/metadata.json @@ -1,7 +1,7 @@ { "name": "simp-journald", "author": "SIMP Team", - "version": "1.0.0", + "version": "1.1.0", "summary": "Configures journald on el7", "source": "git@github.com:simp/pupmod-simp-journald.git", "project_page": "https://github.com/simp/pupmod-simp-journald", @@ -13,7 +13,7 @@ "dependencies": [ { "name": "puppetlabs/stdlib", - "version_requirement": ">= 4.19.0 < 6.0.0" + "version_requirement": ">= 4.19.0 < 7.0.0" }, { "name": "puppetlabs/inifile", @@ -44,7 +44,7 @@ "requirements": [ { "name": "puppet", - "version_requirement": ">= 4.10.4 < 6.0.0" + "version_requirement": ">= 5.0.0 < 7.0.0" } ] }