Showing with 193 additions and 86 deletions.
  1. +5 −8 .github/workflows/{release-prep.yml → auto_release.yml}
  2. +126 −0 .github/workflows/spec.yml
  3. +6 −2 .sync.yml
  4. +0 −45 .travis.yml
  5. +0 −6 .vscode/extensions.json
  6. +0 −5 .vscode/settings.json
  7. +22 −4 CHANGELOG.md
  8. +11 −0 REFERENCE.md
  9. +2 −2 metadata.json
  10. +1 −1 plans/subplans/configure.pp
  11. +6 −7 plans/subplans/db_populate.pp
  12. +14 −6 plans/upgrade.pp
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
name: "Release Prep"
name: "Auto release"

on:
workflow_dispatch:
inputs:
personal_access_token:
description: 'GitHub Personal Access Token'
required: true

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

jobs:
auto_release:
Expand Down Expand Up @@ -37,11 +34,11 @@ jobs:
persist-credentials: false

- name: "PDK Release prep"
uses: docker://puppet/pdk:2.6.1.0
uses: docker://puppet/puppet-dev-tools:4.x
with:
args: 'release prep --force'
args: 'pdk release prep --force --debug'
env:
CHANGELOG_GITHUB_TOKEN: "${{ github.event.inputs.personal_access_token }}"
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: "Get Version"
if: ${{ github.repository_owner == 'puppetlabs' }}
Expand Down
126 changes: 126 additions & 0 deletions .github/workflows/spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: "Spec Tests"

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
pull_request:


env:
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
HONEYCOMB_DATASET: litmus tests

jobs:
setup_matrix:
name: "Setup Test Matrix"
runs-on: ubuntu-20.04
outputs:
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' }}

- name: Activate Ruby 2.7
uses: ruby/setup-ruby@v1
if: ${{ github.repository_owner == 'puppetlabs' }}
with:
ruby-version: "2.7"
bundler-cache: true

- name: Print bundle environment
if: ${{ github.repository_owner == 'puppetlabs' }}
run: |
echo ::group::bundler environment
buildevents cmd $TRACE_ID $STEP_ID '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
- 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
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:
- setup_matrix
if: ${{ needs.setup_matrix.outputs.spec_matrix != '{}' }}

runs-on: ubuntu-20.04
strategy:
fail-fast: false
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

- name: "Activate Ruby ${{ matrix.ruby_version }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby_version}}
bundler-cache: true

- name: Print bundle environment
run: |
echo ::group::bundler environment
buildevents cmd $TRACE_ID $STEP_ID '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
8 changes: 6 additions & 2 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Gemfile:
optional:
':development':
- gem: 'github_changelog_generator'
version: '1.15.2' # Locked due to 1.16 no longer working for ruby lower than 3
version: '1.16.4' # Pinned to latest bug fix version
- gem: 'octokit'
version: '4.21.0' # Locked due to https://github.com/octokit/octokit.rb/issues/1391
Rakefile:
Expand All @@ -30,6 +30,10 @@ spec/spec_helper.rb:
- 'spec/docker/**/files/puppet-enterprise*'
- 'spec/docker/.task_cache.json'
.github/workflows/auto_release.yml:
unmanaged: true
unmanaged: false
.github/workflows/release.yml:
unmanaged: true
.github/workflows/spec.yml:
unmanaged: false
.travis.yml:
delete: true
45 changes: 0 additions & 45 deletions .travis.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .vscode/extensions.json

This file was deleted.

5 changes: 0 additions & 5 deletions .vscode/settings.json

This file was deleted.

26 changes: 22 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).

## [v3.11.1](https://github.com/puppetlabs/puppetlabs-peadm/tree/v3.11.1) (2023-02-10)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-peadm/compare/v3.11.0...v3.11.1)

### Added

- add parameter for setting final state of infrastructure agents after upgrade [\#330](https://github.com/puppetlabs/puppetlabs-peadm/pull/330) ([vchepkov](https://github.com/vchepkov))

### Fixed

- fix variable notation [\#331](https://github.com/puppetlabs/puppetlabs-peadm/pull/331) ([vchepkov](https://github.com/vchepkov))

## [v3.11.0](https://github.com/puppetlabs/puppetlabs-peadm/tree/v3.11.0) (2023-02-01)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-peadm/compare/v3.10.0...v3.11.0)
Expand Down Expand Up @@ -51,7 +63,6 @@ All notable changes to this project will be documented in this file. The format

### Fixed

- Restart compiler services [\#271](https://github.com/puppetlabs/puppetlabs-peadm/pull/271) ([ody](https://github.com/ody))
- Set additional rules on replica when adding compiler [\#270](https://github.com/puppetlabs/puppetlabs-peadm/pull/270) ([ody](https://github.com/ody))
- Updates documentation [\#269](https://github.com/puppetlabs/puppetlabs-peadm/pull/269) ([ody](https://github.com/ody))

Expand All @@ -65,13 +76,22 @@ All notable changes to this project will be documented in this file. The format
- Support PE 2021.6 and 2019.8.11 [\#260](https://github.com/puppetlabs/puppetlabs-peadm/pull/260) ([reidmv](https://github.com/reidmv))
- Add experimental restore plan [\#250](https://github.com/puppetlabs/puppetlabs-peadm/pull/250) ([reidmv](https://github.com/reidmv))

### Fixed

- Restart compiler services [\#271](https://github.com/puppetlabs/puppetlabs-peadm/pull/271) ([ody](https://github.com/ody))

## [v3.6.0](https://github.com/puppetlabs/puppetlabs-peadm/tree/v3.6.0) (2022-05-04)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-peadm/compare/v3.5.0...v3.6.0)

### Added

- Add experimental backup plan [\#235](https://github.com/puppetlabs/puppetlabs-peadm/pull/235) ([davidsandilands](https://github.com/davidsandilands))

### Fixed

- Add read map so puppetdb can start on new compiler [\#252](https://github.com/puppetlabs/puppetlabs-peadm/pull/252) ([ody](https://github.com/ody))
- Fix json escaping in `bash\_task\_helper` [\#246](https://github.com/puppetlabs/puppetlabs-peadm/pull/246) ([reidmv](https://github.com/reidmv))
- Fix and document recovery procedure for PSQL [\#243](https://github.com/puppetlabs/puppetlabs-peadm/pull/243) ([ody](https://github.com/ody))

## [v3.5.0](https://github.com/puppetlabs/puppetlabs-peadm/tree/v3.5.0) (2022-04-13)
Expand All @@ -82,11 +102,10 @@ All notable changes to this project will be documented in this file. The format

- Add support for SLES 12 [\#245](https://github.com/puppetlabs/puppetlabs-peadm/pull/245) ([MartyEwings](https://github.com/MartyEwings))
- Add `peadm::add\_database` plan [\#241](https://github.com/puppetlabs/puppetlabs-peadm/pull/241) ([ody](https://github.com/ody))
- Add experimental backup plan [\#235](https://github.com/puppetlabs/puppetlabs-peadm/pull/235) ([davidsandilands](https://github.com/davidsandilands))
- Add experimental `peadm::util::code\_sync\_status` plan [\#221](https://github.com/puppetlabs/puppetlabs-peadm/pull/221) ([reidmv](https://github.com/reidmv))

### Fixed

- Fix json escaping in `bash\_task\_helper` [\#246](https://github.com/puppetlabs/puppetlabs-peadm/pull/246) ([reidmv](https://github.com/reidmv))
- Fix load balancer bug in `peadm::get\_peadm\_config` task [\#244](https://github.com/puppetlabs/puppetlabs-peadm/pull/244) ([reidmv](https://github.com/reidmv))

## [v3.4.0](https://github.com/puppetlabs/puppetlabs-peadm/tree/v3.4.0) (2022-03-08)
Expand Down Expand Up @@ -126,7 +145,6 @@ All notable changes to this project will be documented in this file. The format

### Added

- Add experimental `peadm::util::code\_sync\_status` plan [\#221](https://github.com/puppetlabs/puppetlabs-peadm/pull/221) ([reidmv](https://github.com/reidmv))
- Add auto-generated REFERENCE.md documentation [\#211](https://github.com/puppetlabs/puppetlabs-peadm/pull/211) ([reidmv](https://github.com/reidmv))
- Make PEAdm a Puppet supported module [\#199](https://github.com/puppetlabs/puppetlabs-peadm/pull/199) ([ody](https://github.com/ody))

Expand Down
11 changes: 11 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ Supported use cases:
* `peadm::restore`: Restore the core user settings for puppet infrastructure from backup
* `peadm::subplans::component_install`: Install a new PEADM component
* `peadm::subplans::configure`: Configure first-time classification and DR setup
* `peadm::subplans::db_populate`: Destructively (re)populates a new or existing database with the contents or a known good source
* `peadm::subplans::install`: Perform initial installation of Puppet Enterprise Extra Large
* `peadm::subplans::modify_certificate`
* `peadm::subplans::prepare_agent`
Expand Down Expand Up @@ -1897,6 +1898,7 @@ The following parameters are available in the `peadm::upgrade` plan:
* [`internal_compiler_a_pool_address`](#-peadm--upgrade--internal_compiler_a_pool_address)
* [`internal_compiler_b_pool_address`](#-peadm--upgrade--internal_compiler_b_pool_address)
* [`pe_installer_source`](#-peadm--upgrade--pe_installer_source)
* [`final_agent_state`](#-peadm--upgrade--final_agent_state)
* [`primary_host`](#-peadm--upgrade--primary_host)
* [`replica_host`](#-peadm--upgrade--replica_host)
* [`compiler_hosts`](#-peadm--upgrade--compiler_hosts)
Expand Down Expand Up @@ -1949,6 +1951,15 @@ URL given.

Default value: `undef`

##### <a name="-peadm--upgrade--final_agent_state"></a>`final_agent_state`

Data type: `Enum['running', 'stopped']`

Configures the state the puppet agent should be in on infrastructure nodes
after PE is upgraded successfully.

Default value: `'running'`

##### <a name="-peadm--upgrade--primary_host"></a>`primary_host`

Data type: `Peadm::SingleTargetSpec`
Expand Down
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppetlabs-peadm",
"version": "3.11.0",
"version": "3.11.1",
"author": "puppetlabs",
"summary": "Bolt plans used to deploy an at-scale Puppet Enterprise architecture",
"license": "Apache-2.0",
Expand Down Expand Up @@ -82,5 +82,5 @@
],
"pdk-version": "2.6.1",
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
"template-ref": "heads/main-0-gd3a41f4"
"template-ref": "heads/main-0-g9375381"
}
2 changes: 1 addition & 1 deletion plans/subplans/configure.pp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
)
}

# Ensure Puppet agent service is running now that configuration is complete
# Configure Puppet agent service status now that configuration is complete
$systemctl_state = $final_agent_state ? {
'running' => 'start',
'stopped' => 'stop'
Expand Down
Loading