Skip to content

Commit

Permalink
Merge pull request #10 from benjamin-robertson/devmain
Browse files Browse the repository at this point in the history
Bump to version 2.0.0 - add support for 22.04 + other features and improvements
  • Loading branch information
benjamin-robertson authored Jun 8, 2023
2 parents f76e131 + 3aafe7e commit 8c22c28
Show file tree
Hide file tree
Showing 34 changed files with 608 additions and 178 deletions.
38 changes: 38 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# devcontainer


For format details, see https://aka.ms/devcontainer.json.

For config options, see the README at:
https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet

``` json
{
"name": "Puppet Development Kit (Community)",
"dockerFile": "Dockerfile",

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "bash",
}
}
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"puppet.puppet-vscode",
"rebornix.Ruby"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pdk --version",
}
```



16 changes: 5 additions & 11 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet
{
"name": "Puppet Development Kit (Community)",
"dockerFile": "Dockerfile",

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
"terminal.integrated.profiles.linux": {
"bash": {
"path": "bash",
}
}
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"puppet.puppet-vscode",
"rebornix.Ruby"
]

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pdk --version",
}
8 changes: 4 additions & 4 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ fixtures:
forge_modules:
stdlib:
repo: "puppetlabs/stdlib"
ref: "7.1.0"
ref: "8.6.0"
puppetlabs-yumrepo_core:
repo: "puppetlabs/yumrepo_core"
ref: "1.0.7"
ref: "2.0.0"
puppet-archive:
repo: "puppet/archive"
ref: "5.0.0"
puppetlabs-mysql:
repo: "puppetlabs/mysql"
ref: "11.0.2"
ref: "13.3.0"
puppetlabs-cron_core:
repo: "puppetlabs/cron_core"
ref: "1.0.5"
Expand All @@ -23,7 +23,7 @@ fixtures:
ref: "3.4.0"
puppetlabs-apache:
repo: "puppetlabs/apache"
ref: "6.2.0"
ref: "10.0.0"
puppet-snmp:
repo: "puppet/snmp"
ref: "5.1.1"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@
.project
.envrc
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
8 changes: 4 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ default:
- bundle -v
- bundle install --without system_tests --path vendor/bundle --jobs $(nproc)

syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop-Ruby 2.5.7-Puppet ~> 6:
validate lint check rubocop-Ruby 2.5.7-Puppet ~> 6:
stage: syntax
image: ruby:2.5.7
script:
- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
- bundle exec rake validate lint check rubocop
variables:
PUPPET_GEM_VERSION: '~> 6'

Expand All @@ -35,11 +35,11 @@ parallel_spec-Ruby 2.5.7-Puppet ~> 6:
variables:
PUPPET_GEM_VERSION: '~> 6'

syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop-Ruby 2.7.2-Puppet ~> 7:
validate lint check rubocop-Ruby 2.7.2-Puppet ~> 7:
stage: syntax
image: ruby:2.7.2
script:
- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
- bundle exec rake validate lint check rubocop
variables:
PUPPET_GEM_VERSION: '~> 7'

Expand Down
2 changes: 2 additions & 0 deletions .pdkignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
.project
.envrc
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
/appveyor.yml
/.editorconfig
/.fixtures.yml
/Gemfile
/.gitattributes
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require:
- rubocop-rspec
AllCops:
DisplayCopNames: true
TargetRubyVersion: '2.4'
TargetRubyVersion: '2.5'
Include:
- "**/*.rb"
Exclude:
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
fast_finish: true
include:
-
env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
env: CHECK="validate lint check rubocop"
stage: static
-
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@

All notable changes to this project will be documented in this file.

## Release 2.0.0

**Features**

- Added support for Ubuntu 22.04
- Bump PDK to 2.6.1
- Allow users to customise observium installation directory via 'install_dir' parameter.
- Allow users to specify mysql auth mechanism via 'auth_mechanism' parameter.
- Added observium snmp mib locations to snmp.conf. User can customise these via the 'mib_locations' and 'additional_mib_location' parameters.
- Added 'apache_custom_options' parameter to specify custom options for apache::vhost directory.
- Added 'apache_auth_require' parameter to specify Apache auth require
- Added ability to specify Apache error and access log location via parameter.

**Bugfixes**

- Updated GPG for OpenNMS yum repos. This was causing installations to fail on RHEL7 and 8. https://www.opennms.com/en/blog/2023-02-13-security-update-mandatory-gpg-key-rotation-for-meridian-and-horizon/

**Deprecations**

- Deprecated support for Ubuntu 18.04
- Dropped Puppet 6 support
- **Warning:** If upgrading puppetlabs-mysql from version <13 to version >= 13 may cause issues with existing mysql installations. Proceed with caution. This results in any Ubuntu 20.04 or later systems being switched from using mysql to mariadb uncleanly.

Thanks to https://github.com/i0dev for their efforts on this release :)

## Release 1.0.0

**Features**
Expand Down
34 changes: 22 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,31 @@ def location_for(place_or_version, fake_version = nil)
end
end

ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
minor_version = ruby_version_segments[0..1].join('.')

group :development do
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.3.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 2.8.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "puppet-module-posix-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.3.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.5.1', require: false if Gem::Requirement.create(['>= 3.0.0', '< 3.0.5']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.6.1', require: false if Gem::Requirement.create(['>= 3.1.0', '< 3.1.3']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.6.3', require: false if Gem::Requirement.create(['>= 3.2.0', '< 4.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "voxpupuli-puppet-lint-plugins", '~> 3.1', require: false
gem "facterdb", '~> 1.18', require: false
gem "metadata-json-lint", '>= 2.0.2', '< 4.0.0', require: false
gem "puppetlabs_spec_helper", '>= 3.0.0', '< 5.0.0', require: false
gem "rspec-puppet-facts", '~> 2.0', require: false
gem "codecov", '~> 0.2', require: false
gem "dependency_checker", '~> 0.2', require: false
gem "parallel_tests", '~> 3.4', require: false
gem "pry", '~> 0.10', require: false
gem "simplecov-console", '~> 0.5', require: false
gem "puppet-debugger", '~> 1.0', require: false
gem "rubocop", '= 1.6.1', require: false
gem "rubocop-performance", '= 1.9.1', require: false
gem "rubocop-rspec", '= 2.0.1', require: false
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
end
group :system_tests do
gem "puppet-module-posix-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
gem "puppet-module-win-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet_litmus", '< 1.0.0', require: false, platforms: [:ruby]
gem "serverspec", '~> 2.41', require: false
end

puppet_version = ENV['PUPPET_GEM_VERSION']
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,16 @@ I originally intended to provide an option of which version of Observium to inst

Tested with the following setups.

- PE 2019.8.4
- Puppet 6.19.1
- PE 2021.7.2
- Puppet 7.21.0
- RHEL
- 7
- 8
- Rocky
- 8
- Ubuntu
- 18.04 LTS
- 20.04 LTS
- 22.04 LTS

### RHEL specific limitations

Expand Down
Loading

0 comments on commit 8c22c28

Please sign in to comment.