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
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ include::modules/con_migrating-from-internal-databases-to-external-databases.ado

include::modules/con_postgresql-as-an-external-database-considerations.adoc[leveloffset=+1]

include::modules/proc_preparing-a-host-for-external-databases.adoc[leveloffset=+1]

include::modules/proc_installing-postgresql.adoc[leveloffset=+1]

include::modules/proc_migrating-to-external-databases.adoc[leveloffset=+1]
Expand Down
2 changes: 0 additions & 2 deletions guides/common/assembly_using-external-databases.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ include::modules/con_configuring-project-server-with-external-database.adoc[leve

include::modules/con_postgresql-as-an-external-database-considerations.adoc[leveloffset=+1]

include::modules/proc_preparing-a-host-for-external-databases.adoc[leveloffset=+1]

include::modules/proc_installing-postgresql.adoc[leveloffset=+1]

include::modules/proc_configuring-satellite-to-use-external-databases.adoc[leveloffset=+1]
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ endif::[]

To migrate from the default internal databases to external databases, you must complete the following procedures:

. xref:preparing-a-host-for-external-databases_{context}[].
Prepare a {RHEL} 8 server to host the external databases.
. xref:installing-postgresql_{context}[].
Prepare PostgreSQL with databases for {Project}, Pulp and Candlepin with dedicated users owning them.
. xref:migrating-to-external-databases_{context}[].
Expand Down
8 changes: 6 additions & 2 deletions guides/common/modules/proc_installing-postgresql.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@
= Installing PostgreSQL

You can install only the same version of PostgreSQL that is installed with the `{foreman-installer}` tool during an internal database installation.
{Project} supports PostgreSQL version 12.
{Project} supports PostgreSQL version 13.

include::snip_firewalld.adoc[]

.Prerequisites
* The prepared host must meet {Project} {InstallingServerDocURL}storage-requirements_{project-context}[Storage requirements].
* The prepared host has base operating system repositories enabled.

.Procedure

. To install PostgreSQL, enter the following command:
+
[options="nowrap" subs="verbatim,quotes,attributes"]
----
ifdef::katello,satellite,orcharhino[]
# dnf install {postgresql-server-package} postgresql-evr postgresql-contrib
# dnf install {postgresql-server-package} postgresql-contrib
endif::[]
ifndef::katello,satellite,orcharhino[]
# dnf install {postgresql-server-package}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[id="upgrading-the-external-database-operating-system"]
= Upgrading the external database operating system

If your {Project} uses an external database, you can upgrade the database from {EL} 8 to {EL} 9 while upgrading {Project} from {ProjectVersionPrevious} to {ProjectVersion}.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that still true for Foreman/Katello nightly? I am asking because it does not run on EL8 anymore. Latest release is 3.12.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The external DB has more flexible requirements than Foreman since it just needs to be a running postgres server, so I think it's still okay that users would have EL8 machines running their DBs for some time. @ekohl can probably keep me honest here though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @ianballou has indicated, it sort of has its own lifecycle. Technically I think we should loosen the requirement to any PostgreSQL 13+ compatible server instead of some (RH)EL server running PostgreSQL.

Within the platform team we've had some discussions on the level of support for the external DB server. Now that it's just a plain PostgreSQL server we can consider not having any instructions on setting up the PostgreSQL server. For example, we don't document how you do backups, partition, etc. Where do we draw the line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see our external DB documentation being the recommendation that we can provide the best support for. Perhaps we should be strict with what the docs recommend but ensure users know that other solutions may be possible, just with limited support.


.Prerequisites
* Create a host running {EL} 9 for PostgreSQL server that follows the external database on {EL} 9 documentation.
ifdef::katello,orcharhino,satellite[]
For more information, see {InstallingServerDocURL}using-external-databases[Using external databases with {Project}].
endif::[]

.Procedure
. Create a backup of your existing external database.
. Restore the backup on the new {EL} 9 server.
. Verify that {Project} can reach the new database:
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# PGPASSWORD='_My_Foreman_Database_Password_' psql -h _postgres.example.com_ -p 5432 -U foreman -d foreman -c "SELECT 1 as ping"
----
. If your {ProjectServer} can reach the new database server by using the old name, no further changes are required.
Otherwise, reconfigure {Project} to use the new name:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# {foreman-installer} \
--foreman-db-host _newpostgres.example.com_ \
--katello-candlepin-db-host _newpostgres.example.com_ \
--foreman-proxy-content-pulpcore-postgresql-host _newpostgres.example.com_
----
25 changes: 11 additions & 14 deletions guides/common/modules/proc_upgrading-the-external-database.adoc
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
[id="Upgrading_the_External_Database_{context}"]
= Upgrading the external database

You can upgrade an external database from {EL} 8 to {EL} 9 while upgrading {Project} from {ProjectVersionPrevious} to {ProjectVersion}.
If your {ProjectServer} uses an external database, the database will be upgraded when running `{foreman-installer}` on your {ProjectServer}.

.Prerequisites
* Create a new {EL} 9 based host for PostgreSQL server that follows the external database on {EL} 9 documentation.
ifdef::katello,orcharhino,satellite[]
For more information, see {InstallingServerDocURL}using-external-databases_{project-context}[Using External Databases with {Project}].
endif::[]
* Install PostgreSQL version 13 on the new {EL} host.
* PostgreSQL version 13 is installed on your {EL} host.

.Procedure
. Create a backup.
. Restore the backup on the new server.
. If {Project} reaches the new database server via the old name, no further changes are required.
Otherwise reconfigure {Project} to use the new name:
. Update permissions to prepare the `postgresql-evr` extension for removal:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# {foreman-installer} \
--foreman-db-host _newpostgres.example.com_ \
--katello-candlepin-db-host _newpostgres.example.com_ \
--foreman-proxy-content-pulpcore-postgresql-host _newpostgres.example.com_
# runuser -l postgres -c \
"psql -d foreman -c \"UPDATE pg_extension SET extowner = (SELECT oid FROM pg_authid WHERE rolname='foreman') WHERE extname='evr';\""
----
ifdef::upgrading-connected[]
. Follow xref:upgrading_a_connected_{project-context}_server_{context}[].
endif::[]
ifdef::upgrading-disconnected[]
. Follow xref:upgrading_a_disconnected_{project-context}_server_{context}[].
endif::[]
6 changes: 5 additions & 1 deletion guides/doc-Release_Notes/topics/katello.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
[id="katello-headline-features"]
== Headline Features

There are no highlights with Katello {KatelloVersion}.
=== postgresql-evr extension no longer required

Installation of the Katello database on remote systems where root access is not available is now possible.
Only a basic PostgreSQL installation is required.
With this feature, you can now install on systems like Amazon RDS or Azure Database for PostgreSQL.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: since Pulp 3.22 uses the HStore extension (which is why you need postgresql-contrib). It's on both https://docs.aws.amazon.com/AmazonRDS/latest/PostgreSQLReleaseNotes/postgresql-extensions.html and https://learn.microsoft.com/en-us/azure/postgresql/extensions/concepts-extensions-versions#hstore so I'd expect it to indeed work.


[id="katello-upgrade-warnings"]
== Upgrade Warnings
Expand Down
1 change: 1 addition & 0 deletions guides/doc-Upgrading_Project/master.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ endif::[]
ifdef::foreman-el,katello,satellite,orcharhino[]
// Upgrading the External database
include::common/modules/proc_upgrading-the-external-database.adoc[leveloffset=+2]
include::common/modules/proc_upgrading-the-external-database-operating-system.adoc[leveloffset=+2]
endif::[]

[appendix]
Expand Down
1 change: 1 addition & 0 deletions guides/doc-Upgrading_Project_Disconnected/master.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ include::common/modules/proc_upgrading-smartproxy-server.adoc[leveloffset=+2]
ifdef::foreman-el,katello,satellite,orcharhino[]
// Upgrading the External database
include::common/modules/proc_upgrading-the-external-database.adoc[leveloffset=+2]
include::common/modules/proc_upgrading-the-external-database-operating-system.adoc[leveloffset=+2]
endif::[]

[appendix]
Expand Down