Skip to content

Commit c1b2b41

Browse files
committed
drop everything related to embedded database support
1 parent f6b6f8d commit c1b2b41

File tree

15 files changed

+94
-283
lines changed

15 files changed

+94
-283
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Release notes for the puppetlabs-puppetdb module.
55
#### Unreleased
66
* Drop support for Puppet 6
77
* Drop support for Ubuntu 16.04 and Scientific Linux 7
8+
* Remove all code related to embedded database
89

910
#### 7.14.0 - 2023/10/09
1011
* Owner of puppetdb config.ini is now root

README.md

Lines changed: 5 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,6 @@ Setup
5252

5353
To begin using PuppetDB, you’ll have to make a few decisions:
5454

55-
* Which database back-end should I use?
56-
* PostgreSQL (default) or our embedded database
57-
* Embedded database
58-
* **note:** As of PuppetDB 4.0, the embedded database is no longer supported as
59-
an option. When running PuppetDB 3.x, we suggest using the embedded database
60-
only for experimental environments rather than production, as it does not scale
61-
well and can cause difficulty in migrating to PostgreSQL.
6255
* Should I run the database on the same node that I run PuppetDB on?
6356
* Should I run PuppetDB on the same node that I run my master on?
6457

@@ -432,35 +425,22 @@ If true, the PostgreSQL server will be managed by this module. Defaults to `true
432425

433426
If true, the PostgreSQL database will be managed by this module. Defaults to `true`.
434427

435-
#### `database`
436-
437-
Which database backend to use; legal values are `postgres` (default)
438-
or `embedded`. The `embedded` option is not supported on PuppetDB
439-
4.0.0 or later. `embedded` can be used for very small installations or
440-
for testing, but is not recommended for use in production
441-
environments. For more info, see the [puppetdb
442-
docs](https://puppet.com/docs/puppetdb/latest/).
443-
444428
#### `database_host`
445429

446430
Hostname to use for the database connection. For single case installations this
447-
should be left as the default. Defaults to `localhost`, ignored for `embedded`
448-
database.
431+
should be left as the default. Defaults to `localhost`.
449432

450433
#### `database_port`
451434

452-
The port that the database server listens on. Defaults to `5432`, ignored for
453-
`embedded` database.
435+
The port that the database server listens on. Defaults to `5432`.
454436

455437
#### `database_username`
456438

457-
The name of the database user to connect as. Defaults to `puppetdb`, ignored for
458-
`embedded` database.
439+
The name of the database user to connect as. Defaults to `puppetdb`.
459440

460441
#### `database_password`
461442

462-
The password for the database user. Defaults to `puppetdb`, ignored for
463-
`embedded` database.
443+
The password for the database user. Defaults to `puppetdb`.
464444

465445
#### `manage_db_password`
466446

@@ -470,30 +450,19 @@ Defaults to `true`
470450

471451
#### `database_name`
472452

473-
The name of the database instance to connect to. Defaults to `puppetdb`, ignored
474-
for `embedded` database.
453+
The name of the database instance to connect to. Defaults to `puppetdb`.
475454

476455
#### `jdbc_ssl_properties`
477456

478457
The text to append to the JDBC connection URI. This should begin with a '?'
479458
character. For example, to use SSL for the PostgreSQL connection, set this
480459
parameter's value to `?ssl=true`.
481460

482-
This setting is only available when using PostgreSQL; when using HyperSQL (the
483-
`embedded` database), it does nothing.
484-
485461
#### `database_validate`
486462

487463
If true, the module will attempt to connect to the database using the specified
488464
settings and fail if it is not able to do so. Defaults to `true`.
489465

490-
#### `database_embedded_path`
491-
492-
*Embedded Database Only* Changes the path location for the HSQLDB database. Does
493-
not provide migration for old data, so if you change this value and you have an
494-
existing database you will need to manually move the content also. (defaults to
495-
package default for 2.x release).
496-
497466
#### `node_ttl`
498467

499468
The length of time a node can go without receiving any new data before it's
@@ -600,11 +569,6 @@ init config file will reflect only what is passed via the `java_args` param.
600569
Jetty option to explicitly set `max-threads`. Defaults to `undef`, so the
601570
PuppetDB-Jetty default is used.
602571

603-
#### `read_database`
604-
605-
Which database backend to use for the read database. Only supports
606-
`postgres` (default). This option is supported in PuppetDB >= 1.6.
607-
608572
#### `read_database_host`
609573
*This parameter must be set to use another PuppetDB instance for queries.*
610574

REFERENCE.md

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ The following parameters are available in the `puppetdb` class:
9494
* [`manage_database`](#-puppetdb--manage_database)
9595
* [`manage_package_repo`](#-puppetdb--manage_package_repo)
9696
* [`postgres_version`](#-puppetdb--postgres_version)
97-
* [`database`](#-puppetdb--database)
9897
* [`database_host`](#-puppetdb--database_host)
9998
* [`database_port`](#-puppetdb--database_port)
10099
* [`database_username`](#-puppetdb--database_username)
@@ -104,7 +103,6 @@ The following parameters are available in the `puppetdb` class:
104103
* [`jdbc_ssl_properties`](#-puppetdb--jdbc_ssl_properties)
105104
* [`database_listen_address`](#-puppetdb--database_listen_address)
106105
* [`database_validate`](#-puppetdb--database_validate)
107-
* [`database_embedded_path`](#-puppetdb--database_embedded_path)
108106
* [`node_ttl`](#-puppetdb--node_ttl)
109107
* [`node_purge_ttl`](#-puppetdb--node_purge_ttl)
110108
* [`report_ttl`](#-puppetdb--report_ttl)
@@ -121,7 +119,6 @@ The following parameters are available in the `puppetdb` class:
121119
* [`puppetdb_user`](#-puppetdb--puppetdb_user)
122120
* [`puppetdb_group`](#-puppetdb--puppetdb_group)
123121
* [`puppetdb_server`](#-puppetdb--puppetdb_server)
124-
* [`read_database`](#-puppetdb--read_database)
125122
* [`read_database_host`](#-puppetdb--read_database_host)
126123
* [`read_database_port`](#-puppetdb--read_database_port)
127124
* [`read_database_username`](#-puppetdb--read_database_username)
@@ -394,14 +391,6 @@ Data type: `Any`
394391

395392
Default value: `$puppetdb::params::postgres_version`
396393

397-
##### <a name="-puppetdb--database"></a>`database`
398-
399-
Data type: `Any`
400-
401-
402-
403-
Default value: `$puppetdb::params::database`
404-
405394
##### <a name="-puppetdb--database_host"></a>`database_host`
406395

407396
Data type: `Any`
@@ -474,14 +463,6 @@ Data type: `Any`
474463

475464
Default value: `$puppetdb::params::database_validate`
476465

477-
##### <a name="-puppetdb--database_embedded_path"></a>`database_embedded_path`
478-
479-
Data type: `Any`
480-
481-
482-
483-
Default value: `$puppetdb::params::database_embedded_path`
484-
485466
##### <a name="-puppetdb--node_ttl"></a>`node_ttl`
486467

487468
Data type: `Any`
@@ -610,14 +591,6 @@ Data type: `Any`
610591

611592
Default value: `$puppetdb::params::puppetdb_server`
612593

613-
##### <a name="-puppetdb--read_database"></a>`read_database`
614-
615-
Data type: `Any`
616-
617-
618-
619-
Default value: `$puppetdb::params::read_database`
620-
621594
##### <a name="-puppetdb--read_database_host"></a>`read_database_host`
622595

623596
Data type: `Any`
@@ -1037,7 +1010,6 @@ global configuration class for PuppetDB
10371010
The following parameters are available in the `puppetdb::globals` class:
10381011

10391012
* [`version`](#-puppetdb--globals--version)
1040-
* [`database`](#-puppetdb--globals--database)
10411013
* [`puppet_confdir`](#-puppetdb--globals--puppet_confdir)
10421014

10431015
##### <a name="-puppetdb--globals--version"></a>`version`
@@ -1048,14 +1020,6 @@ Data type: `Any`
10481020

10491021
Default value: `'present'`
10501022

1051-
##### <a name="-puppetdb--globals--database"></a>`database`
1052-
1053-
Data type: `Any`
1054-
1055-
1056-
1057-
Default value: `'postgres'`
1058-
10591023
##### <a name="-puppetdb--globals--puppet_confdir"></a>`puppet_confdir`
10601024

10611025
Data type: `Stdlib::Absolutepath`
@@ -1298,7 +1262,6 @@ The following parameters are available in the `puppetdb::server` class:
12981262
* [`postgresql_ssl_on`](#-puppetdb--server--postgresql_ssl_on)
12991263
* [`cipher_suites`](#-puppetdb--server--cipher_suites)
13001264
* [`migrate`](#-puppetdb--server--migrate)
1301-
* [`database`](#-puppetdb--server--database)
13021265
* [`database_host`](#-puppetdb--server--database_host)
13031266
* [`database_port`](#-puppetdb--server--database_port)
13041267
* [`database_username`](#-puppetdb--server--database_username)
@@ -1307,7 +1270,6 @@ The following parameters are available in the `puppetdb::server` class:
13071270
* [`manage_db_password`](#-puppetdb--server--manage_db_password)
13081271
* [`jdbc_ssl_properties`](#-puppetdb--server--jdbc_ssl_properties)
13091272
* [`database_validate`](#-puppetdb--server--database_validate)
1310-
* [`database_embedded_path`](#-puppetdb--server--database_embedded_path)
13111273
* [`node_ttl`](#-puppetdb--server--node_ttl)
13121274
* [`node_purge_ttl`](#-puppetdb--server--node_purge_ttl)
13131275
* [`report_ttl`](#-puppetdb--server--report_ttl)
@@ -1323,7 +1285,6 @@ The following parameters are available in the `puppetdb::server` class:
13231285
* [`puppetdb_service_status`](#-puppetdb--server--puppetdb_service_status)
13241286
* [`puppetdb_user`](#-puppetdb--server--puppetdb_user)
13251287
* [`puppetdb_group`](#-puppetdb--server--puppetdb_group)
1326-
* [`read_database`](#-puppetdb--server--read_database)
13271288
* [`read_database_host`](#-puppetdb--server--read_database_host)
13281289
* [`read_database_port`](#-puppetdb--server--read_database_port)
13291290
* [`read_database_username`](#-puppetdb--server--read_database_username)
@@ -1533,14 +1494,6 @@ Data type: `Any`
15331494

15341495
Default value: `$puppetdb::params::migrate`
15351496

1536-
##### <a name="-puppetdb--server--database"></a>`database`
1537-
1538-
Data type: `Any`
1539-
1540-
1541-
1542-
Default value: `$puppetdb::params::database`
1543-
15441497
##### <a name="-puppetdb--server--database_host"></a>`database_host`
15451498

15461499
Data type: `Any`
@@ -1605,14 +1558,6 @@ Data type: `Any`
16051558

16061559
Default value: `$puppetdb::params::database_validate`
16071560

1608-
##### <a name="-puppetdb--server--database_embedded_path"></a>`database_embedded_path`
1609-
1610-
Data type: `Any`
1611-
1612-
1613-
1614-
Default value: `$puppetdb::params::database_embedded_path`
1615-
16161561
##### <a name="-puppetdb--server--node_ttl"></a>`node_ttl`
16171562

16181563
Data type: `Any`
@@ -1733,14 +1678,6 @@ Data type: `Any`
17331678

17341679
Default value: `$puppetdb::params::puppetdb_group`
17351680

1736-
##### <a name="-puppetdb--server--read_database"></a>`read_database`
1737-
1738-
Data type: `Any`
1739-
1740-
1741-
1742-
Default value: `$puppetdb::params::read_database`
1743-
17441681
##### <a name="-puppetdb--server--read_database_host"></a>`read_database_host`
17451682

17461683
Data type: `Any`

manifests/globals.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#
33
class puppetdb::globals (
44
$version = 'present',
5-
$database = 'postgres',
65
Stdlib::Absolutepath $puppet_confdir = $settings::confdir,
76
) {
87
if !(fact('os.family') in ['RedHat', 'Suse', 'Archlinux', 'Debian', 'OpenBSD', 'FreeBSD']) {

manifests/init.pp

Lines changed: 26 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
$manage_database = $puppetdb::params::manage_database,
3232
$manage_package_repo = $puppetdb::params::manage_pg_repo,
3333
$postgres_version = $puppetdb::params::postgres_version,
34-
$database = $puppetdb::params::database,
3534
$database_host = $puppetdb::params::database_host,
3635
$database_port = $puppetdb::params::database_port,
3736
$database_username = $puppetdb::params::database_username,
@@ -41,7 +40,6 @@
4140
$jdbc_ssl_properties = $puppetdb::params::jdbc_ssl_properties,
4241
$database_listen_address = $puppetdb::params::postgres_listen_addresses,
4342
$database_validate = $puppetdb::params::database_validate,
44-
$database_embedded_path = $puppetdb::params::database_embedded_path,
4543
$node_ttl = $puppetdb::params::node_ttl,
4644
$node_purge_ttl = $puppetdb::params::node_purge_ttl,
4745
$report_ttl = $puppetdb::params::report_ttl,
@@ -58,7 +56,6 @@
5856
$puppetdb_user = $puppetdb::params::puppetdb_user,
5957
$puppetdb_group = $puppetdb::params::puppetdb_group,
6058
$puppetdb_server = $puppetdb::params::puppetdb_server,
61-
$read_database = $puppetdb::params::read_database,
6259
$read_database_host = $puppetdb::params::read_database_host,
6360
$read_database_port = $puppetdb::params::read_database_port,
6461
$read_database_username = $puppetdb::params::read_database_username,
@@ -114,7 +111,6 @@
114111
postgresql_ssl_on => $postgresql_ssl_on,
115112
cipher_suites => $cipher_suites,
116113
migrate => $migrate,
117-
database => $database,
118114
database_host => $database_host,
119115
database_port => $database_port,
120116
database_username => $database_username,
@@ -123,7 +119,6 @@
123119
manage_db_password => $manage_db_password,
124120
jdbc_ssl_properties => $jdbc_ssl_properties,
125121
database_validate => $database_validate,
126-
database_embedded_path => $database_embedded_path,
127122
node_ttl => $node_ttl,
128123
node_purge_ttl => $node_purge_ttl,
129124
report_ttl => $report_ttl,
@@ -142,7 +137,6 @@
142137
java_args => $java_args,
143138
merge_default_java_args => $merge_default_java_args,
144139
max_threads => $max_threads,
145-
read_database => $read_database,
146140
read_database_host => $read_database_host,
147141
read_database_port => $read_database_port,
148142
read_database_username => $read_database_username,
@@ -174,34 +168,32 @@
174168
java_bin => $java_bin,
175169
}
176170

177-
if ($database == 'postgres') {
178-
$database_before = str2bool($database_validate) ? {
179-
false => Class['puppetdb::server'],
180-
default => [
181-
Class['puppetdb::server'],
182-
Class['puppetdb::server::validate_db']
183-
],
184-
}
171+
$database_before = str2bool($database_validate) ? {
172+
false => Class['puppetdb::server'],
173+
default => [
174+
Class['puppetdb::server'],
175+
Class['puppetdb::server::validate_db']
176+
],
177+
}
185178

186-
class { 'puppetdb::database::postgresql':
187-
listen_addresses => $database_listen_address,
188-
database_name => $database_name,
189-
puppetdb_server => $puppetdb_server,
190-
database_username => $database_username,
191-
database_password => $database_password,
192-
database_port => $database_port,
193-
manage_server => $manage_dbserver,
194-
manage_database => $manage_database,
195-
manage_package_repo => $manage_package_repo,
196-
postgres_version => $postgres_version,
197-
postgresql_ssl_on => $postgresql_ssl_on,
198-
postgresql_ssl_key_path => $postgresql_ssl_key_path,
199-
postgresql_ssl_cert_path => $postgresql_ssl_cert_path,
200-
postgresql_ssl_ca_cert_path => $postgresql_ssl_ca_cert_path,
201-
read_database_username => $read_database_username,
202-
read_database_password => $read_database_password,
203-
read_database_host => $read_database_host,
204-
before => $database_before,
205-
}
179+
class { 'puppetdb::database::postgresql':
180+
listen_addresses => $database_listen_address,
181+
database_name => $database_name,
182+
puppetdb_server => $puppetdb_server,
183+
database_username => $database_username,
184+
database_password => $database_password,
185+
database_port => $database_port,
186+
manage_server => $manage_dbserver,
187+
manage_database => $manage_database,
188+
manage_package_repo => $manage_package_repo,
189+
postgres_version => $postgres_version,
190+
postgresql_ssl_on => $postgresql_ssl_on,
191+
postgresql_ssl_key_path => $postgresql_ssl_key_path,
192+
postgresql_ssl_cert_path => $postgresql_ssl_cert_path,
193+
postgresql_ssl_ca_cert_path => $postgresql_ssl_ca_cert_path,
194+
read_database_username => $read_database_username,
195+
read_database_password => $read_database_password,
196+
read_database_host => $read_database_host,
197+
before => $database_before,
206198
}
207199
}

0 commit comments

Comments
 (0)