Skip to content
Merged
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,10 @@ Specify the supported SSL protocols for PuppetDB (e.g. TLSv1, TLSv1.1, TLSv1.2.)
Configure jetty's supported `cipher-suites` (e.g. `SSL_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384`).
Defaults to `undef`.

#### `migrate`

If `true`, puppetdb will automatically migrate to the latest database format at startup. If `false`, if the database format supplied by this version of PuppetDB doesn't match the version expected (whether newer or older), PuppetDB will exit with an error status. Defaults to `true`.

### `manage_dbserver`

If true, the PostgreSQL server will be managed by this module. Defaults to `true`.
Expand Down
2 changes: 2 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
$ssl_ca_cert = $puppetdb::params::ssl_ca_cert,
$ssl_protocols = $puppetdb::params::ssl_protocols,
$cipher_suites = $puppetdb::params::cipher_suites,
$migrate = $puppetdb::params::migrate,
$manage_dbserver = $puppetdb::params::manage_dbserver,
$manage_database = $puppetdb::params::manage_database,
$manage_package_repo = $puppetdb::params::manage_pg_repo,
Expand Down Expand Up @@ -104,6 +105,7 @@
ssl_ca_cert => $ssl_ca_cert,
ssl_protocols => $ssl_protocols,
cipher_suites => $cipher_suites,
migrate => $migrate,
database => $database,
database_host => $database_host,
database_port => $database_port,
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
$conn_lifetime = '0'

$max_threads = undef
$migrate = true

# These settings are for the read database
$read_database = 'postgres'
Expand Down
2 changes: 2 additions & 0 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
$ssl_ca_cert = $puppetdb::params::ssl_ca_cert,
$ssl_protocols = $puppetdb::params::ssl_protocols,
$cipher_suites = $puppetdb::params::cipher_suites,
$migrate = $puppetdb::params::migrate,
$database = $puppetdb::params::database,
$database_host = $puppetdb::params::database_host,
$database_port = $puppetdb::params::database_port,
Expand Down Expand Up @@ -184,6 +185,7 @@
confdir => $confdir,
puppetdb_user => $puppetdb_user,
puppetdb_group => $puppetdb_group,
migrate => $migrate,
notify => Service[$puppetdb_service],
}

Expand Down
6 changes: 6 additions & 0 deletions manifests/server/database.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
$puppetdb_user = $puppetdb::params::puppetdb_user,
$puppetdb_group = $puppetdb::params::puppetdb_group,
$database_max_pool_size = $puppetdb::params::database_max_pool_size,
$migrate = $puppetdb::params::migrate,
) inherits puppetdb::params {

if str2bool($database_validate) {
Expand Down Expand Up @@ -165,6 +166,11 @@
value => $conn_lifetime,
}

ini_setting { 'puppetdb_migrate':
setting => 'migrate',
value => $migrate,
}

if $puppetdb::params::database_max_pool_size_setting_name != undef {
if $database_max_pool_size == 'absent' {
ini_setting { 'puppetdb_database_max_pool_size':
Expand Down