Forge Home

migrate_nodes

PE plan to migrate nodes to another PE primary server

121 downloads

121 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.0 (latest)
released Nov 23rd 2023
This version is compatible with:
  • Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
  • Puppet >= 6.21.0 < 8.0.0
  • , , , , , ,
Tasks:
  • check_pe_connection
  • clear_ssl_certs
  • confirm_primary_server
  • set_csr_attributes
  • set_long_paths_windows
Plans:
  • migrate_node

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'benjaminrobertson-migrate_nodes', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add benjaminrobertson-migrate_nodes
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install benjaminrobertson-migrate_nodes --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

benjaminrobertson/migrate_nodes — version 0.1.0 Nov 23rd 2023

migrate_nodes

Module containing a plan to migrate nodes from one Puppet Primary server to another. Useful for migrations.

Table of Contents

  1. Description
  2. Setup - The basics of getting started with migrate_nodes
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Description

There is currently no fully automated process to migrate Puppet nodes between Puppet Primary servers. This plan automates the process while preserving trusted facts contained on the nodes certificate.

Setup

What migrate_nodes affects

This modules plan affects the following

  • Enables long file path support for Windows
  • Updates csr_attributes.yaml with facts currently present on the agent certificate.
  • Reconfigures puppet.conf on target nodes to point to the target Puppet primary.
  • Deletes local agent certificate and ca.pem file.
  • Reboots Puppet service on target.
  • Purges target node from source primary server.

Warning: Do not migrate Puppet infrastructure components. This will break your Puppet installation. A built in check has been included to avoid this situation which relies on the 'is_pe' fact.

Beginning with migrate_nodes

Include the module within your Puppetfile.

mod 'benjaminrobertson-migrate_nodes'

Usage

Run the plan migrate_nodes::migrate_node from the Puppet Enterprise console.

Required parameters

  • origin_pe_primary_server (String - Puppet Primary server the node is being migrated from. Must match Primary server FQDN(Certname))
  • target_pe_address (Array/Sting - either compiler address or FQDN of Primary server. Use array to specify multiple compilers.)

Optional parameters

  • targets (TargetSpec - see here)
  • fact_name (String)
  • fact_value (String)
  • ignore_infra_status_error (Boolean - Ignore errors from puppet infrastructure status command. May allow the plan to operate if some Puppet infrastructure components are failing)
  • bypass_connectivity_check (Boolean - Do not perform connectivity check to target Primary server)
  • noop (Boolean - Run the plan in noop. csr_attributes.yaml will still be generated, however nodes will not be migrated.)

Note: Either targets or fact_name/fact_value must be specified. Cannot specify both.

To specific a trusted fact, use fact_name = trusted.extensions.pp_role.

Limitations

Verified with the following OS\Primary combinations.

Puppet Enterprise

  • 2021.7.6

Puppet Nodes

  • Windows 2019
  • RHEL 8
  • RHEL 9

Expected to work for all Windows 2016 or later, Enterprise Linux, Debian, Ubuntu versions.

Expected to work with all modern Puppet Enterprise releases.

Development

If you find any issues with this module, please log them in the issues register of the GitHub project. Issues

PR glady accepted :)