Les Shiner
08/30/2022, 6:45 PMLumiere
08/30/2022, 6:48 PMLes Shiner
08/30/2022, 6:48 PMLumiere
08/30/2022, 6:49 PMLes Shiner
08/30/2022, 6:49 PMLumiere
08/30/2022, 6:49 PMLumiere
08/30/2022, 6:50 PMLes Shiner
08/30/2022, 6:51 PMLes Shiner
08/30/2022, 6:51 PMLumiere
08/30/2022, 6:51 PMLes Shiner
08/30/2022, 6:52 PMYorokobi
08/30/2022, 6:55 PMInstall PostgreSQL (latest stable)
<https://www.postgresql.org/download/linux/redhat/>
Install Puppet repo
<https://yum.puppetlabs.com/puppet/el/8/x86_64/puppet-release-1.0.0-15.el8.noarch.rpm>
Create psql user for Puppet
$ sudo -iu postgres
$ createuser -DRSP puppetdb
<ENTER PASSWORD YOU WILL REMEMBER>
Create the database
$ createdb -E UTF8 -O puppetdb puppetdb
Add pgsql-14/bin directory to $PATH
# vim /etc/profile.d/postgres.sh
if ! echo $PATH | grep -q /usr/pgsql-14/bin ; then
export PATH=$PATH:/usr/pgsql-14/bin
fi
Log into PostgreSQL DB
$ sudo -iu postgres
$ psql postgres
postgres=# ALTER USER postgres WITH SUPERUSER;
Verify ALTER ROLE with
postgres=# \du
The postgres user should have Superuser in its list of role attributes
postgres=# \connect puppetdb
You are now connected to database "puppetdb" as user "postgres".
puppetdb=# CREATE EXTENSION pg_trgm;
CREATE EXTENSION
puppetdb=# \dx
Check for pg_trgm extension in output of \dx
Exit psql with \q
Edit the pg_hba.conf file
# vim /var/lib/pgsql/14/data/pg_hba.conf
Change the domain socket, IPv4, and IPv6 database and user from 'all' to 'puppetdb'
Restart postgresql-14 service
# dnf install puppetdb puppet-agent
Create the CSR for the Puppet Server to sign
# puppet agent -t
Sign and re-run `puppet agent -t` if necessary.
Edit the Puppet DB database.ini
# vim /etc/puppetlabs/puppetdb/conf.d/database.ini
Uncomment the subname, set the user name and password
Edit the Puppet DB jetty.ini
# vim /etc/puppetlabs/puppetdb/conf.d/jetty.ini
Set the 'host' parameter to 0.0.0.0 or the routable IP of the Puppet DB server
Add `client-auth = want` to the end of the file
Run `/opt/puppetlabs/bin/puppetdb ssl-setup` as root
Grant the Puppet DB JVM more memory to use
# vim /etc/sysconfig/puppetdb
Change JAVA_ARGS -Xmx value to something bigger (1G, for example).
Start/enable Puppet DB
# systemctl enable --now puppetdb
This will take a while
Edit the puppet.conf on the Puppet Server
# vim /etc/puppetlabs/puppet/puppet.conf
Under the `[master]` section, add
Grant the Puppet DB JVM more memory to use
# vim /etc/sysconfig/puppetdb
Change JAVA_ARGS -Xmx value to something bigger (1G, for example).
Start/enable Puppet DB
# systemctl enable --now puppetdb
This will take a while
Edit the puppet.conf on the Puppet Server
# vim /etc/puppetlabs/puppet/puppet.conf
Under the `[server]` section, add
storeconfigs = true
storeconfigs_backend = puppetdb
Create /etc/puppetlabs/puppet/puppetdb.conf
[main]
### Server name must match the signed certificate created with the `puppet agent` run
server_urls = <https://pdb.fqdn:8081/>
Create /etc/puppetlabs/puppet/routes.yaml
---
master:
facts:
terminus: puppetdb
cache: yaml
...
Install 'puppetdb-termini' on the Puppet Server
Restart the Puppet server service
khudson
08/30/2022, 6:58 PMYorokobi
08/30/2022, 6:59 PMInstall PostgreSQL (latest stable)
<https://www.postgresql.org/download/linux/redhat/>
Install Puppet repo
<https://yum.puppetlabs.com/puppet/el/8/x86_64/puppet-release-1.0.0-15.el8.noarch.rpm>
dnf install ./puppet-release-1.0.0-15.el8.noarch.rpm
# dnf install -y <https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm>
# dnf install postgresql14-server postgresql14-contrib puppetdb puppet-agent
Create psql user for Puppet
$ sudo -iu postgres
$ createuser -DRSP puppetdb
<ENTER PASSWORD YOU WILL REMEMBER>
Create the database
$ createdb -E UTF8 -O puppetdb puppetdb
Add pgsql-14/bin directory to $PATH
# vim /etc/profile.d/postgres.sh
if ! echo $PATH | grep -q /usr/pgsql-14/bin ; then
export PATH=$PATH:/usr/pgsql-14/bin
fi
Log into PostgreSQL DB
$ sudo -iu postgres
$ psql postgres
postgres=# ALTER USER postgres WITH SUPERUSER;
Verify ALTER ROLE with
postgres=# \du
The postgres user should have Superuser in its list of role attributes
postgres=# \connect puppetdb
You are now connected to database "puppetdb" as user "postgres".
puppetdb=# CREATE EXTENSION pg_trgm;
CREATE EXTENSION
puppetdb=# \dx
Check for pg_trgm extension in output of \dx
Exit psql with \q
Edit the pg_hba.conf file
# vim /var/lib/pgsql/14/data/pg_hba.conf
Change the domain socket, IPv4, and IPv6 database and user from 'all' to 'puppetdb'
Restart postgresql-14 service
# dnf install puppetdb puppet-agent
Create the CSR for the Puppet Server to sign
# puppet agent -t
Sign and re-run `puppet agent -t` if necessary.
Edit the Puppet DB database.ini
# vim /etc/puppetlabs/puppetdb/conf.d/database.ini
Uncomment the subname, set the user name and password
Edit the Puppet DB jetty.ini
# vim /etc/puppetlabs/puppetdb/conf.d/jetty.ini
Set the 'host' parameter to 0.0.0.0 or the routable IP of the Puppet DB server
Add `client-auth = want` to the end of the file
Run `/opt/puppetlabs/bin/puppetdb ssl-setup` as root
Grant the Puppet DB JVM more memory to use
# vim /etc/sysconfig/puppetdb
Change JAVA_ARGS -Xmx value to something bigger (1G, for example).
Start/enable Puppet DB
# systemctl enable --now puppetdb
This will take a while
Edit the puppet.conf on the Puppet Server
# vim /etc/puppetlabs/puppet/puppet.conf
Under the `[master]` section, add
Grant the Puppet DB JVM more memory to use
# vim /etc/sysconfig/puppetdb
Change JAVA_ARGS -Xmx value to something bigger (1G, for example).
Start/enable Puppet DB
# systemctl enable --now puppetdb
This will take a while
Edit the puppet.conf on the Puppet Server
# vim /etc/puppetlabs/puppet/puppet.conf
Under the `[server]` section, add
storeconfigs = true
storeconfigs_backend = puppetdb
Create /etc/puppetlabs/puppet/puppetdb.conf
[main]
### Server name must match the signed certificate created with the `puppet agent` run
server_urls = <https://pdb.fqdn:8081/>
Create /etc/puppetlabs/puppet/routes.yaml
---
master:
facts:
terminus: puppetdb
cache: yaml
...
Install 'puppetdb-termini' on the Puppet Server
Restart the Puppet server service
Les Shiner
08/30/2022, 6:59 PMLumiere
08/30/2022, 7:00 PMLumiere
08/30/2022, 7:00 PMYorokobi
08/30/2022, 7:01 PMYorokobi
08/30/2022, 7:03 PMInstall PostgreSQL (latest stable)
<https://www.postgresql.org/download/linux/redhat/>
Install Puppet repo
<https://yum.puppetlabs.com/puppet/el/8/x86_64/puppet-release-1.0.0-15.el8.noarch.rpm>
dnf install ./puppet-release-1.0.0-15.el8.noarch.rpm
# dnf install -y <https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm>
# dnf install postgresql14-server postgresql14-contrib puppetdb puppet-agent
Create psql user for Puppet
$ sudo -iu postgres
$ createuser -DRSP puppetdb
<ENTER PASSWORD YOU WILL REMEMBER>
Create the database
$ createdb -E UTF8 -O puppetdb puppetdb
Add pgsql-14/bin directory to $PATH
# vim /etc/profile.d/postgres.sh
if ! echo $PATH | grep -q /usr/pgsql-14/bin ; then
export PATH=$PATH:/usr/pgsql-14/bin
fi
Log into PostgreSQL DB
$ sudo -iu postgres
$ psql postgres
postgres=# ALTER USER postgres WITH SUPERUSER;
Verify ALTER ROLE with
postgres=# \du
The postgres user should have Superuser in its list of role attributes
postgres=# \connect puppetdb
You are now connected to database "puppetdb" as user "postgres".
puppetdb=# CREATE EXTENSION pg_trgm;
CREATE EXTENSION
puppetdb=# \dx
Check for pg_trgm extension in output of \dx
Exit psql with \q
Edit the pg_hba.conf file
# vim /var/lib/pgsql/14/data/pg_hba.conf
Change the domain socket, IPv4, and IPv6 database and user from 'all' to 'puppetdb'
Restart postgresql-14 service
Create the CSR for the Puppet Server to sign
# puppet agent -t
Sign and re-run `puppet agent -t` if auto signing isn't enabled.
Edit the Puppet DB database.ini
# vim /etc/puppetlabs/puppetdb/conf.d/database.ini
Uncomment the subname, set the user name and password
Edit the Puppet DB jetty.ini
# vim /etc/puppetlabs/puppetdb/conf.d/jetty.ini
Set the 'host' parameter to 0.0.0.0 or the routable IP of the Puppet DB server
Add `client-auth = want` to the end of the file
Run `/opt/puppetlabs/bin/puppetdb ssl-setup` as root
Grant the Puppet DB JVM more memory to use
# vim /etc/sysconfig/puppetdb
Change JAVA_ARGS -Xmx value to something bigger (1G, for example).
Start/enable Puppet DB
# systemctl enable --now puppetdb
This will take a while
Edit the puppet.conf on the Puppet Server
# vim /etc/puppetlabs/puppet/puppet.conf
Under the `[master]` section, add
Grant the Puppet DB JVM more memory to use
# vim /etc/sysconfig/puppetdb
Change JAVA_ARGS -Xmx value to something bigger (1G, for example).
Start/enable Puppet DB
# systemctl enable --now puppetdb
This will take a while
Edit the puppet.conf on the Puppet Server
# vim /etc/puppetlabs/puppet/puppet.conf
Under the `[server]` section, add
storeconfigs = true
storeconfigs_backend = puppetdb
Create /etc/puppetlabs/puppet/puppetdb.conf
[main]
### Server name must match the signed certificate created with the `puppet agent` run
server_urls = <https://pdb.fqdn:8081/>
Create /etc/puppetlabs/puppet/routes.yaml
---
master:
facts:
terminus: puppetdb
cache: yaml
...
Install 'puppetdb-termini' on the Puppet Server
Restart the Puppet server service
Les Shiner
08/30/2022, 7:04 PMLes Shiner
08/30/2022, 7:05 PMLes Shiner
08/30/2022, 7:05 PMLumiere
08/30/2022, 7:05 PMLes Shiner
08/30/2022, 7:05 PMLumiere
08/30/2022, 7:05 PMLumiere
08/30/2022, 7:05 PMLumiere
08/30/2022, 7:06 PMSlackbot
08/30/2022, 7:29 PMSlackbot
08/31/2022, 7:33 AMmatt
08/31/2022, 9:27 AM