Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
- Puppet >= 4.10.0 < 7.0.0
- , , , , ,
Tasks:
- nightly
- pin_node_group
- download_file
- install_pe
- run_agent
Plans:
- decom_agent
- provision_agent
- provision_compiler
- provision_master
Start using this module
Add this module to your Puppetfile:
mod 'jarretlavallee-deploy_pe', '0.2.0'
Learn more about managing modules with a PuppetfileDocumentation
deploy_pe
A module of Bolt plans and tasks to facilitate a lab based installation of a monolithic PE stack.
Table of Contents
- Description
- Setup - The basics of getting started with deploy_pe
- Usage - Examples
- Limitations
- Development
Description
A module of Bolt plans and tasks to facilitate the installation of a monolithic PE stack. This module is designed to be used with the Puppet Debugging Kit to install a lab based PE stack.
Currently the module provides the following plans.
- Install a PE master
- Install an agent and sign the certificate on the master
- Install and configure a compiler
Setup
Setup Requirements
This module has only been tested on Linux and MacOS operating systems. The plans and tasks will likely not work from windows workstations. Please use the current version of Bolt to run these tasks and plans
The plans assume that there are no puppet components installed on the target machines. Only 2018.1+ versions of PE have been tested.
Beginning with deploy_pe
Usage
To use this module, install it in the boltdir
and leverage the plans in the section below. The examples below will install a PE master, compiler, and agent.
Install a 2019.1.1 PE master with the admin
password set to puppetlabs
.
bolt plan run 'deploy_pe::provision_master' --run-as 'root' --params '{"version":"2019.1.1","pe_settings":{"password":"puppetlabs"}}' --targets 'pe-master'
The plan above will download the 2019.1.1
PE installer package, create a pe.conf
with the password setting, and run the installer script to install PE.
Install an agent from the PE master.
bolt plan run 'deploy_pe::provision_agent' --run-as 'root' --params '{"master":"pe-master"}' --targets 'pe-agent'
The plan above will install the agent using the installer script from the master after ensuring that the agent packages are available on the master. It will then sign the agent's certificate on the master.
Install a compiler
bolt plan run 'deploy_pe::provision_compiler' --run-as 'root' --params '{"master":"pe-master"}' --targets 'pe-compiler'
The plan above will install the agent using the installer script from the master, pin the node to the PE Master
node group, and then run the agent until there are no changes.
Purge a node from the master
bolt plan run 'deploy_pe::decom_agent' --run-as 'root' --params '{"master":"pe-master"}' --targets 'pe-agent'
The plan above will purge the node from the master. If the node is already offline it will try to guess the node name.
See the REFERENCE.md for additional parameters.
Limitations
This is only meant for lab based installations and not production installations. It is meant to be run with vagrant-bolt and using the Puppet Debugging Kit
Development
PRs and issues are welcome.
Contributors
Thank you @m0dular for the continued help on this module.
Reference
Table of Contents
Functions
deploy_pe::master_package_name
: Generate the PE installer package namedeploy_pe::platform_tag
: Generate the PE naming for the OS version
Tasks
download_file
: Download a file to a specified folderinstall_pe
: Install PE on a serverpin_node_group
: Pin node(s) to a specified node grouprun_agent
: Run the Puppet agent until there are no changes
Plans
deploy_pe::decom_agent
: A plan to purge an agent on the masterdeploy_pe::provision_agent
: A plan to install an agent from the masterdeploy_pe::provision_compiler
: A plan to install an compiler from the masterdeploy_pe::provision_master
: A plan to install a new PE master
Functions
deploy_pe::master_package_name
Type: Puppet Language
Generate the PE installer package name
deploy_pe::master_package_name(Hash $node_facts, String $version)
Generate the PE installer package name
Returns: String
The name of the PE installer package based on the OS and PE version
node_facts
Data type: Hash
A hash of facts that will be used to get the OS version
version
Data type: String
The version of PE
deploy_pe::platform_tag
Type: Puppet Language
Generate the PE naming for the OS version
deploy_pe::platform_tag(Hash $node_facts, Boolean $underscores = false)
Generate the PE naming for the OS version
Returns: String
The name of the OS version in el-7-x86_64
format
node_facts
Data type: Hash
A hash of facts that will be used to get the OS version
underscores
Data type: Boolean
A boolean to enable to use of underscores instead of dashes for the seperator
Tasks
download_file
Download a file to a specified folder
Supports noop? false
Parameters
url
Data type: String[1]
The HTTP/HTTPS URL for the specified file
install_pe
Install PE on a server
Supports noop? false
Parameters
tarball
Data type: String[1]
The path to the PE tarball
pe_conf
Data type: String[1]
The path to the pe.conf
tmpdir
Data type: Optional[String[1]]
The directory to extract the tarball. Defaults to the directory containing the tarball
pin_node_group
Pin node(s) to a specified node group
Supports noop? false
Parameters
agent_certnames
Data type: Pattern[/^([A-Za-z0-9._-]+,?)+$/]
A comma-separated list of agent certificate names
node_group
Data type: String
The name of the node group to pin the targets to
run_agent
Run the Puppet agent until there are no changes
Supports noop? false
Parameters
retries
Data type: Optional[Integer[1]]
The number of times to retry the agent run before failing. Defaults to 5
wait_time
Data type: Optional[Integer[1]]
The time to wait for a running agent lock to finish. Defaults to 300
Plans
deploy_pe::decom_agent
A plan to purge an agent on the master
Examples
Decommission a node
bolt plan run 'deploy_pe::decom_agent' --run-as 'root' --params '{"master":"pe-master"}' --targets 'pe-agent'
Parameters
The following parameters are available in the deploy_pe::decom_agent
plan.
master
Data type: TargetSpec
The TargetSpec for the Master to use to run the node purge on
targets
Data type: TargetSpec
The TargetSpec of one or more targets to be removed from the environment
deploy_pe::provision_agent
A plan to install an agent from the master
Examples
Install the PE agent on a node
bolt plan run 'deploy_pe::provision_agent' --run-as 'root' --params '{"master":"pe-master"}' --targets 'pe-agent'
Parameters
The following parameters are available in the deploy_pe::provision_agent
plan.
master
Data type: TargetSpec
The TargetSpec for the Master from which to use the installer script
targets
Data type: TargetSpec
The TargetSpec of one or more targets to be installed
deploy_pe::provision_compiler
A plan to install an compiler from the master
Examples
Install the PE agent on a node and configure it as a compiler
bolt plan run 'deploy_pe::provision_compiler' --run-as 'root' --params '{"master":"pe-master"}' --targets 'pe-compiler'
Parameters
The following parameters are available in the deploy_pe::provision_compiler
plan.
master
Data type: TargetSpec
The TargetSpec for the Master from which to use the installer script
targets
Data type: TargetSpec
The TargetSpec of one or more compilers to be installed
deploy_pe::provision_master
A plan to install a new PE master
Examples
Install a 2019.1.1 PE master on a node using puppetlabs
as the password
bolt plan run 'deploy_pe::provision_master' --run-as 'root' --params '{"version":"2019.1.1","pe_settings":{"password":"puppetlabs"}}' --targets 'pe-master'
Parameters
The following parameters are available in the deploy_pe::provision_master
plan.
targets
Data type: TargetSpec
The TargetSpec of one or more masters to be installed
version
Data type: Optional[String]
The PE version to download from the $base_url.
The $version
, $download_url
, or $installer_tarball
are mutually exclusive. Please choose only one option.
Default value: undef
base_url
Data type: Optional[String]
The base of a HTTP URL that will be used to download the PE installer script.
The resuting format is ${base_url}/${$version}/${package_name}
.
Default value: 'https://pm.puppetlabs.com/puppet-enterprise'
download_url
Data type: Optional[String]
A direct HTTP link to the installer tarball.
The $version
, $download_url
, or $installer_tarball
are mutually exclusive. Please choose only one option.
Default value: undef
installer_tarball
Data type: Optional[String]
A path to the installer tarball on the target master. This option assumes that the tarball has already been downloaded on the target machine.
The $version
, $download_url
, or $installer_tarball
are mutually exclusive. Please choose only one option.
Default value: undef
pe_settings
Data type: Optional[Hash]
A hash of the settings to be used in the pe.conf
during the installation.
The most common setting will be the password
All other settings can be found in the templates/pe.conf.epp
Default value: {password => 'puppetlabs'}
What are tasks?
Modules can contain tasks that take action outside of a desired state managed by Puppet. It’s perfect for troubleshooting or deploying one-off changes, distributing scripts to run across your infrastructure, or automating changes that need to happen in a particular order as part of an application deployment.
Tasks in this module release
What are plans?
Modules can contain plans that take action outside of a desired state managed by Puppet. It’s perfect for troubleshooting or deploying one-off changes, distributing scripts to run across your infrastructure, or automating changes that need to happen in a particular order as part of an application deployment.
Changelog
All notable changes to this project will be documented in this file.
Release 0.2.0
Breaking Changes
- Rename
nodes
totargets
in plans.- Bolt version 2 dropped support for
nodes
as a argument. This release renames thenodes
in the plans to betargets
.
- Bolt version 2 dropped support for
New Features
- Allow for nightly builds when on the Puppet LAN
- Enable automatic FIPS master detection
Release 0.1.0
Initial release