Showing with 645 additions and 150 deletions.
  1. +1 −0 .fixtures.yml
  2. +2 −2 .github/workflows/test-add-replica.yaml
  3. +152 −0 .github/workflows/test-fips-install-matrix.yaml
  4. +5 −4 .github/workflows/test-install-matrix.yaml
  5. +2 −2 .github/workflows/test-install.yaml
  6. +3 −3 .github/workflows/test-upgrade.yaml
  7. +16 −0 CHANGELOG.md
  8. +25 −14 README.md
  9. +25 −3 REFERENCE.md
  10. +2 −2 documentation/classification.md
  11. +209 −0 documentation/expanding.md
  12. +2 −2 documentation/install.md
  13. +1 −1 documentation/upgrade.md
  14. +1 −1 examples/provision/extra-large-ha.json
  15. +1 −1 examples/provision/extra-large.json
  16. +1 −1 examples/provision/large-ha.json
  17. +1 −1 examples/provision/large.json
  18. +1 −1 examples/provision/minimal.json
  19. +1 −1 examples/provision/standard-ha.json
  20. +1 −1 examples/provision/standard.json
  21. +2 −2 functions/assert_supported_pe_version.pp
  22. +5 −1 metadata.json
  23. +9 −5 plans/add_compiler.pp
  24. +40 −25 plans/add_replica.pp
  25. +3 −1 plans/install.pp
  26. +19 −13 plans/subplans/configure.pp
  27. +22 −13 plans/subplans/db_populate.pp
  28. +3 −1 plans/subplans/install.pp
  29. +26 −0 plans/util/copy_file.pp
  30. +0 −22 plans/util/sync_global_hiera.pp
  31. +12 −2 spec/acceptance/peadm_spec/plans/install_test_cluster.pp
  32. +1 −1 spec/docker/extra-large-ha/params.json
  33. +1 −1 spec/docker/extra-large-ha/upgrade_params.json
  34. +1 −1 spec/docker/extra-large/params.json
  35. +1 −1 spec/docker/extra-large/upgrade_params.json
  36. +1 −1 spec/docker/large-ha/params.json
  37. +1 −1 spec/docker/large-ha/upgrade_params.json
  38. +1 −1 spec/docker/large/params.json
  39. +1 −1 spec/docker/large/upgrade_params.json
  40. +1 −1 spec/docker/standard-ha/params.json
  41. +1 −1 spec/docker/standard-ha/upgrade_params.json
  42. +1 −1 spec/docker/standard/params.json
  43. +1 −1 spec/docker/standard/upgrade_params.json
  44. +1 −1 spec/functions/assert_supported_pe_version_spec.rb
  45. +2 −2 spec/plans/add_compiler_spec.rb
  46. +2 −2 spec/plans/add_replica_spec.rb
  47. +1 −1 spec/plans/convert_spec.rb
  48. +1 −1 spec/plans/subplans/configure_spec.rb
  49. +1 −1 spec/plans/subplans/install_spec.rb
  50. +2 −2 spec/plans/upgrade_spec.rb
  51. +6 −0 tasks/get_psql_version.json
  52. +15 −0 tasks/get_psql_version.rb
  53. +4 −2 tasks/precheck.sh
  54. +4 −0 tasks/rbac_token.json
  55. +1 −1 tasks/rbac_token.rb
1 change: 1 addition & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ fixtures:
ruby_task_helper: "puppetlabs/ruby_task_helper"
service: "puppetlabs/service"
package: "puppetlabs/package"
reboot: "puppetlabs/reboot"
repositories:
facts: 'https://github.com/puppetlabs/puppetlabs-facts.git'
puppet_agent: 'https://github.com/puppetlabs/puppetlabs-puppet_agent.git'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-add-replica.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ on:
image:
description: 'GCP image for test cluster'
required: true
default: 'centos-7'
default: 'almalinux-cloud/almalinux-8'
architecture:
description: 'PE architecture to test'
required: true
default: 'standard'
version:
description: 'PE version to install'
required: true
default: '2019.8.8'
default: '2021.7.0'
ssh-debugging:
description: 'Boolean; whether or not to pause for ssh debugging'
required: true
Expand Down
152 changes: 152 additions & 0 deletions .github/workflows/test-fips-install-matrix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
---
name: "Install fips test matrix"

on:
pull_request:
branches: [main]
types: [review_requested]
workflow_dispatch: {}

env:
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
HONEYCOMB_DATASET: litmus tests

jobs:
test-install:
name: "PE ${{ matrix.version }} ${{ matrix.architecture }} on ${{ matrix.image }} with fips ${{ matrix.fips }}"
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
matrix:
architecture:
- standard-with-dr
- large
- extra-large-with-dr
version:
- 2019.8.12
- 2021.7.0
image:
- rhel-8
fips:
- enable

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-test-cluster >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: "Checkout Source"
uses: actions/checkout@v2

- name: "Activate Ruby 2.7"
uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
bundler-cache: true

- name: "Print bundle environment"
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 }}-fips_${{ matrix.fips }}-provision >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
echo ::endgroup::
- name: 'Provision test cluster'
timeout-minutes: 15
run: |
echo ::group::prepare
mkdir -p $HOME/.ssh
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
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 }}
echo ::endgroup::
echo ::group::info:request
cat request.json || true; echo
echo ::endgroup::
echo ::group::info:inventory
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 }}-fips_${{ matrix.fips }}-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 }} \
fips=${{ matrix.fips }}
- 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 }}-fips_${{ matrix.fips }}-tear_down >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
echo ::endgroup::
- name: 'Tear down test cluster'
if: ${{ always() }}
continue-on-error: true
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'
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::
9 changes: 5 additions & 4 deletions .github/workflows/test-install-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ jobs:
- large
- extra-large-with-dr
version:
- 2019.8.11
- 2021.6.0
- 2019.8.12
- 2021.7.0
image:
- centos-7

- almalinux-cloud/almalinux-8
steps:
- name: "Honeycomb: Start recording"
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
Expand Down Expand Up @@ -88,7 +88,8 @@ jobs:
--modulepath spec/fixtures/modules \
provider=provision_service \
image=${{ matrix.image }} \
architecture=${{ matrix.architecture }}
architecture=${{ matrix.architecture }} \
--log-level trace
echo ::endgroup::
echo ::group::info:request
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ on:
image:
description: 'GCP image for test cluster'
required: true
default: 'centos-7'
default: 'almalinux-cloud/almalinux-8'
architecture:
description: 'PE architecture to test'
required: true
default: 'standard'
version:
description: 'PE version to install'
required: true
default: '2021.6.0'
default: '2021.7.0'
ssh-debugging:
description: 'Boolean; whether or not to pause for ssh debugging'
required: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ jobs:
- 'standard'
- 'extra-large-with-dr'
version:
- '2019.8.11'
- '2019.8.12'
version_to_upgrade:
- '2021.6.0'
- '2021.7.0'
image:
- 'centos-7'
- 'almalinux-cloud/almalinux-8'
download_mode:
- 'direct'

Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

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.9.0](https://github.com/puppetlabs/puppetlabs-peadm/tree/v3.9.0) (2022-09-23)

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

### Added

- allow to customize admin's token lifetime [\#285](https://github.com/puppetlabs/puppetlabs-peadm/pull/285) ([vchepkov](https://github.com/vchepkov))

### Fixed

- Ensure fips commands exists before using it [\#289](https://github.com/puppetlabs/puppetlabs-peadm/pull/289) ([ody](https://github.com/ody))
- Fix-ups in copy\_file plan usage [\#282](https://github.com/puppetlabs/puppetlabs-peadm/pull/282) ([ody](https://github.com/ody))
- Re-use sync\_global\_hiera plan [\#281](https://github.com/puppetlabs/puppetlabs-peadm/pull/281) ([ody](https://github.com/ody))
- Support the installation of PE on FIPS enabled RHEL [\#280](https://github.com/puppetlabs/puppetlabs-peadm/pull/280) ([ody](https://github.com/ody))
- Fetch installed PSQL version [\#275](https://github.com/puppetlabs/puppetlabs-peadm/pull/275) ([ody](https://github.com/ody))

## [v3.8.0](https://github.com/puppetlabs/puppetlabs-peadm/tree/v3.8.0) (2022-06-21)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-peadm/compare/v3.7.0...v3.8.0)
Expand Down
39 changes: 25 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,25 @@ The peadm module is able to deploy and manage Puppet Enterprise 2019.x Standard,

#### Table of Contents

1. [Expectations and support](#expectations-and-support)
2. [Overview](#overview)
* [What peadm affects](#what-peadm-affects)
* [What peadm does not affect](#what-peadm-does-not-affect)
* [Requirements](#requirements)
3. [Usage](#usage)
4. [Reference](#reference)
5. [Getting Help](#getting-help)
- [Puppet Enterprise (pe) Administration (adm) Module](#puppet-enterprise-pe-administration-adm-module)
- [Table of Contents](#table-of-contents)
- [Expectations and support](#expectations-and-support)
- [Overview](#overview)
- [What peadm affects](#what-peadm-affects)
- [What peadm does not affect](#what-peadm-does-not-affect)
- [Requirements](#requirements)
- [Usage](#usage)
- [Reference](#reference)
- [Getting Help](#getting-help)

## Expectations and support

The peadm module is intended to be used only by Puppet Enterprise customers actively working with and being guided by Puppet Customer Success teams—specifically, the Professional Services and Solutions Architecture teams. Puppet Enterprise customers might be advised to begin using this tool after an introduction by their Technical Account manager (TAM) to the Solutions Architecture team or during a Professional Sevices (PS) engagement where the Puppet PS team aids and intructurs in the use of the tool. Independent use is not recommended for production environments without a comprehensive understanding of the peadm module.
While the peadm module was initially built by the Puppet Solutions Architecture team to streamline particularly large and complex Puppet Enterprise deployments, but has matured to a point where we believe that users with a reasonable understanding of Puppet Enterprise architecture can use it on their own.

As a Puppet Enterprise customer this tool is **supported** through Puppet Enterprise's standard and premium [support.puppet.com](https://support.puppet.com) service, and if you have questions or need assistance, you are welcome to reach out to your Support team for help, or to talk to your Sales or Technical Account Manager contacts to arrange a chat with one of us on the Solutions Architect team.

We also love contributions! We're more than happy to also chat about any ideas you may have for improving this module, or offer guidance on ways you could get involved.

The peadm module is a services-led tool that is **supported** through Puppet Enterprise's standard and premium [support.puppet.com](https://support.puppet.com) service.

## Overview

Expand All @@ -42,7 +47,7 @@ The normal usage pattern for peadm is as follows.

### Requirements

* Puppet Enterprise 2019.8.1 or newer (tested with PE 2021.6)
* Puppet Enterprise 2019.8.1 or newer (tested with PE 2021.7)
* Bolt 3.17.0 or newer (tested with Bolt 3.21.0)
* EL 7, EL 8, Ubuntu 18.04, or Ubuntu 20.04
* Classifier Data enabled. This PE feature is enabled by default on new installs, but can be disabled by users if they remove the relevant configuration from their global hiera.yaml file. See the [PE docs](https://puppet.com/docs/pe/latest/config_console.html#task-5039) for more information.
Expand All @@ -58,12 +63,18 @@ Follow the links below to usage instructions for each peadm plan.

## Reference

Additional documentation and information pertaining to various aspects or elements of peadm.
Information from the Puppet documentation site that will help you understand which architecture is right for you.

* [DR Component Recovery](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/recovery.md)
* [PE Architecture Documentation](https://puppet.com/docs/pe/latest/choosing_an_architecture.html)
* [Classification](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/classification.md)
* [PE Multi-region reference architecture](https://puppet.com/docs/patterns-and-tactics/latest/reference-architectures/pe-multi-region-reference-architectures.html)


Documentation pertaining to additional uses of peadm.

* [DR Component Recovery](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/recovery.md)
* [Architectures](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/architectures.md)
* [Expanding Deployment](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/expanding.md)
* [Classification](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/classification.md)
* [Testing](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/pre_post_checks.md)
* [Docker Based Examples](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/docker_examples.md)

Expand Down
Loading