diff --git a/guides/common/assembly_migrating-from-internal-databases-to-external-databases.adoc b/guides/common/assembly_migrating-from-internal-databases-to-external-databases.adoc index 172c3cd88ad..d1e73a301e4 100644 --- a/guides/common/assembly_migrating-from-internal-databases-to-external-databases.adoc +++ b/guides/common/assembly_migrating-from-internal-databases-to-external-databases.adoc @@ -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] diff --git a/guides/common/assembly_using-external-databases.adoc b/guides/common/assembly_using-external-databases.adoc index 050843bc208..b2f7e51e81c 100644 --- a/guides/common/assembly_using-external-databases.adoc +++ b/guides/common/assembly_using-external-databases.adoc @@ -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] diff --git a/guides/common/modules/con_migrating-from-internal-databases-to-external-databases.adoc b/guides/common/modules/con_migrating-from-internal-databases-to-external-databases.adoc index 570ece31b1f..cc8e35724e0 100644 --- a/guides/common/modules/con_migrating-from-internal-databases-to-external-databases.adoc +++ b/guides/common/modules/con_migrating-from-internal-databases-to-external-databases.adoc @@ -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}[]. diff --git a/guides/common/modules/proc_installing-postgresql.adoc b/guides/common/modules/proc_installing-postgresql.adoc index de42c9cd0c7..d3f40f84c19 100644 --- a/guides/common/modules/proc_installing-postgresql.adoc +++ b/guides/common/modules/proc_installing-postgresql.adoc @@ -2,10 +2,14 @@ = 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: @@ -13,7 +17,7 @@ include::snip_firewalld.adoc[] [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} diff --git a/guides/common/modules/proc_preparing-a-host-for-external-databases.adoc b/guides/common/modules/proc_preparing-a-host-for-external-databases.adoc deleted file mode 100644 index 572f1541eab..00000000000 --- a/guides/common/modules/proc_preparing-a-host-for-external-databases.adoc +++ /dev/null @@ -1,56 +0,0 @@ -[id="preparing-a-host-for-external-databases_{context}"] -= Preparing a host for external databases - -Install a freshly provisioned system with the latest {EL} 9 to host the external databases. - -ifdef::satellite[] -Subscriptions for {RHEL} do not provide the correct service level agreement for using {Project} with external databases. -You must also attach a {Project} subscription to the base operating system that you want to use for the external databases. -endif::[] - -.Prerequisites -* The prepared host must meet {Project}'s {InstallingServerDocURL}storage-requirements_{project-context}[Storage Requirements]. -ifdef::satellite[] -* You must attach a {Project} subscription to your server. -For more information about subscription, see {InstallingServerDocURL}attaching-infrastructure-subscription_{project-context}[Attaching the {Project} Infrastructure Subscription] in _{InstallingServerDocTitle}_. -endif::[] - -.Procedure -ifndef::orcharhino[] - -:distribution-major-version: 9 - -ifdef::satellite[] -. Disable all repositories: -+ -[options="nowrap"] ----- -# subscription-manager repos --disable "*" ----- -. Enable the following repositories: -+ -[options="nowrap" subs="+quotes,attributes"] ----- -# subscription-manager repos \ ---enable={RepoRHEL9ServerSatelliteServerProjectVersion} \ ---enable={RepoRHEL9ServerSatelliteMaintenanceProjectVersion} \ ---enable={RepoRHEL9BaseOS} \ ---enable={RepoRHEL9AppStream} ----- -endif::[] - -ifdef::katello[] -. Install the `katello-repos-latest.rpm` package -+ -[options="nowrap" subs="+quotes,attributes"] ----- -# {client-package-install-el8} https://yum.theforeman.org/releases/{ProjectVersion}/el{distribution-major-version}/x86_64/foreman-release.rpm \ -https://yum.theforeman.org/katello/{KatelloVersion}/katello/el{distribution-major-version}/x86_64/katello-repos-latest.rpm ----- -endif::[] - -include::snip_verification-enabled-repolist.adoc[] -endif::[] -ifdef::orcharhino[] -Ensure the prepared host has the same content available as your {ProjectServer}. -endif::[] diff --git a/guides/common/modules/proc_upgrading-the-external-database-operating-system.adoc b/guides/common/modules/proc_upgrading-the-external-database-operating-system.adoc new file mode 100644 index 00000000000..091886ed170 --- /dev/null +++ b/guides/common/modules/proc_upgrading-the-external-database-operating-system.adoc @@ -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}. + +.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_ +---- diff --git a/guides/common/modules/proc_upgrading-the-external-database.adoc b/guides/common/modules/proc_upgrading-the-external-database.adoc index a4ba8880aba..4a49dab6e47 100644 --- a/guides/common/modules/proc_upgrading-the-external-database.adoc +++ b/guides/common/modules/proc_upgrading-the-external-database.adoc @@ -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::[] diff --git a/guides/doc-Release_Notes/topics/katello.adoc b/guides/doc-Release_Notes/topics/katello.adoc index 25ac8c29ab9..d0dbebc8e76 100644 --- a/guides/doc-Release_Notes/topics/katello.adoc +++ b/guides/doc-Release_Notes/topics/katello.adoc @@ -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. [id="katello-upgrade-warnings"] == Upgrade Warnings diff --git a/guides/doc-Upgrading_Project/master.adoc b/guides/doc-Upgrading_Project/master.adoc index 2421993b24f..bdf04faf8f8 100644 --- a/guides/doc-Upgrading_Project/master.adoc +++ b/guides/doc-Upgrading_Project/master.adoc @@ -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] diff --git a/guides/doc-Upgrading_Project_Disconnected/master.adoc b/guides/doc-Upgrading_Project_Disconnected/master.adoc index 3e5d03dac63..144ac47a469 100644 --- a/guides/doc-Upgrading_Project_Disconnected/master.adoc +++ b/guides/doc-Upgrading_Project_Disconnected/master.adoc @@ -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]