Showing with 2,507 additions and 870 deletions.
  1. +38 −0 .devcontainer/README.md
  2. +5 −11 .devcontainer/devcontainer.json
  3. +18 −0 .github/workflows/add-to-project.yml
  4. +1 −1 .github/workflows/release-prep.yml
  5. +2 −2 .github/workflows/release.yml
  6. +185 −0 .github/workflows/test-add-compiler.yaml
  7. +1 −1 .github/workflows/test-add-replica.yaml
  8. +221 −0 .github/workflows/test-failover.yaml
  9. +1 −1 .github/workflows/test-fips-install-matrix.yaml
  10. +190 −0 .github/workflows/test-install-latest-dev.yaml
  11. +163 −0 .github/workflows/test-install-latest-xlarge-dev-nightly.yaml
  12. +1 −1 .github/workflows/test-install-matrix.yaml
  13. +1 −1 .github/workflows/test-install.yaml
  14. +216 −0 .github/workflows/test-upgrade-latest-dev.yaml
  15. +175 −0 .github/workflows/test-upgrade-latest-xlarge-dev-nightly.yaml
  16. +187 −0 .github/workflows/test-upgrade-matrix.yaml
  17. +36 −11 .github/workflows/test-upgrade.yaml
  18. +2 −0 .puppet-lint.rc
  19. +1 −1 .rubocop.yml
  20. +8 −4 .sync.yml
  21. +21 −7 CHANGELOG.md
  22. +25 −16 Gemfile
  23. +1 −1 README.md
  24. +333 −338 REFERENCE.md
  25. +2 −0 Rakefile
  26. +74 −0 documentation/backup.md
  27. +2 −2 documentation/expanding.md
  28. +1 −1 documentation/install.md
  29. +46 −0 documentation/restore.md
  30. +2 −2 documentation/upgrade.md
  31. +6 −8 examples/haproxy/compiler.pp
  32. +6 −8 examples/haproxy/load_balancer.pp
  33. +3 −5 examples/haproxy/puppetdb.pp
  34. +13 −12 functions/assert_supported_architecture.pp
  35. +3 −3 functions/assert_supported_bolt_version.pp
  36. +7 −1 functions/assert_supported_pe_version.pp
  37. +8 −6 functions/certname.pp
  38. +5 −6 functions/convert_status.pp
  39. +12 −12 functions/determine_status.pp
  40. +0 −2 functions/file_or_content.pp
  41. +2 −2 functions/get_targets.pp
  42. +0 −1 manifests/setup/convert_node_manager.pp
  43. +0 −1 manifests/setup/convert_pre20197.pp
  44. +7 −9 manifests/setup/node_manager.pp
  45. +1 −3 manifests/setup/node_manager_yaml.pp
  46. +3 −3 metadata.json
  47. +14 −15 plans/add_compiler.pp
  48. +40 −44 plans/add_database.pp
  49. +8 −9 plans/add_replica.pp
  50. +10 −7 plans/backup.pp
  51. +16 −11 plans/convert.pp
  52. +11 −7 plans/install.pp
  53. +2 −2 plans/misc/divert_code_manager.pp
  54. +4 −4 plans/modify_cert_extensions.pp
  55. +2 −2 plans/modify_certificate.pp
  56. +23 −20 plans/restore.pp
  57. +13 −13 plans/status.pp
  58. +1 −1 plans/subplans/component_install.pp
  59. +28 −20 plans/subplans/configure.pp
  60. +7 −9 plans/subplans/db_populate.pp
  61. +51 −44 plans/subplans/install.pp
  62. +17 −17 plans/subplans/modify_certificate.pp
  63. +5 −6 plans/subplans/prepare_agent.pp
  64. +0 −1 plans/uninstall.pp
  65. +62 −52 plans/upgrade.pp
  66. +7 −7 plans/util/code_sync_status.pp
  67. +0 −1 plans/util/copy_file.pp
  68. +0 −1 plans/util/db_disable_pglogical.pp
  69. +2 −3 plans/util/db_purge.pp
  70. +4 −4 plans/util/insert_csr_extension_requests.pp
  71. +5 −6 plans/util/update_classification.pp
  72. +4 −6 plans/util/update_db_setting.pp
  73. +36 −0 spec/acceptance/peadm_spec/plans/add_compiler.pp
  74. +10 −5 spec/acceptance/peadm_spec/plans/install_test_cluster.pp
  75. +6 −0 spec/acceptance/peadm_spec/plans/provision_test_cluster.pp
  76. +9 −5 spec/acceptance/peadm_spec/plans/upgrade_test_cluster.pp
  77. +1 −1 spec/functions/assert_supported_pe_version_spec.rb
  78. +1 −1 spec/plans/convert_spec.rb
  79. +2 −2 spec/plans/upgrade_spec.rb
  80. +2 −2 tasks/agent_install.json
  81. +17 −0 tasks/agent_install.ps1
  82. +0 −13 tasks/agent_upgrade.json
  83. +0 −12 tasks/agent_upgrade.sh
  84. +7 −1 tasks/pe_install.sh
  85. +2 −2 tasks/precheck.sh
  86. +2 −2 tasks/submit_csr.json
  87. +12 −0 tasks/submit_csr.ps1
  88. +23 −23 types/ldap_config.pp
  89. +6 −6 types/recovery_opts.pp
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",
}
18 changes: 18 additions & 0 deletions .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Add new issue to Solarch project

on:
issues:
types:
- opened

jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v0.3.0
with:
# You can target a repository in a different organization
# to the issue
project-url: https://github.com/orgs/puppetlabs/projects/55
github-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/release-prep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
persist-credentials: false

- name: "PDK Release prep"
uses: docker://puppet/iac_release:ci
uses: docker://puppet/pdk:2.6.1.0
with:
args: 'release prep --force'
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jobs:
ref: ${{ github.ref }}
clean: true
- name: "PDK Build"
uses: docker://puppet/pdk:nightly
uses: docker://puppet/pdk:2.6.1.0
with:
args: 'build'
- name: "Push to Forge"
uses: docker://puppet/pdk:nightly
uses: docker://puppet/pdk:2.6.1.0
with:
args: 'release publish --forge-token ${{ secrets.FORGE_API_KEY }} --force'
185 changes: 185 additions & 0 deletions .github/workflows/test-add-compiler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
---
name: "Add Compiler test"

on:
workflow_dispatch:
inputs:
image:
description: 'GCP image for test cluster'
required: true
default: 'almalinux-cloud/almalinux-8'
architecture:
description: 'PE architecture to test'
required: true
default: 'large'
version:
description: 'PE version to install'
required: true
default: '2021.7.2'
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
matrix:
architecture:
- "${{ github.event.inputs.architecture }}"
version:
- "${{ github.event.inputs.version }}"
image:
- "${{ github.event.inputs.image }}"

steps:
- name: 'Start SSH session'
if: ${{ github.event.inputs.ssh-debugging == 'true' }}
uses: luchihoratiu/debug-via-ssh@main
with:
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

- 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 }}-provision >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
echo ::endgroup::
- name: 'Provision test cluster (specified architecture with added DR)'
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 }}-with-extra-compiler
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 }}-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::
- 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 }}
- name: 'Wait as long as the file ${HOME}/pause file is present'
if: ${{ always() && github.event.inputs.ssh-debugging == 'true' }}
run: |
while [ -f "${HOME}/pause" ] ; do
echo "${HOME}/pause present, sleeping for 60 seconds..."
sleep 60
done
echo "${HOME}/pause absent, continuing workflow."
- 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::
2 changes: 1 addition & 1 deletion .github/workflows/test-add-replica.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
version:
description: 'PE version to install'
required: true
default: '2021.7.0'
default: '2021.7.2'
ssh-debugging:
description: 'Boolean; whether or not to pause for ssh debugging'
required: true
Expand Down
Loading