From 841ca5bf194ad0b969ce06dc3cb9107df545cf1e Mon Sep 17 00:00:00 2001 From: Ian Ballou Date: Thu, 25 Jul 2024 16:08:26 -0400 Subject: [PATCH 1/5] Remove references to postgresql-evr --- guides/common/modules/proc_installing-postgresql.adoc | 4 ++-- guides/doc-Release_Notes/topics/katello.adoc | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/guides/common/modules/proc_installing-postgresql.adoc b/guides/common/modules/proc_installing-postgresql.adoc index de42c9cd0c7..f9efc501a63 100644 --- a/guides/common/modules/proc_installing-postgresql.adoc +++ b/guides/common/modules/proc_installing-postgresql.adoc @@ -2,7 +2,7 @@ = 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[] @@ -13,7 +13,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/doc-Release_Notes/topics/katello.adoc b/guides/doc-Release_Notes/topics/katello.adoc index 25ac8c29ab9..f440c5a91a8 100644 --- a/guides/doc-Release_Notes/topics/katello.adoc +++ b/guides/doc-Release_Notes/topics/katello.adoc @@ -4,7 +4,8 @@ [id="katello-headline-features"] == Headline Features -There are no highlights with Katello {KatelloVersion}. +Remote installation of the Katello database on systems where root access is not available is now possible. +The contents of postgresql-evr have been moved into Katello itself as a migration, which enables this new capability. [id="katello-upgrade-warnings"] == Upgrade Warnings From e8654e86c6cd56ecbc6cca9b24f8c8c5b16b8ae1 Mon Sep 17 00:00:00 2001 From: Ian Ballou Date: Wed, 31 Jul 2024 11:44:20 -0400 Subject: [PATCH 2/5] Remove references to Foreman repositories for external DBs --- .../proc_preparing-a-host-for-external-databases.adoc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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 index 572f1541eab..173d49b4c73 100644 --- a/guides/common/modules/proc_preparing-a-host-for-external-databases.adoc +++ b/guides/common/modules/proc_preparing-a-host-for-external-databases.adoc @@ -32,21 +32,14 @@ ifdef::satellite[] [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 +. Ensure that the {EL} 9 BaseOS and Appstream repositories are enabled. + -[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[] From a09f1f84d75d4a09a0e2b93cffafdbb8339b73bb Mon Sep 17 00:00:00 2001 From: Ian Ballou Date: Mon, 5 Aug 2024 14:05:13 -0400 Subject: [PATCH 3/5] Add release note for new remote DB possibilities --- guides/doc-Release_Notes/topics/katello.adoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/guides/doc-Release_Notes/topics/katello.adoc b/guides/doc-Release_Notes/topics/katello.adoc index f440c5a91a8..1e7324573de 100644 --- a/guides/doc-Release_Notes/topics/katello.adoc +++ b/guides/doc-Release_Notes/topics/katello.adoc @@ -4,7 +4,10 @@ [id="katello-headline-features"] == Headline Features -Remote installation of the Katello database on systems where root access is not available is now possible. +=== 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, which should enable installs on systems like Amazon RDS or Azure Database for PostgreSQL. The contents of postgresql-evr have been moved into Katello itself as a migration, which enables this new capability. [id="katello-upgrade-warnings"] From 4c7a0e53b8065131067a9d731a846e21092b0a02 Mon Sep 17 00:00:00 2001 From: Ian Ballou Date: Mon, 5 Aug 2024 13:58:02 -0400 Subject: [PATCH 4/5] Remove excess parts of external DB host setup --- ...roc_preparing-a-host-for-external-databases.adoc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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 index 173d49b4c73..ab6e3682281 100644 --- a/guides/common/modules/proc_preparing-a-host-for-external-databases.adoc +++ b/guides/common/modules/proc_preparing-a-host-for-external-databases.adoc @@ -10,17 +10,18 @@ endif::[] .Prerequisites * The prepared host must meet {Project}'s {InstallingServerDocURL}storage-requirements_{project-context}[Storage Requirements]. +ifndef::satellite[] +* Ensure the host has base operating system repositories enabled. +endif::[] 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::[] +ifdef::satellite[] .Procedure ifndef::orcharhino[] -:distribution-major-version: 9 - -ifdef::satellite[] . Disable all repositories: + [options="nowrap"] @@ -35,12 +36,6 @@ ifdef::satellite[] --enable={RepoRHEL9BaseOS} \ --enable={RepoRHEL9AppStream} ---- -endif::[] - -ifdef::katello[] -. Ensure that the {EL} 9 BaseOS and Appstream repositories are enabled. -+ -endif::[] include::snip_verification-enabled-repolist.adoc[] endif::[] From ef0b16085c99be153b2f7077baec1ef109fb9a01 Mon Sep 17 00:00:00 2001 From: Ian Ballou Date: Wed, 7 Aug 2024 15:41:15 -0400 Subject: [PATCH 5/5] Remove prepping a host for ext DBs guide + introduce evr permissions command --- ...ernal-databases-to-external-databases.adoc | 2 - .../assembly_using-external-databases.adoc | 2 - ...ernal-databases-to-external-databases.adoc | 2 - .../modules/proc_installing-postgresql.adoc | 4 ++ ...eparing-a-host-for-external-databases.adoc | 44 ------------------- ...he-external-database-operating-system.adoc | 29 ++++++++++++ .../proc_upgrading-the-external-database.adoc | 25 +++++------ guides/doc-Release_Notes/topics/katello.adoc | 4 +- guides/doc-Upgrading_Project/master.adoc | 1 + .../master.adoc | 1 + 10 files changed, 48 insertions(+), 66 deletions(-) delete mode 100644 guides/common/modules/proc_preparing-a-host-for-external-databases.adoc create mode 100644 guides/common/modules/proc_upgrading-the-external-database-operating-system.adoc 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 f9efc501a63..d3f40f84c19 100644 --- a/guides/common/modules/proc_installing-postgresql.adoc +++ b/guides/common/modules/proc_installing-postgresql.adoc @@ -6,6 +6,10 @@ You can install only the same version of PostgreSQL that is installed with the ` 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: 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 ab6e3682281..00000000000 --- a/guides/common/modules/proc_preparing-a-host-for-external-databases.adoc +++ /dev/null @@ -1,44 +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]. -ifndef::satellite[] -* Ensure the host has base operating system repositories enabled. -endif::[] -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::[] - -ifdef::satellite[] -.Procedure -ifndef::orcharhino[] - -. Disable all repositories: -+ -[options="nowrap"] ----- -# subscription-manager repos --disable "*" ----- -. Enable the following repositories: -+ -[options="nowrap" subs="+quotes,attributes"] ----- -# subscription-manager repos \ ---enable={RepoRHEL9BaseOS} \ ---enable={RepoRHEL9AppStream} ----- - -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 1e7324573de..d0dbebc8e76 100644 --- a/guides/doc-Release_Notes/topics/katello.adoc +++ b/guides/doc-Release_Notes/topics/katello.adoc @@ -7,8 +7,8 @@ === 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, which should enable installs on systems like Amazon RDS or Azure Database for PostgreSQL. -The contents of postgresql-evr have been moved into Katello itself as a migration, which enables this new capability. +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]