From 7f87c517d975ae1ffec44d3e7915d98ea73181a4 Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 8 Oct 2022 13:39:24 +0200 Subject: [PATCH 01/21] Removed Centos 8 from tests EOL Removed in the-bastion v3.08.00 --- kitchen.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/kitchen.yml b/kitchen.yml index d8b132f..e78aa17 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -31,10 +31,6 @@ platforms: - name: debian-9 driver: image: dokken/debian-9 - - name: centos-8 - driver: - image: dokken/centos-8 - pid_one_command: /usr/lib/systemd/systemd - name: centos-7 driver: image: dokken/centos-7 From c52f4ff64bc92fb485a25c56189acaf94511eb89 Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 8 Oct 2022 13:39:51 +0200 Subject: [PATCH 02/21] Added Ubuntu 22.04 to tests Added in the-bastion v3.08.00 --- kitchen.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kitchen.yml b/kitchen.yml index e78aa17..9a89834 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -44,6 +44,9 @@ platforms: - name: ubuntu-20.04 driver: image: dokken/ubuntu-20.04 + - name: ubuntu-22.04 + driver: + image: dokken/ubuntu-22.04 - name: opensuse-leap-15 driver: image: dokken/opensuse-leap-15 From 1e2afd06ad55f7ff3fa4b56a0d2558f333e2226c Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 8 Oct 2022 13:43:09 +0200 Subject: [PATCH 03/21] Removed CentOS 7 from test suite It's EOL --- kitchen.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/kitchen.yml b/kitchen.yml index 9a89834..eb1fc34 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -31,10 +31,6 @@ platforms: - name: debian-9 driver: image: dokken/debian-9 - - name: centos-7 - driver: - image: dokken/centos-7 - pid_one_command: /usr/lib/systemd/systemd - name: ubuntu-16.04 driver: image: dokken/ubuntu-16.04 From a95181befbcd6f9e86ab97562c8851059a7c4e91 Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 8 Oct 2022 13:44:04 +0200 Subject: [PATCH 04/21] Added CentOS Stream 8 to test suite --- kitchen.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kitchen.yml b/kitchen.yml index eb1fc34..e88d237 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -19,6 +19,9 @@ verifier: deprecations_as_errors: true platforms: + - name: centos-stream-8 + driver: + image: dokken/centos-stream-8 - name: amazonlinux-2 driver: image: dokken/amazonlinux-2 From bf960f51ef50cbd91d7efb35427d9bb6795cab9c Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 8 Oct 2022 13:45:53 +0200 Subject: [PATCH 05/21] Removed Ubuntu 16.04 from testing suite It's EOL --- kitchen.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/kitchen.yml b/kitchen.yml index e88d237..466dc5d 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -34,9 +34,6 @@ platforms: - name: debian-9 driver: image: dokken/debian-9 - - name: ubuntu-16.04 - driver: - image: dokken/ubuntu-16.04 - name: ubuntu-18.04 driver: image: dokken/ubuntu-18.04 From 7047245eb804175f4d371981e1b777f88e5f5c4a Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 8 Oct 2022 13:49:27 +0200 Subject: [PATCH 06/21] Added RockyLinux to test suite --- kitchen.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kitchen.yml b/kitchen.yml index 466dc5d..5347c8e 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -19,6 +19,12 @@ verifier: deprecations_as_errors: true platforms: + - name: rockylinux-8 + driver: + image: dokken/rockylinux-8 + - name: rockylinux-9 + driver: + image: dokken/rockylinux-9 - name: centos-stream-8 driver: image: dokken/centos-stream-8 From e3996b951876ff5155c39d3a82df2702a8a07a10 Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 8 Oct 2022 13:49:39 +0200 Subject: [PATCH 07/21] Removed Debian 9 from test suite It's EOL --- kitchen.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/kitchen.yml b/kitchen.yml index 5347c8e..a58e218 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -37,9 +37,6 @@ platforms: - name: debian-10 driver: image: dokken/debian-10 - - name: debian-9 - driver: - image: dokken/debian-9 - name: ubuntu-18.04 driver: image: dokken/ubuntu-18.04 From 9daef006c8bb010c46025b7d1fe09142cf50f09a Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 8 Oct 2022 13:51:32 +0200 Subject: [PATCH 08/21] Added openSUSE 15.3 and 15.4 to test suite --- kitchen.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kitchen.yml b/kitchen.yml index a58e218..72b7012 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -46,9 +46,13 @@ platforms: - name: ubuntu-22.04 driver: image: dokken/ubuntu-22.04 - - name: opensuse-leap-15 + - name: opensuse-leap-15.3 driver: - image: dokken/opensuse-leap-15 + image: dokken/opensuse-leap-15.3 + pid_one_command: /usr/lib/systemd/systemd + - name: opensuse-leap-15.4 + driver: + image: dokken/opensuse-leap-15.4 pid_one_command: /usr/lib/systemd/systemd suites: - name: default From 4bbfa5fe7a91e11dbe0de2faa4def5d8ecf3bcf4 Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 8 Oct 2022 14:48:56 +0200 Subject: [PATCH 09/21] Removed rocky linux from testing suite It was just not working --- kitchen.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/kitchen.yml b/kitchen.yml index 72b7012..08afe76 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -19,12 +19,6 @@ verifier: deprecations_as_errors: true platforms: - - name: rockylinux-8 - driver: - image: dokken/rockylinux-8 - - name: rockylinux-9 - driver: - image: dokken/rockylinux-9 - name: centos-stream-8 driver: image: dokken/centos-stream-8 From fe5446ec59f7e54d9600a45671b83491fe93e685 Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 8 Oct 2022 14:49:17 +0200 Subject: [PATCH 10/21] Fixed install process breaking for CentOS Stream 8 --- recipes/install.rb | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/recipes/install.rb b/recipes/install.rb index 3aad111..110e516 100644 --- a/recipes/install.rb +++ b/recipes/install.rb @@ -24,15 +24,31 @@ include_recipe 'yum-epel' if platform?('amazon') +execute 'enable powertools' do + live_stream true + command 'dnf config-manager --set-enabled powertools -y' + action :nothing + only_if { platform?('centos', 'rocky') } +end + apt_update 'all platforms' do action :nothing only_if { platform_family?('debian') } end +# Base packages requires +packages = %w(git curl) + +# Add specific requires packages for CentOS and Rocky OS +if platform?('centos') + packages.append('epel-release') +end + ## Install git, curl -package %w(git curl) do +package packages do action :install notifies :update, 'apt_update[all platforms]', :before + notifies :run, 'execute[enable powertools]', :before end ## Download the bastion From dede4bb8c75c9a5013aef63f0d0f65e3dc0331a8 Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 8 Oct 2022 14:53:25 +0200 Subject: [PATCH 11/21] Fixed openSUSE Leap 15.4 not starting --- kitchen.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/kitchen.yml b/kitchen.yml index 08afe76..8cfcd61 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -47,7 +47,6 @@ platforms: - name: opensuse-leap-15.4 driver: image: dokken/opensuse-leap-15.4 - pid_one_command: /usr/lib/systemd/systemd suites: - name: default run_list: From 264784dc356c556e7cf3d1a260f01fed05825f01 Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 8 Oct 2022 14:53:37 +0200 Subject: [PATCH 12/21] Updated OS support list --- metadata.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/metadata.rb b/metadata.rb index f511125..c242344 100644 --- a/metadata.rb +++ b/metadata.rb @@ -6,11 +6,11 @@ version '2.0.2' chef_version '>= 15.3' -supports 'debian', '>= 9.0' -supports 'centos', '>= 7.0' +supports 'debian', '>= 10.0' +supports 'centos', '>= 8.0' supports 'redhat', '>= 7.0' -supports 'ubuntu', '>= 16.04' -supports 'opensuseleap', '>= 15.2' +supports 'ubuntu', '>= 18.04' +supports 'opensuseleap', '>= 15.3' # The `issues_url` points to the location where issues for this cookbook are # tracked. A `View Issues` link will be displayed on this cookbook's page when From bc62fcc75111f5e6c7a3434388305dfc26e68f58 Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 8 Oct 2022 14:53:50 +0200 Subject: [PATCH 13/21] Updated the-bastion version --- attributes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attributes/default.rb b/attributes/default.rb index 4e83df5..d69ddeb 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -1,5 +1,5 @@ # Basic attributes -default['ovh_the_bastion']['version'] = 'v3.07.00' +default['ovh_the_bastion']['version'] = 'v3.08.00' default['ovh_the_bastion']['path'] = '/opt/bastion' # See /opt/bastion/bin/admin/install --help From aade5881097b9e792b09fe42c53841b7783f68c1 Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 29 Oct 2022 11:30:46 +0200 Subject: [PATCH 14/21] Updated changelog --- CHANGELOG.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e53906a..98d6e35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] + +## [v2.0.2] - 2022-10-29 + +### Added +- Support for CentOS stream 8, Ubuntu 22.04, +OpenSUSE Leap 15.3 and 15.4. + +### Removed +- Support for CentOS 7, 8, Ubuntu 16.04, +OpenSUSE Leap < 15.3 + +### Changed +- ovh/the-bastion version upgraded to 3.08.00 (was 3.07.00). + ## [v2.0.2] - 2021-12-31 @@ -134,7 +148,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Removed Chef Workflow files -[Unreleased]: https://github.com/axl89/ovh_the_bastion/compare/v2.0.2...main +[Unreleased]: https://github.com/axl89/ovh_the_bastion/compare/v3.0.0...main +[v3.0.0]: https://github.com/axl89/ovh_the_bastion/compare/v2.0.2...v3.0.0 [v2.0.2]: https://github.com/axl89/ovh_the_bastion/compare/v2.0.1...v2.0.2 [v2.0.1]: https://github.com/axl89/ovh_the_bastion/compare/v2.0.0...v2.0.1 [v2.0.0]: https://github.com/axl89/ovh_the_bastion/compare/v1.1.0...v2.0.0 From cc03e252460f92ff3ae3e3d62f73f2e48a0d565f Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 29 Oct 2022 11:31:15 +0200 Subject: [PATCH 15/21] Updated version --- metadata.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index c242344..17794ad 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ maintainer_email 'axl89@users.noreply.github.com' license 'GPL-3.0' description 'Installs and configures ovh/the-bastion software' -version '2.0.2' +version '3.0.0' chef_version '>= 15.3' supports 'debian', '>= 10.0' From 18338b728b15008637887b6268f51bc90f738e89 Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 29 Oct 2022 11:32:20 +0200 Subject: [PATCH 16/21] Corrected version --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98d6e35..e7deac0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [v2.0.2] - 2022-10-29 +## [v3.0.0] - 2022-10-29 ### Added - Support for CentOS stream 8, Ubuntu 22.04, From 212db99f25bec88b21e312d1ae437e9959a7c994 Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 29 Oct 2022 11:39:05 +0200 Subject: [PATCH 17/21] Updated CI to latest sous-chef This bois know what they're doing. --- .circleci/config.yml | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 41cef18..f2b1626 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,31 +1,10 @@ --- version: 2.1 orbs: - kitchen: sous-chefs/kitchen@2.1.1 -jobs: - cookstyle: - docker: - - image: chef/chefdk:4.9.17 - steps: - - checkout - - run: chef env --chef-license accept-silent - - run: chef exec cookstyle . - foodcritic: - docker: - - image: chef/chefdk:4.9.17 - steps: - - checkout - - run: chef env --chef-license accept-silent - - run: chef exec foodcritic . - + kitchen: sous-chefs/kitchen@2 workflows: - test: + danger: jobs: - # Lint and Unit Test - - kitchen/yamllint: - name: lint-yaml - - kitchen/dokken-single: - name: dokken-single - suite: default - - cookstyle - - foodcritic + - kitchen/danger: + name: danger + context: Danger-Minimal \ No newline at end of file From b7504173e3ac8f971b689861e9e03a7f858dd0c4 Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 29 Oct 2022 11:42:32 +0200 Subject: [PATCH 18/21] Added Dangerfile Copied from sous-chef/nginx --- Dangerfile | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Dangerfile diff --git a/Dangerfile b/Dangerfile new file mode 100644 index 0000000..5065c0d --- /dev/null +++ b/Dangerfile @@ -0,0 +1,48 @@ +# Reference: http://danger.systems/reference.html + +# A pull request summary is required. Add a description of the pull request purpose. +# Changelog must be updated for each pull request that changes code. +# Warnings will be issued for: +# Pull request with more than 400 lines of code changed +# Pull reqest that change more than 5 lines without test changes +# Failures will be issued for: +# Pull request without summary +# Pull requests with code changes without changelog entry + +def code_changes? + code = %w(libraries attributes recipes resources files templates) + code.each do |location| + return true unless git.modified_files.grep(/#{location}/).empty? + end + false +end + +def test_changes? + tests = %w(spec test kitchen.yml kitchen.dokken.yml) + tests.each do |location| + return true unless git.modified_files.grep(/#{location}/).empty? + end + false +end + +failure 'Please provide a summary of your Pull Request.' if github.pr_body.length < 10 + +warn 'This is a big Pull Request.' if git.lines_of_code > 400 + +warn 'This is a Table Flip.' if git.lines_of_code > 2000 + +# Require a CHANGELOG entry for non-test changes. +if !git.modified_files.include?('CHANGELOG.md') && code_changes? + failure 'Please include a CHANGELOG entry.' +end + +# Require Major Minor Patch version labels +unless github.pr_labels.grep /minor|major|patch/i + warn 'Please add a release label to this pull request' +end + +# A sanity check for tests. +if git.lines_of_code > 5 && code_changes? && !test_changes? + warn 'This Pull Request is probably missing tests.' +end + From 06d03453aa90869431def38e12e7a73cb7fcf629 Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 29 Oct 2022 11:43:54 +0200 Subject: [PATCH 19/21] Revert "Updated CI to latest sous-chef" This reverts commit 212db99f25bec88b21e312d1ae437e9959a7c994. --- .circleci/config.yml | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f2b1626..41cef18 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,10 +1,31 @@ --- version: 2.1 orbs: - kitchen: sous-chefs/kitchen@2 + kitchen: sous-chefs/kitchen@2.1.1 +jobs: + cookstyle: + docker: + - image: chef/chefdk:4.9.17 + steps: + - checkout + - run: chef env --chef-license accept-silent + - run: chef exec cookstyle . + foodcritic: + docker: + - image: chef/chefdk:4.9.17 + steps: + - checkout + - run: chef env --chef-license accept-silent + - run: chef exec foodcritic . + workflows: - danger: + test: jobs: - - kitchen/danger: - name: danger - context: Danger-Minimal \ No newline at end of file + # Lint and Unit Test + - kitchen/yamllint: + name: lint-yaml + - kitchen/dokken-single: + name: dokken-single + suite: default + - cookstyle + - foodcritic From 0689aacebbd6a88c1b846a23033008291bc5a43b Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 29 Oct 2022 11:43:59 +0200 Subject: [PATCH 20/21] Revert "Added Dangerfile" This reverts commit b7504173e3ac8f971b689861e9e03a7f858dd0c4. --- Dangerfile | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 Dangerfile diff --git a/Dangerfile b/Dangerfile deleted file mode 100644 index 5065c0d..0000000 --- a/Dangerfile +++ /dev/null @@ -1,48 +0,0 @@ -# Reference: http://danger.systems/reference.html - -# A pull request summary is required. Add a description of the pull request purpose. -# Changelog must be updated for each pull request that changes code. -# Warnings will be issued for: -# Pull request with more than 400 lines of code changed -# Pull reqest that change more than 5 lines without test changes -# Failures will be issued for: -# Pull request without summary -# Pull requests with code changes without changelog entry - -def code_changes? - code = %w(libraries attributes recipes resources files templates) - code.each do |location| - return true unless git.modified_files.grep(/#{location}/).empty? - end - false -end - -def test_changes? - tests = %w(spec test kitchen.yml kitchen.dokken.yml) - tests.each do |location| - return true unless git.modified_files.grep(/#{location}/).empty? - end - false -end - -failure 'Please provide a summary of your Pull Request.' if github.pr_body.length < 10 - -warn 'This is a big Pull Request.' if git.lines_of_code > 400 - -warn 'This is a Table Flip.' if git.lines_of_code > 2000 - -# Require a CHANGELOG entry for non-test changes. -if !git.modified_files.include?('CHANGELOG.md') && code_changes? - failure 'Please include a CHANGELOG entry.' -end - -# Require Major Minor Patch version labels -unless github.pr_labels.grep /minor|major|patch/i - warn 'Please add a release label to this pull request' -end - -# A sanity check for tests. -if git.lines_of_code > 5 && code_changes? && !test_changes? - warn 'This Pull Request is probably missing tests.' -end - From a0d8001db54fe13d1f0f51265f1bf0e931296dbe Mon Sep 17 00:00:00 2001 From: Axel Amigo Arnold Date: Sat, 29 Oct 2022 11:44:23 +0200 Subject: [PATCH 21/21] Updated chef Docker images --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 41cef18..8d9371c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,14 +5,14 @@ orbs: jobs: cookstyle: docker: - - image: chef/chefdk:4.9.17 + - image: chef/chef:current steps: - checkout - run: chef env --chef-license accept-silent - run: chef exec cookstyle . foodcritic: docker: - - image: chef/chefdk:4.9.17 + - image: chef/chef:current steps: - checkout - run: chef env --chef-license accept-silent