Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: puppetlabs/puppetlabs-peadm
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.2.0
Choose a base ref
...
head repository: puppetlabs/puppetlabs-peadm
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.3.0
Choose a head ref

Commits on Sep 24, 2021

  1. (SUP-2643) Add option to override version assertion

    Prior to this commit, there was no way to force an override to the PE
    version assertion. This commit adds a new parameter that will override
    the PE version check and output a warning when enabled. This is useful
    in testing new PE versions that are not yet supported by the module.
    Jarret Lavallee committed Sep 24, 2021
    Copy the full SHA
    d98c551 View commit details

Commits on Sep 27, 2021

  1. Copy the full SHA
    6e16e7f View commit details
  2. Copy the full SHA
    50ccb74 View commit details
  3. adds spaces around the brackets to meet bash syntax

    Co-authored-by: Reid Vandewiele <reid@puppet.com>
    mcka1n and reidmv authored Sep 27, 2021
    Copy the full SHA
    d1ae598 View commit details
  4. uses proper quotes around variable

    Co-authored-by: Reid Vandewiele <reid@puppet.com>
    mcka1n and reidmv authored Sep 27, 2021
    Copy the full SHA
    6f5c612 View commit details
  5. removes -p flag to avoid future mktemp conflicts

    Co-authored-by: Reid Vandewiele <reid@puppet.com>
    mcka1n and reidmv authored Sep 27, 2021
    Copy the full SHA
    63deb3f View commit details
  6. uses proper syntax for interpolation

    Co-authored-by: Reid Vandewiele <reid@puppet.com>
    mcka1n and reidmv authored Sep 27, 2021
    Copy the full SHA
    4c90d40 View commit details
  7. removes unused variable

    mcka1n committed Sep 27, 2021
    Copy the full SHA
    35b05eb View commit details
  8. Copy the full SHA
    f1b8f6d View commit details
  9. Copy the full SHA
    9b3ff97 View commit details

Commits on Sep 28, 2021

  1. Copy the full SHA
    b1ec230 View commit details
  2. Copy the full SHA
    87342b4 View commit details
  3. removes the name argument from mktemp

    Co-authored-by: Reid Vandewiele <reid@puppet.com>
    mcka1n and reidmv authored Sep 28, 2021
    Copy the full SHA
    4965f43 View commit details
  4. Merge pull request #215 from puppetlabs/SOLARCH-622

    Improve reliability of downloading PE tarball
    reidmv authored Sep 28, 2021
    Copy the full SHA
    3924918 View commit details

Commits on Sep 29, 2021

  1. Return accurate 'supported' data even when unsafe

    The new $permit_unsafe_versions parameter allows the
    assert_supported_pe_version() function to not raise on failure, but it
    should always return accurate data about whether or not the given
    version is or isn't supported.
    reidmv committed Sep 29, 2021
    Copy the full SHA
    275ecb4 View commit details
  2. Merge pull request #204 from jarretlavallee/sup_2643_version_override

    Add development and testing option to permit installing unsupported PE versions
    reidmv authored Sep 29, 2021
    Copy the full SHA
    c0908a2 View commit details

Commits on Oct 1, 2021

  1. Improve logging of peadm::download

    Adjust message language, add message for moving temp file into target
    location on successful download
    reidmv committed Oct 1, 2021
    Copy the full SHA
    bb8a795 View commit details
  2. Determine signing key from asc file

    Rather than expecting that downloaded files will be signed with a known
    key, simply use the key from the signature asc file.
    
    The purpose of this validation isn't to validate authenticity. It is
    only to validate digest.
    reidmv committed Oct 1, 2021
    Copy the full SHA
    4e3e52a View commit details

Commits on Oct 4, 2021

  1. Merge pull request #219 from puppetlabs/GH-216

    Determine validation key from asc signature file
    davidsandilands authored Oct 4, 2021
    Copy the full SHA
    009b631 View commit details
  2. Catch mv errors when downloading

    If moving the temporary file into the final location fails, make sure
    that error is caught and return values set appropriately.
    reidmv committed Oct 4, 2021
    Copy the full SHA
    a55a966 View commit details

Commits on Oct 5, 2021

  1. Merge pull request #220 from puppetlabs/maint-catch-mv-errors

    Catch mv errors when downloading
    reidmv authored Oct 5, 2021
    Copy the full SHA
    53c8968 View commit details

Commits on Oct 6, 2021

  1. Fail agent_install if agent is already installed

    The PE bash installer script doesn't support re-configuring an existing
    agent, which is critical to our use case. Therefore, we should fail if
    the agent is already installed, since we cannot guarantee correct
    configuration in that scenario.
    reidmv committed Oct 6, 2021
    Copy the full SHA
    41e55ad View commit details
  2. Remove inotify and log watching service from docker examples

      * Previously we could spit out logs of what bolt was doing.
        This feature is now natively supported in bolt and there
        is no need for installing inotify and supporting services.
    
      * Additionally, this adds the old pe installer gpg key
    
      * Reformats json and yaml files under spec/docker
    logicminds committed Oct 6, 2021
    Copy the full SHA
    5e139ba View commit details
  3. Use the docker host's bolt command and bolt project file

      * The previously implementation used pdk which ships with an
        older version of bolt.  This allows the user to use the local
        installation of bolt which is the same procedure as using peadm
        directly.
    
      * This also fixes a few issues around module dependencies and relying
        on the fixtures path.  Users are no longer required to have pdk
        or run bundle commands.  Since this uses pure bolt the entire process
        mimics that of a real installation and usage.
    
      * Updates install and upgrade scripts to use bolt commands
    logicminds committed Oct 6, 2021
    Copy the full SHA
    2313fa7 View commit details
  4. Copy the full SHA
    f81a635 View commit details
  5. Merge pull request #223 from puppetlabs/fail-agent_install-on-reinstall

    Fail agent_install if agent is already installed
    reidmv authored Oct 6, 2021
    Copy the full SHA
    95e4cd9 View commit details
  6. Adds ability to optionally add agents for docker examples

      * Previously the documentation detailed instructions for
        how to add agents to a docker example cluster.  This
        adds a script to do the dirty work.
    logicminds committed Oct 6, 2021
    Copy the full SHA
    abfd2b8 View commit details

Commits on Oct 7, 2021

  1. Merge pull request #224 from nwops/docker_fix

    Updates docker to use bolt commands
    reidmv authored Oct 7, 2021
    Copy the full SHA
    e5e0d61 View commit details

Commits on Dec 23, 2021

  1. Copy the full SHA
    a3b61ea View commit details
  2. Copy the full SHA
    3b3b5b5 View commit details

Commits on Dec 29, 2021

  1. Merge pull request #227 from puppetlabs/SOLARCH-716

    Accidentally closed instead of merging Merging despite broken test @reidmv advised of issue. Will fix the test separately
    davidsandilands authored Dec 29, 2021
    Copy the full SHA
    11927ab View commit details

Commits on Jan 4, 2022

  1. Fix failing table output tests

    The gem was updated and the output format changed slightly.
    
    These tests should probably just be removed; they are too exact and
    finicky.
    reidmv committed Jan 4, 2022
    Copy the full SHA
    748975e View commit details
  2. Merge pull request #228 from puppetlabs/fix-table-tests

    Fix failing table output tests
    davidsandilands authored Jan 4, 2022
    Copy the full SHA
    131def2 View commit details

Commits on Jan 5, 2022

  1. Support PE 2021.4

    This commit adds support for PE 2021.4
    reidmv committed Jan 5, 2022
    Copy the full SHA
    66d3c80 View commit details
  2. Merge pull request #229 from puppetlabs/2021.4

    Support PE 2021.4
    reidmv authored Jan 5, 2022
    Copy the full SHA
    2527bc0 View commit details
  3. Update stdlib dependency

    New version 8.1 is supported
    reidmv committed Jan 5, 2022
    Copy the full SHA
    17d5b62 View commit details
  4. Release prep v3.3.0

    GitHub Action committed Jan 5, 2022
    Copy the full SHA
    6a526af View commit details
  5. Merge pull request #230 from puppetlabs/release-prep

    Release prep v3.3.0
    reidmv authored Jan 5, 2022
    Copy the full SHA
    130948d View commit details
Showing with 407 additions and 159 deletions.
  1. +2 −2 .github/workflows/test-install-matrix.yaml
  2. +1 −1 .github/workflows/test-install.yaml
  3. +2 −2 .github/workflows/test-upgrade.yaml
  4. +4 −0 .gitignore
  5. +16 −0 CHANGELOG.md
  6. +2 −2 README.md
  7. +27 −9 REFERENCE.md
  8. +38 −7 documentation/docker_examples.md
  9. +6 −2 documentation/install.md
  10. +15 −2 functions/assert_supported_pe_version.pp
  11. +3 −3 metadata.json
  12. +6 −4 plans/install.pp
  13. +4 −3 plans/subplans/install.pp
  14. +5 −4 plans/upgrade.pp
  15. +1 −0 spec/docker/.dockerignore
  16. +9 −10 spec/docker/Dockerfile
  17. +13 −0 spec/docker/Puppetfile
  18. +12 −0 spec/docker/bolt-project.yaml
  19. +9 −3 spec/docker/extra-large-ha/docker-compose.yaml
  20. +8 −2 spec/docker/extra-large-ha/params.json
  21. +8 −6 spec/docker/extra-large-ha/upgrade_params.json
  22. +3 −1 spec/docker/extra-large/docker-compose.yaml
  23. +7 −2 spec/docker/extra-large/params.json
  24. +1 −1 spec/docker/extra-large/upgrade_params.json
  25. +7 −12 spec/docker/install.sh
  26. +4 −1 spec/docker/large-ha/docker-compose.yaml
  27. +7 −2 spec/docker/large-ha/params.json
  28. +6 −5 spec/docker/large-ha/upgrade_params.json
  29. +2 −1 spec/docker/large/docker-compose.yaml
  30. +8 −3 spec/docker/large/params.json
  31. +5 −4 spec/docker/large/upgrade_params.json
  32. +0 −8 spec/docker/live_audit.service
  33. +0 −20 spec/docker/live_audit.sh
  34. +52 −0 spec/docker/pe-old-pub.gpg
  35. +39 −0 spec/docker/setup-agents.sh
  36. +5 −2 spec/docker/standard-ha/docker-compose.yaml
  37. +4 −1 spec/docker/standard-ha/params.json
  38. +3 −4 spec/docker/standard-ha/upgrade_params.json
  39. +2 −0 spec/docker/standard/docker-compose.yaml
  40. +5 −3 spec/docker/standard/params.json
  41. +2 −3 spec/docker/standard/upgrade_params.json
  42. +5 −11 spec/docker/upgrade.sh
  43. +1 −1 spec/fixtures/plans/failed_table.txt
  44. +1 −1 spec/fixtures/plans/passed_table.txt
  45. +1 −1 spec/fixtures/plans/summary_table.txt
  46. +14 −0 spec/functions/assert_supported_pe_version_spec.rb
  47. +5 −0 tasks/agent_install.sh
  48. +1 −6 tasks/download.json
  49. +26 −4 tasks/download.sh
4 changes: 2 additions & 2 deletions .github/workflows/test-install-matrix.yaml
Original file line number Diff line number Diff line change
@@ -28,8 +28,8 @@ jobs:
- large
- extra-large-with-dr
version:
- 2019.8.8
- 2021.3.0
- 2019.8.9
- 2021.4.0
image:
- centos-7

2 changes: 1 addition & 1 deletion .github/workflows/test-install.yaml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ on:
version:
description: 'PE version to install'
required: true
default: '2021.3.0'
default: '2021.4.0'
ssh-debugging:
description: 'Boolean; whether or not to pause for ssh debugging'
required: true
4 changes: 2 additions & 2 deletions .github/workflows/test-upgrade.yaml
Original file line number Diff line number Diff line change
@@ -27,9 +27,9 @@ jobs:
- 'standard'
- 'extra-large-with-dr'
version:
- '2019.8.8'
- '2019.8.9'
version_to_upgrade:
- '2021.3.0'
- '2021.4.0'
image:
- 'centos-7'
download_mode:
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -32,3 +32,7 @@
.plan_cache.json
.resource_types/
bolt-debug.log
spec/docker/**/*.tar.gz
spec/docker/**/*.asc
spec/docker/**/files/puppet-enterprise*
spec/docker/.task_cache.json
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,22 @@

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).

## [v3.3.0](https://github.com/puppetlabs/puppetlabs-peadm/tree/v3.3.0) (2022-01-05)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-peadm/compare/v3.2.0...v3.3.0)

### Added

- Support PE 2021.4 [\#229](https://github.com/puppetlabs/puppetlabs-peadm/pull/229) ([reidmv](https://github.com/reidmv))
- Add development and testing option to permit installing unsupported PE versions [\#204](https://github.com/puppetlabs/puppetlabs-peadm/pull/204) ([jarretlavallee](https://github.com/jarretlavallee))

### Fixed

- Fail agent\_install if agent is already installed [\#223](https://github.com/puppetlabs/puppetlabs-peadm/pull/223) ([reidmv](https://github.com/reidmv))
- Catch mv errors when downloading [\#220](https://github.com/puppetlabs/puppetlabs-peadm/pull/220) ([reidmv](https://github.com/reidmv))
- Determine validation key from asc signature file [\#219](https://github.com/puppetlabs/puppetlabs-peadm/pull/219) ([reidmv](https://github.com/reidmv))
- Improve reliability of downloading PE tarball [\#215](https://github.com/puppetlabs/puppetlabs-peadm/pull/215) ([mcka1n](https://github.com/mcka1n))

## [v3.2.0](https://github.com/puppetlabs/puppetlabs-peadm/tree/v3.2.0) (2021-09-20)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-peadm/compare/v3.1.0...v3.2.0)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -42,8 +42,8 @@ The normal usage pattern for peadm is as follows.

### Requirements

* Puppet Enterprise 2019.8.1 or newer (tested with PE 2021.3)
* Bolt 3.17.0 or newer (tested with Bolt 3.17.0)
* Puppet Enterprise 2019.8.1 or newer (tested with PE 2021.4)
* Bolt 3.17.0 or newer (tested with Bolt 3.21.0)
* EL 7, EL 8, Ubuntu 18.04, or Ubuntu 20.04
* Classifier Data enabled. This PE feature is enabled by default on new installs, but can be disabled by users if they remove the relevant configuration from their global hiera.yaml file. See the [PE docs](https://puppet.com/docs/pe/latest/config_console.html#task-5039) for more information.

36 changes: 27 additions & 9 deletions REFERENCE.md
Original file line number Diff line number Diff line change
@@ -165,7 +165,7 @@ Type: Puppet Language

Assert that the PE version given is supported by PEAdm

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

The peadm::assert_supported_pe_version function.

@@ -183,6 +183,12 @@ Data type: `String`



##### `permit_unsafe_versions`

Data type: `Boolean`



### <a name="peadmbolt_version"></a>`peadm::bolt_version`

Type: Ruby 4.x API
@@ -861,17 +867,11 @@ Data type: `Boolean`

Whether to check the integrity of the downloaded file

##### `key_id`

Data type: `String`

The GPG key ID to use when verifying the download

##### `key_server`

Data type: `String`

The GPG keyserver to retrieve the GPG key from
The GPG keyserver to retrieve GPG keys from

### <a name="enable_replica"></a>`enable_replica`

@@ -1330,6 +1330,7 @@ The following parameters are available in the `peadm::install` plan:
* [`license_key_content`](#license_key_content)
* [`stagingdir`](#stagingdir)
* [`download_mode`](#download_mode)
* [`permit_unsafe_versions`](#permit_unsafe_versions)

##### <a name="compiler_pool_address"></a>`compiler_pool_address`

@@ -1410,7 +1411,7 @@ Data type: `String`



Default value: `'2019.8.5'`
Default value: `'2019.8.8'`

##### <a name="dns_alt_names"></a>`dns_alt_names`

@@ -1492,6 +1493,14 @@ Data type: `Enum[direct,bolthost]`

Default value: `'bolthost'`

##### <a name="permit_unsafe_versions"></a>`permit_unsafe_versions`

Data type: `Boolean`



Default value: ``false``

### <a name="peadmmodify_certificate"></a>`peadm::modify_certificate`

Certificates can be modified by adding extensions, removing extensions, or
@@ -1632,6 +1641,7 @@ The following parameters are available in the `peadm::upgrade` plan:
* [`token_file`](#token_file)
* [`stagingdir`](#stagingdir)
* [`download_mode`](#download_mode)
* [`permit_unsafe_versions`](#permit_unsafe_versions)
* [`begin_at_step`](#begin_at_step)

##### <a name="compiler_pool_address"></a>`compiler_pool_address`
@@ -1731,6 +1741,14 @@ Data type: `Enum[direct,bolthost]`

Default value: `'bolthost'`

##### <a name="permit_unsafe_versions"></a>`permit_unsafe_versions`

Data type: `Boolean`



Default value: ``false``

##### <a name="begin_at_step"></a>`begin_at_step`

Data type: `Optional[Enum[
45 changes: 38 additions & 7 deletions documentation/docker_examples.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
## Docker Based Examples
This module provides docker compose files for the various architectures for experimentation purposes. This gives you the ability to stand up an entire PE stack in order to learn how this module and DR works. If you have docker and docker-compose you can start up a full Puppet architecture with a single command. Please note that Puppet does not support PE on containers in production.

In order to decouple Bolt from a dev system, a special bolt container is created that will run all the bolt commands. This is
required to achieve maximum portability. Should you want to run bolt commands against the PE stack you must
first login to this bolt container via ssh, docker or docker-compose.

Example: `docker-compose run --entrypoint=/bin/bash bolt`

### Requirements
To run the container based examples you will need the following requirements:

1. Docker
2. Docker compose
3. Bolt 3.18+
3. realpath (brew install coreutils on mac)
4. 16GB memory, 24GB+ for XL and XL-DR architectures
5. CPU with many cores (Tested with Core i7 6700)
@@ -46,6 +41,8 @@ In order to stop and remove the containers you will need to perform the followin
2. `cd <chosen architecture>`
3. docker-compose down

Alternative you can run something similar like: `docker-compose --project-directory=large down`

### Logging into the console
You can login to the PE Console after successful install. However, first you will need to
grab the mapped port number of the PE console. The port numbers are mapped dynamically as to not
@@ -108,6 +105,8 @@ docker inspect pe-xl-core-0.puppet.vm -f "{{json .NetworkSettings.Networks }}" |
}
```

You can also run `docker inspect pe-xl-core-0.puppet.vm -f "{{json .HostConfig.NetworkMode }}" | sed -e 's/^"//' -e 's/"$//'`

**NOTE** In these example you may see the use of `jq`. This is a [cli utility for parsing JSON](https://stedolan.github.io/jq/). I recommend installing it. As a alternative you can pipe output to `python -m json.tool`.

### Starting agent containers
@@ -122,8 +121,38 @@ Example:
For most tasks these images are great. However, if you wish to use puppet orchestrator with the pcp transport. The one requirement is that all images used must be systemd aware, otherwise pxp will not start. If you do not plan on using pcp
there is no need for containers with systemd.

At this time we have not added documention for starting a container with systemd. Instructions coming soon.
You can use the the custom image `pe-base` built with the docker cluster named pe-base. This is a centos:7 image that you can use to generate tens or hundreds of agents. (Resources permitting). You will also want to run the docker run command with additonal flags.

`docker run -d -t --hostname=pe-std-agent1.puppet.vm --network=pe-std_default --privileged --label=pe-std-agent,docker-example-agent" -v /sys/fs/cgroup:/sys/fs/cgroup:ro pe-base"`

Once you have created the container you will obviously want to install the puppet agent

`docker exec -ti $CONTAINER_ID sh -c "curl -k https://${PE_SERVER}:8140/packages/current/install.bash | bash && puppet agent -t"`

Accept the cert in the console and run the puppet agent again on the agent container.

Login interactively if you wish: `docker exec -ti $CONTAINER_ID /bin/bash`

Take a look at the spec/docker/Dockerfile for examples of how to setup systemd in a container.


### Cleaning up
Before you run docker-compose down inside the cluster type directory you will need to stop and remove
all the agent containers if created.

This can be done like so:

```bash
# base name is the name of the primary hostname without domain
PE_CLUSTER_TYPE=standard
BASE_NAME=pe-std
docker stop $(docker ps -q -f label="${BASE_NAME}-agent")
docker rm $(docker ps -a -q -f label="${BASE_NAME}-agent")
# The docker-compose down command cannot be run until the agents have been removed
cd spec/docker/${PE_CLUSTER_TYPE}
docker-compose down

```

### Other notes
1. The install plan is not fully idempotent.
@@ -134,3 +163,5 @@ At this time we have not added documention for starting a container with systemd
6. You can use top to view all the processes being run in the containers.
7. Docker will use the privilege mode option when running these examples (systemd support)
8. Systemd is running inside these containers! The real systemd, not the fake one.

If you see errors regarding peadmin::puppet_runonce, just run the install or upgrade script again. Might have to perform multiple times for resource constrained docker hosts.
8 changes: 6 additions & 2 deletions documentation/install.md
Original file line number Diff line number Diff line change
@@ -33,6 +33,10 @@ When installing a new PE cluster using peadm, there are several different host p

Supplying a combination of host parameters which does not match one of the supported architectures above will result in an unsupported architecture error.

## Requirements

* Puppet must not be installed on any of the target PE cluster hosts prior to beginning install.

## Usage

### Bolt 3 usage
@@ -99,7 +103,7 @@ Example params.json Bolt parameters file (shown: Extra Large with DR):
"console_password": "puppetlabs",
"dns_alt_names": [ "puppet", "puppet.lab1.puppet.vm" ],
"compiler_pool_address": "puppet.lab1.puppet.vm",
"version": "2021.3.0"
"version": "2021.4.0"
}
```

@@ -111,7 +115,7 @@ The peadm::install plan downloads installation content from an online repository

The default staging directory is `/tmp`. If a different staging dir is being used, it can be specified using the `stagingdir` parameter to the peadm::install plan.

The content needed is the PE installation tarball for the target version. The installation content should be in the staging dir, and should have its original name. E.g. `/tmp/puppet-enterprise-2021.3.0-el-7-x86_64.tar.gz`.
The content needed is the PE installation tarball for the target version. The installation content should be in the staging dir, and should have its original name. E.g. `/tmp/puppet-enterprise-2021.4.0-el-7-x86_64.tar.gz`.

Installation content can be downloaded from [https://puppet.com/try-puppet/puppet-enterprise/download/](https://puppet.com/try-puppet/puppet-enterprise/download/).

17 changes: 15 additions & 2 deletions functions/assert_supported_pe_version.pp
Original file line number Diff line number Diff line change
@@ -3,12 +3,25 @@
# @param [String] the version number to check
function peadm::assert_supported_pe_version (
String $version,
Boolean $permit_unsafe_versions = false,
) >> Struct[{'supported' => Boolean}] {
$oldest = '2019.7'
$newest = '2021.3'
$newest = '2021.4'
$supported = ($version =~ SemVerRange(">= ${oldest} <= ${newest}"))

unless $supported {
if $permit_unsafe_versions {
warning(@("WARN"/L))
WARNING: Permitting unsafe PE versions. This is not supported or tested.
Proceeding with this action could result in a broken PE Infrastructure.
| WARN
}

if (!$supported and $permit_unsafe_versions) {
warning(@("WARN"/L))
WARNING: PE version ${version} is NOT SUPPORTED!
| WARN
}
elsif (!$supported) {
fail(@("REASON"/L))
This version of the puppetlabs-peadm module does not support PE ${version}.

6 changes: 3 additions & 3 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppetlabs-peadm",
"version": "3.2.0",
"version": "3.3.0",
"author": "puppetlabs",
"summary": "Bolt plans used to deploy an at-scale Puppet Enterprise architecture",
"license": "Apache-2.0",
@@ -10,7 +10,7 @@
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 6.5.0 < 8.0.0"
"version_requirement": ">= 6.5.0 < 9.0.0"
},
{
"name": "WhatsARanjit/node_manager",
@@ -30,7 +30,7 @@
},
{
"name": "puppetlabs/service",
"version_requirement": ">= 1.3.0 < 2.0.0"
"version_requirement": ">= 1.3.0 < 3.0.0"
}
],
"operatingsystem_support": [
10 changes: 6 additions & 4 deletions plans/install.pp
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@

# Common Configuration
String $console_password,
String $version = '2019.8.5',
String $version = '2019.8.8',
Optional[Array[String]] $dns_alt_names = undef,
Optional[String] $compiler_pool_address = undef,
Optional[String] $internal_compiler_a_pool_address = undef,
@@ -44,12 +44,13 @@
Optional[String] $license_key_content = undef,

# Other
Optional[String] $stagingdir = undef,
Enum[direct,bolthost] $download_mode = 'bolthost',
Optional[String] $stagingdir = undef,
Enum[direct,bolthost] $download_mode = 'bolthost',
Boolean $permit_unsafe_versions = false,
) {
peadm::assert_supported_bolt_version()

peadm::assert_supported_pe_version($version)
peadm::assert_supported_pe_version($version, $permit_unsafe_versions)

$install_result = run_plan('peadm::subplans::install',
# Standard
@@ -81,6 +82,7 @@
# Other
stagingdir => $stagingdir,
download_mode => $download_mode,
permit_unsafe_versions => $permit_unsafe_versions,
)

$configure_result = run_plan('peadm::subplans::configure',
7 changes: 4 additions & 3 deletions plans/subplans/install.pp
Original file line number Diff line number Diff line change
@@ -48,10 +48,11 @@
Optional[String] $license_key_content = undef,

# Other
String $stagingdir = '/tmp',
Enum[direct,bolthost] $download_mode = 'bolthost',
String $stagingdir = '/tmp',
Enum[direct,bolthost] $download_mode = 'bolthost',
Boolean $permit_unsafe_versions = false,
) {
peadm::assert_supported_pe_version($version)
peadm::assert_supported_pe_version($version, $permit_unsafe_versions)

# Convert inputs into targets.
$primary_target = peadm::get_targets($primary_host, 1)
Loading