Download and install Puppet Enterprise with Vagrant.
vagrant-pe_build
manages the downloading and installation of Puppet Enterprise
on Vagrant boxes to rapidly build a functioning Puppet environment.
These settings go in the config object namespace and act as defaults in the event multiple machines are being provisioned. These settings are optional and can be overridden in a VM's individual provisioner config.
config.pe_build.version
- Description: The version of Puppet Enterprise to install.
config.pe_build.version_file
- Description: A fully-qualified URI or a path relative to
download_root
. The contents of this file will be read and used to setversion
--- overriding any value that may already be set.
- Description: A fully-qualified URI or a path relative to
config.pe_build.suffix
- Suffix of the Puppet Enterprise installer to use.- Description: The distribution specifix suffix of the Puppet Enterprise installer to use.
- Default:
:detect
config.pe_build.filename
- Description: The filename of the Puppet Enterprise installer.
- Default: this will use the version and suffix provided to guess a filename
of the form
puppet-enterprise-<version>-<suffix>.tar.gz
.
config.pe_build.download_root
- Description: The URI to the directory containing Puppet Enterprise installers if the installer is not yet cached. This setting is optional.
- Supported URI schemes:
- http
- https
- ftp
- file
- A blank URI will default to
file
.
These settings are on a per provisioner basis. They configure the individual
behaviors of each provisioner instance. All of the config.pe_build
options
can be overridden at this point.
role
- Description: The role of the Puppet Enterprise install.
- Options:
:agent
,:master
- Default:
:agent
verbose
- Description: Whether or not to show the verbose output of the Puppet Enterprise install.
- Options:
true
,false
- Default:
true
master
- Description: The address of the puppet master
- Default:
master
answer_file
- Description: The location of alternate answer file for PE installation. Values can be paths relative to the Vagrantfile's project directory.
- Default: The default answer file for the Puppet Enterprise version and role.
answer_extras
- Description: An array of strings that will be appended to the answer file template, one string per line. This can be used to supply additional answers and override default answers.
- Default: An empty array.
relocate_manifests
- Description: Whether or not to change the PE master to use a config of
manifestdir=/manifests
andmodulepath=/modules
. This is meant to be used when the vagrant working directory manifests and modules are remounted on the guest. - Options:
true
,false
- Default:
false
- Description: Whether or not to change the PE master to use a config of
The pe_agent
provisioner installs the Puppet Agent for PE 2015.2.0 and above
and, optionally, configures PE Master VMs to support the new agent.
NOTE: The pe_agent
provisioner currently does not share any configuration
with the global config.pe_build
settings.
master_vm
- Description: The name of a VM in the current Vagrant environment which
hosts the Puppet master that the agent should be connected to. When this
is set, the
master
,autosign
andautopurge
settings are populated with default values. If themaster_vm
setting is not used, then themaster
setting must be populated with the hostname of the Puppet Master. - Default:
nil
.
- Description: The name of a VM in the current Vagrant environment which
hosts the Puppet master that the agent should be connected to. When this
is set, the
autosign
- Description: An boolean switch which controls whether or not to sign the
agent's certificate after installation. Requires
master_vm
to be set. - Options:
true
,false
- Default:
true
, ifmaster_vm
is set.
- Description: An boolean switch which controls whether or not to sign the
agent's certificate after installation. Requires
autopurge
- Description: An boolean switch which controls whether or not to clean the
agent's certificate from the master and purge agent data from PuppetDB
when the agent VM is destroyed. Requires
master_vm
to be set. - Options:
true
,false
- Default:
true
, ifmaster_vm
is set.
- Description: An boolean switch which controls whether or not to clean the
agent's certificate from the master and purge agent data from PuppetDB
when the agent VM is destroyed. Requires
master
- Description: The hostname or fqdn of the puppet master. Must be specified
if
master_vm
is not set. - Default:
nil
. Defaults tovm.hostname
of the Puppet Master ifmaster_vm
is set.
- Description: The hostname or fqdn of the puppet master. Must be specified
if
version
- Description: The version number of the PE Agent to install. NOTE:
this setting is currently used only for Windows agents. POSIX agents will
always receive the
'current'
version installed on the master. Support for setting the version number of POSIX agents will be added in a future release. - Options: A version string,
x.y.z[-optional-stuff]
, or the string'current'
. - Default:
'current'
.
- Description: The version number of the PE Agent to install. NOTE:
this setting is currently used only for Windows agents. POSIX agents will
always receive the
This requires that the necessary installers have already been downloaded and
added with vagrant pe-build copy
.
Vagrant.configure('2') do |config|
config.pe_build.version = '3.8.2'
config.vm.define 'master' do |node|
node.vm.box = 'puppetlabs/centos-7.0-64-nocm'
node.vm.provision :pe_bootstrap do |p|
p.role = :master
end
end
config.vm.define 'agent1' do |node|
node.vm.box = 'puppetlabs/centos-7.0-64-nocm'
node.vm.provision :pe_bootstrap
end
end
Same as above, but uses pe_agent
to provision agent nodes instead
of pe_bootstrap
.
Vagrant.configure('2') do |config|
config.pe_build.version = '2015.2.2'
config.vm.define 'master' do |node|
node.vm.box = 'puppetlabs/centos-7.0-64-nocm'
node.vm.provision :pe_bootstrap do |p|
p.role = :master
end
end
config.vm.define 'agent1' do |node|
node.vm.box = 'puppetlabs/centos-7.0-64-nocm'
node.vm.provision :pe_agent do |p|
p.master_vm = 'master'
end
end
end
Vagrant.configure('2') do |config|
config.pe_build.version = '3.8.2'
config.pe_build.download_root = 'http://my.pe.download.mirror/installers'
# Alternately, a local directory can be specified
#config.pe_build.download_root = 'file://Users/luke/Downloads'
config.vm.define 'master' do |node|
node.vm.box = 'puppetlabs/centos-7.0-64-nocm'
node.vm.provision :pe_bootstrap do |p|
p.role = :master
end
end
config.vm.define 'agent1' do |node|
node.vm.box = 'puppetlabs/centos-7.0-64-nocm'
node.vm.provision :pe_bootstrap
end
end
Vagrant.configure('2') do |config|
config.pe_build.version = '3.8.2'
config.pe_build.download_root = 'http://my.pe.download.mirror/installers'
# Alternately, a local directory can be specified
#config.pe_build.download_root = 'file://Users/luke/Downloads'
config.vm.define 'master' do |node|
node.vm.box = 'puppetlabs/centos-7.0-64-nocm'
node.vm.provision :pe_bootstrap do |p|
p.role = :master
p.answer_file = 'answers/vagrant_master.answers.txt'
end
end
config.vm.define 'agent1' do |node|
node.vm.box = 'puppetlabs/centos-7.0-64-nocm'
node.vm.provision :pe_bootstrap
end
end
Vagrant.configure('2') do |config|
config.pe_build.version = '3.8.2'
config.pe_build.filename = 'puppet-enterprise-3.8.2-el-7-x86_64.tar.gz'
# Alternately, a local directory can be specified
#config.pe_build.download_root = 'file://Users/luke/Downloads'
config.vm.define 'master' do |node|
node.vm.box = 'puppetlabs/centos-7.0-64-nocm'
node.vm.provision :pe_bootstrap do |p|
p.role = :master
end
end
config.vm.define 'agent1' do |node|
node.vm.box = 'puppetlabs/centos-7.0-64-nocm'
node.vm.provision :pe_bootstrap
end
end
Ensure VMs have a FQDN set before installing PE. The easiest way to do this is by setting the hostname
attribute of the VM configuration.
Puppet Enterprise relies on SSL for security so you'll need to ensure that your SSL configuration isn't borked. vagrant-hosts is recommended to configure VMs with semi-sane DNS.
Guest VMs need to be able to directly communicate. You'll need to ensure that they have private network interfaces prepared.
If you have questions or concerns about this module, contact finch on on Freenode, or email adrien@puppetlabs.com.