Designing advanced profiles
In this advanced example, we iteratively refactor our basic roles and profiles example to handle real-world concerns. The final result is — with only minor differences — the Jenkins profile we use in production here at Puppet.
Along the way, we explain our choices and point out some of the common trade-offs you encounter as you design your own profiles.
Here's the basic Jenkins profile we're starting with:
# /etc/puppetlabs/code/environments/production/site/profile/manifests/jenkins/controller.pp class profile::jenkins::controller ( String $jenkins_port = '9091', String $java_dist = 'jdk', String $java_version = 'latest', ) { class { 'jenkins': configure_firewall => true, install_java => false, port => $jenkins_port, config_hash => { 'HTTP_PORT' => { 'value' => $jenkins_port }, 'JENKINS_PORT' => { 'value' => $jenkins_port }, }, } class { 'java': distribution => $java_dist, version => $java_version, before => Class['jenkins'], } }