@@ -71,6 +71,50 @@ class { 'puppet::server::puppetdb':
7171}
7272` ` `
7373
74+ Above example manages Puppetserver + PuppetDB integration. It won't install the
75+ PuppetDB. To do so, you also need the `puppetdb` class
76+
77+ ` ` ` puppet
78+ class { 'puppet':
79+ server => true,
80+ server_reports => 'puppetdb,foreman',
81+ server_storeconfigs => true,
82+ }
83+ include puppetdb
84+ class { 'puppet::server::puppetdb':
85+ server => 'mypuppetdb.example.com',
86+ }
87+ ` ` `
88+
89+ Then the PuppetDB module will also configure postgresql and setup the database.
90+ If you want to manage postgresql installation on your own :
91+
92+ ` ` ` puppet
93+ class { 'postgresql::globals':
94+ encoding => 'UTF-8',
95+ locale => 'en_US.UTF-8',
96+ version => '15',
97+ manage_package_repo => true,
98+ }
99+ class { 'postgresql::server':
100+ listen_addresses => '127.0.0.1',
101+ }
102+ postgresql::server::extension { 'pg_trgm':
103+ database => 'puppetdb',
104+ require => Postgresql::Server::Db['puppetdb'],
105+ before => Service['puppetdb'],
106+ }
107+ class { 'puppetdb':
108+ manage_dbserver => false,
109+ }
110+ class { 'puppet::server::puppetdb':
111+ server => 'mypuppetdb.example.com',
112+ }
113+ ` ` `
114+
115+ Above code will install Puppetserver/PuppetDB/PostgreSQL on a single server. It
116+ will use the upstream postgresql repositories. It was tested on Ubuntu.
117+
74118Please also make sure your puppetdb ciphers are compatible with your puppet server ciphers, ie that the two following parameters match :
75119` ` `
76120puppet::server::cipher_suites
@@ -136,10 +180,9 @@ To use this in standalone mode, edit a file (e.g. install.pp), put in a class re
136180as per the examples above, and the execute _puppet apply_ e.g :
137181
138182` ` ` sh
139- cat > install.pp <<EOF
140- class { ':: puppet': server => true }
183+ puppet apply --modulepath /path_to/extracted_tarball <<EOF
184+ class { 'puppet': server => true }
141185EOF
142- puppet apply install.pp --modulepath /path_to/extracted_tarball
143186` ` `
144187
145188# Advanced scenarios
0 commit comments