Skip to content

Latest commit

 

History

History
2055 lines (1141 loc) · 48.9 KB

REFERENCE.md

File metadata and controls

2055 lines (1141 loc) · 48.9 KB

Reference

Table of Contents

Classes

Private Classes

  • peadm::setup::convert_node_manager: Used during the peadm::convert plan
  • peadm::setup::convert_pre20197: Defines configuration needed for converting PE 2018
  • peadm::setup::node_manager: Configures PEAdm's required node groups
  • peadm::setup::node_manager_yaml: Set up the node_manager.yaml file in the temporary Bolt confdir

Functions

Data types

Tasks

Plans

Public Plans

Private Plans

  • peadm::add_compiler: Add a new compiler to a PE architecture or replace an existing one with new configuration.
  • peadm::add_replica: Replace a replica host for a Standard or Large architecture. Supported use cases: 1: The existing replica is broken, we have a fresh new VM we want to provision the replica to.
  • peadm::misc::divert_code_manager: This plan exists to account for a scenario where a PE XL
  • peadm::modify_cert_extensions
  • peadm::subplans::component_install: Install a new PEADM component
  • peadm::subplans::configure: Configure first-time classification and DR setup
  • peadm::subplans::db_populate: Destructively (re)populates a new or existing database with the contents or a known good source
  • peadm::subplans::install: Perform initial installation of Puppet Enterprise Extra Large
  • peadm::subplans::modify_certificate
  • peadm::subplans::prepare_agent
  • peadm::uninstall: Single-entry-point plan for uninstalling Puppet Enterprise
  • peadm::util::code_sync_status
  • peadm::util::copy_file
  • peadm::util::db_disable_pglogical
  • peadm::util::db_purge
  • peadm::util::insert_csr_extension_requests
  • peadm::util::retrieve_and_upload
  • peadm::util::sanitize_pg_pe_conf
  • peadm::util::update_classification: Configure classification
  • peadm::util::update_db_setting: Make updates to PuppetDB database settings

Functions

peadm::assert_supported_architecture

Type: Puppet Language

Assert that the architecture given is a supported one

peadm::assert_supported_architecture(TargetSpec $primary_host, Variant[TargetSpec, Undef] $replica_host = undef, Variant[TargetSpec, Undef] $primary_postgresql_host = undef, Variant[TargetSpec, Undef] $replica_postgresql_host = undef, Variant[TargetSpec, Undef] $compiler_hosts = undef)

The peadm::assert_supported_architecture function.

Returns: Hash

primary_host

Data type: TargetSpec

replica_host

Data type: Variant[TargetSpec, Undef]

primary_postgresql_host

Data type: Variant[TargetSpec, Undef]

replica_postgresql_host

Data type: Variant[TargetSpec, Undef]

compiler_hosts

Data type: Variant[TargetSpec, Undef]

peadm::assert_supported_bolt_version

Type: Puppet Language

Checks if the current Bolt version matches the SemVerRange defined in $supported_bolt_version Fails the calling plan if false, does nothing if true. Accepts a parameter for the $supported_bolt_version for unit testing purposes

peadm::assert_supported_bolt_version()

Checks if the current Bolt version matches the SemVerRange defined in $supported_bolt_version Fails the calling plan if false, does nothing if true. Accepts a parameter for the $supported_bolt_version for unit testing purposes

Returns: Struct[{ 'supported' => Boolean }]

peadm::assert_supported_pe_version

Type: Puppet Language

Assert that the PE version given is supported by PEAdm

peadm::assert_supported_pe_version(String $version, Boolean $permit_unsafe_versions = false)

The peadm::assert_supported_pe_version function.

Returns: Struct[{ 'supported' => Boolean }] true if the version is supported, raise error otherwise

the

Data type: String

version number to check

version

Data type: String

permit_unsafe_versions

Data type: Boolean

peadm::bolt_version

Type: Ruby 4.x API

The peadm::bolt_version function.

peadm::bolt_version()

The peadm::bolt_version function.

Returns: Any

peadm::certname

Type: Puppet Language

This function accepts a variety of data types which could represent single targets, and returns the certname corresponding to the input.

For Target objects, or arrays of a single Target object, a "certname" var can be set, which determines that target's certname. Otherwise, the target's name is its certname. For strings, the certname is equal to the string. Undef input returns undef.

`peadm::certname(Variant[Target,

String,
Undef,
Array[Target,1,1],
Array[String,1,1],
Array[Undef,1,1],

Array[Any,0,0]] $target)`

This function accepts a variety of data types which could represent single targets, and returns the certname corresponding to the input.

For Target objects, or arrays of a single Target object, a "certname" var can be set, which determines that target's certname. Otherwise, the target's name is its certname. For strings, the certname is equal to the string. Undef input returns undef.

Returns: Variant[String, Undef]

target

Data type:

Variant[Target,
    String,
    Undef,
    Array[Target,1,1],
    Array[String,1,1],
    Array[Undef,1,1],
  Array[Any,0,0]]

peadm::convert_hash

Type: Puppet Language

converts two arrays into hash

Examples

peadm::convert_hash(['type', 'status'], [['xl', 'running'], ['large', 'failed']])
[
  { type => xl, status => running}, { type => large, status => failed }
]

peadm::convert_hash(Array $keys, Array[Array] $values)

The peadm::convert_hash function.

Returns: Array

Examples
peadm::convert_hash(['type', 'status'], [['xl', 'running'], ['large', 'failed']])
[
  { type => xl, status => running}, { type => large, status => failed }
]
keys

Data type: Array

an array of key names to be merged into the hash

values

Data type: Array[Array]

data to be merged into an array with the keys

peadm::convert_status

Type: Puppet Language

Transforms a value in a human readable status with or without colors

Examples

With colors
peadm::convert_status(true) = "\e[32moperational\e[0m"
Without colors
peadm::convert_status(true, 0, false) = "operational"
Using integers where 1 of 2 services has failed
peadm::convert_status(1, 2, false) = "degraded"
Using integers where 2 of 2 services has failed
peadm::convert_status(2, 2, false) = "failed"
Using integers where 0 of 2 services has failed
peadm::convert_status(0, 2, false) = "operational"

peadm::convert_status(Variant[String,Boolean, Integer] $status, Optional[Integer] $total = 0, Optional[Boolean] $use_colors = true)

The peadm::convert_status function.

Returns: String A status as a string with or without color

Examples
With colors
peadm::convert_status(true) = "\e[32moperational\e[0m"
Without colors
peadm::convert_status(true, 0, false) = "operational"
Using integers where 1 of 2 services has failed
peadm::convert_status(1, 2, false) = "degraded"
Using integers where 2 of 2 services has failed
peadm::convert_status(2, 2, false) = "failed"
Using integers where 0 of 2 services has failed
peadm::convert_status(0, 2, false) = "operational"
status

Data type: Variant[String,Boolean, Integer]

A value of true, false, degraded, or an Integer that represents number of non operationally services If using an integer, you must also supply the total amount of services

total

Data type: Optional[Integer]

the total number of services, used only when the status is an integer

use_colors

Data type: Optional[Boolean]

Adds colors to the status, defaults to true

peadm::determine_status

Type: Puppet Language

}

Examples

peadm::determine_status($data, true)
{
 "failed" => {
           "activity/pe-std-replica.puppet.vm" => false,
         "classifier/pe-std-replica.puppet.vm" => false,
   "file-sync-client/pe-std-replica.puppet.vm" => false,
             "master/pe-std-replica.puppet.vm" => false,
           "puppetdb/pe-std-replica.puppet.vm" => false,
               "rbac/pe-std-replica.puppet.vm" => false
 },
 "passed" => {
            "activity-service/pe-std.puppet.vm" => true,
              "broker-service/pe-std.puppet.vm" => true,
          "classifier-service/pe-std.puppet.vm" => true,
        "code-manager-service/pe-std.puppet.vm" => true,
    "file-sync-client-service/pe-std.puppet.vm" => true,
   "file-sync-storage-service/pe-std.puppet.vm" => true,
        "orchestrator-service/pe-std.puppet.vm" => true,
                   "pe-master/pe-std.puppet.vm" => true,
             "puppetdb-status/pe-std.puppet.vm" => true,
                "rbac-service/pe-std.puppet.vm" => true
 },
  "state" => {
            "activity-service/pe-std.puppet.vm" => true,
            "activity/pe-std-replica.puppet.vm" => false,
              "broker-service/pe-std.puppet.vm" => true,
          "classifier-service/pe-std.puppet.vm" => true,
          "classifier/pe-std-replica.puppet.vm" => false,
        "code-manager-service/pe-std.puppet.vm" => true,
    "file-sync-client-service/pe-std.puppet.vm" => true,
    "file-sync-client/pe-std-replica.puppet.vm" => false,
   "file-sync-storage-service/pe-std.puppet.vm" => true,
              "master/pe-std-replica.puppet.vm" => false,
        "orchestrator-service/pe-std.puppet.vm" => true,
                   "pe-master/pe-std.puppet.vm" => true,
             "puppetdb-status/pe-std.puppet.vm" => true,
            "puppetdb/pe-std-replica.puppet.vm" => false,
                "rbac-service/pe-std.puppet.vm" => true,
                "rbac/pe-std-replica.puppet.vm" => false
 },
 "status" => "\e[33mdegraded\e[0m"

peadm::determine_status(Array $status_data, Boolean $use_colors = true)

}

Returns: Hash A simplified hash of of status data for the given stack

Examples
peadm::determine_status($data, true)
{
 "failed" => {
           "activity/pe-std-replica.puppet.vm" => false,
         "classifier/pe-std-replica.puppet.vm" => false,
   "file-sync-client/pe-std-replica.puppet.vm" => false,
             "master/pe-std-replica.puppet.vm" => false,
           "puppetdb/pe-std-replica.puppet.vm" => false,
               "rbac/pe-std-replica.puppet.vm" => false
 },
 "passed" => {
            "activity-service/pe-std.puppet.vm" => true,
              "broker-service/pe-std.puppet.vm" => true,
          "classifier-service/pe-std.puppet.vm" => true,
        "code-manager-service/pe-std.puppet.vm" => true,
    "file-sync-client-service/pe-std.puppet.vm" => true,
   "file-sync-storage-service/pe-std.puppet.vm" => true,
        "orchestrator-service/pe-std.puppet.vm" => true,
                   "pe-master/pe-std.puppet.vm" => true,
             "puppetdb-status/pe-std.puppet.vm" => true,
                "rbac-service/pe-std.puppet.vm" => true
 },
  "state" => {
            "activity-service/pe-std.puppet.vm" => true,
            "activity/pe-std-replica.puppet.vm" => false,
              "broker-service/pe-std.puppet.vm" => true,
          "classifier-service/pe-std.puppet.vm" => true,
          "classifier/pe-std-replica.puppet.vm" => false,
        "code-manager-service/pe-std.puppet.vm" => true,
    "file-sync-client-service/pe-std.puppet.vm" => true,
    "file-sync-client/pe-std-replica.puppet.vm" => false,
   "file-sync-storage-service/pe-std.puppet.vm" => true,
              "master/pe-std-replica.puppet.vm" => false,
        "orchestrator-service/pe-std.puppet.vm" => true,
                   "pe-master/pe-std.puppet.vm" => true,
             "puppetdb-status/pe-std.puppet.vm" => true,
            "puppetdb/pe-std-replica.puppet.vm" => false,
                "rbac-service/pe-std.puppet.vm" => true,
                "rbac/pe-std-replica.puppet.vm" => false
 },
 "status" => "\e[33mdegraded\e[0m"
status_data

Data type: Array

Raw json data as returned by puppet infra status --format=json

use_colors

Data type: Boolean

Adds colors to the status, defaults to true

peadm::fail_on_transport

Type: Puppet Language

Fails if any nodes have the chosen transport.

Useful for excluding PCP when it's not appopriate

peadm::fail_on_transport(TargetSpec $nodes, String $transport, String $message = 'This is not supported.')

Fails if any nodes have the chosen transport.

Useful for excluding PCP when it's not appopriate

Returns: Any

nodes

Data type: TargetSpec

transport

Data type: String

message

Data type: String

peadm::file_content_upload

Type: Ruby 4.x API

The peadm::file_content_upload function.

peadm::file_content_upload(String[1] $content, String[1] $destination, TargetOrTargets *$targets)

The peadm::file_content_upload function.

Returns: Any

content

Data type: String[1]

destination

Data type: String[1]

*targets

Data type: TargetOrTargets

peadm::file_or_content

Type: Puppet Language

The peadm::file_or_content function.

peadm::file_or_content(String $param_name, Variant[String, Undef] $file, Variant[String, Undef] $content)

The peadm::file_or_content function.

Returns: Any

param_name

Data type: String

file

Data type: Variant[String, Undef]

content

Data type: Variant[String, Undef]

peadm::flatten_compact

Type: Puppet Language

The peadm::flatten_compact function.

peadm::flatten_compact(Array $input)

The peadm::flatten_compact function.

Returns: Any

input

Data type: Array

peadm::generate_pe_conf

Type: Puppet Language

Generate a pe.conf file in JSON format

peadm::generate_pe_conf(Hash $settings)

The peadm::generate_pe_conf function.

Returns: String

settings

Data type: Hash

A hash of settings to set in the config file. Any keys that are set to undef will not be included in the config file.

peadm::get_targets

Type: Puppet Language

Accept undef or a SingleTargetSpec, and return an Array[Target, 1, 0]. This differs from get_target() in that:

  • It returns an Array[Target, 1, 0], rather than a Target
  • It will accept undef and return [ ].

peadm::get_targets(Variant[TargetSpec, Undef] $spec, Optional[Integer[1,1]] $count = undef)

Accept undef or a SingleTargetSpec, and return an Array[Target, 1, 0]. This differs from get_target() in that:

  • It returns an Array[Target, 1, 0], rather than a Target
  • It will accept undef and return [ ].

Returns: Any

spec

Data type: Variant[TargetSpec, Undef]

count

Data type: Optional[Integer[1,1]]

peadm::node_manager_yaml_location

Type: Ruby 4.x API

The peadm::node_manager_yaml_location function.

peadm::node_manager_yaml_location()

The peadm::node_manager_yaml_location function.

Returns: Any

peadm::oid

Type: Puppet Language

The peadm::oid function.

peadm::oid(String $short_name)

The peadm::oid function.

Returns: Any

short_name

Data type: String

peadm::plan_step

Type: Ruby 4.x API

The peadm::plan_step function.

peadm::plan_step(String $step_name, Callable &$block)

The peadm::plan_step function.

Returns: Any

step_name

Data type: String

&block

Data type: Callable

peadm::recovery_opts_default

Type: Puppet Language

The peadm::recovery_opts_default function.

peadm::recovery_opts_default()

The peadm::recovery_opts_default function.

Returns: Any

peadm::wait_until_service_ready

Type: Puppet Language

A convenience function to help remember port numbers for services and handle running the wait_until_service_ready task

peadm::wait_until_service_ready(String $service, TargetSpec $target)

A convenience function to help remember port numbers for services and handle running the wait_until_service_ready task

Returns: Any

service

Data type: String

target

Data type: TargetSpec

Data types

Peadm::Ldap_config

The Peadm::Ldap_config data type.

Alias of

Struct[{
    base_dn                             => String,
    connect_timeout                     => Integer,
    disable_ldap_matching_rule_in_chain => Boolean,
    display_name                        => String,
    group_lookup_attr                   => String,
    group_member_attr                   => String,
    group_name_attr                     => String,
    group_object_class                  => String,
    Optional[group_rdn]                 => Optional[String],
    Optional[help_link]                 => Optional[String],
    hostname                            => String,
    Optional[login]                     => Optional[String],
    Optional[password]                  => Optional[String],
    port                                => Integer,
    search_nested_groups                => Boolean,
    ssl                                 => Boolean,
    ssl_hostname_validation             => Boolean,
    ssl_wildcard_validation             => Boolean,
    start_tls                           => Boolean,
    user_display_name_attr              => String,
    user_email_attr                     => String,
    user_lookup_attr                    => String,
    Optional[user_rdn]                  => Optional[String],
}]

Peadm::Pe_version

The Peadm::Pe_version data type.

Alias of Pattern[/^\d+\.\d+\.\d+(-.+)?$/]

Peadm::Pem

The Peadm::Pem data type.

Alias of Pattern[/^-----BEGIN/]

Peadm::Recovery_opts

The Peadm::Recovery_opts data type.

Alias of

Struct[{
    'orchestrator' => Optional[Boolean],
    'puppetdb'     => Optional[Boolean],
    'rbac'         => Optional[Boolean],
    'activity'     => Optional[Boolean],
    'ca'           => Optional[Boolean[false]],
    'classifier'   => Optional[Boolean],
}]

Peadm::SingleTargetSpec

A SingleTargetSpec represents any String, Target or single-element array of one or the other that can be passed to get_targets() to return an Array[Target, 1, 1]. This is a constrained type variant of Boltlib::TargetSpec for use when a single target is valid, but multiple targets are not.

Alias of Variant[Pattern[/\A[^[:space:],]+\z/], Target, Array[Peadm::SingleTargetSpec, 1, 1]]

Tasks

agent_install

Install the Puppet agent from a master

Supports noop? false

Parameters

server

Data type: String

The resolvable name of the Puppet server to install from

install_flags

Data type: Array[String]

Positional arguments to pass to the shell installer

backup_classification

A task to call the classification api and write to file

Supports noop? false

Parameters

directory

Data type: String

The directory to write the classification output to. Directory must exist

cert_data

Return certificate data related to the Puppet agent

Supports noop? false

cert_valid_status

Check primary for valid state of a certificate

Supports noop? false

Parameters

certname

Data type: String

The certifcate name to check validation of

code_manager

Perform various code manager actions

Supports noop? false

Parameters

action

Data type: String

What code manager action to perform. For example: 'deploy production'; 'flush-environment-cache'; 'file-sync commit'

code_sync_status

A task to confirm code is in sync accross the cluster for clusters with code manager configured

Supports noop? false

Parameters

environments

Data type: Array

A list of environments to check, pass a single value of all for all

divert_code_manager

Divert the code manager live-dir setting

Supports noop? false

download

Download a file using curl

Supports noop? false

Parameters

source

Data type: String

Where to download the file from

path

Data type: String

Where to save the downloaded file

verify_download

Data type: Boolean

Whether to check the integrity of the downloaded file

key_server

Data type: String

The GPG keyserver to retrieve GPG keys from

enable_replica

Execute the enable replica puppet command

Supports noop? false

Parameters

replica

Data type: String

The name of the replica to enable

token_file

Data type: Optional[String]

The name of the token file to use for auth

filesize

Return the size of a file in bytes

Supports noop? false

Parameters

path

Data type: String

Path to the file to return the size of

get_peadm_config

Run on a PE primary node to return the currently configured PEAdm parameters

Supports noop? false

get_psql_version

Run on a PE PSQL node to return the major version of the PSQL server currently installed

Supports noop? false

infrastatus

Runs puppet infra status and returns the output

Supports noop? false

Parameters

format

Data type: Enum[json,text]

The type of output to return

mkdir_p_file

Create a file with the specified content at the specified location

Supports noop? false

Parameters

path

Data type: String

The fully qualified path of the file to create

content

Data type: String

The content to create the file with

owner

Data type: Optional[String]

The file owner

group

Data type: Optional[String]

The file group

mode

Data type: Optional[String]

The file mode

chown_r

Data type: Optional[String]

If supplied, recursively chown starting at this path

mv

Wrapper task for mv command

Supports noop? false

Parameters

source

Data type: String

Current path of file

target

Data type: String

New path of file

pe_install

Install Puppet Enterprise from a tarball

Supports noop? false

Parameters

tarball

Data type: String

The path to the Puppet Enterprise tarball

peconf

Data type: Optional[String]

The path to the pe.conf file

install_extra_large

Data type: Optional[Boolean]

If true, optimize task for known manual issues with extra-large installs. Do not use for upgrades

puppet_service_ensure

Data type: Optional[Enum['stopped']]

If 'stopped', ensure the Puppet agent is not running when install completes

pe_ldap_config

Set the ldap config in the PE console

Supports noop? false

Parameters

ldap_config

Data type: Peadm::Ldap_config

The hash of options for ldap.

pe_main

Data type: String

The PE Main server

pe_uninstall

Uninstall Puppet Enterprise

Supports noop? false

precheck

Return pre-check information about a system

Supports noop? false

provision_replica

Execute the replica provision puppet command

Supports noop? false

Parameters

replica

Data type: String

The name of the replica to provision

token_file

Data type: Optional[String]

The name of the token-file for auth

legacy

Data type: Boolean

Set to true if provisioning a replica for PE 2019.5 or older. Defaults to false

puppet_infra_upgrade

Execute the puppet infra upgrade command

Supports noop? false

Parameters

type

Data type: Enum[compiler,replica]

Which kind of infra node to upgrade

targets

Data type: Array[String]

The certnames of the targets to upgrade

token_file

Data type: Optional[String]

The path to the token file to use

wait_until_connected_timeout

Data type: Integer

How many seconds to wait for targets to be connected to the orchestrator

puppet_runonce

Run the Puppet agent one time

Supports noop? false

Parameters

noop

Data type: Optional[Boolean]

If true, run Puppet in no-op mode

rbac_token

Get and save an rbac token for the root user, admin rbac user

Supports noop? false

Parameters

password

Data type: String

The password for the admin user

token_lifetime

Data type: String

The duration for which a token will be valid. Format [smhdy]

read_file

Read the contents of a file

Supports noop? false

Parameters

path

Data type: String

Path to the file to read

restore_classification

A short description of this task

Supports noop? false

Parameters

classification_file

Data type: String

The full path to a backed up or transformed classification file

sign_csr

Submit a certificate signing request

Supports noop? false

Parameters

certnames

Data type: Array[String]

A list of certnames to sign

ssl_clean

Clean an agent's certificate

Supports noop? false

Parameters

certname

Data type: String

The certname to clean

submit_csr

Submit a certificate signing request

Supports noop? false

Parameters

dns_alt_names

Data type: Optional[Array[String]]

DNS Alternative Names to request for the certificate

transform_classification_groups

Transform the user groups from a source backup to a list of groups on the target server

Supports noop? false

Parameters

source_directory

Data type: String

Location of Source node group yaml file

working_directory

Data type: String

Location of target node group yaml file and where to create the transformed file

wait_until_service_ready

Return when the orchestrator service is healthy, or timeout after 15 seconds

Supports noop? false

Parameters

service

Data type: Enum[all, ca, pe-master, orchestrator-service]

What service to check. For example: all, pe-master, orchestrator-service

port

Data type: Enum['8140', '8143']

Which port to query the status API on

Plans

peadm::add_database

The peadm::add_database class.

Parameters

The following parameters are available in the peadm::add_database plan:

targets

Data type: Peadm::SingleTargetSpec

primary_host

Data type: Peadm::SingleTargetSpec

mode

Data type: Optional[Enum['init', 'pair']]

Default value: undef

begin_at_step

Data type:

Optional[Enum[
      'init-db-node',
      'replicate-db',
      'update-classification',
      'update-db-settings',
      'cleanup-db',
  'finalize']]

Default value: undef

peadm::convert

This plan sets required certificate extensions on PE nodes, and configures the required PE node groups to make an existing cluster compatible with management using PEAdm.

Parameters

The following parameters are available in the peadm::convert plan:

primary_host

Data type: Peadm::SingleTargetSpec

replica_host

Data type: Optional[Peadm::SingleTargetSpec]

Default value: undef

compiler_hosts

Data type: Optional[TargetSpec]

Default value: undef

primary_postgresql_host

Data type: Optional[Peadm::SingleTargetSpec]

Default value: undef

replica_postgresql_host

Data type: Optional[Peadm::SingleTargetSpec]

Default value: undef

compiler_pool_address

Data type: String

Default value: $primary_host

internal_compiler_a_pool_address

Data type: Optional[String]

Default value: undef

internal_compiler_b_pool_address

Data type: Optional[String]

Default value: undef

dns_alt_names

Data type: Array[String]

Default value: []

begin_at_step

Data type:

Optional[Enum[
      'modify-primary-certs',
      'modify-infra-certs',
      'convert-node-groups',
  'finalize']]

Default value: undef

peadm::install

Install a new PE cluster

Parameters

The following parameters are available in the peadm::install plan:

compiler_pool_address

Data type: Optional[String]

The service address used by agents to connect to compilers, or the Puppet service. Typically this is a load balancer.

Default value: undef

internal_compiler_a_pool_address

Data type: Optional[String]

A load balancer address directing traffic to any of the "A" pool compilers. This is used for DR configuration in large and extra large architectures.

Default value: undef

internal_compiler_b_pool_address

Data type: Optional[String]

A load balancer address directing traffic to any of the "B" pool compilers. This is used for DR configuration in large and extra large architectures.

Default value: undef

pe_installer_source

Data type: Optional[String]

The URL to download the Puppet Enterprise installer media from. If not specified, PEAdm will attempt to download PE installation media from its standard public source. When specified, PEAdm will download directly from the URL given.

Default value: undef

ldap_config

Data type: Optional[Peadm::Ldap_config]

If specified, configures PE RBAC DS with the supplied configuration hash. The parameter should be set to a valid set of connection settings as documented for the PE RBAC /ds endpoint. See: https://puppet.com/docs/pe/latest/rbac_api_v1_directory.html#put_ds-request_format

Default value: undef

final_agent_state

Data type: Enum['running', 'stopped']

Configures the state the puppet agent should be in on infrastructure nodes after PE is configured successfully.

Default value: 'running'

primary_host

Data type: Peadm::SingleTargetSpec

replica_host

Data type: Optional[Peadm::SingleTargetSpec]

Default value: undef

compiler_hosts

Data type: Optional[TargetSpec]

Default value: undef

primary_postgresql_host

Data type: Optional[Peadm::SingleTargetSpec]

Default value: undef

replica_postgresql_host

Data type: Optional[Peadm::SingleTargetSpec]

Default value: undef

console_password

Data type: String

version

Data type: Peadm::Pe_version

Default value: '2021.7.2'

dns_alt_names

Data type: Optional[Array[String]]

Default value: undef

pe_conf_data

Data type: Optional[Hash]

Default value: {}

r10k_remote

Data type: Optional[String]

Default value: undef

r10k_private_key_file

Data type: Optional[String]

Default value: undef

r10k_private_key_content

Data type: Optional[Peadm::Pem]

Default value: undef

deploy_environment

Data type: Optional[String]

Default value: undef

license_key_file

Data type: Optional[String]

Default value: undef

license_key_content

Data type: Optional[String]

Default value: undef

stagingdir

Data type: Optional[String]

Default value: undef

download_mode

Data type: Enum['direct', 'bolthost']

Default value: 'bolthost'

permit_unsafe_versions

Data type: Boolean

Default value: false

token_lifetime

Data type: String

Default value: '1y'

peadm::modify_certificate

Certificates can be modified by adding extensions, removing extensions, or setting DNS alternative names.

Parameters

The following parameters are available in the peadm::modify_certificate plan:

targets

Data type: TargetSpec

primary_host

Data type: Peadm::SingleTargetSpec

add_extensions

Data type: Hash

Default value: {}

remove_extensions

Data type: Array

Default value: []

dns_alt_names

Data type: Optional[Array]

Default value: undef

force_regenerate

Data type: Boolean

Default value: false

peadm::status

Return status information from one or more PE clusters in a table format

Examples

peadm::status($targets, 'table', true, true)

Parameters

The following parameters are available in the peadm::status plan:

targets

Data type: TargetSpec

These are a list of the primary puppetservers from one or multiple puppet stacks

format

Data type: Enum[json,table]

The output format to dump to stdout (json or table)

Default value: 'table'

summarize

Data type: Boolean

Controls the type of json output to render, defaults to true

Default value: true

verbose

Data type: Boolean

Toggles the output to show all the operationally services, can be loads more data

Default value: false

colors

Data type: Boolean

Toggles the usage of colors, you may want to disable if the format is json

Default value: $format ? { 'json' => false, default => true

peadm::upgrade

Upgrade a PEAdm-managed cluster

Parameters

The following parameters are available in the peadm::upgrade plan:

compiler_pool_address

Data type: Optional[String]

The service address used by agents to connect to compilers, or the Puppet service. Typically this is a load balancer.

Default value: undef

internal_compiler_a_pool_address

Data type: Optional[String]

A load balancer address directing traffic to any of the "A" pool compilers. This is used for DR configuration in large and extra large architectures.

Default value: undef

internal_compiler_b_pool_address

Data type: Optional[String]

A load balancer address directing traffic to any of the "B" pool compilers. This is used for DR configuration in large and extra large architectures.

Default value: undef

pe_installer_source

Data type: Optional[String]

The URL to download the Puppet Enterprise installer media from. If not specified, PEAdm will attempt to download PE installation media from its standard public source. When specified, PEAdm will download directly from the URL given.

Default value: undef

final_agent_state

Data type: Enum['running', 'stopped']

Configures the state the puppet agent should be in on infrastructure nodes after PE is upgraded successfully.

Default value: 'running'

primary_host

Data type: Peadm::SingleTargetSpec

replica_host

Data type: Optional[Peadm::SingleTargetSpec]

Default value: undef

compiler_hosts

Data type: Optional[TargetSpec]

Default value: undef

primary_postgresql_host

Data type: Optional[Peadm::SingleTargetSpec]

Default value: undef

replica_postgresql_host

Data type: Optional[Peadm::SingleTargetSpec]

Default value: undef

version

Data type: Optional[Peadm::Pe_version]

Default value: undef

token_file

Data type: Optional[String]

Default value: undef

stagingdir

Data type: String

Default value: '/tmp'

download_mode

Data type: Enum[direct,bolthost]

Default value: 'bolthost'

permit_unsafe_versions

Data type: Boolean

Default value: false

begin_at_step

Data type:

Optional[Enum[
      'upgrade-primary',
      'upgrade-node-groups',
      'upgrade-primary-compilers',
      'upgrade-replica',
      'upgrade-replica-compilers',
  'finalize']]

Default value: undef