diff --git a/.github/workflows/test-install-rhel-9.yaml b/.github/workflows/PE_XL_DR_2023_almalinux8.yaml similarity index 59% rename from .github/workflows/test-install-rhel-9.yaml rename to .github/workflows/PE_XL_DR_2023_almalinux8.yaml index 793eebd1..a0fb9da7 100644 --- a/.github/workflows/test-install-rhel-9.yaml +++ b/.github/workflows/PE_XL_DR_2023_almalinux8.yaml @@ -1,5 +1,5 @@ --- -name: Install test rhel-9 +name: Install test matrix on: pull_request: paths: @@ -35,9 +35,9 @@ jobs: strategy: fail-fast: false matrix: - architecture: [standard-with-dr, large, extra-large-with-dr] - version: [2021.7.9, 2023.8.1, 2025.0.0] - image: [rhel-9] + architecture: [extra-large-with-dr] + version: [2023.8.0] # can change to test multiple versions once this one works + image: [almalinux-cloud/almalinux-8] steps: - name: Checkout Source uses: actions/checkout@v4 @@ -97,3 +97,54 @@ jobs: cat request.json || true; echo echo ::endgroup:: fi + test-backup: # to replace failed VM + name: PE ${{ matrix.version }} ${{ matrix.architecture }} on ${{ matrix.image }} + runs-on: ubuntu-20.04 + env: + BOLT_GEM: true + BOLT_DISABLE_ANALYTICS: true + LANG: en_US.UTF-8 + strategy: + fail-fast: false + matrix: + architecture: [extra-large-with-dr] + version: [2023.8.0] # can change to test multiple versions once this one works + image: [almalinux-cloud/almalinux-8] + steps: + - name: Checkout Source + uses: actions/checkout@v4 + - 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 + bundle 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 + bundle exec rake spec_prep + echo ::endgroup:: + echo ::group::provision + bundle exec bolt plan run peadm_spec::provision_test_cluster \ + --modulepath spec/fixtures/modules \ + provider=provision_service \ + image=${{ matrix.image }} \ + architecture=standard \ + --log-level trace + 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:: \ No newline at end of file diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml deleted file mode 100644 index d1d53a21..00000000 --- a/.github/workflows/nightly.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: nightly -on: - schedule: - - cron: 0 0 * * * - workflow_dispatch: -jobs: - Spec: - if: ${{ github.repository_owner == 'puppetlabs' }} - uses: puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main - secrets: inherit - Acceptance: - if: ${{ github.repository_owner == 'puppetlabs' }} - needs: Spec - uses: puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main - with: - flags: --provision-service - secrets: inherit diff --git a/.github/workflows/test-add-compiler-matrix.yml b/.github/workflows/test-add-compiler-matrix.yml deleted file mode 100644 index 6da1fddc..00000000 --- a/.github/workflows/test-add-compiler-matrix.yml +++ /dev/null @@ -1,105 +0,0 @@ ---- -name: Add compiler matrix -on: - pull_request: - 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 - branches: [main] - workflow_dispatch: {} -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 - LANG: en_US.UTF-8 - strategy: - fail-fast: false - matrix: - architecture: [standard, large, extra-large] - version: [2021.7.9, 2023.8.1, 2025.0.0] - image: [almalinux-cloud/almalinux-8] - steps: - - name: Checkout Source - uses: actions/checkout@v4 - - 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 - bundle 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 - bundle exec rake spec_prep - echo ::endgroup:: - echo ::group::provision - 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: Install PE on test cluster - timeout-minutes: 120 - run: | - bundle exec bolt plan run peadm_spec::install_test_cluster \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - architecture=${{ matrix.architecture }} \ - console_password=${{ secrets.CONSOLE_PASSWORD }} \ - version=${{ matrix.version }} - - name: Run add_compilers plan - timeout-minutes: 50 - run: | - bundle exec bolt plan run peadm_spec::add_compilers -v \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - architecture=${{ matrix.architecture }} - - name: Tear down test cluster - if: ${{ always() }} - continue-on-error: true - run: |- - if [ -f spec/fixtures/litmus_inventory.yaml ]; then - echo ::group::tear_down - bundle exec rake 'litmus:tear_down' - echo ::endgroup:: - echo ::group::info:request - cat request.json || true; echo - echo ::endgroup:: - fi diff --git a/.github/workflows/test-add-compiler.yaml b/.github/workflows/test-add-compiler.yaml deleted file mode 100644 index 46eeedc4..00000000 --- a/.github/workflows/test-add-compiler.yaml +++ /dev/null @@ -1,115 +0,0 @@ ---- -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: 2023.8.1 - ssh-debugging: - description: Boolean; whether or not to pause for ssh debugging - required: true - default: 'false' -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 - 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: Checkout Source - uses: actions/checkout@v4 - - 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 - bundle env - echo ::endgroup:: - - name: Provision test cluster (specified architecture with added compiler) - 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 - bundle exec rake spec_prep - echo ::endgroup:: - echo ::group::provision - 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: Install PE on test cluster - timeout-minutes: 120 - run: | - 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 }} \ - console_password=${{ secrets.CONSOLE_PASSWORD }} - - name: Run add_compilers plan - timeout-minutes: 50 - run: | - bundle exec bolt plan run peadm_spec::add_compilers -v \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - architecture=${{ matrix.architecture }} \ - --stream - - 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 - bundle exec rake 'litmus:tear_down' - echo ::endgroup:: - echo ::group::info:request - cat request.json || true; echo - echo ::endgroup:: - fi diff --git a/.github/workflows/test-add-replica-matrix.yaml b/.github/workflows/test-add-replica-matrix.yaml deleted file mode 100644 index a4cb89f6..00000000 --- a/.github/workflows/test-add-replica-matrix.yaml +++ /dev/null @@ -1,112 +0,0 @@ ---- -name: Add replica matrix -on: - pull_request: - 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 - branches: [main] - workflow_dispatch: {} -jobs: - test-add-replica: - name: PE ${{ matrix.version }} ${{ matrix.architecture }} on ${{ matrix.image }} - runs-on: ubuntu-20.04 - env: - BOLT_GEM: true - BOLT_DISABLE_ANALYTICS: true - LANG: en_US.UTF-8 - strategy: - fail-fast: false - matrix: - architecture: [standard, standard-with-dr, large, extra-large] - version: [2023.8.1, 2025.0.0] - image: [almalinux-cloud/almalinux-8] - steps: - - name: Checkout Source - uses: actions/checkout@v4 - - 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 - bundle env - echo ::endgroup:: - - name: Provision test cluster (specified architecture and a spare replica) - 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 - bundle exec rake spec_prep - echo ::endgroup:: - echo ::group::provision - bundle exec bolt plan run peadm_spec::provision_test_cluster \ - --modulepath spec/fixtures/modules \ - provider=provision_service \ - image=${{ matrix.image }} \ - architecture=${{ matrix.architecture }}-and-spare-replica - 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: Install PE on test cluster - timeout-minutes: 120 - run: | - 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 }} \ - console_password=${{ secrets.CONSOLE_PASSWORD }} \ - code_manager_auto_configure=true - - name: Run add_replica plan - timeout-minutes: 60 - run: | - bundle exec bolt plan run peadm_spec::add_replica -v \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - --stream - - name: Verify that replica was added - timeout-minutes: 10 - run: | - bundle exec bolt plan run peadm_spec::verify_replica -v \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules - - name: Tear down test cluster - if: ${{ always() }} - continue-on-error: true - run: |- - if [ -f spec/fixtures/litmus_inventory.yaml ]; then - echo ::group::tear_down - bundle exec rake 'litmus:tear_down' - echo ::endgroup:: - echo ::group::info:request - cat request.json || true; echo - echo ::endgroup:: - fi diff --git a/.github/workflows/test-add-replica.yaml b/.github/workflows/test-add-replica.yaml deleted file mode 100644 index 4ce32630..00000000 --- a/.github/workflows/test-add-replica.yaml +++ /dev/null @@ -1,121 +0,0 @@ ---- -name: Add Replica 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: standard - version: - description: PE version to install - required: true - default: 2023.8.1 - ssh-debugging: - description: Boolean; whether or not to pause for ssh debugging - required: true - default: 'false' -jobs: - test-add-replica: - name: PE ${{ matrix.version }} ${{ matrix.architecture }} on ${{ matrix.image }} - runs-on: ubuntu-20.04 - env: - BOLT_GEM: true - BOLT_DISABLE_ANALYTICS: true - 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: Checkout Source - uses: actions/checkout@v4 - - 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 - bundle env - echo ::endgroup:: - - name: Provision test cluster (specified architecture with spare replica) - 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 - bundle exec rake spec_prep - echo ::endgroup:: - echo ::group::provision - bundle exec bolt plan run peadm_spec::provision_test_cluster \ - --modulepath spec/fixtures/modules \ - provider=provision_service \ - image=${{ matrix.image }} \ - architecture=${{ matrix.architecture }}-and-spare-replica - 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: Install PE on test cluster - timeout-minutes: 120 - run: | - 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 }} \ - console_password=${{ secrets.CONSOLE_PASSWORD }} \ - code_manager_auto_configure=true - - name: Run add_replica plan - timeout-minutes: 60 - run: | - bundle exec bolt plan run peadm_spec::add_replica -v \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - --stream - - name: Verify that replica was added - timeout-minutes: 10 - run: | - bundle exec bolt plan run peadm_spec::verify_replica -v \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules - - 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 - bundle exec rake 'litmus:tear_down' - echo ::endgroup:: - echo ::group::info:request - cat request.json || true; echo - echo ::endgroup:: - fi diff --git a/.github/workflows/test-backup-restore-migration.yaml b/.github/workflows/test-backup-restore-migration.yaml deleted file mode 100644 index c8f6e393..00000000 --- a/.github/workflows/test-backup-restore-migration.yaml +++ /dev/null @@ -1,217 +0,0 @@ ---- -name: Backup and restore 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: standard - version: - description: PE version to install - required: true - default: 2021.7.4 - ssh-debugging: - description: Boolean; whether or not to pause for ssh debugging - required: true - default: 'false' -jobs: - backup: - name: 'Backup: Cluster A: PE ${{ inputs.version }} ${{ inputs.architecture }} - on ${{ inputs.image }}' - runs-on: ubuntu-20.04 - env: - BOLT_GEM: true - BOLT_DISABLE_ANALYTICS: true - LANG: en_US.UTF-8 - 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: Checkout Source - uses: actions/checkout@v4 - - 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 - bundle 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 - bundle exec rake spec_prep - echo ::endgroup:: - echo ::group::provision - bundle exec bolt plan run peadm_spec::provision_test_cluster \ - --modulepath spec/fixtures/modules \ - provider=provision_service \ - image=${{ inputs.image }} \ - architecture=${{ inputs.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: Save inventory file A to an artifact - # uses: actions/upload-artifact@v3 - # with: - # name: inventory_A - # path: spec/fixtures/litmus_inventory.yaml - - name: Install PE on test cluster - timeout-minutes: 120 - run: | - bundle exec bolt plan run peadm_spec::install_test_cluster \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - architecture=${{ inputs.architecture }} \ - version=${{ inputs.version }} \ - console_password=${{ secrets.CONSOLE_PASSWORD }} - - 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: Download artifacts - # # if: always() - # uses: actions/download-artifact@v3 - # with: - # path: spec/fixtures/ - - name: perform PE backup of cluster A - timeout-minutes: 10 - continue-on-error: true - 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 - bundle exec rake spec_prep - echo ::endgroup:: - echo ::group::backup - bundle exec bolt plan run peadm_spec::test_backup \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules - echo ::endgroup:: - - name: Wait as long as the file ${HOME}/pause file is present - continue-on-error: true - # if: ${{ always() && github.event.inputs.ssh-debugging == 'true' }} - if: github.event.inputs.ssh-debugging == 'true' - run: | - while [ -f "${HOME}/pause" ] ; do - echo "${HOME}/pause present, sleeping for 60 seconds..." - sleep 10 - done - echo "${HOME}/pause absent, continuing workflow." - - name: Tear down cluster A - if: always() - run: | - if [ -f spec/fixtures/litmus_inventory.yaml ]; then - echo ::group::tear_down - bundle exec rake 'litmus:tear_down' - echo ::endgroup:: - echo ::group::info:request - cat request.json || true; echo - echo ::endgroup:: - fi - restore: - name: 'Restore: Cluster B: PE ${{ inputs.version }} ${{ inputs.architecture }} - on ${{ inputs.image }}' - runs-on: ubuntu-20.04 - env: - BOLT_GEM: true - BOLT_DISABLE_ANALYTICS: true - LANG: en_US.UTF-8 - steps: - - name: Checkout Source - uses: actions/checkout@v4 - - 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 - bundle 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 - bundle exec rake spec_prep - echo ::endgroup:: - echo ::group::provision - bundle exec bolt plan run peadm_spec::provision_test_cluster \ - --modulepath spec/fixtures/modules \ - provider=provision_service \ - image=${{ inputs.image }} \ - architecture=${{ inputs.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: Save inventory file B to an artifact - # uses: actions/upload-artifact@v3 - # with: - # name: inventory_B - # path: spec/fixtures/litmus_inventory.yaml - - name: Install PE on test cluster - timeout-minutes: 120 - run: | - bundle exec bolt plan run peadm_spec::install_test_cluster \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - architecture=${{ inputs.architecture }} \ - version=${{ inputs.version }} \ - console_password=${{ secrets.CONSOLE_PASSWORD }} - - name: Wait for backup to finish - uses: lewagon/wait-on-check-action@v1.3.4 - with: - ref: ${{ github.ref }} - check-name: 'Backup: Cluster A: PE ${{ inputs.version }} ${{ inputs.architecture }} - on ${{ inputs.image }}' - repo-token: ${{ secrets.GITHUB_TOKEN }} - wait-interval: 10 - - name: Tear down cluster B - if: always() - run: |- - cp spec/fixtures/inventory_B/litmus_inventory.yaml spec/fixtures/litmus_inventory.yaml || true - if [ -f spec/fixtures/litmus_inventory.yaml ]; then - echo ::group::tear_down - bundle exec rake 'litmus:tear_down' - echo ::endgroup:: - echo ::group::info:request - cat request.json || true; echo - echo ::endgroup:: - fi diff --git a/.github/workflows/test-failover.yaml b/.github/workflows/test-failover.yaml deleted file mode 100644 index 139b47ae..00000000 --- a/.github/workflows/test-failover.yaml +++ /dev/null @@ -1,140 +0,0 @@ ---- -name: Failover test -on: - workflow_dispatch: - inputs: - image: - description: GCP image for test cluster - required: true - default: almalinux-cloud/almalinux-8 - version: - description: PE version to install - required: true - default: 2019.8.12 - version_to_upgrade: - description: PE version to upgrade to - required: false - default: 2023.8.1 - ssh-debugging: - description: Boolean; whether or not to pause for ssh debugging - required: true - default: 'false' - log_level: - description: Bolt log level - required: false - default: debug -jobs: - test-failover: - name: PE ${{ matrix.version }} ${{ matrix.architecture }} on ${{ matrix.image }} - runs-on: ubuntu-20.04 - env: - BOLT_GEM: true - BOLT_DISABLE_ANALYTICS: true - LANG: en_US.UTF-8 - strategy: - fail-fast: false - matrix: - version: ['${{ github.event.inputs.version }}'] - image: ['${{ github.event.inputs.image }}'] - architecture: [extra-large-with-dr] - 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: Checkout Source - uses: actions/checkout@v4 - - 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 - bundle env - echo ::endgroup:: - - name: Provision test cluster (XL with spare replica) - 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 - bundle exec rake spec_prep - echo ::endgroup:: - echo ::group::provision - bundle exec bolt plan run peadm_spec::provision_test_cluster \ - --modulepath spec/fixtures/modules \ - provider=provision_service \ - image=${{ matrix.image }} \ - architecture=${{ matrix.architecture }}-and-spare-replica - 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: Install PE on test cluster - timeout-minutes: 120 - run: | - bundle exec bolt plan run peadm_spec::install_test_cluster --log_level ${{ github.event.inputs.log_level }} \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - architecture=${{ matrix.architecture }} \ - version=${{ matrix.version }} \ - console_password=${{ secrets.CONSOLE_PASSWORD }} - - name: Perform failover - run: | - bundle exec bolt plan run peadm_spec::perform_failover --log_level ${{ github.event.inputs.log_level }} \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules - - 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: Set up yq - uses: frenck/action-setup-yq@v1 - with: - version: v4.30.5 - - name: Update inventory - run: | - # Remove failed primary - yq -i 'del(.groups[].targets[] | select(.vars.role == "primary"))' spec/fixtures/litmus_inventory.yaml - # Swap primary and replica nodes - sed -i.sedbak 's/primary/__tmp__/;s/spare-replica/__tmp2__/;s/replica/primary/;s/__tmp__/replica/;s/__tmp2__/replica/' \ - spec/fixtures/litmus_inventory.yaml - echo ::group::info:inventory - sed -e 's/password: .*/password: "[redacted]"/' < spec/fixtures/litmus_inventory.yaml || true - echo ::endgroup:: - - name: Upgrade PE on test cluster - if: ${{ success() && github.event.inputs.version_to_upgrade != '' }} - timeout-minutes: 120 - run: | - bundle exec bolt plan run peadm_spec::upgrade_test_cluster --log_level ${{ github.event.inputs.log_level }} \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - architecture=${{ matrix.architecture }} \ - download_mode='direct' \ - version=${{ github.event.inputs.version_to_upgrade }} - - name: Tear down test cluster - if: ${{ always() }} - continue-on-error: true - run: |- - if [ -f spec/fixtures/litmus_inventory.yaml ]; then - echo ::group::tear_down - bundle exec rake 'litmus:tear_down' - echo ::endgroup:: - echo ::group::info:request - cat request.json || true; echo - echo ::endgroup:: - fi diff --git a/.github/workflows/test-fips-install-matrix.yaml b/.github/workflows/test-fips-install-matrix.yaml deleted file mode 100644 index 494459ce..00000000 --- a/.github/workflows/test-fips-install-matrix.yaml +++ /dev/null @@ -1,101 +0,0 @@ ---- -name: Install fips test matrix -on: - pull_request: - 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 - branches: [main] - workflow_dispatch: {} -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 - 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.9, 2023.8.1, 2025.0.0] - image: [rhel-8] - fips: [enable] - steps: - - name: Checkout Source - uses: actions/checkout@v4 - - 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 - bundle 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 - bundle exec rake spec_prep - echo ::endgroup:: - echo ::group::provision - 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: Install PE on test cluster - timeout-minutes: 120 - run: | - 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 }} \ - console_password=${{ secrets.CONSOLE_PASSWORD }} - - name: Tear down test cluster - if: ${{ always() }} - continue-on-error: true - run: |- - if [ -f spec/fixtures/litmus_inventory.yaml ]; then - echo ::group::tear_down - bundle exec rake 'litmus:tear_down' - echo ::endgroup:: - echo ::group::info:request - cat request.json || true; echo - echo ::endgroup:: - fi diff --git a/.github/workflows/test-install-latest-dev.yaml b/.github/workflows/test-install-latest-dev.yaml deleted file mode 100644 index 9f1d08f2..00000000 --- a/.github/workflows/test-install-latest-dev.yaml +++ /dev/null @@ -1,120 +0,0 @@ ---- -name: Install latest dev test -on: - workflow_dispatch: - inputs: - image: - description: GCP image for test cluster - required: true - default: almalinux-cloud/almalinux-8 - architecture: - type: choice - required: true - default: standard - description: PE architecture to test - options: - - standard - - standard-with-dr - - large - - large-with-dr - - extra-large - - extra-large-with-dr - ssh-debugging: - description: Boolean; whether or not to pause for ssh debugging - required: true - default: 'false' -jobs: - test-install: - name: PE ${{ matrix.version }} ${{ matrix.architecture }} on ${{ matrix.image }} - runs-on: ubuntu-20.04 - env: - BOLT_GEM: true - BOLT_DISABLE_ANALYTICS: true - LANG: en_US.UTF-8 - strategy: - fail-fast: false - matrix: - architecture: ['${{ github.event.inputs.architecture }}'] - 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: Checkout Source - uses: actions/checkout@v4 - - 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 - bundle 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 - bundle exec rake spec_prep - echo ::endgroup:: - echo ::group::provision - 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: Activate twingate to obtain unreleased build - uses: twingate/github-action@main - with: - service-key: ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }} - - name: Get latest build name - id: latest - run: | - echo "::set-output name=ver::$(curl -q https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/main/ci-ready/LATEST)" - - name: Install PE on test cluster - timeout-minutes: 120 - run: | - bundle exec bolt plan run peadm_spec::install_test_cluster \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - permit_unsafe_versions=true \ - download_mode="bolthost" \ - architecture=${{ matrix.architecture }} \ - pe_installer_source="https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/main/ci-ready/puppet-enterprise-${{ steps.latest.outputs.ver }}-el-8-x86_64.tar" \ - console_password=${{ secrets.CONSOLE_PASSWORD }} - - 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 - bundle exec rake 'litmus:tear_down' - echo ::endgroup:: - echo ::group::info:request - cat request.json || true; echo - echo ::endgroup:: - fi diff --git a/.github/workflows/test-install-latest-xlarge-dev-nightly.yaml b/.github/workflows/test-install-latest-xlarge-dev-nightly.yaml deleted file mode 100644 index e39073a3..00000000 --- a/.github/workflows/test-install-latest-xlarge-dev-nightly.yaml +++ /dev/null @@ -1,106 +0,0 @@ ---- -name: Install latest dev test nightly -on: - schedule: - - cron: 0 3 * * * - workflow_dispatch: - inputs: - ssh-debugging: - description: Boolean; whether or not to pause for ssh debugging - required: true - default: 'false' -jobs: - test-install: - name: PE nightly using ${{ matrix.architecture }} on ${{ matrix.image }} - runs-on: ubuntu-20.04 - env: - BOLT_GEM: true - BOLT_DISABLE_ANALYTICS: true - LANG: en_US.UTF-8 - strategy: - fail-fast: false - matrix: - architecture: [extra-large-with-dr] - image: [almalinux-cloud/almalinux-8] - 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: Checkout Source - uses: actions/checkout@v4 - - 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 - bundle 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 - bundle exec rake spec_prep - echo ::endgroup:: - echo ::group::provision - 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: Activate twingate to obtain unreleased build - uses: twingate/github-action@main - with: - service-key: ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }} - - name: Get latest build name - id: latest - run: | - echo "::set-output name=ver::$(curl -q https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/main/ci-ready/LATEST)" - - name: Install PE on test cluster - timeout-minutes: 120 - run: | - bundle exec bolt plan run peadm_spec::install_test_cluster \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - permit_unsafe_versions=true \ - download_mode="bolthost" \ - architecture=${{ matrix.architecture }} \ - pe_installer_source="https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/main/ci-ready/puppet-enterprise-${{ steps.latest.outputs.ver }}-el-8-x86_64.tar" \ - console_password=${{ secrets.CONSOLE_PASSWORD }} - - 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 - bundle exec rake 'litmus:tear_down' - echo ::endgroup:: - echo ::group::info:request - cat request.json || true; echo - echo ::endgroup:: - fi diff --git a/.github/workflows/test-legacy-compilers.yaml b/.github/workflows/test-legacy-compilers.yaml deleted file mode 100644 index 254a8b99..00000000 --- a/.github/workflows/test-legacy-compilers.yaml +++ /dev/null @@ -1,161 +0,0 @@ ---- -name: Convert compiler to legacy -on: - pull_request: - 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 - branches: [main] - workflow_dispatch: - inputs: - ssh-debugging: - description: Boolean; whether or not to pause for ssh debugging - required: true - default: 'false' -jobs: - convert_compiler: - name: Convert compilers to legacy - runs-on: ubuntu-20.04 - env: - BOLT_GEM: true - BOLT_DISABLE_ANALYTICS: true - LANG: en_US.UTF-8 - 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: Checkout Source - uses: actions/checkout@v4 - - 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 - bundle 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 - bundle exec rake spec_prep - echo ::endgroup:: - echo ::group::provision - bundle exec bolt plan run peadm_spec::provision_test_cluster \ - --modulepath spec/fixtures/modules \ - provider=provision_service \ - image=almalinux-cloud/almalinux-8 \ - architecture=large-with-dr - echo ::endgroup:: - echo ::group::certnames - bundle exec bolt plan run peadm_spec::add_inventory_hostnames \ - --inventory spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - --no-host-key-check \ - inventory_file=spec/fixtures/litmus_inventory.yaml - 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: Set up yq - uses: frenck/action-setup-yq@v1 - with: - version: v4.30.5 - - name: Install PE on test cluster - timeout-minutes: 120 - run: | - bundle exec bolt plan run peadm_spec::install_test_cluster \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - architecture=large-with-dr \ - console_password=${{ secrets.CONSOLE_PASSWORD }} \ - version=2025.0.0 - - 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: Convert one compiler to legacy - timeout-minutes: 120 - run: | - primary=$(yq '.groups[].targets[] | select(.vars.role == "primary") | .name' spec/fixtures/litmus_inventory.yaml) - compiler=$(yq '.groups[].targets[] | select(.vars.role == "compiler") | .name' spec/fixtures/litmus_inventory.yaml | head -n 1) - echo "primary: $primary" - echo "compiler: $compiler" - echo ::group::convert_compiler_to_legacy - bundle exec bolt plan run peadm::convert_compiler_to_legacy \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - --no-host-key-check \ - primary_host=$primary \ - legacy_hosts=$compiler - echo ::endgroup:: - - name: Check if compiler is converted - timeout-minutes: 120 - run: | - echo ::group::inventory - sed -e 's/password: .*/password: "[redacted]"/' < spec/fixtures/litmus_inventory.yaml || true - echo ::endgroup:: - echo ::group::get_peadm_config - primary=$(yq '.groups[].targets[] | select(.vars.role == "primary") | .name' spec/fixtures/litmus_inventory.yaml) - compiler=$(yq '.groups[].targets[] | select(.vars.role == "compiler") | .name' spec/fixtures/litmus_inventory.yaml | head -n 1) - bundle exec bolt task run peadm::get_peadm_config \ - --targets $primary \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - --no-host-key-check \ - --format json > peadm_config.json - cat peadm_config.json - echo ::endgroup:: - echo ::group::smoke_test - legacy_compiler=$(yq '.items[0].value.params.legacy_compilers[0]' peadm_config.json) - if [ "$compiler" != "$legacy_compiler" ]; then - echo "Compiler conversion failed, expected $compiler, got $legacy_compiler" - exit 1 - fi - 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 - bundle exec rake 'litmus:tear_down' - echo ::endgroup:: - echo ::group::info:request - cat request.json || true; echo - echo ::endgroup:: - fi diff --git a/.github/workflows/test-legacy-upgrade.yaml b/.github/workflows/test-legacy-upgrade.yaml deleted file mode 100644 index 23692fca..00000000 --- a/.github/workflows/test-legacy-upgrade.yaml +++ /dev/null @@ -1,205 +0,0 @@ ---- -name: Upgrade PE with legacy compilers -on: - pull_request: - 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 - branches: [main] - workflow_dispatch: - inputs: - ssh-debugging: - description: Boolean; whether or not to pause for ssh debugging - required: true - default: 'false' -jobs: - upgrade_with_legacy_compilers: - name: Upgrade PE with legacy compilers - runs-on: ubuntu-20.04 - env: - BOLT_GEM: true - BOLT_DISABLE_ANALYTICS: true - LANG: en_US.UTF-8 - 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: Checkout Source - uses: actions/checkout@v4 - - 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 - bundle 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 - bundle exec rake spec_prep - echo ::endgroup:: - echo ::group::provision - bundle exec bolt plan run peadm_spec::provision_test_cluster \ - --modulepath spec/fixtures/modules \ - provider=provision_service \ - image=almalinux-cloud/almalinux-8 \ - architecture=large-with-dr - echo ::endgroup:: - echo ::group::certnames - bundle exec bolt plan run peadm_spec::add_inventory_hostnames \ - --inventory spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - --no-host-key-check \ - inventory_file=spec/fixtures/litmus_inventory.yaml - 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: Set up yq - uses: frenck/action-setup-yq@v1 - with: - version: v4.30.5 - - name: Create the params.json file - run: | - primary=$(yq '.groups[].targets[] | select(.vars.role == "primary") | .name' spec/fixtures/litmus_inventory.yaml) - compiler=$(yq '.groups[].targets[] | select(.vars.role == "compiler") | .name' spec/fixtures/litmus_inventory.yaml | head -n 1) - legacy_compiler=$(yq '.groups[].targets[] | select(.vars.role == "compiler") | .name' spec/fixtures/litmus_inventory.yaml | sed -n 2p) - replica=$(yq '.groups[].targets[] | select(.vars.role == "replica") | .name' spec/fixtures/litmus_inventory.yaml) - hash_random=$(LC_ALL=C tr -dc 'A-Za-z0-9!#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' params.json - - name: Install PE with legacy compilers - timeout-minutes: 120 - run: | - echo ::group::params.json - jq '.console_password = "[redacted]"' params.json || true - echo ::endgroup:: - echo ::group::install - bundle exec bolt plan run peadm::install \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - --no-host-key-check \ - --params @params.json - echo ::endgroup:: - - 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: Check if compilers are configured - timeout-minutes: 120 - run: | - echo ::group::inventory - sed -e 's/password: .*/password: "[redacted]"/' < spec/fixtures/litmus_inventory.yaml || true - echo ::endgroup:: - echo ::group::get_peadm_config - primary=$(yq '.groups[].targets[] | select(.vars.role == "primary") | .name' spec/fixtures/litmus_inventory.yaml) - compiler=$(yq '.groups[].targets[] | select(.vars.role == "compiler") | .name' spec/fixtures/litmus_inventory.yaml | head -n 1) - legacy_compiler=$(yq '.groups[].targets[] | select(.vars.role == "compiler") | .name' spec/fixtures/litmus_inventory.yaml | sed -n 2p) - bundle exec bolt task run peadm::get_peadm_config \ - --targets $primary \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - --no-host-key-check \ - --format json > peadm_config.json - cat peadm_config.json - echo ::endgroup:: - echo ::group::smoke_test - configured_legacy_compiler=$(yq '.items[0].value.params.legacy_compilers[0]' peadm_config.json) - configured_compiler=$(yq '.items[0].value.params.compiler_hosts[0]' peadm_config.json) - if [ "$configured_legacy_compiler" != "$legacy_compiler" ] && [ "$configured_compiler" != "$compiler" ]; then - echo "Compilers are not configured, expected $legacy_compiler and $compiler, got $configured_legacy_compiler and $configured_compiler" - exit 1 - fi - echo ::endgroup:: - - name: Create the upgrade params.json file - run: | - primary=$(yq '.groups[].targets[] | select(.vars.role == "primary") | .name' spec/fixtures/litmus_inventory.yaml) - compiler=$(yq '.groups[].targets[] | select(.vars.role == "compiler") | .name' spec/fixtures/litmus_inventory.yaml | head -n 1) - legacy_compiler=$(yq '.groups[].targets[] | select(.vars.role == "compiler") | .name' spec/fixtures/litmus_inventory.yaml | sed -n 2p) - replica=$(yq '.groups[].targets[] | select(.vars.role == "replica") | .name' spec/fixtures/litmus_inventory.yaml) - echo -n '{ "primary_host": "'$primary'", "replica_host": "'$replica'", "compiler_hosts": ["'$compiler'", "'$legacy_compiler'"], "version": "2025.0.0"}' > upgrade_params.json - - name: Upgrade PE with legacy compilers - run: | - echo ::group::upgrade_params.json - cat upgrade_params.json - echo ::endgroup:: - echo ::group::upgrade - bundle exec bolt plan run peadm::upgrade \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - --no-host-key-check \ - --params @upgrade_params.json - echo ::endgroup:: - - name: Check if we still have legacy compilers configured - timeout-minutes: 120 - run: | - echo ::group::inventory - sed -e 's/password: .*/password: "[redacted]"/' < spec/fixtures/litmus_inventory.yaml || true - echo ::endgroup:: - echo ::group::get_peadm_config - primary=$(yq '.groups[].targets[] | select(.vars.role == "primary") | .name' spec/fixtures/litmus_inventory.yaml) - compiler=$(yq '.groups[].targets[] | select(.vars.role == "compiler") | .name' spec/fixtures/litmus_inventory.yaml | head -n 1) - legacy_compiler=$(yq '.groups[].targets[] | select(.vars.role == "compiler") | .name' spec/fixtures/litmus_inventory.yaml | sed -n 2p) - bundle exec bolt task run peadm::get_peadm_config \ - --targets $primary \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - --no-host-key-check \ - --format json > peadm_config.json - cat peadm_config.json - echo ::endgroup:: - echo ::group::smoke_test - configured_legacy_compiler=$(yq '.items[0].value.params.legacy_compilers[0]' peadm_config.json) - configured_compiler=$(yq '.items[0].value.params.compiler_hosts[0]' peadm_config.json) - if [ "$configured_legacy_compiler" != "$legacy_compiler" ] && [ "$configured_compiler" != "$compiler" ]; then - echo "Compilers are not configured, expected $legacy_compiler and $compiler, got $configured_legacy_compiler and $configured_compiler" - exit 1 - fi - 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 - bundle exec rake 'litmus:tear_down' - echo ::endgroup:: - echo ::group::info:request - cat request.json || true; echo - echo ::endgroup:: - fi diff --git a/.github/workflows/test-upgrade-latest-dev.yaml b/.github/workflows/test-upgrade-latest-dev.yaml deleted file mode 100644 index 37ad90a7..00000000 --- a/.github/workflows/test-upgrade-latest-dev.yaml +++ /dev/null @@ -1,135 +0,0 @@ ---- -name: Upgrade to latest dev test -on: - workflow_dispatch: - inputs: - image: - description: GCP image for test cluster - required: true - default: almalinux-cloud/almalinux-8 - architecture: - type: choice - required: true - default: standard - description: PE architecture to test - options: - - standard - - standard-with-dr - - large - - large-with-dr - - extra-large - - extra-large-with-dr - version: - type: string - required: true - description: The initial version of PE to install before upgrade - default: 2023.8.1 - ssh-debugging: - description: Boolean; whether or not to pause for ssh debugging - required: true - default: 'false' -jobs: - test-upgrade: - name: PE ${{ matrix.version }} to latest dev using ${{ matrix.architecture }} - on ${{ matrix.image }} - runs-on: ubuntu-20.04 - env: - BOLT_GEM: true - BOLT_DISABLE_ANALYTICS: true - 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: Checkout Source - uses: actions/checkout@v4 - - 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 - bundle 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 - bundle exec rake spec_prep - echo ::endgroup:: - echo ::group::provision - 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: Install PE on test cluster - timeout-minutes: 120 - run: | - 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 }} \ - console_password=${{ secrets.CONSOLE_PASSWORD }} - - 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: Activate twingate to obtain unreleased build - uses: twingate/github-action@main - with: - service-key: ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }} - - name: Get latest build name - id: latest - run: | - echo "::set-output name=ver::$(curl -q https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/main/ci-ready/LATEST)" - - name: Upgrade PE on test cluster - timeout-minutes: 120 - run: | - bundle exec bolt plan run peadm_spec::upgrade_test_cluster \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - permit_unsafe_versions=true \ - download_mode="bolthost" \ - architecture=${{ matrix.architecture }} \ - pe_installer_source="https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/main/ci-ready/puppet-enterprise-${{ steps.latest.outputs.ver }}-el-8-x86_64.tar" - - name: Tear down test cluster - if: ${{ always() }} - continue-on-error: true - run: |- - if [ -f spec/fixtures/litmus_inventory.yaml ]; then - echo ::group::tear_down - bundle exec rake 'litmus:tear_down' - echo ::endgroup:: - echo ::group::info:request - cat request.json || true; echo - echo ::endgroup:: - fi diff --git a/.github/workflows/test-upgrade-latest-xlarge-dev-nightly.yaml b/.github/workflows/test-upgrade-latest-xlarge-dev-nightly.yaml deleted file mode 100644 index 0a5ee865..00000000 --- a/.github/workflows/test-upgrade-latest-xlarge-dev-nightly.yaml +++ /dev/null @@ -1,96 +0,0 @@ ---- -name: Upgrade to latest dev test nightly -on: - schedule: - - cron: 0 3 * * * -jobs: - test-upgrade: - name: PE ${{ matrix.version }} to nightly dev using ${{ matrix.architecture }} - on ${{ matrix.image }} - runs-on: ubuntu-20.04 - env: - BOLT_GEM: true - BOLT_DISABLE_ANALYTICS: true - LANG: en_US.UTF-8 - strategy: - fail-fast: false - matrix: - architecture: [extra-large-with-dr] - version: [2023.8.1] - image: [almalinux-cloud/almalinux-8] - steps: - - name: Checkout Source - uses: actions/checkout@v4 - - 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 - bundle 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 - bundle exec rake spec_prep - echo ::endgroup:: - echo ::group::provision - 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: Install PE on test cluster - timeout-minutes: 120 - run: | - 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 }} \ - console_password=${{ secrets.CONSOLE_PASSWORD }} - - name: Activate twingate to obtain unreleased build - uses: twingate/github-action@main - with: - service-key: ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }} - - name: Get latest build name - id: latest - run: | - echo "::set-output name=ver::$(curl -q https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/main/ci-ready/LATEST)" - - name: Upgrade PE on test cluster - timeout-minutes: 120 - run: | - bundle exec bolt plan run peadm_spec::upgrade_test_cluster \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - permit_unsafe_versions=true \ - download_mode="bolthost" \ - architecture=${{ matrix.architecture }} \ - pe_installer_source="https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/main/ci-ready/puppet-enterprise-${{ steps.latest.outputs.ver }}-el-8-x86_64.tar" - - name: Tear down test cluster - if: ${{ always() }} - continue-on-error: true - run: |- - if [ -f spec/fixtures/litmus_inventory.yaml ]; then - echo ::group::tear_down - bundle exec rake 'litmus:tear_down' - echo ::endgroup:: - echo ::group::info:request - cat request.json || true; echo - echo ::endgroup:: - fi diff --git a/.github/workflows/test-upgrade-matrix.yaml b/.github/workflows/test-upgrade-matrix.yaml deleted file mode 100644 index e59b4cde..00000000 --- a/.github/workflows/test-upgrade-matrix.yaml +++ /dev/null @@ -1,139 +0,0 @@ ---- -name: Upgrade test matrix -on: - pull_request: - 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 - branches: [main] - workflow_dispatch: {} -jobs: - test-upgrade: - name: PE ${{ matrix.version }} to ${{ matrix.version_to_upgrade }} ${{ matrix.architecture }} - on ${{ matrix.image }} - runs-on: ubuntu-20.04 - env: - BOLT_GEM: true - BOLT_DISABLE_ANALYTICS: true - LANG: en_US.UTF-8 - strategy: - fail-fast: false - matrix: - architecture: [standard, extra-large-with-dr] - version: [2019.8.12, 2021.7.9, 2023.8.1] - version_to_upgrade: [2021.7.9, 2023.8.1, 2025.0.0] - image: [almalinux-cloud/almalinux-8] - download_mode: [direct] - exclude: - - version: 2019.8.12 - version_to_upgrade: 2023.8.1 - - version: 2019.8.12 - version_to_upgrade: 2025.0.0 - - version: 2021.7.9 - version_to_upgrade: 2021.7.9 - - version: 2021.7.9 - version_to_upgrade: 2025.0.0 - - version: 2023.8.1 - version_to_upgrade: 2023.8.1 - - version: 2023.8.1 - version_to_upgrade: 2025.0.0 - - version: 2023.8.1 - version_to_upgrade: 2021.7.9 - 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: Checkout Source - uses: actions/checkout@v4 - - 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 - bundle 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 - bundle exec rake spec_prep - echo ::endgroup:: - echo ::group::provision - 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: Install PE on test cluster - timeout-minutes: 120 - run: | - 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 }} \ - console_password=${{ secrets.CONSOLE_PASSWORD }} - - 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: Upgrade PE on test cluster - timeout-minutes: 120 - run: | - bundle exec bolt plan run peadm_spec::upgrade_test_cluster \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - architecture=${{ matrix.architecture }} \ - download_mode=${{ matrix.download_mode }} \ - version=${{ matrix.version_to_upgrade }} - - name: Tear down test cluster - if: ${{ always() }} - continue-on-error: true - run: |- - if [ -f spec/fixtures/litmus_inventory.yaml ]; then - echo ::group::tear_down - bundle exec rake 'litmus:tear_down' - echo ::endgroup:: - echo ::group::info:request - cat request.json || true; echo - echo ::endgroup:: - fi diff --git a/.github/workflows/test-upgrade.yaml b/.github/workflows/test-upgrade.yaml deleted file mode 100644 index aece32cd..00000000 --- a/.github/workflows/test-upgrade.yaml +++ /dev/null @@ -1,130 +0,0 @@ ---- -name: Upgrade test -on: - workflow_dispatch: - inputs: - image: - description: GCP image for test cluster - required: true - default: almalinux-cloud/almalinux-8 - architecture: - type: choice - required: true - default: standard - description: PE architecture to test - options: - - standard - - standard-with-dr - - large - - large-with-dr - - extra-large - - extra-large-with-dr - version: - description: PE version to install initially - required: true - default: 2019.8.12 - upgrade_version: - description: PE version to upgrade to - required: true - default: 2021.7.9 - ssh-debugging: - description: Boolean; whether or not to pause for ssh debugging - required: true - default: 'false' -jobs: - test-upgrade: - name: PE ${{ matrix.version }} ${{ matrix.architecture }} on ${{ matrix.image }} - runs-on: ubuntu-20.04 - env: - BOLT_GEM: true - BOLT_DISABLE_ANALYTICS: true - LANG: en_US.UTF-8 - strategy: - fail-fast: false - matrix: - download_mode: [direct] - architecture: ['${{ github.event.inputs.architecture }}'] - version: ['${{ github.event.inputs.version }}'] - version_to_upgrade: ['${{ github.event.inputs.upgrade_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: Checkout Source - uses: actions/checkout@v4 - - 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 - bundle 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 - bundle exec rake spec_prep - echo ::endgroup:: - echo ::group::provision - 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: Install PE on test cluster - timeout-minutes: 120 - run: | - 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 }} \ - console_password=${{ secrets.CONSOLE_PASSWORD }} - - 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: Upgrade PE on test cluster - timeout-minutes: 120 - run: | - bundle exec bolt plan run peadm_spec::upgrade_test_cluster \ - --inventoryfile spec/fixtures/litmus_inventory.yaml \ - --modulepath spec/fixtures/modules \ - architecture=${{ matrix.architecture }} \ - download_mode=${{ matrix.download_mode }} \ - version=${{ matrix.version_to_upgrade }} - - name: Tear down test cluster - if: ${{ always() }} - continue-on-error: true - run: |- - if [ -f spec/fixtures/litmus_inventory.yaml ]; then - echo ::group::tear_down - bundle exec rake 'litmus:tear_down' - echo ::endgroup:: - echo ::group::info:request - cat request.json || true; echo - echo ::endgroup:: - fi