Showing with 1,059 additions and 1,262 deletions.
  1. +0 −19 .github/workflows/auto_release.yml
  2. +15 −0 .github/workflows/release-prep.yml
  3. +27 −47 .github/workflows/spec.yml
  4. +18 −72 .github/workflows/test-add-compiler.yaml
  5. +17 −71 .github/workflows/test-add-replica.yaml
  6. +123 −0 .github/workflows/test-backup-restore.yaml
  7. +23 −96 .github/workflows/test-failover.yaml
  8. +35 −67 .github/workflows/test-fips-install-matrix.yaml
  9. +16 −69 .github/workflows/test-install-latest-dev.yaml
  10. +27 −67 .github/workflows/test-install-latest-xlarge-dev-nightly.yaml
  11. +36 −68 .github/workflows/test-install-matrix.yaml
  12. +14 −67 .github/workflows/test-install.yaml
  13. +17 −80 .github/workflows/test-upgrade-latest-dev.yaml
  14. +22 −85 .github/workflows/test-upgrade-latest-xlarge-dev-nightly.yaml
  15. +42 −84 .github/workflows/test-upgrade-matrix.yaml
  16. +15 −78 .github/workflows/test-upgrade.yaml
  17. +1 −2 .gitignore
  18. +2 −6 .pdkignore
  19. +210 −6 .rubocop.yml
  20. +6 −0 .vscode/extensions.json
  21. +289 −204 CHANGELOG.md
  22. +1 −1 CODEOWNERS
  23. +26 −25 Gemfile
  24. +10 −1 REFERENCE.md
  25. +4 −5 Rakefile
  26. +13 −9 documentation/upgrade.md
  27. +1 −1 examples/ruby_task.rb
  28. +1 −1 functions/assert_supported_pe_version.pp
  29. +2 −2 functions/determine_status.pp
  30. +3 −3 functions/generate_pe_conf.pp
  31. +5 −5 metadata.json
  32. +12 −0 plans/add_database.pp
  33. +3 −1 plans/install.pp
  34. +4 −4 plans/status.pp
  35. +3 −2 plans/subplans/install.pp
  36. +3 −3 plans/upgrade.pp
  37. +1 −1 plans/util/insert_csr_extension_requests.pp
  38. +2 −0 spec/acceptance/peadm_spec/plans/install_test_cluster.pp
  39. +1 −1 spec/functions/assert_supported_pe_version_spec.rb
  40. +1 −1 spec/plans/convert_spec.rb
  41. +2 −2 spec/plans/upgrade_spec.rb
  42. +3 −2 spec/spec_helper.rb
  43. +1 −2 tasks/get_peadm_config.rb
  44. +2 −2 tasks/transform_classification_groups.py
19 changes: 0 additions & 19 deletions .github/workflows/auto_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
workflow_dispatch:

env:
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
HONEYCOMB_DATASET: litmus tests
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
Expand All @@ -14,18 +12,6 @@ jobs:
runs-on: ubuntu-20.04

steps:

- name: "Honeycomb: Start recording"
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
with:
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
dataset: ${{ env.HONEYCOMB_DATASET }}
job-status: ${{ job.status }}

- name: "Honeycomb: start first step"
run: |
echo STEP_ID="auto-release" >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: "Checkout Source"
if: ${{ github.repository_owner == 'puppetlabs' }}
uses: actions/checkout@v2
Expand Down Expand Up @@ -83,8 +69,3 @@ jobs:
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
- name: "Honeycomb: Record finish step"
if: ${{ always() }}
run: |
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Finished auto release workflow'
15 changes: 15 additions & 0 deletions .github/workflows/release-prep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Release Prep"

on:
workflow_dispatch:
inputs:
version:
description: "Module version to be released. Must be a valid semver string. (1.2.3)"
required: true

jobs:
release_prep:
uses: "puppetlabs/cat-github-actions/.github/workflows/module_release_prep.yml@main"
with:
version: "${{ github.event.inputs.version }}"
secrets: "inherit"
74 changes: 27 additions & 47 deletions .github/workflows/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,26 @@ on:
- cron: '0 0 * * *'
workflow_dispatch:
pull_request:


env:
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
HONEYCOMB_DATASET: litmus tests
paths:
- '.github/workflows/**/*'
- 'spec/**/*'
- 'lib/**/*'
- 'tasks/**/*'
- 'functions/**/*'
- 'types/**/*'
- 'plans/**/*'
- 'hiera/**/*'
- 'manifests/**/*'
- 'templates/**/*'
- 'files/**/*'
- 'metadata.json'
- 'Rakefile'
- 'Gemfile'
- 'provision.yaml'
- '.rspec'
- '.rubocop.yml'
- '.puppet-lint.rc'
- '.fixtures.yml'

jobs:
setup_matrix:
Expand All @@ -19,18 +34,6 @@ jobs:
spec_matrix: ${{ steps.get-matrix.outputs.spec_matrix }}

steps:

- name: "Honeycomb: Start recording"
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
with:
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
dataset: ${{ env.HONEYCOMB_DATASET }}
job-status: ${{ job.status }}

- name: "Honeycomb: Start first step"
run: |
echo STEP_ID=setup-environment >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: Checkout Source
uses: actions/checkout@v2
if: ${{ github.repository_owner == 'puppetlabs' }}
Expand All @@ -46,31 +49,23 @@ jobs:
if: ${{ github.repository_owner == 'puppetlabs' }}
run: |
echo ::group::bundler environment
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
bundle env
echo ::endgroup::
- name: "Honeycomb: Record Setup Environment time"
if: ${{ github.repository_owner == 'puppetlabs' }}
run: |
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: Run Static & Syntax Tests
if: ${{ github.repository_owner == 'puppetlabs' }}
run: |
buildevents cmd $TRACE_ID $STEP_ID 'static_syntax_checks' -- bundle exec rake validate lint check rubocop
bundle exec rake validate lint check rubocop
- name: Setup Spec Test Matrix
id: get-matrix
run: |
if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
bundle exec matrix_from_metadata_v2
else
echo "::set-output name=spec_matrix::{}"
fi
- name: "Honeycomb: Record Setup Test Matrix time"
if: ${{ always() }}
run: |
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
Spec:
name: "Spec Tests (Puppet: ${{matrix.puppet_version}}, Ruby Ver: ${{matrix.ruby_version}})"
needs:
Expand All @@ -83,28 +78,13 @@ jobs:
matrix: ${{fromJson(needs.setup_matrix.outputs.spec_matrix)}}

env:
BUILDEVENT_FILE: '../buildevents.txt'
PUPPET_GEM_VERSION: ${{ matrix.puppet_version }}
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main'

steps:
- run: |
echo "SANITIZED_PUPPET_VERSION=$(echo '${{ matrix.puppet_version }}' | sed 's/~> //g')" >> $GITHUB_ENV
- run: |
echo 'puppet_version=${{ env.SANITIZED_PUPPET_VERSION }}' >> $BUILDEVENT_FILE
- name: "Honeycomb: Start first step"
run: |
echo "STEP_ID=${{ env.SANITIZED_PUPPET_VERSION }}-spec" >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: "Honeycomb: Start recording"
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
with:
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
dataset: ${{ env.HONEYCOMB_DATASET }}
job-status: ${{ job.status }}
matrix-key: ${{ env.SANITIZED_PUPPET_VERSION }}
- name: Checkout Source
uses: actions/checkout@v2

Expand All @@ -117,10 +97,10 @@ jobs:
- name: Print bundle environment
run: |
echo ::group::bundler environment
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
bundle env
echo ::endgroup::
- name: Run parallel_spec tests
run: |
buildevents cmd $TRACE_ID $STEP_ID 'rake parallel_spec Puppet ${{ matrix.puppet_version }}, Ruby ${{ matrix.ruby_version }}' -- bundle exec rake parallel_spec
bundle exec rake parallel_spec
90 changes: 18 additions & 72 deletions .github/workflows/test-add-compiler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,19 @@ on:
version:
description: 'PE version to install'
required: true
default: '2021.7.2'
default: '2021.7.4'
ssh-debugging:
description: 'Boolean; whether or not to pause for ssh debugging'
required: true
default: 'false'

env:
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
HONEYCOMB_DATASET: litmus tests

jobs:
test-add-compiler:
name: "PE ${{ matrix.version }} ${{ matrix.architecture }} on ${{ matrix.image }}"
runs-on: ubuntu-20.04
env:
BOLT_GEM: true
BOLT_DISABLE_ANALYTICS: true
BUILDEVENT_FILE: '../buildevents.txt'
LANG: 'en_US.UTF-8'
strategy:
fail-fast: false
Expand All @@ -52,18 +47,6 @@ jobs:
NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
SSH_PASS: ${{ secrets.SSH_PASS }}

- name: "Honeycomb: Start recording"
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
with:
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
dataset: ${{ env.HONEYCOMB_DATASET }}
job-status: ${{ job.status }}

- name: "Honeycomb: Start first step"
run: |
echo STEP_ID=setup-test-cluster >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: "Checkout Source"
uses: actions/checkout@v2

Expand All @@ -77,16 +60,7 @@ jobs:
if: ${{ github.repository_owner == 'puppetlabs' }}
run: |
echo ::group::info:bundler
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
echo ::endgroup::
- name: "Honeycomb: Record environment setup time"
if: ${{ always() }}
run: |
echo ::group::honeycomb
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Set up environment'
echo STEP_ID=${{ matrix.architecture }}-${{ matrix.image }}-provision >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
bundle env
echo ::endgroup::
- name: 'Provision test cluster (specified architecture with added DR)'
Expand All @@ -97,16 +71,15 @@ jobs:
echo 'Host *' > $HOME/.ssh/config
echo ' ServerAliveInterval 150' >> $HOME/.ssh/config
echo ' ServerAliveCountMax 2' >> $HOME/.ssh/config
buildevents cmd $TRACE_ID $STEP_ID 'rake spec_prep' -- bundle exec rake spec_prep
bundle exec rake spec_prep
echo ::endgroup::
echo ::group::provision
buildevents cmd $TRACE_ID $STEP_ID 'bolt plan run peadm_spec::provision_test_cluster' -- \
bundle exec bolt plan run peadm_spec::provision_test_cluster \
--modulepath spec/fixtures/modules \
provider=provision_service \
image=${{ matrix.image }} \
architecture=${{ matrix.architecture }}-with-extra-compiler
bundle exec bolt plan run peadm_spec::provision_test_cluster \
--modulepath spec/fixtures/modules \
provider=provision_service \
image=${{ matrix.image }} \
architecture=${{ matrix.architecture }}-with-extra-compiler
echo ::endgroup::
echo ::group::info:request
Expand All @@ -117,42 +90,22 @@ jobs:
sed -e 's/password: .*/password: "[redacted]"/' < spec/fixtures/litmus_inventory.yaml || true
echo ::endgroup::
- name: "Honeycomb: Record provision time"
if: ${{ always() }}
run: |
echo ::group::honeycomb
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Provision test cluster'
echo STEP_ID=${{ matrix.architecture }}-${{ matrix.image }}-install >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
echo ::endgroup::
- name: 'Install PE on test cluster'
timeout-minutes: 120
run: |
buildevents cmd $TRACE_ID $STEP_ID 'bolt plan run peadm_spec::install_test_cluster' -- \
bundle exec bolt plan run peadm_spec::install_test_cluster \
--inventoryfile spec/fixtures/litmus_inventory.yaml \
--modulepath spec/fixtures/modules \
architecture=${{ matrix.architecture }} \
version=${{ matrix.version }}
- name: "Honeycomb: Record install time"
if: ${{ always() }}
run: |
echo ::group::honeycomb
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Install PE on test cluster'
echo STEP_ID=${{ matrix.architecture }}-${{ matrix.image }}-tear_down >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
echo ::endgroup::
bundle exec bolt plan run peadm_spec::install_test_cluster \
--inventoryfile spec/fixtures/litmus_inventory.yaml \
--modulepath spec/fixtures/modules \
architecture=${{ matrix.architecture }} \
version=${{ matrix.version }}
- name: 'Run add_compiler plan'
timeout-minutes: 30
run: |
buildevents cmd $TRACE_ID $STEP_ID 'bolt plan run peadm_spec::add_compiler' -- \
bundle exec bolt plan run peadm_spec::add_compiler -v \
--inventoryfile spec/fixtures/litmus_inventory.yaml \
--modulepath spec/fixtures/modules \
architecture=${{ matrix.architecture }}
bundle exec bolt plan run peadm_spec::add_compiler -v \
--inventoryfile spec/fixtures/litmus_inventory.yaml \
--modulepath spec/fixtures/modules \
architecture=${{ matrix.architecture }}
- name: 'Wait as long as the file ${HOME}/pause file is present'
if: ${{ always() && github.event.inputs.ssh-debugging == 'true' }}
Expand All @@ -169,17 +122,10 @@ jobs:
run: |
if [ -f spec/fixtures/litmus_inventory.yaml ]; then
echo ::group::tear_down
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:tear_down' -- bundle exec rake 'litmus:tear_down'
bundle exec rake 'litmus:tear_down'
echo ::endgroup::
echo ::group::info:request
cat request.json || true; echo
echo ::endgroup::
fi
- name: "Honeycomb: Record tear down time"
if: ${{ always() }}
run: |
echo ::group::honeycomb
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Tear down test cluster'
echo ::endgroup::
Loading