Puppet Plan: peadm::install

Defined in:
plans/install.pp

Summary

Install a new PE cluster

Overview

Parameters:

  • compiler_pool_address (Optional[String]) (defaults to: undef)

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

  • internal_compiler_a_pool_address (Optional[String]) (defaults to: undef)

    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.

  • internal_compiler_b_pool_address (Optional[String]) (defaults to: undef)

    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.

  • pe_installer_source (Optional[Stdlib::HTTPSUrl]) (defaults to: undef)

    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.

  • ldap_config (Optional[Peadm::Ldap_config]) (defaults to: undef)

    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: puppet.com/docs/pe/latest/rbac_api_v1_directory.html#put_ds-request_format

  • final_agent_state (Enum['running', 'stopped']) (defaults to: 'running')

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

  • stagingdir (Optional[String]) (defaults to: undef)

    Directory on the Bolt host where the installer tarball will be cached if download_mode is ‘bolthost’ (default)

  • uploaddir (Optional[String]) (defaults to: undef)

    Directory the installer tarball will be uploaded to or expected to be in for offline usage.

  • primary_host (Peadm::SingleTargetSpec)
  • replica_host (Optional[Peadm::SingleTargetSpec]) (defaults to: undef)
  • compiler_hosts (Optional[TargetSpec]) (defaults to: undef)
  • legacy_compilers (Optional[TargetSpec]) (defaults to: undef)
  • primary_postgresql_host (Optional[Peadm::SingleTargetSpec]) (defaults to: undef)
  • replica_postgresql_host (Optional[Peadm::SingleTargetSpec]) (defaults to: undef)
  • console_password (String)
  • version (Peadm::Pe_version) (defaults to: '2023.8.1')
  • dns_alt_names (Optional[Array[String]]) (defaults to: undef)
  • pe_conf_data (Optional[Hash]) (defaults to: {})
  • code_manager_auto_configure (Optional[Boolean]) (defaults to: undef)
  • r10k_remote (Optional[String]) (defaults to: undef)
  • r10k_private_key_file (Optional[String]) (defaults to: undef)
  • r10k_private_key_content (Optional[Peadm::Pem]) (defaults to: undef)
  • r10k_known_hosts (Optional[Peadm::Known_hosts]) (defaults to: undef)
  • deploy_environment (Optional[String]) (defaults to: undef)
  • license_key_file (Optional[String]) (defaults to: undef)
  • license_key_content (Optional[String]) (defaults to: undef)
  • download_mode (Peadm::Download_mode) (defaults to: 'bolthost')
  • permit_unsafe_versions (Boolean) (defaults to: false)
  • token_lifetime (String) (defaults to: '1y')


34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'plans/install.pp', line 34

plan peadm::install (
  # Standard
  Peadm::SingleTargetSpec           $primary_host,
  Optional[Peadm::SingleTargetSpec] $replica_host = undef,

  # Large
  Optional[TargetSpec]              $compiler_hosts = undef,
  Optional[TargetSpec]              $legacy_compilers = undef,

  # Extra Large
  Optional[Peadm::SingleTargetSpec] $primary_postgresql_host = undef,
  Optional[Peadm::SingleTargetSpec] $replica_postgresql_host = undef,

  # Common Configuration
  String                            $console_password,
  Peadm::Pe_version                 $version                          = '2023.8.1',
  Optional[Stdlib::HTTPSUrl]        $pe_installer_source              = undef,
  Optional[Array[String]]           $dns_alt_names                    = undef,
  Optional[String]                  $compiler_pool_address            = undef,
  Optional[String]                  $internal_compiler_a_pool_address = undef,
  Optional[String]                  $internal_compiler_b_pool_address = undef,
  Optional[Hash]                    $pe_conf_data                     = {},
  Optional[Peadm::Ldap_config]      $ldap_config                      = undef,

  # Code Manager
  Optional[Boolean]                 $code_manager_auto_configure = undef,
  Optional[String]                  $r10k_remote              = undef,
  Optional[String]                  $r10k_private_key_file    = undef,
  Optional[Peadm::Pem]              $r10k_private_key_content = undef,
  Optional[Peadm::Known_hosts]      $r10k_known_hosts         = undef,
  Optional[String]                  $deploy_environment       = undef,

  # License Key
  Optional[String]                  $license_key_file    = undef,
  Optional[String]                  $license_key_content = undef,

  # Other
  Optional[String]           $stagingdir             = undef,
  Optional[String]           $uploaddir              = undef,
  Enum['running', 'stopped'] $final_agent_state      = 'running',
  Peadm::Download_mode       $download_mode          = 'bolthost',
  Boolean                    $permit_unsafe_versions = false,
  String                     $token_lifetime         = '1y',
) {
  peadm::assert_supported_bolt_version()

  peadm::assert_supported_pe_version($version, $permit_unsafe_versions)

  $install_result = run_plan('peadm::subplans::install',
    # Standard
    primary_host                   => $primary_host,
    replica_host                   => $replica_host,

    # Large
    compiler_hosts                 => $compiler_hosts,
    legacy_compilers               => $legacy_compilers,

    # Extra Large
    primary_postgresql_host        => $primary_postgresql_host,
    replica_postgresql_host        => $replica_postgresql_host,

    # Common Configuration
    version                        => $version,
    pe_installer_source            => $pe_installer_source,
    console_password               => $console_password,
    dns_alt_names                  => $dns_alt_names,
    pe_conf_data                   => $pe_conf_data,

    # Code Manager
    code_manager_auto_configure => $code_manager_auto_configure,
    r10k_remote                    => $r10k_remote,
    r10k_private_key_file          => $r10k_private_key_file,
    r10k_private_key_content       => $r10k_private_key_content,
    r10k_known_hosts               => $r10k_known_hosts,

    # License Key
    license_key_file               => $license_key_file,
    license_key_content            => $license_key_content,

    # Other
    stagingdir                     => $stagingdir,
    uploaddir                      => $uploaddir,
    download_mode                  => $download_mode,
    permit_unsafe_versions         => $permit_unsafe_versions,
    token_lifetime                 => $token_lifetime,
  )

  $configure_result = run_plan('peadm::subplans::configure',
    # Standard
    primary_host                     => $primary_host,
    replica_host                     => $replica_host,

    # Large
    compiler_hosts                   => $compiler_hosts,
    legacy_compilers                 => $legacy_compilers,

    # Extra Large
    primary_postgresql_host          => $primary_postgresql_host,
    replica_postgresql_host          => $replica_postgresql_host,

    # Common Configuration
    compiler_pool_address            => $compiler_pool_address,
    internal_compiler_a_pool_address => $internal_compiler_a_pool_address,
    internal_compiler_b_pool_address => $internal_compiler_b_pool_address,
    deploy_environment               => $deploy_environment,
    ldap_config                      => $ldap_config,

    # Other
    stagingdir                       => $stagingdir,
    final_agent_state                => $final_agent_state,
  )

  # Return a string banner reporting on what was done
  return([$install_result, $configure_result])
}