Configure the environment timeout setting
The enviroment_timeout
setting determines how often the primary Puppet server caches the data it loads from an environment.
For best performance, change the settings after you have a mature code deployment
process.
- Set
environment_timeout = unlimited
inpuppet.conf
. - Change your code deployment process to refresh the primary server whenever you
deploy updated code. For example, set a postrun command in your r10k config or add a step to your continuous
integration job.
-
With Puppet Server, refresh environments by calling the
environment-cache
API endpoint. Ensure you have write access to the puppet-admin section of thepuppetserver.conf
file. -
With a Rack primary server, restart the web server or the application server. Passenger lets you touch a
restart.txt
file to refresh an application without restarting Apache. See the Passenger docs for details.
-
The environment-timeout
setting can be overridden per-environment in
environment.conf
.