Skip to content

Commit 04c8fae

Browse files
authored
Merge pull request #31 from puppetlabs/rename-to-peadm
Rename module to puppetlabs-peadm
2 parents a3b8244 + 9ea1e69 commit 04c8fae

28 files changed

+173
-188
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Puppet Enterprise Extra Large
1+
# Puppet Enterprise (pe) Administration (adm) Module
22

3-
This Puppet module contains Puppet Task Plans used to deploy an at-scale Puppet Enterprise architecture.
3+
This Puppet module contains Puppet Task Plans used to deploy and manage at-scale Puppet Enterprise architecture.
44

5-
Use this module to deploy Puppet Enterprise 2019.0.x Extra Large architecture.
5+
Use this module to deploy Puppet Enterprise 2019.x Standard, Large, and Extra Large architecture.
66

77
* This deployment depends on and assumes the use of trusted facts. Specifically, `pp_role` and `pp_environment`.
88
* This deployment assumes that at least for PE infrastructure nodes, Puppet certnames are correct, resolvable FQDNs.

documentation/basic_usage.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ Provisioning can be broken down into two actions: [install](../plans/unit/instal
1414
Besides getting Puppet Enterprise installed, the key configuration supporting Large and Extra Large architectures is laid out in four classification groups. Links are provided below to a Markdown document that describes the groups, and also to the Puppet manifest that actually configures them:
1515

1616
* [classification.md](classification.md)
17-
* [pe\_xl::node\_manager class](../manifests/node_manager.pp)
17+
* [peadm::node\_manager class](../manifests/node_manager.pp)
1818

1919
The reference implementation uses trusted facts to put nodes in the right groups. Because the important puppet\_enterprise::\* class parameters and data are specified in the console, it should also be safe to have a pe.conf present on both the master, and the master replica nodes.
2020

2121
## Basic usage instructions
2222

2323
1. Install Bolt on a jumphost. This can be the master, or any other system.
24-
2. Download or git clone the pe\_xl module and put it somewhere on the jumphost. e.g. ~/modules/pe\_xl.
24+
2. Download or git clone the peadm module and put it somewhere on the jumphost. e.g. ~/modules/peadm.
2525
2. Download or git clone the module dependencies, and put them somewhere on the jumphost. e.g. ~/modules/stdlib, ~/modules/node\_manager, etc.
2626
2. Ensure the hostname of each system is set correctly, to the same value that will be used to connect to the system, and refer to the system as. If the hostname is not set as expected the installation plan will refuse to continue.
2727
4. Create an inventory file with connection information. Example included below. Available Bolt configuration options are documented here.
2828
5. Create a parameters file. Example included below. Note at the top of the file are arguments which dictate which plans should be run, such as install+configure.
29-
6. Run the pe\_xl plan with the inputs created. Example:
29+
6. Run the peadm::provision plan with the inputs created. Example:
3030

31-
bolt plan run pe_xl::provision \
31+
bolt plan run peadm::provision \
3232
--inventory nodes.yaml \
3333
--modulepath ~/modules \
3434
--params @params.json
@@ -38,7 +38,7 @@ Example nodes.yaml Bolt inventory file:
3838
```yaml
3939
---
4040
groups:
41-
- name: pe_xl_nodes
41+
- name: pe_nodes
4242
config:
4343
transport: ssh
4444
ssh:

documentation/install_and_configure_without_ha.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ The install, configure, and upgrade plans covered in the [basic_usage.md](basic_
99

1010
1. Ensure the hostname of each system is set correctly, to the same value that will be used to connect to the system, and refer to the system as. If the hostname is not set as expected the installation plan will refuse to continue.
1111
2. Install Bolt on a jumphost. This can be the master, or any other system.
12-
3. Download or git clone the pe\_xl module and put it somewhere on the jumphost, e.g. ~/modules/pe\_xl.
12+
3. Download or git clone the peadm module and put it somewhere on the jumphost, e.g. ~/modules/peadm.
1313
4. Create an inventory file with connection information. An example is included below.
1414
5. Create a parameters file. An example is included below. Note the omission of the `master_replica_host` and `puppetdb_database_replica_host` parameters.
15-
6. Run the pe\_xl plan with the inputs created. Example:
15+
6. Run the peadm plan with the inputs created. Example:
1616
```
17-
bolt plan run pe_xl::provision \
17+
bolt plan run peadm::provision \
1818
--inventory nodes.yaml \
1919
--modulepath ~/modules \
2020
--params @params.json
@@ -26,7 +26,7 @@ The install, configure, and upgrade plans covered in the [basic_usage.md](basic_
2626

2727
---
2828
groups:
29-
- name: pe_xl_nodes
29+
- name: peadm_nodes
3030
config:
3131
transport: ssh
3232
ssh:

documentation/large_deploy.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ deploy a PE Large Architecture.
2424

2525
Ensuring that the parameters above are omitted from the `params.json` file,
2626
the [basic usage instructions](basic_usage.md#basic-usage-instructions) can be
27-
used to run the `pe_xl` plan in order to install and configure the deployment.
27+
used to run the `peadm` plan in order to install and configure the deployment.
2828

2929
Example nodes.yaml Bolt inventory file:
3030

3131
```yaml
3232
---
3333
groups:
34-
- name: pe_xl_nodes
34+
- name: peadm_nodes
3535
config:
3636
transport: ssh
3737
ssh:

functions/fail_on_transport.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Useful for excluding PCP when it's not appopriate
44
#
5-
function pe_xl::fail_on_transport (
5+
function peadm::fail_on_transport (
66
TargetSpec $nodes,
77
String $transport,
88
) {

functions/flatten_compact.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function pe_xl::flatten_compact (
1+
function peadm::flatten_compact (
22
Array $input,
33
) {
44
$input.flatten.filter |$value| {

functions/generate_pe_conf.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# undef will not be included in the config file. This is done to reduce the
66
# amount of logic required within plans if parameters are not passed in.
77
#
8-
function pe_xl::generate_pe_conf (
8+
function peadm::generate_pe_conf (
99
Hash $settings,
1010
) {
1111
# Check that console_admin_password is present

functions/get_targets.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This differs from get_target() in that:
33
# - It returns an Array[Target, 1, 0], rather than a Target
44
# - It will accept undef and return [ ].
5-
function pe_xl::get_targets(
5+
function peadm::get_targets(
66
Variant[TargetSpec, Undef] $spec,
77
Optional[Integer[1,1]] $count = undef,
88
) {

functions/print_apply_result.pp

-20
This file was deleted.

functions/target_host.pp

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function pe_xl::target_host(
1+
function peadm::target_host(
22
Variant[Target, Array[Target,0,1]] $target,
33
) >> Variant[String, Undef] {
44
case $target {
@@ -11,5 +11,8 @@ function pe_xl::target_host(
1111
Array[Target,0,0]: {
1212
undef
1313
}
14+
default: {
15+
fail('Unexpected input type to peadm::target_host function')
16+
}
1417
}
1518
}

functions/validate_architecture.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function pe_xl::validate_architecture (
1+
function peadm::validate_architecture (
22
TargetSpec $master_host,
33
Variant[TargetSpec, Undef] $master_replica_host = undef,
44
Variant[TargetSpec, Undef] $puppetdb_database_host = undef,
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
extension_requests:
3-
pp_role: "pe_xl::master"
3+
pp_role: "peadm::master"
44
pp_environment: "pe_production"
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
extension_requests:
3-
pp_role: "pe_xl::puppetdb_database"
3+
pp_role: "peadm::puppetdb_database"
44
pp_environment: "pe_production"

lib/puppet/functions/pe_xl/file_content_upload.rb lib/puppet/functions/peadm/file_content_upload.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require 'tempfile'
22

3-
Puppet::Functions.create_function(:'pe_xl::file_content_upload') do
3+
Puppet::Functions.create_function(:'peadm::file_content_upload') do
44
local_types do
55
type 'TargetOrTargets = Variant[String[1], Target, Array[TargetOrTargets]]'
66
end
@@ -12,7 +12,7 @@
1212
end
1313

1414
def file_content_upload(content, destination, *targets)
15-
file = Tempfile.new('pe_xl')
15+
file = Tempfile.new('peadm')
1616
file.write(content)
1717
file.flush
1818
result = call_function('upload_file', file.path, destination, *targets)
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
Puppet::Functions.create_function(:'pe_xl::node_manager_yaml_location') do
1+
Puppet::Functions.create_function(:'peadm::node_manager_yaml_location') do
22
dispatch :nm_yaml_location do
33
end
44

5-
def nm_yaml_location()
5+
def nm_yaml_location
66
File.join(Puppet.settings['confdir'], 'node_manager.yaml')
77
end
88
end

manifests/compiler.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @summary Example class for PE compiler load balancing
22
#
3-
class pe_xl::compiler {
3+
class peadm::compiler {
44

55
@@haproxy::balancermember { "${::clientcert}_puppetserver_listener":
66
listening_service => 'puppetserver',

manifests/load_balancer.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @summary Example class for PE compiler load balancer
22
#
3-
class pe_xl::load_balancer {
3+
class peadm::load_balancer {
44

55
class { 'haproxy':
66
global_options => {

manifests/puppetdb.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @summary Example class for PE PuppetDB load balancing
22
#
3-
class pe_xl::puppetdb {
3+
class peadm::puppetdb {
44

55
# TODO: split load balancing into two pools, A and B
66
@@haproxy::balancermember { "${::clientcert}_puppetdb_listener":

manifests/setup/node_manager.pp

+10-10
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
# This class will be applied during master bootstrap using e.g.
88
#
99
# puppet apply \
10-
# --exec 'class { "pe_xl::node_manager":
10+
# --exec 'class { "peadm::node_manager":
1111
# environments => ["production", "staging", "development"],
1212
# }'
1313
#
14-
class pe_xl::setup::node_manager (
14+
class peadm::setup::node_manager (
1515
String[1] $master_host,
1616
String[1] $puppetdb_database_host,
1717
String[1] $compiler_pool_address,
@@ -43,7 +43,7 @@
4343
# We modify this group's rule such that all PE infrastructure nodes will be
4444
# members.
4545
node_group { 'PE Infrastructure Agent':
46-
rule => ['and', ['~', ['trusted', 'extensions', 'pp_role'], '^pe_xl::']],
46+
rule => ['and', ['~', ['trusted', 'extensions', 'pp_role'], '^peadm::']],
4747
}
4848

4949
# We modify this group to add, as data, the compiler_pool_address only.
@@ -52,7 +52,7 @@
5252
node_group { 'PE Master':
5353
parent => 'PE Infrastructure',
5454
rule => ['or',
55-
['and', ['=', ['trusted', 'extensions', 'pp_role'], 'pe_xl::compiler']],
55+
['and', ['=', ['trusted', 'extensions', 'pp_role'], 'peadm::compiler']],
5656
['=', 'name', $master_host],
5757
],
5858
data => {
@@ -71,7 +71,7 @@
7171
parent => 'PE Infrastructure',
7272
environment => 'production',
7373
override_environment => false,
74-
rule => ['and', ['=', ['trusted', 'extensions', 'pp_role'], 'pe_xl::puppetdb_database']],
74+
rule => ['and', ['=', ['trusted', 'extensions', 'pp_role'], 'peadm::puppetdb_database']],
7575
classes => {
7676
'puppet_enterprise::profile::database' => { },
7777
},
@@ -84,7 +84,7 @@
8484
ensure => present,
8585
parent => 'PE Infrastructure',
8686
rule => ['and',
87-
['=', ['trusted', 'extensions', 'pp_role'], 'pe_xl::master'],
87+
['=', ['trusted', 'extensions', 'pp_role'], 'peadm::master'],
8888
['=', ['trusted', 'extensions', 'pp_cluster'], 'A'],
8989
],
9090
data => {
@@ -103,7 +103,7 @@
103103
ensure => 'present',
104104
parent => 'PE Master',
105105
rule => ['and',
106-
['=', ['trusted', 'extensions', 'pp_role'], 'pe_xl::compiler'],
106+
['=', ['trusted', 'extensions', 'pp_role'], 'peadm::compiler'],
107107
['=', ['trusted', 'extensions', 'pp_cluster'], 'A'],
108108
],
109109
classes => {
@@ -131,14 +131,14 @@
131131
classes => {
132132
'puppet_enterprise::profile::primary_master_replica' => { }
133133
},
134-
variables => { 'pe_xl_replica' => true },
134+
variables => { 'peadm_replica' => true },
135135
}
136136

137137
node_group { 'PE Master B':
138138
ensure => present,
139139
parent => 'PE Infrastructure',
140140
rule => ['and',
141-
['=', ['trusted', 'extensions', 'pp_role'], 'pe_xl::master'],
141+
['=', ['trusted', 'extensions', 'pp_role'], 'peadm::master'],
142142
['=', ['trusted', 'extensions', 'pp_cluster'], 'B'],
143143
],
144144
data => {
@@ -155,7 +155,7 @@
155155
ensure => 'present',
156156
parent => 'PE Master',
157157
rule => ['and',
158-
['=', ['trusted', 'extensions', 'pp_role'], 'pe_xl::compiler'],
158+
['=', ['trusted', 'extensions', 'pp_role'], 'peadm::compiler'],
159159
['=', ['trusted', 'extensions', 'pp_cluster'], 'B'],
160160
],
161161
classes => {

metadata.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"name": "puppetlabs-pe_xl",
2+
"name": "puppetlabs-peadm",
33
"version": "0.4.0",
44
"author": "Reid Vandewiele",
55
"summary": "Bolt plans used to deploy an at-scale Puppet Enterprise architecture",
66
"license": "Apache-2.0",
7-
"source": "https://github.com/puppetlabs/puppetlabs-pe_xl",
8-
"project_page": "https://github.com/puppetlabs/puppetlabs-pe_xl",
9-
"issues_url": "https://github.com/puppetlabs/puppetlabs-pe_xl/issues",
7+
"source": "https://github.com/puppetlabs/puppetlabs-peadm",
8+
"project_page": "https://github.com/puppetlabs/puppetlabs-peadm",
9+
"issues_url": "https://github.com/puppetlabs/puppetlabs-peadm/issues",
1010
"dependencies": [
1111
{
1212
"name": "puppetlabs/stdlib",

plans/misc/divert_code_manager.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# This is a stop-gap at best. This should not be attempted without advisement.
1212
#
13-
plan pe_xl::misc::divert_code_manager (
13+
plan peadm::misc::divert_code_manager (
1414
$master_host,
1515
) {
1616

@@ -21,7 +21,7 @@
2121
This will allow /etc/puppetlabs/code to be managed manually
2222
| HEREDOC
2323

24-
run_task('pe_xl::divert_code_manager', $master_host)
24+
run_task('peadm::divert_code_manager', $master_host)
2525

2626
notice(@(HEREDOC))
2727
Remember to enforce this configuration in your Puppet code with a Collector Override. E.g.

plans/provision.pp

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
# Puppet Enterprise Extra Large cluster. This plan accepts all parameters
33
# used by its sub-plans, and invokes them in order.
44
#
5-
plan pe_xl::provision (
5+
plan peadm::provision (
66
# Standard
7-
Pe_xl::SingleTargetSpec $master_host,
8-
Optional[Pe_xl::SingleTargetSpec] $master_replica_host = undef,
7+
Peadm::SingleTargetSpec $master_host,
8+
Optional[Peadm::SingleTargetSpec] $master_replica_host = undef,
99

1010
# Large
1111
Optional[TargetSpec] $compiler_hosts = undef,
1212

1313
# Extra Large
14-
Optional[Pe_xl::SingleTargetSpec] $puppetdb_database_host = undef,
15-
Optional[Pe_xl::SingleTargetSpec] $puppetdb_database_replica_host = undef,
14+
Optional[Peadm::SingleTargetSpec] $puppetdb_database_host = undef,
15+
Optional[Peadm::SingleTargetSpec] $puppetdb_database_replica_host = undef,
1616

1717
# Common Configuration
1818
String $console_password,
@@ -24,14 +24,14 @@
2424
# Code Manager
2525
Optional[String] $r10k_remote = undef,
2626
Optional[String] $r10k_private_key_file = undef,
27-
Optional[Pe_xl::Pem] $r10k_private_key_content = undef,
27+
Optional[Peadm::Pem] $r10k_private_key_content = undef,
2828
Optional[String] $deploy_environment = undef,
2929

3030
# Other
3131
Optional[String] $stagingdir = undef,
3232
) {
3333

34-
$install_result = run_plan('pe_xl::unit::install',
34+
$install_result = run_plan('peadm::unit::install',
3535
# Standard
3636
master_host => $master_host,
3737
master_replica_host => $master_replica_host,
@@ -58,7 +58,7 @@
5858
stagingdir => $stagingdir,
5959
)
6060

61-
$configure_result = run_plan('pe_xl::unit::configure',
61+
$configure_result = run_plan('peadm::unit::configure',
6262
# Standard
6363
master_host => $master_host,
6464
master_replica_host => $master_replica_host,

0 commit comments

Comments
 (0)