Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for legacy compilers (#448) #495

Merged
merged 37 commits into from
Sep 25, 2024
Merged

Adding support for legacy compilers (#448) #495

merged 37 commits into from
Sep 25, 2024

Commits on Sep 16, 2024

  1. Adding support for legacy compilers (#448)

    * Adding support for legacy compilers
    
    * Adding inventoryfile to test upgrade legacy workflow
    
    * feat(documentation): add instructions for converting compilers to legacy
    
    This commit introduces a new section in the `convert.md` documentation. It provides instructions on how to convert compilers to legacy compilers for Puppet Enterprise installations using puppetlabs-peadm version 3.21 or later, as well as for versions prior to 3.21. The new section includes specific commands to run and references to other relevant documentation.
    
    * Fixing lint and regenerating referencemd
    
    * PE-38772 Node groups added for legacy compilers (#455)
    
    * Fixing typo for parameter in docs
    
    ---------
    
    Co-authored-by: Ioannis Karasavvaidis <[email protected]>
    Co-authored-by: Neil Anderson <[email protected]>
    Co-authored-by: Aaron Shannon <[email protected]>
    4 people committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    3103736 View commit details
    Browse the repository at this point in the history
  2. Updating groups to cover ha scenarios

    ragingra authored and CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    80e0762 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a0ffeaa View commit details
    Browse the repository at this point in the history
  4. (PE-38767) Adding legacy compilers to get_peadm_config (#456)

    Added legacy compilers section, and updated compilers with legacy compilers oid
    
    Co-authored-by: Neil Anderson <[email protected]>
    2 people authored and CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    590af0b View commit details
    Browse the repository at this point in the history
  5. (PE-38770) Install Plan accepts legacy_compilers key (#474)

    * feat(peadm): add support for legacy compilers
    
    - Added `legacy_compilers` parameter to `peadm::install`, `peadm::subplans::install`, and `peadm::subplans::configure` plans.
    - Updated `peadm::assert_supported_architecture` function to handle `legacy_compilers`.
    - Modified various plans to include `legacy_compilers` in the installation and configuration processes.
    - Updated documentation to reflect the changes and added examples for `legacy_compilers`.
    
    This change allows the PEADM module to support legacy compilers in addition to the standard compilers.
    
    * feat(assert_supported_architecture): normalize and combine compiler variables
    
    - Normalize `$legacy_compilers` and `$compiler_hosts` to arrays, handling both strings and arrays.
    - Combine the normalized arrays into `$all_compilers`.
    - Set `$has_compilers` to `undef` if `$all_compilers` is empty, otherwise set it to `true`.
    - Update tests to cover scenarios with both `compiler_hosts` and `legacy_compilers`.
    
    This change ensures that the function correctly handles different types for compiler variables and improves robustness.
    
    * Updated REFERENCE.md to document the new parameter.
    
    * style(tests): use single quotes for consistency in spec files
    
    Updated all double quotes to single quotes in the `assert_supported_architecture_spec.rb` and `install_spec.rb` files to maintain consistency in string literals across the test suite.
    
    * refactor(plans): rename legacy_targets to legacy_compiler_targets
    
    Renamed the variable `legacy_targets` to `legacy_compiler_targets` across multiple plans for better clarity and consistency. This change affects the following plans:
    - convert_compiler_to_legacy.pp
    - subplans/configure.pp
    - subplans/install.pp
    
    The new variable name more accurately reflects its purpose, which is to target legacy compiler hosts.
    
    * docs(install): correct grammar in installation requirements section
    
    Corrected the grammar in the installation requirements section by changing "Puppets must not be installed" to "Puppet must not be installed" for clarity and accuracy.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    e97569b View commit details
    Browse the repository at this point in the history
  6. (PE-38771) Convert plan accepts legacy compilers key in params.json (#…

    …476)
    
    * feat(convert): add support for legacy compilers
    
    - Introduced `legacy_compilers` parameter to handle legacy compiler hosts.
    - Added logic to filter and categorize legacy compiler targets.
    - Updated certificate modification steps to include legacy compiler targets with appropriate extensions.
    
    * feat(convert): ensure all targets are up-to-date post conversion
    
    - Added a step to run puppet on all targets after restarting services.
    - Ensures all targets are fully up-to-date after conversion.
    
    * docs(convert): update documentation for PEADM module
    
    - Corrected the module name from 'peadm' to 'PEADM' for consistency.
    - Added 'legacy_compilers' section in the example JSON parameters.
    - Improved clarity in the description of the `begin_at_step` parameter.
    - Fixed minor grammatical issues in the instructions for converting compilers to legacy.
    
    * - Updated REFERENCE.md to include the new parameter.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    496e4bc View commit details
    Browse the repository at this point in the history
  7. feat(convert): add check for legacy compilers (#483)

    - Introduced a new task `check_legacy_compilers.rb` to verify legacy compilers.
    - Updated `convert.pp` to run the new task and display warnings if legacy compilers are detected.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    9d584f2 View commit details
    Browse the repository at this point in the history
  8. fix: update messaging for legacy compilers check

    - Clarified the message indicating which legacy compilers are classified as Puppet primary nodes.
    - Improved the remediation message to specify that the upgrade cannot proceed until the compilers are no longer classified as Puppet primary nodes.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    3a5f4fb View commit details
    Browse the repository at this point in the history
  9. fix: clarify legacy compilers upgrade message

    - Updated the message to specify that the upgrade can only proceed if the compilers are no longer recognized as Puppet primary nodes.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    5a05385 View commit details
    Browse the repository at this point in the history
  10. chore(workflow): update test-upgrade-legacy.yaml for compiler versions

    Updated the compiler versions in the test-upgrade-legacy.yaml GitHub workflow from 2023.6.0 and 2023.7.0 to 2023.7.0 and 2023.8.0. Also, made formatting changes for consistency.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    e566eb2 View commit details
    Browse the repository at this point in the history
  11. chore(workflow): add console_password to test-upgrade-legacy.yaml

    Added the console_password parameter to the test-upgrade-legacy.yaml GitHub workflow to ensure the console password is passed securely from secrets.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    89d3acf View commit details
    Browse the repository at this point in the history
  12. refactor(plan): remove PuppetDB service stop commands in convert_comp…

    …iler_to_legacy.pp
    
    Removed the commands to stop Puppet and PuppetDB services when the remove_pdb parameter is true in the convert_compiler_to_legacy plan. This simplifies the plan and avoids unnecessary service stops.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    8924308 View commit details
    Browse the repository at this point in the history
  13. fix(setup): correct variable reference for internal compiler pool add…

    …ress
    
    - Updated the variable reference for `internal_compiler_b_pool_address` and `internal_compiler_a_pool_address` in `peadm::setup::legacy_compiler_group` class.
    - Ensured the correct scope is used for the variables.
    - Added missing newline at the end of the file.
    - Added logic to stop and disable `pe-puppetdb` service if `remove_pdb` is true in `convert_compiler_to_legacy` plan.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    b509f68 View commit details
    Browse the repository at this point in the history
  14. Adding internal compiler address params to convert legacy compilers, …

    …and added trusted cert along with internal compiler address
    ragingra authored and CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    f7244a3 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    123c1e6 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    e332276 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    97577d6 View commit details
    Browse the repository at this point in the history
  18. fix(setup): update puppetdb_host to use internal compiler pool addresses

    - Replaced `${trusted['certname']}` with `$internal_compiler_a_pool_address` and `$internal_compiler_b_pool_address` in `puppetdb_host` for `puppet_enterprise::profile::master` class.
    - Applied `.filter |$_| { $_ }` to ensure non-empty values.
    - Removed lint ignore comments for single quote string with variables.
    
    This change ensures that the correct internal compiler pool addresses are used for the `puppetdb_host` configuration.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    bd2acdc View commit details
    Browse the repository at this point in the history
  19. docs: update upgrade_with_legacy_compilers.md with remove_pdb paramet…

    …er info
    
    - Added information about the `remove_pdb` parameter to the documentation.
    - Updated `convert_compiler_to_legacy` plan to set `remove_pdb` default to `true`.
    
    This change provides clarity on how to retain PuppetDB service on converted compilers.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    f38f402 View commit details
    Browse the repository at this point in the history
  20. fix(workflow): correct indentation for ssh-debugging input in test-up…

    …grade-legacy.yaml
    
    - Added missing `inputs` key for `ssh-debugging` under `workflow_dispatch`.
    
    This change ensures proper YAML structure for the workflow configuration.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    afff69c View commit details
    Browse the repository at this point in the history
  21. chore(workflow): update test-upgrade-legacy.yaml name for clarity

    - Changed workflow name to "Upgrade PE with one legacy compiler (test)" for better identification.
    
    fix(convert_compiler_to_legacy): ensure proper handling of legacy compilers
    
    - Added architecture validation for supported architectures.
    - Split legacy compiler targets into groups A and B based on availability group or cluster.
    - Modified certificate extensions for legacy compilers.
    - Ensured proper stopping of PuppetDB service on legacy compilers when `remove_pdb` is true.
    - Updated node manager YAML and legacy compiler group setup to include internal compiler pool addresses.
    - Adjusted Puppet run tasks to include all compiler targets.
    
    These changes improve the handling and configuration of legacy compilers during the upgrade process.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    4c5bd66 View commit details
    Browse the repository at this point in the history
  22. feat(convert_compiler_to_legacy): update parameter types and improve …

    …formatting
    
    - Changed `remove_pdb` parameter type to `Optional[Boolean]` for better flexibility.
    - Improved alignment and formatting of parameters and variables for better readability.
    - Updated `$compiler_targets` assignment to use `peadm::get_targets` for consistency.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    4b24dfb View commit details
    Browse the repository at this point in the history
  23. feat(workflow): enhance test-upgrade-legacy with SSH config and grouping

    - Added SSH configuration setup to ensure stable connections.
    - Grouped preparation and conversion steps for better readability in logs.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    016bdd6 View commit details
    Browse the repository at this point in the history
  24. fix: handle undefined certname in convert_compiler_to_legacy plan

    - Updated `primary_host` to handle cases where `certname` is undefined.
    - Added conditional logic to default to `$primary_target` if `certname` is undefined.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    b93f416 View commit details
    Browse the repository at this point in the history
  25. fix(workflow): downgrade test-upgrade-legacy version to 2021.7.9

    - Changed the `version` in the test-upgrade-legacy workflow from 2023.7.0 to 2021.7.9.
    - Ensured compatibility with older versions for testing purposes.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    f642fe8 View commit details
    Browse the repository at this point in the history
  26. fix(workflow): update architecture in test-upgrade-legacy to large-wi…

    …th-dr
    
    - Changed the `architecture` in the test-upgrade-legacy workflow from `large-with-two-compilers` to `large-with-dr`.
    - Updated the `version` from `2021.7.9` to `2023.7.0`.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    fb01220 View commit details
    Browse the repository at this point in the history
  27. Fix Conflicts

    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    86ca580 View commit details
    Browse the repository at this point in the history
  28. feat(plan): run puppet agent on all nodes after installation

    - Added a task to run the puppet agent on all nodes after the installation plan.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    0ae01f3 View commit details
    Browse the repository at this point in the history
  29. fix(plan): remove redundant puppet agent run task

    - Removed the redundant task to run the puppet agent on all nodes after installation.
    - Simplified the install_test_cluster plan by eliminating unnecessary steps.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    b30996c View commit details
    Browse the repository at this point in the history
  30. feat(plans): gather certificate extension information in convert_comp…

    …iler_to_legacy plan
    
    - Added a step to gather certificate extension information from all systems using the `peadm::cert_data` task.
    - This information is used to filter legacy compiler targets based on availability group.
    
    This enhancement improves the accuracy of the conversion process by ensuring that the correct certificate data is used.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    79dc961 View commit details
    Browse the repository at this point in the history
  31. feat(convert_compiler_to_legacy): gather certificate extension inform…

    …ation
    
    - Added steps to gather certificate extension information from all systems using the `peadm::cert_data` task.
    - Updated variable names for clarity and consistency.
    - Filtered legacy compiler targets based on availability group using the gathered certificate data.
    
    This enhancement improves the accuracy of the conversion process by ensuring that the correct certificate data is used.
    CoMfUcIoS committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    7533166 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2024

  1. feat(convert_compiler_to_legacy): gather certificate extension inform…

    …ation
    
    - Updated `puppetdb_host` to include both internal compiler pool addresses.
    - Modified `convert_compiler_to_legacy` plan to gather certificate extension information from legacy targets using the `peadm::cert_data` task.
    - Adjusted filtering of legacy compiler targets based on availability group using the gathered certificate data.
    
    This enhancement improves the accuracy of the conversion process by ensuring that the correct certificate data is used.
    CoMfUcIoS committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    e67d0b3 View commit details
    Browse the repository at this point in the history
  2. feat(convert_compiler_to_legacy): gather certificate extension inform…

    …ation
    
    - Added steps to apply `peadm::setup::node_manager_yaml` class on the primary target.
    - Ensured `primary_host` is set correctly based on the primary target's certname.
    - Improved the setup process by gathering certificate extension information.
    
    This enhancement ensures that the correct certificate data is used, improving the accuracy of the conversion process.
    CoMfUcIoS committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    fdac866 View commit details
    Browse the repository at this point in the history
  3. feat(convert_compiler_to_legacy): gather certificate extension inform…

    …ation
    
    - Added steps to apply `peadm::setup::legacy_compiler_group` class with internal compiler pool addresses.
    - Ensured `primary_host` is set correctly based on the primary target's certname.
    - Removed redundant application of `peadm::setup::node_manager_yaml` and `peadm::setup::legacy_compiler_group` classes.
    
    This enhancement ensures that the correct certificate data is used, improving the accuracy of the conversion process.
    CoMfUcIoS committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    e235324 View commit details
    Browse the repository at this point in the history
  4. feat(convert_compiler_to_legacy): update internal compiler pool addre…

    …ss retrieval
    
    - Changed retrieval of `internal_compiler_a_pool_address` and `internal_compiler_b_pool_address` to use `getvar` function.
    - Ensured compatibility with updated cluster parameter structure.
    
    This update improves the robustness of the plan by ensuring correct retrieval of internal compiler pool addresses.
    CoMfUcIoS committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    002167c View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2024

  1. ci(github-actions): remove test-upgrade-legacy workflow

    - Deleted `.github/workflows/test-upgrade-legacy.yaml` file.
    - Removed workflow for testing PE upgrade with one legacy compiler.
    
    This change simplifies the CI configuration by removing an outdated or unnecessary workflow.
    CoMfUcIoS committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    438ca01 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2024

  1. docs: update documentation for converting and upgrading legacy compilers

    - Updated the version reference from 3.21 to 3.25 in the upgrade documentation.
    - Added instructions for using the `peadm::convert_compiler_to_legacy` plan.
    - Removed outdated steps for updating certificate extensions and converting legacy compilers.
    - Simplified the upgrade process description for Puppet Enterprise using puppetlabs-peadm module 3.25 or later.
    CoMfUcIoS committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    4a07155 View commit details
    Browse the repository at this point in the history