Skip to content

Commit 50080bf

Browse files
Improve proxy upgrade procedure (theforeman#3885)
* Simplify syncing new repos and proxy upgrade * Include proxy upgrade procedure for Debian * Replace REX proxy upgrade procedure with a reference to the job template * Drop step to clean metadata * Drop step to verify that settings.yml points to FQDN * Minor edits --------- Co-authored-by: Maximilian Kolb <mail@maximilian-kolb.de>
1 parent 23e157c commit 50080bf

File tree

5 files changed

+146
-153
lines changed

5 files changed

+146
-153
lines changed

guides/common/modules/proc_synchronizing-the-new-repositories.adoc

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,28 @@ You must enable and synchronize the new {ProjectVersion} repositories before you
66
.Procedure
77

88
. In the {ProjectWebUI}, navigate to *Content* > *Red{nbsp}Hat Repositories*.
9-
. Toggle the *Recommended Repositories* switch to the *On* position.
10-
. From the list of results, expand the following repositories and click the *Enable* icon to enable the repositories:
11-
+
12-
* To upgrade {Project} clients, enable the *{project-client-name}* repositories for all {RHEL} versions that clients use.
13-
+
14-
* If you have {SmartProxyServers}, to upgrade them, enable the following repositories too:
15-
+
16-
*{ProjectName} {SmartProxy} {ProjectVersion} (for RHEL 9 x86_64) (RPMs)*
17-
+
18-
*{ProjectName} Maintenance {ProjectVersion} (for RHEL 9 x86_64) (RPMs)*
19-
+
20-
*{EL} 9 (for x86_64 {endash} BaseOS) (RPMs)*
21-
+
22-
*{EL} 9 (for x86_64 {endash} AppStream) (RPMs)*
23-
24-
+
25-
[NOTE]
26-
====
27-
If the {ProjectVersion} repositories are not available, refresh the Red{nbsp}Hat Subscription Manifest.
28-
In the {ProjectWebUI}, navigate to *Content* > *Subscriptions*, click *Manage Manifest*, then click *Refresh*.
29-
====
30-
+
9+
. Enable the following repositories:
10+
* Repositories required to upgrade {SmartProxyServers}:
11+
** *{ProjectName} {SmartProxy} {ProjectVersion} (for RHEL 9 x86_64) (RPMs)*
12+
** *{ProjectName} Maintenance {ProjectVersion} (for RHEL 9 x86_64) (RPMs)*
13+
** *{RHEL} 9 (for x86_64 {endash} BaseOS) (RPMs)*
14+
** *{RHEL} 9 (for x86_64 {endash} AppStream) (RPMs)*
15+
* Repositories required to upgrade {Project} clients:
16+
** *{project-client-name}* for each {RHEL} version your clients are using
3117
. In the {ProjectWebUI}, navigate to *Content* > *Sync Status*.
32-
. Click the arrow next to the product to view the available repositories.
33-
. Select the repositories for {ProjectVersion}.
34-
Note that *{project-client-name}* does not have a {ProjectVersion} version.
35-
Choose *{project-client-name}* instead.
36-
. Click *Synchronize Now*.
18+
. Synchronize the following repositories:
19+
** All repositories for version {ProjectVersion}
20+
** *{project-client-name}* repositories for each {RHEL} version your clients are using
21+
22+
.Troubleshooting
23+
* If you do not see the {ProjectVersion} repositories in the list of repositories or if an error occurs when synchronizing a repository, refresh the Red{nbsp}Hat subscription manifest.
24+
In the {ProjectWebUI}, navigate to *Content* > *Subscriptions* > *Manage Manifest* > *Refresh*.
3725
+
38-
[IMPORTANT]
26+
[WARNING]
3927
====
40-
If an error occurs when you try to synchronize a repository, refresh the manifest.
41-
If the problem persists, raise a support request.
42-
Do not delete the manifest from the Customer Portal or in the {ProjectWebUI}; this removes all the entitlements of your content hosts.
28+
Do not delete the manifest from the Customer Portal or in the {ProjectWebUI}.
29+
Deleting your manifest removes all the entitlements of your hosts.
4330
====
44-
+
45-
. If you use content views to control updates to the base operating system of {SmartProxyServer}, update those content views with new repositories, publish, and promote their updated versions.
46-
For more information, see {ContentManagementDocURL}Managing_Content_Views_content-management[Managing content views] in _{ContentManagementDocTitle}_.
31+
32+
.Additional resources
33+
* For more information on synchronizing repositories, see {ContentManagementDocURL}[Importing content] in _{ContentManagementDocTitle}_.
Lines changed: 35 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,133 +1,52 @@
11
[id="upgrading_{smart-proxy-context}_server_{context}"]
22
= Upgrading {SmartProxyServers}
33

4-
ifdef::katello,orcharhino,satellite[]
4+
ifdef::satellite[]
55
After you have upgraded your {ProjectServer} and synchronized the required repositories, you can start upgrading your {SmartProxyServers}.
66
endif::[]
7-
ifndef::katello,orcharhino,satellite[]
7+
ifndef::satellite[]
88
After you have upgraded your {ProjectServer}, you can start upgrading your {SmartProxyServers}.
99
endif::[]
1010

11-
.Prerequisites
12-
ifdef::katello,orcharhino,satellite[]
13-
* If you use content views to control updates to the {SmartProxyServer} base operating system or repository, update those content views with new repositories, then publish and promote their updated versions.
14-
For more information, see {ContentManagementDocURL}Managing_Content_Views_content-management[Managing content views] in _{ContentManagementDocTitle}_.
15-
* Ensure the base system of the {SmartProxy} is registered to the newly upgraded {ProjectServer}.
16-
endif::[]
17-
* If you implemented custom certificates, you must retain the content of both the `/root/ssl-build` directory and the directory in which you created any source files associated with your custom certificates.
18-
ifdef::katello,orcharhino,satellite[]
19-
+
20-
[WARNING]
11+
ifndef::foreman-deb[]
12+
[NOTE]
2113
====
22-
Failure to retain these files during an upgrade causes the upgrade to fail.
23-
If these files have been deleted, they must be restored from a backup in order for the upgrade to proceed.
14+
You can use the *{SmartProxy} Upgrade Playbook* job template to upgrade {SmartProxyServer}s remotely.
15+
For more information about running remote jobs based on templates, see {ManagingHostsDocURL}Configuring_and_Setting_Up_Remote_Jobs_managing-hosts[Configuring and setting up remote jobs] in _{ManagingHostsDocTitle}_.
2416
====
2517
endif::[]
2618

27-
.Upgrading {SmartProxyServers}
28-
. Create a backup.
29-
+
30-
* On a virtual machine, take a snapshot.
31-
* On a physical machine, create a backup.
32-
+
33-
For information on backups, see {AdministeringDocURL}backing-up-{project-context}-server-and-{smart-proxy-context}_admin[Backing Up {ProjectServer} and {SmartProxyServer}] in _{AdministeringDocTitle}_.
34-
35-
ifdef::foreman-el,katello[]
36-
. Update repositories:
37-
+
38-
[options="nowrap" subs="attributes"]
39-
----
40-
ifdef::katello[]
41-
# {project-package-update} https://yum.theforeman.org/releases/{ProjectVersion}/el9/x86_64/foreman-release.rpm \
42-
https://yum.theforeman.org/katello/{KatelloVersion}/katello/el9/x86_64/katello-repos-latest.rpm
19+
.Prerequisites
20+
* The base system of the {SmartProxy} is registered to the newly upgraded {ProjectServer}.
21+
ifdef::katello,orcharhino[]
22+
* If you use content views to control updates to the base operating system of {SmartProxyServer}, ensure these content views are up-to-date with the new repositories.
4323
endif::[]
44-
ifdef::foreman-el[]
45-
# {project-package-update} https://yum.theforeman.org/releases/{ProjectVersion}/el9/x86_64/foreman-release.rpm
24+
ifdef::satellite[]
25+
* If you use content views to control updates to the base operating system of {SmartProxyServer}, ensure these content views are up-to-date with the new repositories synchronized in xref:synchronizing_the_new_repositories_{context}[].
4626
endif::[]
47-
----
48-
. Stop {SmartProxy} services:
49-
+
50-
[options="nowrap" subs="attributes"]
51-
----
52-
# {foreman-maintain} service stop
53-
----
54-
. Update the required packages:
55-
+
56-
[options="nowrap" subs="attributes"]
57-
----
58-
# {project-package-update}
59-
----
60-
. Run the installer:
61-
+
62-
[options="nowrap" subs="attributes"]
63-
----
64-
# {foreman-installer}
65-
----
27+
ifdef::katello,orcharhino,satellite[]
28+
This involves updating the content views and publishing and promoting the updated versions of the content views.
29+
For more information, see {ContentManagementDocURL}Managing_Content_Views_content-management[Managing content views] in _{ContentManagementDocTitle}_.
6630
endif::[]
67-
ifdef::satellite[]
68-
. Clean yum cache:
69-
+
70-
----
71-
# yum clean metadata
72-
----
73-
. Synchronize the `{RepoRHEL9ServerSatelliteCapsuleProjectVersion}` repository in the {ProjectServer}.
74-
. Publish and promote a new version of the content view with which the {SmartProxy} is registered.
75-
. Optional: Because of the lengthy upgrade time, use a utility such as `tmux` to suspend and reattach a communication session.
76-
You can then check the upgrade progress without staying connected to the command shell continuously.
77-
+
78-
If you lose connection to the command shell where the upgrade command is running, you can see the logged messages in the `{installer-smartproxy-log-file}` file to check if the process completed successfully.
79-
. The `rubygem-foreman_maintain` is installed from the {Project} Maintenance repository or upgraded from the {Project} Maintenance repository if currently installed.
80-
+
81-
Ensure that the {Project} Maintenance repository is enabled:
82-
+
83-
[options="nowrap" subs="attributes"]
84-
----
85-
# subscription-manager repos --enable \
86-
{RepoRHEL9ServerSatelliteMaintenanceProjectVersion}
87-
----
88-
+
89-
Ensure {SmartProxy} has access to `{RepoRHEL9ServerSatelliteMaintenanceProjectVersion}` and execute:
90-
+
91-
[options="nowrap" subs="attributes"]
92-
----
93-
# {foreman-maintain} self-upgrade
94-
----
9531

96-
. On {SmartProxyServer}, verify that the `foreman_url` setting points to the {Project} FQDN:
97-
+
98-
----
99-
# grep foreman_url /etc/foreman-proxy/settings.yml
100-
----
101-
. Use the health check option to determine if the system is ready for upgrade:
102-
+
103-
[options="nowrap" subs="attributes"]
104-
----
105-
# {foreman-maintain} upgrade check
106-
----
107-
+
108-
Review the results and address any highlighted error conditions before performing the upgrade.
109-
. Perform the upgrade:
110-
+
111-
[options="nowrap" subs="attributes"]
112-
----
113-
# {foreman-maintain} upgrade run
114-
----
115-
+
32+
.Procedure
33+
ifdef::foreman-deb[]
34+
[tabs]
35+
=====
36+
Debian 12 (Bookworm)::
37+
+
38+
--
39+
:distribution-codename: bookworm
40+
include::snip_upgrading-smartproxy-server.adoc[]
41+
--
42+
Ubuntu 22.04 (Jammy)::
43+
+
44+
--
45+
:distribution-codename: jammy
46+
include::snip_upgrading-smartproxy-server.adoc[]
47+
--
48+
=====
49+
endif::[]
50+
ifndef::foreman-deb[]
51+
include::snip_upgrading-smartproxy-server.adoc[]
11652
endif::[]
117-
include::snip_steps-needs-reboot.adoc[]
118-
. Optional: If you made manual edits to DNS or DHCP configuration files, check and restore any changes required to the DNS and DHCP configuration files using the backups made earlier.
119-
120-
.Upgrading {SmartProxyServers} using remote execution
121-
. Create a backup or take a snapshot.
122-
+
123-
For more information on backups, see {AdministeringDocURL}backing-up-satellite-server-and-capsule-server[Backing Up {ProjectServer} and {SmartProxyServer}] in _{AdministeringDocTitle}_.
124-
. In the {ProjectWebUI}, navigate to *Monitor* > *Jobs*.
125-
. Click *Run Job*.
126-
. From the *Job category* list, select *Maintenance Operations*.
127-
. From the *Job template* list, select *{SmartProxy} Upgrade Playbook*.
128-
. In the *Search Query* field, enter the host name of the {SmartProxy}.
129-
. Ensure that *Apply to 1 host* is displayed in the *Resolves to* field.
130-
. In the *target_version* field, enter the target version of the {SmartProxy}.
131-
. In the *whitelist_options* field, enter the options.
132-
. Select the schedule for the job execution in *Schedule*.
133-
. In the *Type of query* section, click *Static Query*.

guides/common/modules/snip_steps-needs-reboot.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ifndef::foreman-deb[]
1818
endif::[]
1919
endif::[]
2020
ifdef::satellite[]
21-
. If the {foreman-maintain} command told you to reboot, then reboot the system:
21+
. If the `{foreman-maintain}` command told you to reboot, then reboot the system:
2222
endif::[]
2323
+
2424
[options="nowrap"]
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
. Create a backup of your {SmartProxyServer}.
2+
* If your {SmartProxyServer} runs on a virtual machine:
3+
.. Stop all {Project} services:
4+
+
5+
[options="nowrap" subs="+quotes,verbatim,attributes"]
6+
----
7+
# {foreman-maintain} service stop
8+
----
9+
.. Take a snapshot.
10+
.. Start all {Project} services:
11+
+
12+
[options="nowrap" subs="+quotes,verbatim,attributes"]
13+
----
14+
# {foreman-maintain} service start
15+
----
16+
* If your {SmartProxyServer} runs on a physical machine, create a backup as described in {AdministeringDocURL}[Backing up {ProjectServer} and {SmartProxyServer}] in _{AdministeringDocTitle}_.
17+
ifdef::foreman-el,katello[]
18+
. Update repositories:
19+
+
20+
[options="nowrap" subs="attributes"]
21+
----
22+
ifdef::katello[]
23+
# {project-package-update} https://yum.theforeman.org/releases/{ProjectVersion}/el9/x86_64/foreman-release.rpm \
24+
https://yum.theforeman.org/katello/{KatelloVersion}/katello/el9/x86_64/katello-repos-latest.rpm
25+
endif::[]
26+
ifdef::foreman-el[]
27+
# {project-package-update} https://yum.theforeman.org/releases/{ProjectVersion}/el9/x86_64/foreman-release.rpm
28+
endif::[]
29+
----
30+
endif::[]
31+
ifdef::foreman-deb[]
32+
. Update repositories in `/etc/apt/sources.list.d/foreman.list` to consume content for {Project} {ProjectVersion}:
33+
+
34+
[options="nowrap" subs="+quotes,verbatim,attributes"]
35+
----
36+
deb http://deb.theforeman.org/ {distribution-codename} {ProjectVersion}
37+
deb http://deb.theforeman.org/ plugins {ProjectVersion}
38+
----
39+
endif::[]
40+
ifdef::foreman-deb,foreman-el,katello[]
41+
. Stop {Project} services:
42+
+
43+
[options="nowrap" subs="attributes"]
44+
----
45+
# {foreman-maintain} service stop
46+
----
47+
. Update the required packages:
48+
+
49+
[options="nowrap" subs="attributes"]
50+
----
51+
# {project-package-update}
52+
----
53+
. Run the {Project} installer:
54+
+
55+
[options="nowrap" subs="attributes"]
56+
----
57+
# {foreman-installer}
58+
----
59+
endif::[]
60+
ifdef::satellite[]
61+
. Upgrade the `{foreman-maintain}` utility on the {SmartProxyServer} to its latest version:
62+
+
63+
[options="nowrap" subs="attributes"]
64+
----
65+
# {foreman-maintain} self-upgrade
66+
----
67+
. Determine whether {SmartProxyServer} is ready for the upgrade:
68+
+
69+
[options="nowrap" subs="attributes"]
70+
----
71+
# {foreman-maintain} upgrade check
72+
----
73+
+
74+
Review the results and address any highlighted error conditions before performing the upgrade.
75+
. Run the {Project} upgrade command.
76+
Because of the lengthy upgrade time, consider using a utility such as `tmux`.
77+
ifdef::upgrading-connected[]
78+
For more information, see xref:following_the_progress_of_the_upgrade_upgrading-connected[].
79+
endif::[]
80+
ifdef::upgrading-disconnected[]
81+
For more information, see xref:following_the_progress_of_the_upgrade_upgrading-disconnected[].
82+
endif::[]
83+
+
84+
[options="nowrap" subs="attributes"]
85+
----
86+
# {foreman-maintain} upgrade run
87+
----
88+
endif::[]
89+
include::snip_steps-needs-reboot.adoc[]

guides/doc-Upgrading_Project/master.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ ifdef::satellite[]
3333
include::common/modules/proc_synchronizing-the-new-repositories.adoc[leveloffset=+2]
3434
endif::[]
3535

36-
ifdef::foreman-el,katello,satellite,orcharhino[]
3736
// Upgrading Smart Proxy Server
3837
include::common/modules/proc_upgrading-smartproxy-server.adoc[leveloffset=+2]
39-
endif::[]
4038

4139
ifdef::foreman-el,katello,satellite,orcharhino[]
4240
// Upgrading the External database

0 commit comments

Comments
 (0)