Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for 'versioned code' in the puppet server configuration #702

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,12 @@
# $server_max_open_files:: Increase the max open files limit for Puppetserver.
# Defaults to undef
#
# $server_versioned_code_id The path to an executable script that Puppet Server invokes to generate a code_id
# Defaults to undef
# $server_versioned_code_content Contains the path to an executable script that Puppet Server
# invokes when on static_file_content requests.
# Defaults to undef
#
# === Usage:
#
# * Simple usage:
Expand Down Expand Up @@ -720,6 +726,9 @@
Boolean $server_ca_allow_auth_extensions = $puppet::params::server_ca_allow_auth_extensions,
Boolean $server_ca_enable_infra_crl = $puppet::params::server_ca_enable_infra_crl,
Optional[Integer[1]] $server_max_open_files = $puppet::params::server_max_open_files,
Optional[String] $server_versioned_code_id = undef,
Optional[String] $server_versioned_code_content = undef,

) inherits puppet::params {
contain puppet::config

Expand Down
6 changes: 6 additions & 0 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,10 @@
# The number of selector threads actually used by Jetty is twice the number of selectors
# requested. For example, if a value of 3 is specified for the ssl-selector-threads setting,
# Jetty will actually use 6 selector threads.
# versioned_code_id The path to an executable script that Puppet Server invokes to generate a code_id
# versioned_code_content Contains the path to an executable script that Puppet Server invokes when an agent makes
# a static_file_content API request for the contents of a file resource that
# has a source attribute with a puppet:/// URI value.
class puppet::server(
Variant[Boolean, Stdlib::Absolutepath] $autosign = $::puppet::autosign,
Array[String] $autosign_entries = $::puppet::autosign_entries,
Expand Down Expand Up @@ -443,6 +447,8 @@
Boolean $ca_allow_auth_extensions = $::puppet::server_ca_allow_auth_extensions,
Boolean $ca_enable_infra_crl = $::puppet::server_ca_enable_infra_crl,
Optional[Integer[1]] $max_open_files = $::puppet::server_max_open_files,
Optional[String] $versioned_code_id = $::puppet::server_versioned_code_id,
Optional[String] $versioned_code_content = $::puppet::server_versioned_code_content,
) {
if $ca {
$ssl_ca_cert = "${ssl_dir}/ca/ca_crt.pem"
Expand Down
2 changes: 2 additions & 0 deletions manifests/server/puppetserver.pp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@
$ca_allow_auth_extensions = $::puppet::server::ca_allow_auth_extensions,
$ca_enable_infra_crl = $::puppet::server::ca_enable_infra_crl,
$max_open_files = $::puppet::server::max_open_files,
$versioned_code_id = $::puppet::server::versioned_code_id,
$versioned_code_content = $::puppet::server::versioned_code_content,
) {
include ::puppet::server

Expand Down
7 changes: 7 additions & 0 deletions templates/server/puppetserver/conf.d/puppetserver.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ jruby-puppet: {
<%- end -%>
}

<%- if @versioned_code_id and @versioned_code_content %>
versioned-code {
code-id-command: <%= @versioned_code_id %>
code-content-command: <%= @versioned_code_content %>
}
<%- end -%>

# settings related to HTTPS client requests made by Puppet Server
http-client: {
# A list of acceptable protocols for making HTTPS requests
Expand Down